/* modules/subscription-dashboard/styles/dashboard.css */
/* Uses theme variables from themes.css */

/* Dashboard specific layout */
.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Sections */
.dashboard-container section {
    background-color: var(--surface-primary);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-primary);
}

.dashboard-container h2 {
    font-size: 1.5rem;
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    border: 1px solid var(--border-secondary);
    padding: 1rem;
    border-radius: var(--radius-md);
    background-color: var(--surface-secondary);
}

.stat-card h3 {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0 0 0.5rem 0;
    font-weight: 500;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
}

.stat-detail {
    font-size: 0.875rem;
    color: var(--text-tertiary);
    margin: 0.25rem 0 0 0;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 8px;
    background-color: var(--bg-tertiary);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin: 0.5rem 0;
}

.progress-fill {
    height: 100%;
    background-color: var(--accent-primary);
    width: 0%;
    transition: width 0.3s ease;
}

/* Module Badges */
.module-badge {
    display: inline-block;
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Status Colors */
.status-active {
    color: var(--success-text);
}
.status-trial {
    color: var(--accent-primary);
}
.status-past_due {
    color: var(--error-text);
}
.status-expired {
    color: var(--error-text);
}
.status-cancelled {
    color: var(--text-tertiary);
}

/* Section Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-header h2 {
    margin-bottom: 0;
}

/* Employees Summary */
.employees-summary {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.summary-item {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.summary-item .summary-label {
    color: var(--text-secondary);
}

.summary-item .summary-value {
    font-weight: 600;
    color: var(--text-primary);
}

/* Billing Table */
.billing-table {
    width: 100%;
    border-collapse: collapse;
}

.billing-table th,
.billing-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-primary);
}

.billing-table th {
    background-color: var(--surface-secondary);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.billing-table td {
    color: var(--text-primary);
}

.billing-table tbody tr:hover {
    background-color: var(--surface-hover);
}

.status-paid {
    color: var(--success-text);
    background-color: var(--success-bg);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 500;
}

.status-pending {
    color: var(--warning-text);
    background-color: var(--warning-bg);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 500;
}

.status-failed {
    color: var(--error-text);
    background-color: var(--error-bg);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 500;
}

/* Error Container */
.error-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
    color: var(--text-secondary);
}

.error-container .material-icons {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: var(--text-tertiary);
}

.error-container p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

/* Modal Form Enhancements */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.text-muted {
    color: var(--text-tertiary);
}

.text-sm {
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard-container {
        padding: 1rem;
    }

    .employees-summary {
        flex-direction: column;
        gap: 1rem;
    }

    .billing-table {
        font-size: 0.875rem;
    }

    .billing-table th,
    .billing-table td {
        padding: 0.5rem;
    }
}
