:root {
    --kmbi-green: #46ac7d;
    --kmbi-green-dark: #2f8f65;
    --kmbi-green-soft: #eaf7f0;
    --kmbi-navy: #193952;
    --kmbi-navy-soft: #31506a;
    --kmbi-ink: #1f2a37;
    --kmbi-muted: #6e7f8d;
    --kmbi-line: rgba(25, 57, 82, 0.10);
    --surface: rgba(255, 255, 255, 0.82);
    --surface-strong: rgba(255, 255, 255, 0.94);
    --danger: #cf4242;
    --radius-xl: 32px;
    --radius-lg: 24px;
    --radius-md: 18px;
    --radius-sm: 14px;
    --shadow-soft: 0 18px 48px rgba(25, 57, 82, 0.10);
    --shadow-strong: 0 24px 70px rgba(25, 57, 82, 0.16);
}

/* Reset */
* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    font-family: "Inter", sans-serif;
    color: var(--kmbi-ink);
    background: radial-gradient(circle at top left, rgba(70, 172, 125, 0.18), transparent 28%), radial-gradient(circle at top right, rgba(25, 57, 82, 0.10), transparent 24%), linear-gradient(180deg, #f6fbf8 0%, #eef5f4 46%, #f8ffff 100%);
}

body {
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    display: block;
    max-width: 100%;
}

/* Layout */
.auth-body {
    min-height: 100vh;
}

.auth-shell {
    min-height: 100vh;
    padding: 20px 16px 32px;
}

.auth-main {
    display: flex;
    justify-content: center;
}

/* Topbar */
.auth-topbar {
    max-width: 1120px;
    margin: 0 auto 20px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.68);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-radius: 24px;
    box-shadow: var(--shadow-soft);
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.auth-brand-mark {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    background: rgba(255,255,255,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 22px rgba(25,57,82,0.08);
    flex-shrink: 0;
}

.auth-brand-logo {
    width: 34px;
    height: 34px;
    object-fit: contain;
}

.auth-brand-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.auth-brand-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 800;
    color: var(--kmbi-green-dark);
}

.auth-brand-text strong {
    font-size: 16px;
    color: var(--kmbi-navy);
    line-height: 1.2;
}

.auth-brand-text small {
    color: var(--kmbi-muted);
    font-size: 12px;
    line-height: 1.2;
}

.topbar-link {
    padding: 12px 16px;
    border-radius: 14px;
    font-weight: 700;
    color: var(--kmbi-navy);
    background: rgba(25, 57, 82, 0.06);
    transition: background 0.2s ease, transform 0.2s ease;
    white-space: nowrap;
}

    .topbar-link:hover {
        background: rgba(25, 57, 82, 0.10);
        transform: translateY(-1px);
    }

/* Shared page */
.auth-page {
    width: 100%;
    display: flex;
    justify-content: center;
}

.auth-card {
    width: 100%;
    max-width: 430px;
    position: relative;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid rgba(255,255,255,0.72);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-strong);
    padding: 28px 20px 24px;
}

.auth-card--wide {
    max-width: 780px;
}

.auth-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 6px;
    background: linear-gradient(90deg, var(--kmbi-green), var(--kmbi-navy));
    z-index: 2;
}

.auth-card-glow {
    position: absolute;
    border-radius: 999px;
    filter: blur(18px);
    opacity: 0.65;
    pointer-events: none;
}

.auth-card-glow--top {
    width: 180px;
    height: 180px;
    top: -70px;
    right: -50px;
    background: rgba(70, 172, 125, 0.18);
}

.auth-card-glow--bottom {
    width: 160px;
    height: 160px;
    left: -50px;
    bottom: -60px;
    background: rgba(25, 57, 82, 0.10);
}

/* Header */
.auth-card-header {
    position: relative;
    z-index: 1;
    text-align: center;
    margin-bottom: 22px;
}

.brand-badge {
    width: 88px;
    height: 88px;
    margin: 0 auto 16px;
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,255,255,0.92));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 14px 30px rgba(25,57,82,0.10);
    border: 1px solid rgba(25,57,82,0.06);
}

.brand-logo {
    width: 56px;
    height: 56px;
    object-fit: contain;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 12px;
    border-radius: 999px;
    background: var(--kmbi-green-soft);
    color: var(--kmbi-green-dark);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.auth-card-header h1 {
    margin: 0;
    font-size: 30px;
    line-height: 1.1;
    font-weight: 800;
    color: var(--kmbi-navy);
}

.subtext {
    margin: 12px auto 0;
    max-width: 560px;
    font-size: 14px;
    line-height: 1.65;
    color: var(--kmbi-muted);
}

/* Info strip */
.auth-info-strip {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.info-pill {
    padding: 14px;
    border-radius: 18px;
    background: rgba(255,255,255,0.74);
    border: 1px solid rgba(25,57,82,0.06);
    box-shadow: 0 10px 24px rgba(25,57,82,0.06);
}

.info-label {
    display: block;
    margin-bottom: 4px;
    font-size: 12px;
    color: var(--kmbi-muted);
}

.info-pill strong {
    font-size: 15px;
    color: var(--kmbi-navy);
}

/* Alerts */
.alert-success {
    margin-bottom: 18px;
    padding: 14px;
    border-radius: 16px;
    background: rgba(70, 172, 125, 0.12);
    border: 1px solid rgba(70, 172, 125, 0.18);
    color: var(--kmbi-green-dark);
    font-size: 14px;
    line-height: 1.5;
    text-align: center;
}

.alert-danger {
    margin-bottom: 18px;
    padding: 14px;
    border-radius: 16px;
    background: rgba(220, 53, 69, 0.12); /* red */
    border: 1px solid rgba(220, 53, 69, 0.2);
    color: #b02a37; /* dark red */
    font-size: 14px;
    line-height: 1.5;
    text-align:center;
}

/* Form */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
    z-index: 1;
}

.auth-grid {
    display: grid;
    gap: 16px;
}

.auth-grid--2 {
    grid-template-columns: 1fr;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--kmbi-navy);
}

.input-control {
    width: 100%;
}

.fintech-input {
    height: 56px;
    padding: 0 16px;
    border-radius: 16px;
    border: 1px solid rgba(25,57,82,0.10);
    background: rgba(255,255,255,0.94);
    font-size: 15px;
    color: var(--kmbi-ink);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

    .fintech-input::placeholder {
        color: #97a5b1;
    }

    .fintech-input:focus {
        outline: none;
        border-color: var(--kmbi-green);
        box-shadow: 0 0 0 4px rgba(70, 172, 125, 0.14);
        background: #fff;
        transform: translateY(-1px);
    }

.form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--kmbi-muted);
    font-size: 13px;
}

    .checkbox-row input[type="checkbox"] {
        width: 16px;
        height: 16px;
        accent-color: var(--kmbi-green);
    }

.text-link {
    color: var(--kmbi-navy-soft);
    font-size: 13px;
    font-weight: 600;
}

    .text-link:hover {
        color: var(--kmbi-green-dark);
    }

.strong-link {
    margin-left: 4px;
    font-weight: 700;
    color: var(--kmbi-navy);
}

/* Section labels */
.section-caption {
    margin: 4px 0 -2px;
    display: flex;
    align-items: center;
    gap: 10px;
}

    .section-caption span {
        font-size: 12px;
        font-weight: 800;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        color: var(--kmbi-muted);
    }

    .section-caption::after {
        content: "";
        flex: 1;
        height: 1px;
        background: rgba(25,57,82,0.08);
    }

/* Buttons */
.btn-primary,
.btn-secondary {
    text-decoration: none;
}

.fintech-btn {
    width: 100%;
    height: 56px;
    border: none;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--kmbi-green), var(--kmbi-green-dark));
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.01em;
    cursor: pointer;
    box-shadow: 0 14px 30px rgba(70,172,125,0.28);
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

    .fintech-btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 18px 34px rgba(70,172,125,0.34);
    }

.fintech-btn-secondary {
    width: 100%;
    height: 56px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.72);
    border: 1px solid rgba(25,57,82,0.10);
    color: var(--kmbi-navy);
    font-size: 15px;
    font-weight: 700;
    transition: background 0.2s ease, transform 0.2s ease;
}

    .fintech-btn-secondary:hover {
        background: rgba(25,57,82,0.04);
        transform: translateY(-1px);
    }

.action-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Trust */
.trust-card {
    margin-top: 2px;
    padding: 14px;
    border-radius: 16px;
    background: rgba(25,57,82,0.04);
    border: 1px solid rgba(25,57,82,0.06);
    display: flex;
    align-items: center;
    gap: 10px;
}

.trust-card--spaced {
    margin-top: 6px;
}

.trust-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    border-radius: 50%;
    background: rgba(70,172,125,0.16);
    color: var(--kmbi-green-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.trust-card p {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: var(--kmbi-muted);
}

.auth-footer-note {
    margin-top: 2px;
    text-align: center;
    color: var(--kmbi-muted);
    font-size: 14px;
}

/* Validation */
.text-danger {
    font-size: 12px;
    color: var(--danger);
    margin-top: 2px;
}

.fintech-select {
    height: 56px;
    border-radius: 16px;
    border: 1px solid rgba(25,57,82,0.10);
    background: rgba(255,255,255,0.94);
    padding: 0 14px;
    font-size: 15px;
    color: var(--kmbi-ink);
    appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml;utf8,<svg fill='%23193952' height='20' viewBox='0 0 20 20' width='20' xmlns='http://www.w3.org/2000/svg'><path d='M5 7l5 5 5-5z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;
}

    .fintech-select:focus {
        outline: none;
        border-color: var(--kmbi-green);
        box-shadow: 0 0 0 4px rgba(70,172,125,0.14);
    }

/* Responsive */
@media (min-width: 768px) {
    .auth-shell {
        padding: 24px 24px 36px;
    }

    .auth-card {
        padding: 32px 28px 28px;
    }

    .auth-grid--2 {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 520px) {
    .auth-topbar {
        padding: 12px 14px;
        border-radius: 20px;
    }

    .auth-brand-text small {
        display: none;
    }

    .auth-card {
        border-radius: 26px;
        padding: 24px 18px 22px;
    }

    .auth-card-header h1 {
        font-size: 26px;
    }

    .auth-info-strip {
        grid-template-columns: 1fr;
    }

    .form-row {
        flex-direction: row; /* keep horizontal */
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        flex-wrap: wrap; /* allow graceful wrap if needed */
    }
    .checkbox-row {
        flex: 1 1 auto; /* take available space */
        min-width: 0; /* prevent overflow */
    }

        .checkbox-row span {
            font-size: 12px; /* slightly smaller for mobile */
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis; /* prevent breaking layout */
        }

    .text-link {
        flex-shrink: 0; /* don't shrink */
        white-space: nowrap; /* keep "Forgot password?" in one line */
        font-size: 12px;
    }

    .topbar-link {
        padding: 10px 12px;
        font-size: 13px;
    }
}

/* ================= APP PAGE ================= */
.app-page {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
}

.dashboard-page {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ================= SHARED GLASS PANEL ================= */
.glass-panel {
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    border-radius: 28px;
    box-shadow: 0 24px 60px rgba(25, 57, 82, 0.10);
}

/* ================= DASHBOARD HERO ================= */
.dashboard-hero {
    padding: 24px;
}

.dashboard-hero-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
}

.dashboard-hero h1 {
    margin: 8px 0 0;
    font-size: 32px;
    line-height: 1.1;
    color: var(--kmbi-navy);
    font-weight: 800;
}

.dashboard-subtext {
    margin: 12px 0 0;
    color: var(--kmbi-muted);
    font-size: 14px;
    line-height: 1.5;
}

.dot-separator {
    margin: 0 8px;
    color: var(--kmbi-muted);
}

/* ================= STATUS CHIP ================= */
.status-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.status-chip--success {
    background: rgba(70, 172, 125, 0.12);
    color: var(--kmbi-green-dark);
    border: 1px solid rgba(70, 172, 125, 0.18);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

/* ================= HERO BALANCE ================= */
.hero-balance-strip {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 14px;
}

.hero-balance-card {
    padding: 18px;
    border-radius: 22px;
    background: rgba(255,255,255,0.72);
    border: 1px solid rgba(25,57,82,0.06);
    box-shadow: 0 10px 24px rgba(25,57,82,0.05);
}

.hero-balance-card--primary {
    background: linear-gradient(135deg, rgba(70,172,125,0.16), rgba(25,57,82,0.08));
    border: 1px solid rgba(70,172,125,0.14);
}

.hero-balance-label {
    display: block;
    font-size: 13px;
    color: var(--kmbi-muted);
    margin-bottom: 8px;
}

.hero-balance-card strong {
    display: block;
    font-size: 28px;
    line-height: 1.1;
    color: var(--kmbi-navy);
    margin-bottom: 6px;
}

.hero-balance-card small {
    color: var(--kmbi-muted);
    font-size: 13px;
    line-height: 1.5;
}

/* ================= METRICS ================= */
.metric-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.metric-card {
    padding: 20px;
    border-radius: 24px;
    background: rgba(255,255,255,0.82);
    border: 1px solid rgba(255,255,255,0.72);
    box-shadow: 0 16px 40px rgba(25, 57, 82, 0.08);
}

.metric-card--primary {
    background: linear-gradient(135deg, rgba(70,172,125,0.18), rgba(255,255,255,0.92));
    border-color: rgba(70,172,125,0.14);
}

.metric-card--warning {
    background: linear-gradient(135deg, rgba(255,193,7,0.14), rgba(255,255,255,0.92));
    border-color: rgba(255,193,7,0.18);
}

.metric-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.metric-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--kmbi-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.metric-icon {
    font-size: 20px;
}

.metric-card h3 {
    margin: 0;
    font-size: 28px;
    line-height: 1.1;
    color: var(--kmbi-navy);
    font-weight: 800;
}

.metric-desc {
    margin: 10px 0 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--kmbi-muted);
}

/* ================= GRID ================= */
.dashboard-grid {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 18px;
}

.dashboard-panel {
    padding: 22px;
}

.dashboard-panel--table {
    min-width: 0;
}

/* ================= PANEL HEADER ================= */
.panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
}

    .panel-header h2 {
        margin: 6px 0 0;
        font-size: 22px;
        line-height: 1.2;
        color: var(--kmbi-navy);
    }

/* ================= SUMMARY ================= */
.summary-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.summary-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255,255,255,0.66);
    border: 1px solid rgba(25,57,82,0.06);
}

    .summary-item span {
        font-size: 12px;
        color: var(--kmbi-muted);
        text-transform: uppercase;
        letter-spacing: 0.05em;
    }

    .summary-item strong {
        font-size: 15px;
        color: var(--kmbi-navy);
    }

.text-success {
    color: var(--kmbi-green-dark);
}

/* ================= TABLE ================= */
.table-wrapper {
    overflow-x: auto;
}

.modern-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 680px;
}

    .modern-table thead th {
        text-align: left;
        font-size: 12px;
        font-weight: 800;
        letter-spacing: 0.05em;
        text-transform: uppercase;
        color: var(--kmbi-muted);
        padding: 14px 14px;
        border-bottom: 1px solid rgba(25,57,82,0.08);
    }

    .modern-table tbody td {
        padding: 16px 14px;
        border-bottom: 1px solid rgba(25,57,82,0.06);
        font-size: 14px;
        color: var(--kmbi-ink);
        vertical-align: middle;
    }

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

.amount {
    font-weight: 700;
    color: var(--kmbi-navy);
}

.table-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.table-badge--green {
    background: rgba(70,172,125,0.12);
    color: var(--kmbi-green-dark);
}

.table-badge--muted {
    background: rgba(25,57,82,0.08);
    color: var(--kmbi-muted);
}

/* ================= EMPTY STATE ================= */
.empty-state-card {
    padding: 34px 20px;
    text-align: center;
    border-radius: 22px;
    background: rgba(255,255,255,0.62);
    border: 1px dashed rgba(25,57,82,0.12);
}

.empty-state-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.empty-state-card h3 {
    margin: 0 0 8px;
    font-size: 18px;
    color: var(--kmbi-navy);
}

.empty-state-card p {
    margin: 0;
    font-size: 14px;
    color: var(--kmbi-muted);
    line-height: 1.6;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 980px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .metric-grid {
        grid-template-columns: 1fr;
    }

    .hero-balance-strip {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .dashboard-hero {
        padding: 20px 18px;
    }

    .dashboard-panel {
        padding: 18px;
    }

    .dashboard-hero-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .dashboard-hero h1 {
        font-size: 28px;
    }

    .metric-card h3,
    .hero-balance-card strong {
        font-size: 24px;
    }

    .panel-header h2 {
        font-size: 20px;
    }
}

/* ================= APP LAYOUT ================= */
.app-body {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient(circle at top left, rgba(70, 172, 125, 0.14), transparent 26%), radial-gradient(circle at top right, rgba(25, 57, 82, 0.08), transparent 20%), linear-gradient(180deg, #f6fbf8 0%, #eef5f4 48%, #f8ffff 100%);
    color: var(--kmbi-ink);
}

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 18px;
    padding: 18px;
}

/* ================= SIDEBAR ================= */
.app-sidebar {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 18px;
    border-radius: 30px;
    background: rgba(25, 57, 82, 0.96);
    color: #fff;
    box-shadow: 0 24px 60px rgba(25, 57, 82, 0.18);
    position: sticky;
    top: 18px;
    height: calc(100vh - 36px);
}

.sidebar-top {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    color: inherit;
}

.sidebar-brand-mark {
    width: 76px;
    height: 76px;
    border-radius: 22px;
    background: rgba(255,255,255,0.96);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 14px 30px rgba(0,0,0,0.10);
    flex-shrink: 0;
}

.sidebar-logo {
    width: 52px;
    height: 52px;
    object-fit: contain;
}

.sidebar-brand-text h1 {
    margin: 6px 0 4px;
    font-size: 22px;
    line-height: 1.1;
    color: #fff;
}

.sidebar-brand-text p {
    margin: 0;
    color: rgba(255,255,255,0.72);
    font-size: 13px;
    line-height: 1.5;
}

/* ================= NAV ================= */
.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 18px;
    color: rgba(255,255,255,0.86);
    transition: background 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

    .sidebar-link:hover {
        background: rgba(255,255,255,0.08);
        color: #fff;
        transform: translateY(-1px);
    }

    .sidebar-link.active {
        background: linear-gradient(135deg, rgba(70,172,125,0.28), rgba(70,172,125,0.18));
        color: #fff;
        border: 1px solid rgba(255,255,255,0.08);
        box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
    }

.nav-icon {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: rgba(255,255,255,0.10);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

/* ================= SIDEBAR FOOTER ================= */
.sidebar-bottom {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.sidebar-user-card,
.sidebar-info-card {
    border-radius: 20px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.08);
}

.sidebar-user-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
}

.user-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--kmbi-green), var(--kmbi-green-dark));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 15px;
    flex-shrink: 0;
}

.user-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

    .user-meta strong {
        color: #fff;
        font-size: 14px;
        line-height: 1.3;
    }

    .user-meta span {
        color: rgba(255,255,255,0.68);
        font-size: 12px;
        line-height: 1.3;
    }

.sidebar-info-card {
    padding: 14px;
}

.sidebar-info-title {
    font-size: 13px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 6px;
}

.sidebar-info-card p {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: rgba(255,255,255,0.70);
}

.btn-logout {
    width: 100%;
    height: 52px;
    border: none;
    border-radius: 18px;
    background: rgba(255,255,255,0.10);
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

    .btn-logout:hover {
        background: rgba(255,255,255,0.16);
        transform: translateY(-1px);
    }

/* ================= MAIN ================= */
.app-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.app-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 22px;
    border-radius: 28px;
    background: rgba(255,255,255,0.74);
    border: 1px solid rgba(255,255,255,0.72);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 18px 44px rgba(25, 57, 82, 0.08);
}

.app-topbar-left h2 {
    margin: 6px 0 0;
    font-size: 28px;
    line-height: 1.1;
    color: var(--kmbi-navy);
}

.topbar-date-card {
    min-width: 180px;
    padding: 12px 14px;
    border-radius: 18px;
    background: rgba(25,57,82,0.04);
    border: 1px solid rgba(25,57,82,0.06);
    text-align: right;
}

.topbar-date-label {
    display: block;
    font-size: 12px;
    color: var(--kmbi-muted);
    margin-bottom: 3px;
}

.topbar-date-card strong {
    font-size: 14px;
    color: var(--kmbi-navy);
}

.app-content {
    min-width: 0;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 1100px) {
    .app-shell {
        grid-template-columns: 260px minmax(0, 1fr);
    }
}

@media (max-width: 900px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .app-sidebar {
        position: static;
        height: auto;
        border-radius: 26px;
    }

    .sidebar-top {
        gap: 18px;
    }

    .sidebar-nav {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .sidebar-link {
        min-width: max-content;
    }
}

@media (max-width: 640px) {
    .app-shell {
        padding: 14px;
        gap: 14px;
    }

    .app-sidebar {
        padding: 16px;
    }

    .sidebar-brand-mark {
        width: 62px;
        height: 62px;
        border-radius: 18px;
    }

    .sidebar-logo {
        width: 42px;
        height: 42px;
    }

    .sidebar-brand-text h1 {
        font-size: 18px;
    }

    .app-topbar {
        padding: 16px 18px;
        border-radius: 22px;
        flex-direction: column;
        align-items: flex-start;
    }

    .app-topbar-left h2 {
        font-size: 24px;
    }

    .topbar-date-card {
        width: 100%;
        text-align: left;
    }
}

.logout-icon {
    width: 18px;
    height: 18px;
    display: inline-flex;
}

    .logout-icon svg {
        width: 100%;
        height: 100%;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

.app-topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Logout button in topbar */
.topbar-logout {
    width: 48px;
    height: 48px;
    padding: 0;
    border-radius: 14px;
    background: rgba(25,57,82,0.06);
    border: 1px solid rgba(25,57,82,0.08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--kmbi-navy);
    transition: all 0.2s ease;
}

    .topbar-logout:hover {
        background: rgba(25,57,82,0.10);
        transform: translateY(-1px);
    }

/* SVG sizing */
.logout-icon {
    width: 18px;
    height: 18px;
    display: inline-flex;
}

    .logout-icon svg {
        width: 100%;
        height: 100%;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

/* Slight emphasis for history table */
.history-table td strong {
    color: var(--kmbi-navy);
}

/* Improve spacing for financial numbers */
.history-table .amount {
    font-weight: 700;
    letter-spacing: 0.2px;
}

/* Optional: subtle row hover (fintech feel) */
.modern-table tbody tr:hover {
    background: rgba(70,172,125,0.04);
    transition: background 0.2s ease;
}

.validation-summary-errors ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.validation-summary-errors li {
    margin: 0;
}

.page-loader {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(2px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

    .page-loader.show {
        display: flex;
    }

.page-loader__box {
    min-width: 220px;
    padding: 20px 24px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
    text-align: center;
}

.page-loader__spinner {
    width: 42px;
    height: 42px;
    margin: 0 auto 12px;
    border: 4px solid rgba(16, 185, 129, 0.18);
    border-top: 4px solid var(--kmbi-green-dark, #169c68);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.page-loader__text {
    font-size: 14px;
    color: #334155;
    line-height: 1.4;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.tagalog {
    display: block;
    font-size: 0.8em;
    font-style: italic;
    opacity: 0.8; /* slightly lighter for hierarchy */
    margin-top: 2px;
}

.password-wrapper {
    position: relative;
}

    .password-wrapper input {
        padding-right: 42px;
    }

.toggle-password {
    position: absolute;
    top: 60%;
    right: 12px;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    font-size: 16px;
}

    .toggle-password:hover {
        color: #000;
    }
