/* Subscription Details Container */
.subscription-details-container {
    padding: 20px;
    background-color: #f5f7fa;
    min-height: 100vh;
}

/* Header Section */
.subscription-details-header {
    margin-bottom: 30px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    color: #3b82f6;
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 10px;
    font-weight: 500;
    transition: color 0.2s;
}

.back-link:hover {
    color: #2563eb;
    text-decoration: none;
}

.back-link i {
    margin-right: 6px;
}

.page-title {
    font-size: 24px;
    font-weight: 600;
    color: #1e293b;
    margin: 10px 0 5px 0;
}

.page-subtitle {
    font-size: 14px;
    color: #64748b;
    margin: 0;
}

/* Loading and Error States */
.loading-container {
    text-align: center;
    padding: 60px 20px;
    color: #64748b;
}

.loading-container i {
    color: #3b82f6;
    margin-bottom: 15px;
}

.error-container {
    margin: 20px 0;
    padding: 15px;
    border-radius: 8px;
}

.error-container i {
    margin-right: 8px;
}

/* Summary Cards Grid */
.summary-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.summary-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: flex-start;
    gap: 15px;
    transition: box-shadow 0.2s;
}

.summary-card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.summary-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: #eff6ff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #3b82f6;
    font-size: 24px;
    flex-shrink: 0;
}

.summary-card-icon.camera {
    background: #fef3c7;
    color: #f59e0b;
}

.summary-card-icon.asset {
    background: #dbeafe;
    color: #3b82f6;
}

.summary-card-icon.fleet {
    background: #e0e7ff;
    color: #6366f1;
}

.summary-card-content {
    flex: 1;
}

.summary-card-label {
    font-size: 12px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
    font-weight: 600;
}

.summary-card-value {
    font-size: 32px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1;
    margin-bottom: 8px;
}

.summary-card-stats {
    font-size: 12px;
}

.stat-label {
    color: #64748b;
    margin-right: 4px;
}

.stat-value.standard {
    color: #3b82f6;
    font-weight: 600;
}

.stat-value.enterprise {
    color: #f59e0b;
    font-weight: 600;
}

.stat-separator {
    margin: 0 4px;
    color: #94a3b8;
}

/* Subscription Table Container */
.subscription-table-container {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.table-title {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 20px 0;
}

.table-responsive {
    overflow-x: auto;
    margin-bottom: 20px;
}

/* Subscription Table */
.subscription-table {
    width: 100%;
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
}

.subscription-table thead th {
    background-color: #f8fafc;
    color: #475569;
    font-weight: 600;
    font-size: 13px;
    padding: 12px 16px;
    text-align: center;
    border-bottom: 2px solid #e2e8f0;
    white-space: nowrap;
}

.subscription-table thead th.customer-name-col {
    text-align: left;
    position: sticky;
    left: 0;
    background-color: #f8fafc;
    z-index: 2;
}

.subscription-table .tracker-group-header {
    border-left: 1px solid #e2e8f0;
}

.subscription-table .camera-header {
    color: #f59e0b;
}

.subscription-table .asset-header {
    color: #3b82f6;
}

.subscription-table .fleet-header {
    color: #6366f1;
}

.subscription-table .sub-header th {
    font-size: 11px;
    padding: 8px 12px;
    background-color: #f1f5f9;
    color: #64748b;
    font-weight: 500;
}

.subscription-table .type-col {
    min-width: 100px;
}

.subscription-table .total-col {
    background-color: #f8fafc;
    font-weight: 600;
}

/* Table Body */
.subscription-table tbody tr {
    border-bottom: 1px solid #e2e8f0;
    transition: background-color 0.15s;
}

.subscription-table tbody tr:hover {
    background-color: #f8fafc;
}

.subscription-table tbody td {
    padding: 16px;
    text-align: center;
    vertical-align: middle;
}

.customer-name {
    text-align: left !important;
    font-weight: 500;
    color: #1e293b;
    font-size: 14px;
    position: sticky;
    left: 0;
    background-color: white;
    z-index: 1;
}

.subscription-table tbody tr:hover .customer-name {
    background-color: #f8fafc;
}

.data-cell {
    font-size: 13px;
    padding: 12px !important;
}

.cell-count {
    font-weight: 600;
    color: #1e293b;
    font-size: 14px;
    margin-bottom: 4px;
}

.cell-data-usage {
    font-size: 11px;
    color: #64748b;
}

.standard-cell {
    background-color: #eff6ff;
}

.enterprise-cell {
    background-color: #fef3c7;
}

.total-cell {
    background-color: #f1f5f9;
    font-weight: 700;
    color: #1e293b;
    font-size: 15px;
}

/* Table Footer - Totals Row */
.subscription-table tfoot {
    border-top: 3px solid #cbd5e1;
}

.subscription-table tfoot tr {
    background-color: #f8fafc;
}

.subscription-table tfoot td {
    padding: 16px;
    font-weight: 700;
    text-align: center;
    color: #1e293b;
    font-size: 14px;
}

.totals-label {
    text-align: left !important;
    position: sticky;
    left: 0;
    background-color: #f8fafc;
    z-index: 1;
    letter-spacing: 0.5px;
}

.standard-total {
    background-color: #dbeafe;
}

.enterprise-total {
    background-color: #fde68a;
}

.totals-grand {
    background-color: #e0e7ff;
    color: #4f46e5;
}

/* Pagination Bar */
.subscription-table-container pagination-bar {
    display: block;
    margin-top: 20px;
    margin-bottom: 20px;
}

/* Data Usage Legend */
.data-usage-legend {
    padding: 16px;
    background-color: #fef9c3;
    border-radius: 8px;
    font-size: 13px;
    color: #854d0e;
    border: 1px solid #fde047;
}

.data-usage-legend strong {
    margin-right: 6px;
}

.legend-text {
    color: #713f12;
}

.legend-highlight {
    font-weight: 600;
    color: #854d0e;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .summary-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .subscription-details-container {
        padding: 15px;
    }

    .summary-cards-grid {
        grid-template-columns: 1fr;
    }

    .page-title {
        font-size: 20px;
    }

    .summary-card-value {
        font-size: 28px;
    }

    .subscription-table {
        font-size: 12px;
    }

    .subscription-table thead th,
    .subscription-table tbody td,
    .subscription-table tfoot td {
        padding: 8px;
    }
}

@media (max-width: 576px) {
    .subscription-table thead th,
    .subscription-table tbody td,
    .subscription-table tfoot td {
        padding: 6px;
        font-size: 11px;
    }

    .cell-count {
        font-size: 12px;
    }

    .cell-data-usage {
        font-size: 10px;
    }
}
