/* ========== Dashboard Layout ========== */
.dashboard-body {
    background: var(--bg);
}

/* ========== Login ========== */
.login-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 24px;
}

.login-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 48px 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-lg);
}

.login-card h2 {
    font-size: 1.6rem;
    margin-bottom: 8px;
}

.login-card > p {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 28px;
}

/* ========== Dashboard Main ========== */
.dashboard {
    padding: 100px 0 60px;
    min-height: 100vh;
}

.dash-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 32px;
}

.dash-title {
    font-size: 1.8rem;
}

.dash-subtitle {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-top: 4px;
}

/* ========== Summary Cards ========== */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.summary-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.summary-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-light);
}

.summary-value {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--primary);
}

.summary-paid {
    color: #2d8a4e;
}

.summary-outstanding {
    color: #c4430a;
}

/* ========== Invoices ========== */
.invoices-section {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.invoices-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 28px;
    border-bottom: 1px solid var(--border);
}

.invoices-header h2 {
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
}

.filter-group {
    display: flex;
    gap: 4px;
    background: var(--section-alt);
    padding: 4px;
    border-radius: 8px;
}

.filter-btn {
    padding: 8px 16px;
    border: none;
    background: none;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-light);
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn.active {
    background: var(--white);
    color: var(--text);
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.invoices-table-wrap {
    overflow-x: auto;
}

.invoices-table {
    width: 100%;
    border-collapse: collapse;
}

.invoices-table th {
    text-align: left;
    padding: 14px 28px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-light);
    background: var(--section-alt);
    border-bottom: 1px solid var(--border);
}

.invoices-table td {
    padding: 18px 28px;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.invoices-table tr:last-child td {
    border-bottom: none;
}

.invoices-table tr:hover td {
    background: rgba(201, 169, 110, 0.03);
}

.invoice-id {
    font-weight: 600;
    color: var(--primary);
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.status-paid {
    background: #e8f5ed;
    color: #2d8a4e;
}

.status-paid::before {
    background: #2d8a4e;
}

.status-outstanding {
    background: #fef0e8;
    color: #c4430a;
}

.status-outstanding::before {
    background: #c4430a;
}

.status-overdue {
    background: #fde8e8;
    color: #b91c1c;
}

.status-overdue::before {
    background: #b91c1c;
}

/* Pay Button */
.btn-pay {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn-pay:hover {
    background: #2a2a4e;
    transform: translateY(-1px);
}

.btn-pay.disabled {
    background: var(--section-alt);
    color: var(--text-light);
    cursor: default;
    pointer-events: none;
}

.btn-receipt {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    background: transparent;
    color: var(--text-light);
    border: 1.5px solid var(--border);
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn-receipt:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.empty-state {
    padding: 60px 28px;
    text-align: center;
    color: var(--text-light);
}

/* ========== Mobile Dashboard ========== */
@media (max-width: 768px) {
    .summary-grid {
        grid-template-columns: 1fr;
    }

    .invoices-header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }

    .invoices-table th,
    .invoices-table td {
        padding: 12px 16px;
    }

    .login-card {
        padding: 32px 24px;
    }

    .dash-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
}
