/* ============================================================
   ExpenseTracker – Shared Design System
   Brand: Deep Forest Green + Amber Gold (from logo/splash)
   ============================================================ */

/* ── Design Tokens ───────────────────────────────────────── */
:root {
    --et-primary:          #1a6b3c;
    --et-primary-dark:     #134d2b;
    --et-primary-light:    #2d9e5a;
    --et-primary-xlight:   #e8f5ee;
    --et-accent:           #f59e0b;
    --et-accent-dark:      #d97706;
    --et-accent-light:     #fde68a;
    --et-success:          #22c55e;
    --et-danger:           #ef4444;
    --et-danger-bg:        #fef2f2;
    --et-danger-border:    #fecaca;
    --et-bg:               #f0f7f3;
    --et-surface:          #ffffff;
    --et-border:           #d1e8da;
    --et-border-strong:    #a8d4b8;
    --et-text:             #0f2d1c;
    --et-text-secondary:   #3d6b51;
    --et-text-muted:       #6b9e7e;
    --et-text-on-primary:  #ffffff;
    --et-text-on-accent:   #0f2d1c;
    --et-header-bg:        #1a6b3c;
    --et-header-height:    3.75rem;
    --et-drawer-width:     280px;
    --et-drawer-bg:        #134d2b;
    --et-drawer-hover:     #1a6b3c;
    --et-drawer-active-bg: #f59e0b;
    --et-drawer-active-fg: #0f2d1c;
    --et-radius:           0.875rem;
    --et-radius-sm:        0.5rem;
    --et-shadow:           0 4px 24px rgba(26,107,60,.13);
    --et-shadow-sm:        0 1px 6px rgba(26,107,60,.09);
    --et-shadow-md:        0 8px 32px rgba(26,107,60,.22);
    --et-font:             'Segoe UI','Helvetica Neue',Arial,sans-serif;
    --et-transition:       .18s ease;
    --et-transition-slow:  .32s ease;
    --et-z-drawer:         1040;
    --et-z-overlay:        1039;
    --et-z-header:         1030;
}

/* ── Reset & Base ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    font-family: var(--et-font);
    background: var(--et-bg);
    color: var(--et-text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--et-primary); text-decoration: none; transition: color var(--et-transition); }
a:hover { color: var(--et-primary-dark); text-decoration: underline; }

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.25;
    color: var(--et-text);
}

/* ── Buttons ─────────────────────────────────────────────── */
.et-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    padding: .7rem 1.5rem;
    font-size: .975rem;
    font-weight: 600;
    border-radius: var(--et-radius-sm);
    border: none;
    cursor: pointer;
    transition: background var(--et-transition), box-shadow var(--et-transition), transform var(--et-transition);
    text-decoration: none;
    white-space: nowrap;
    font-family: var(--et-font);
}
.et-btn:focus-visible { outline: 2.5px solid var(--et-accent); outline-offset: 2px; }
.et-btn:disabled { opacity: .55; cursor: not-allowed; }

.et-btn-primary { background: var(--et-primary); color: #fff; }
.et-btn-primary:hover:not(:disabled) {
    background: var(--et-primary-dark);
    box-shadow: 0 4px 16px rgba(26,107,60,.35);
    transform: translateY(-1px);
    color: #fff; text-decoration: none;
}

.et-btn-accent { background: var(--et-accent); color: var(--et-text-on-accent); }
.et-btn-accent:hover:not(:disabled) {
    background: var(--et-accent-dark);
    box-shadow: 0 4px 16px rgba(245,158,11,.35);
    transform: translateY(-1px);
}

.et-btn-outline { background: transparent; color: var(--et-primary); border: 1.5px solid var(--et-primary); }
.et-btn-outline:hover:not(:disabled) { background: var(--et-primary); color: #fff; }

.et-btn-ghost { background: transparent; color: var(--et-text-muted); border: none; }
.et-btn-ghost:hover:not(:disabled) { background: var(--et-primary-xlight); color: var(--et-primary); }

.et-btn-full { width: 100%; }

.et-btn-link {
    background: none; border: none;
    color: var(--et-primary); font-size: .9rem; font-weight: 500;
    cursor: pointer; padding: 0;
    text-decoration: underline; text-underline-offset: 2px;
}

.et-fab-add {
    position: fixed;
    right: 1.6rem;
    bottom: 1.6rem;
    z-index: 1031;
    width: 4rem;
    height: 4rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--et-primary-light), var(--et-primary));
    color: #fff;
    box-shadow: 0 18px 36px rgba(15, 107, 65, .34);
    text-decoration: none;
    transition: transform var(--et-transition), box-shadow var(--et-transition), background var(--et-transition);
}

.et-fab-add span {
    display: block;
    color: inherit;
    font-size: 2.2rem;
    font-weight: 600;
    line-height: 1;
    transform: translateY(-1px);
}

.et-fab-add:hover {
    color: #fff;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 22px 44px rgba(15, 107, 65, .4);
}

.et-fab-add:focus-visible {
    outline: 3px solid var(--et-accent);
    outline-offset: 4px;
}
.et-btn-link:hover { color: var(--et-primary-dark); }

/* ── Forms ───────────────────────────────────────────────── */
.et-form-group { margin-bottom: 1.15rem; }

.et-label {
    display: block;
    font-size: .84rem; font-weight: 600;
    color: var(--et-text); margin-bottom: .38rem;
}

.et-input {
    display: block; width: 100%;
    padding: .68rem .95rem;
    font-size: 1rem;
    color: var(--et-text);
    background: var(--et-surface);
    border: 1.5px solid var(--et-border);
    border-radius: var(--et-radius-sm);
    transition: border-color var(--et-transition), box-shadow var(--et-transition);
    outline: none; appearance: none;
    font-family: var(--et-font);
}
.et-input:focus {
    border-color: var(--et-primary);
    box-shadow: 0 0 0 3px rgba(26,107,60,.14);
    background: #fff;
}
.et-input::placeholder { color: var(--et-text-muted); }
.et-input.invalid { border-color: var(--et-danger); }

.et-input-group { position: relative; display: flex; align-items: center; }
.et-input-group .et-input { padding-right: 2.8rem; }
.et-input-addon {
    position: absolute; right: .7rem;
    background: none; border: none; cursor: pointer;
    color: var(--et-text-muted); font-size: 1.1rem; padding: 0; line-height: 1;
    transition: color var(--et-transition);
}
.et-input-addon:hover { color: var(--et-primary); }

/* ── Alerts ──────────────────────────────────────────────── */
.et-alert {
    padding: .75rem 1rem; border-radius: var(--et-radius-sm);
    font-size: .9rem; margin-bottom: 1rem;
    display: flex; align-items: flex-start; gap: .5rem;
}
.et-alert-danger  { background: var(--et-danger-bg);  color: #991b1b; border: 1px solid var(--et-danger-border); }
.et-alert-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.et-alert-warning { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }

/* ── Validation ──────────────────────────────────────────── */
.et-validation { font-size: .8rem; color: var(--et-danger); margin-top: .28rem; }
input.valid.modified:not([type=checkbox]),
select.valid.modified,
textarea.valid.modified { outline: 2px solid var(--et-success); outline-offset: -1px; }
input.invalid,
select.invalid,
textarea.invalid { outline: 2px solid var(--et-danger); outline-offset: -1px; }
.validation-message { color: var(--et-danger); font-size: .82rem; }

/* ── Cards ───────────────────────────────────────────────── */
.et-card {
    background: var(--et-surface);
    border: 1px solid var(--et-border);
    border-radius: var(--et-radius);
    box-shadow: var(--et-shadow-sm);
    padding: 1.5rem;
}

/* ── Stat Widget ─────────────────────────────────────────── */
.et-stat {
    display: flex; flex-direction: column; gap: .25rem;
    padding: 1.25rem 1.5rem;
    background: var(--et-surface);
    border-radius: var(--et-radius);
    border: 1px solid var(--et-border);
    box-shadow: var(--et-shadow-sm);
    transition: box-shadow var(--et-transition);
}
.et-stat:hover { box-shadow: var(--et-shadow); }
.et-stat-label { font-size: .78rem; font-weight: 700; color: var(--et-text-muted); text-transform: uppercase; letter-spacing: .06em; }
.et-stat-value { font-size: 1.85rem; font-weight: 800; color: var(--et-primary); line-height: 1.1; }

/* ── Divider ─────────────────────────────────────────────── */
.et-divider {
    display: flex; align-items: center; gap: .75rem;
    margin: 1.25rem 0; color: var(--et-text-muted); font-size: .85rem;
}
.et-divider::before, .et-divider::after { content: ''; flex: 1; height: 1px; background: var(--et-border); }

/* ── Spinner ─────────────────────────────────────────────── */
.et-spinner {
    width: 1.1rem; height: 1.1rem;
    border: 2.5px solid rgba(255,255,255,.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: et-spin .75s linear infinite;
    display: inline-block; flex-shrink: 0;
}
.et-spinner-green { border-color: var(--et-border-strong); border-top-color: var(--et-primary); }
@keyframes et-spin { to { transform: rotate(360deg); } }

/* ═══════════════════════════════════════════════════════════
   AUTH LAYOUT
   ═══════════════════════════════════════════════════════════ */
.et-auth-page {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    padding: 1.25rem;
    background: linear-gradient(155deg, var(--et-primary-dark) 0%, var(--et-primary) 55%, #2d9e5a 100%);
    position: relative; overflow: hidden;
}
.et-auth-page::before, .et-auth-page::after {
    content: ''; position: absolute; border-radius: 50%; opacity: .15; pointer-events: none;
}
.et-auth-page::before { width: 500px; height: 500px; background: var(--et-accent); top: -150px; right: -150px; }
.et-auth-page::after  { width: 350px; height: 350px; background: var(--et-primary-light); bottom: -110px; left: -90px; }

.et-auth-card {
    position: relative; z-index: 1;
    background: var(--et-surface);
    border-radius: var(--et-radius);
    box-shadow: var(--et-shadow-md);
    width: 100%; max-width: 440px;
    padding: 2.75rem 2.25rem 2.25rem;
}

.et-auth-logo {
    display: block; margin: 0 auto 1.75rem;
    max-height: 80px; max-width: 220px; object-fit: contain;
}
.et-auth-title {
    font-size: 1.65rem; font-weight: 800;
    text-align: center; color: var(--et-text);
    margin-bottom: .3rem; letter-spacing: -.02em;
}
.et-auth-subtitle {
    font-size: .9rem; text-align: center;
    color: var(--et-text-muted); margin-bottom: 2rem;
}
.et-auth-footer {
    text-align: center; margin-top: 1.5rem;
    font-size: .9rem; color: var(--et-text-muted);
}

@media (max-width: 480px) {
    .et-auth-card { padding: 2rem 1.25rem 1.75rem; }
    .et-auth-title { font-size: 1.4rem; }
}

/* Modern auth flow */
.et-landing-shell,
.et-auth-modern-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1.25rem;
    background: #eef6f4;
}

.et-landing-phone {
    width: min(100%, 390px);
    min-height: min(820px, calc(100vh - 2.5rem));
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 1.55rem;
    border-radius: 34px;
    background: linear-gradient(160deg, #18ad80 0%, #0f805f 55%, #07523f 100%);
    color: #fff;
    padding: 2rem;
    box-shadow: 0 22px 55px rgba(10, 51, 42, .28);
    text-align: center;
}

.et-wallet-mark {
    width: 6.3rem;
    height: 6.3rem;
    display: grid;
    place-items: center;
    color: #eafff8;
}

.et-wallet-mark svg {
    width: 100%;
    height: 100%;
}

.et-wallet-mark-small {
    width: 3.9rem;
    height: 3.9rem;
}

.et-landing-phone h1 {
    color: #fff;
    font-size: 2rem;
    line-height: 1.1;
}

.et-landing-phone p {
    color: rgba(255, 255, 255, .9);
    line-height: 1.55;
    margin-bottom: 1rem;
}

.et-landing-actions {
    width: 100%;
    display: grid;
    gap: .85rem;
    margin-top: 2.5rem;
}

.et-landing-button {
    display: grid;
    place-items: center;
    min-height: 3.15rem;
    border-radius: 8px;
    font-weight: 900;
    text-decoration: none;
}

.et-landing-button:hover {
    text-decoration: none;
}

.et-landing-button-light {
    background: #fff;
    color: #0f805f;
}

.et-landing-button-outline {
    border: 2px solid rgba(255, 255, 255, .8);
    color: #fff;
}

.et-landing-phone small {
    align-self: end;
    margin-top: 2.2rem;
    color: rgba(255, 255, 255, .88);
    font-weight: 700;
}

.et-auth-modern-page {
    grid-template-columns: minmax(230px, 330px) minmax(320px, 520px);
    gap: 0;
    justify-content: center;
    align-content: center;
    overflow: hidden;
    background:
        radial-gradient(circle at 18% 18%, rgba(38, 188, 144, .14), transparent 28rem),
        radial-gradient(circle at 84% 88%, rgba(15, 155, 101, .12), transparent 30rem),
        #eef6f4;
}

.et-auth-modern-page-simple {
    grid-template-columns: minmax(320px, 440px);
    justify-content: center;
}

.et-auth-brand-panel {
    min-height: 620px;
    align-self: stretch;
    display: grid;
    align-content: start;
    gap: .65rem;
    overflow: hidden;
    position: relative;
    padding: 2rem;
    border-radius: 8px 0 0 8px;
    background: linear-gradient(165deg, #083d36, #0c5d4f);
    color: #fff;
}

.et-auth-brand-panel h2 {
    color: #fff;
    font-size: 1.45rem;
}

.et-auth-brand-panel p {
    color: rgba(255, 255, 255, .82);
    line-height: 1.45;
}

.et-auth-plant {
    position: absolute;
    left: 2rem;
    right: 2rem;
    bottom: 1.5rem;
    height: 17rem;
    opacity: .55;
    background: linear-gradient(160deg, transparent 20%, rgba(44, 199, 154, .14));
    border-radius: 50% 50% 0 0;
}

.et-auth-plant span {
    position: absolute;
    bottom: 0;
    width: 1.6rem;
    border-radius: 1rem 1rem 0 0;
    background: #27c79a;
}

.et-auth-plant span:nth-child(1) { left: 2rem; height: 5rem; }
.et-auth-plant span:nth-child(2) { left: 4.7rem; height: 7rem; }
.et-auth-plant span:nth-child(3) { left: 7.4rem; height: 9.5rem; }

.et-auth-modern-card {
    position: relative;
    width: 100%;
    min-height: 620px;
    display: grid;
    align-content: center;
    padding: 3rem clamp(1.5rem, 5vw, 4rem);
    border-radius: 0 8px 8px 0;
    background: #fff;
    box-shadow: 0 18px 42px rgba(15, 23, 42, .12);
}

.et-auth-modern-page-simple .et-auth-modern-card {
    border-radius: 26px;
    min-height: auto;
    align-self: center;
    padding-block: 4rem;
}

.et-auth-modern-card .et-auth-title {
    border: 0;
    outline: 0;
    box-shadow: none;
    background: transparent;
    color: #0f2d1c;
    letter-spacing: 0;
}

.et-auth-back {
    position: absolute;
    left: 1.25rem;
    top: 1.1rem;
    color: #334155;
    font-size: 2rem;
    line-height: 1;
    text-decoration: none;
}

.et-auth-form-modern {
    display: grid;
    gap: .9rem;
    margin-top: 1.35rem;
}

.et-auth-form-modern .et-form-group {
    margin-bottom: 0;
}

.et-auth-input {
    min-height: 3.25rem;
    border-color: #dce6ee;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .03);
}

.et-auth-input::placeholder {
    color: #8a9aaa;
}

.et-input-addon span {
    font-size: .72rem;
    font-weight: 800;
}

.et-auth-options,
.et-terms-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    color: #64748b;
    font-size: .86rem;
}

.et-auth-options label,
.et-terms-row {
    cursor: pointer;
}

.et-auth-options input,
.et-terms-row input {
    accent-color: #0f9b65;
}

.et-terms-row {
    justify-content: flex-start;
    font-weight: 700;
}

.et-auth-primary {
    min-height: 3.25rem;
    border: 0;
    border-radius: 8px;
    background: linear-gradient(135deg, #26bc90, #0f9b65);
    color: #fff;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(15, 155, 101, .24);
}

.et-auth-primary:disabled {
    opacity: .65;
    cursor: not-allowed;
}

.et-auth-divider-modern {
    display: flex;
    align-items: center;
    gap: .7rem;
    color: #8a9aaa;
    font-size: .86rem;
    margin: 1.35rem 0 .95rem;
}

.et-auth-divider-modern::before,
.et-auth-divider-modern::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e6edf3;
}

.et-social-row {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.et-social-row button {
    width: 3rem;
    height: 3rem;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    color: #0f172a;
    font-size: 1.2rem;
    font-weight: 900;
}

.et-verify-card {
    justify-items: center;
    text-align: center;
}

.et-envelope-mark {
    position: relative;
    width: 6.7rem;
    height: 5.4rem;
    color: #29465a;
    margin-bottom: 1.5rem;
}

.et-envelope-mark svg {
    width: 100%;
    height: 100%;
}

.et-envelope-mark span {
    position: absolute;
    right: .1rem;
    bottom: .15rem;
    width: 2.45rem;
    height: 2.45rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #16a273;
    color: #fff;
    font-weight: 900;
    box-shadow: 0 4px 12px rgba(22, 162, 115, .25);
}

.et-verify-copy {
    max-width: 18rem;
    color: #334155;
    line-height: 1.45;
    margin: .6rem 0 1.6rem;
}

.et-auth-link-button {
    border: 0;
    background: transparent;
    color: #2675c9;
    font: inherit;
    font-weight: 800;
    margin-top: 1rem;
    cursor: pointer;
}

@media (max-width: 820px) {
    .et-auth-modern-page {
        grid-template-columns: minmax(0, 430px);
        justify-content: center;
    }

    .et-auth-brand-panel {
        display: none;
    }

    .et-auth-modern-card {
        min-height: auto;
        align-self: center;
        border-radius: 28px;
        box-shadow: 0 18px 42px rgba(15, 23, 42, .16);
    }
}

@media (max-width: 480px) {
    .et-landing-shell,
    .et-auth-modern-page {
        padding: 0;
        background: #fff;
    }

    .et-landing-phone,
    .et-auth-modern-card,
    .et-auth-modern-page-simple .et-auth-modern-card {
        min-height: 100vh;
        width: 100%;
        border-radius: 0;
        box-shadow: none;
        align-self: stretch;
    }
}

/* ═══════════════════════════════════════════════════════════
   APP LAYOUT SHELL (Header + Flyout Drawer)
   ═══════════════════════════════════════════════════════════ */

/* ── Header ──────────────────────────────────────────────── */
.et-header {
    position: fixed; top: 0; left: 0; right: 0;
    height: var(--et-header-height);
    background: var(--et-header-bg);
    display: flex; align-items: center;
    padding: 0 1.25rem; gap: .85rem;
    z-index: var(--et-z-header);
    box-shadow: 0 2px 10px rgba(0,0,0,.28);
}
.et-header-logo { height: 2rem; object-fit: contain; }
.et-header-title {
    font-size: 1.05rem; font-weight: 700; color: #fff;
    flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.et-header-actions { display: flex; align-items: center; gap: .5rem; margin-left: auto; }

/* ── Hamburger ───────────────────────────────────────────── */
.et-hamburger {
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    gap: 5px; width: 2.4rem; height: 2.4rem;
    border: none; background: rgba(255,255,255,.12);
    border-radius: .3rem; cursor: pointer; padding: 0; flex-shrink: 0;
    transition: background var(--et-transition);
}
.et-hamburger:hover { background: rgba(255,255,255,.22); }
.et-hamburger span {
    display: block; width: 1.2rem; height: 2px;
    background: #fff; border-radius: 2px;
    transition: transform var(--et-transition), opacity var(--et-transition), width var(--et-transition);
}
.et-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.et-hamburger.open span:nth-child(2) { opacity: 0; width: 0; }
.et-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Overlay ─────────────────────────────────────────────── */
.et-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,.52);
    z-index: var(--et-z-overlay);
}
.et-overlay.open { display: block; animation: et-fade-in .2s ease; }
@keyframes et-fade-in { from { opacity:0; } to { opacity:1; } }

/* ── Drawer ──────────────────────────────────────────────── */
.et-drawer {
    position: fixed; top: 0; left: 0; bottom: 0;
    width: var(--et-drawer-width);
    background: var(--et-drawer-bg);
    z-index: var(--et-z-drawer);
    display: flex; flex-direction: column;
    transform: translateX(-100%);
    transition: transform var(--et-transition-slow);
    overflow-y: auto; overflow-x: hidden;
}
.et-drawer.open { transform: translateX(0); }

.et-drawer-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,.08);
    flex-shrink: 0;
}
.et-drawer-title {
    font-size: .85rem; font-weight: 700; letter-spacing: .1em;
    text-transform: uppercase; color: rgba(255,255,255,.55);
}
.et-drawer-close {
    background: rgba(255,255,255,.08); border: none;
    color: rgba(255,255,255,.75); width: 2.1rem; height: 2.1rem;
    border-radius: .4rem; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background var(--et-transition), color var(--et-transition);
    padding: 0;
}
.et-drawer-close:hover { background: rgba(255,255,255,.2); color: #fff; }
.et-drawer-close svg { display: block; }

.et-drawer-nav {
    flex: 1; padding: .65rem 0;
    display: flex; flex-direction: column; gap: .1rem;
}

.et-drawer-section-label {
    padding: .85rem 1.25rem .3rem;
    font-size: .68rem; font-weight: 700;
    letter-spacing: .1em; text-transform: uppercase;
    color: rgba(255,255,255,.32);
}

.et-drawer-item {
    display: flex; align-items: center; gap: .85rem;
    padding: .72rem 1.25rem;
    color: rgba(255,255,255,.82);
    text-decoration: none; font-size: .93rem; font-weight: 500;
    border-left: 3px solid transparent;
    transition: background var(--et-transition), color var(--et-transition), padding-left var(--et-transition);
    background: none; border-top: none; border-right: none; border-bottom: none;
    width: 100%; text-align: left; cursor: pointer; font-family: var(--et-font);
}
.et-drawer-item:hover {
    background: var(--et-drawer-hover); color: #fff;
    text-decoration: none; padding-left: 1.5rem;
}
.et-drawer-item.active {
    background: var(--et-accent); color: var(--et-text-on-accent);
    border-left-color: var(--et-accent-dark); font-weight: 700;
}
.et-drawer-item.active:hover { background: var(--et-accent-dark); }
.et-drawer-icon {
    width: 1.5rem; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
}
.et-drawer-icon svg { display: block; }

.et-drawer-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(255,255,255,.08); flex-shrink: 0;
}
.et-drawer-user {
    display: flex; align-items: center; gap: .7rem;
    padding: .6rem .75rem; border-radius: var(--et-radius-sm);
    background: rgba(255,255,255,.06); margin-bottom: .5rem;
}
.et-drawer-avatar {
    width: 2.1rem; height: 2.1rem; border-radius: 50%;
    background: var(--et-accent);
    display: flex; align-items: center; justify-content: center;
    font-size: .85rem; font-weight: 800; color: var(--et-text-on-accent); flex-shrink: 0;
}
.et-drawer-user-name  { font-size: .87rem; font-weight: 600; color: #fff; }
.et-drawer-user-email { font-size: .74rem; color: rgba(255,255,255,.48); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 155px; }

/* ── Page body ───────────────────────────────────────────── */
.et-page-body { padding-top: var(--et-header-height); min-height: 100vh; }
.et-page-content { padding: 1.75rem 1.5rem; max-width: 1200px; margin: 0 auto; }

@media (max-width: 600px) {
    .et-page-content { padding: 1.25rem 1rem; }
}

/* ═══════════════════════════════════════════════════════════
   SPLASH SCREEN
   ═══════════════════════════════════════════════════════════ */
.et-splash {
    position: fixed; inset: 0;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    background: linear-gradient(155deg, var(--et-primary-dark) 0%, var(--et-primary) 60%, #2d9e5a 100%);
    z-index: 9999; gap: 1.5rem;
    animation: et-splash-in .35s ease;
}
.et-splash.fade-out { animation: et-splash-out .55s ease forwards; pointer-events: none; }

.et-splash-logo {
    max-width: min(280px, 68vw); object-fit: contain;
    filter: drop-shadow(0 8px 24px rgba(0,0,0,.3));
    animation: et-rise .65s .1s ease both;
}
.et-splash-tagline {
    color: rgba(255,255,255,.82); font-size: 1rem; font-weight: 500; letter-spacing: .05em;
    animation: et-rise .65s .3s ease both;
}
.et-splash-dots { display: flex; gap: .45rem; animation: et-rise .65s .5s ease both; }
.et-splash-dots span {
    width: .52rem; height: .52rem; border-radius: 50%;
    background: rgba(255,255,255,.65);
    animation: et-dot 1.2s ease-in-out infinite;
}
.et-splash-dots span:nth-child(2) { animation-delay: .2s; }
.et-splash-dots span:nth-child(3) { animation-delay: .4s; }

@keyframes et-splash-in  { from { opacity:0; }  to { opacity:1; } }
@keyframes et-splash-out { from { opacity:1; }  to { opacity:0; } }
@keyframes et-rise { from { opacity:0; transform:translateY(18px); } to { opacity:1; transform:none; } }
@keyframes et-dot  { 0%,80%,100% { transform:scale(.7); opacity:.45; } 40% { transform:scale(1.2); opacity:1; } }

/* ═══════════════════════════════════════════════════════════
   UPLOAD RECEIPT — PROCESS STEPS
   ═══════════════════════════════════════════════════════════ */

/* ── Step tracker bar (desktop) ──────────────────────────── */
.et-steps {
    display: flex;
    align-items: flex-start;
    gap: 0;
    margin-bottom: 1.75rem;
    counter-reset: step;
}

.et-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    text-align: center;
}

/* connector line between steps */
.et-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 1.1rem;
    left: calc(50% + 1.2rem);
    right: calc(-50% + 1.2rem);
    height: 2px;
    background: var(--et-border);
    z-index: 0;
    transition: background var(--et-transition);
}
.et-step.done:not(:last-child)::after {
    background: var(--et-primary);
}

.et-step-icon {
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 50%;
    border: 2px solid var(--et-border);
    background: var(--et-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    transition: background var(--et-transition), border-color var(--et-transition);
    color: var(--et-text-muted);
    flex-shrink: 0;
}

.et-step.active .et-step-icon {
    border-color: var(--et-primary);
    background: var(--et-primary);
    color: #fff;
    box-shadow: 0 0 0 4px rgba(26,107,60,.15);
}

.et-step.done .et-step-icon {
    border-color: var(--et-primary);
    background: var(--et-primary-xlight);
    color: var(--et-primary);
}

.et-step-label {
    margin-top: .45rem;
    font-size: .75rem;
    font-weight: 600;
    color: var(--et-text-muted);
    line-height: 1.2;
    white-space: nowrap;
}
.et-step.active .et-step-label { color: var(--et-primary); }
.et-step.done  .et-step-label { color: var(--et-text-secondary); }

/* ── Mobile collapsible step indicator ───────────────────── */
.et-steps-mobile {
    display: none;
    margin-bottom: 1.25rem;
}
.et-steps-mobile-bar {
    border: 1px solid var(--et-border);
    border-radius: var(--et-radius-sm);
    padding: .75rem 1rem;
    background: var(--et-surface);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    cursor: pointer;
    user-select: none;
}
.et-steps-mobile-bar span { font-size: .9rem; font-weight: 700; color: var(--et-text); }
.et-steps-mobile-bar small { font-size: .8rem; color: var(--et-success); font-weight: 600; }
.et-steps-mobile-list {
    margin-top: .6rem;
    display: grid;
    gap: .5rem;
}
.et-steps-mobile-item {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .65rem .9rem;
    border: 1px solid var(--et-border);
    border-radius: var(--et-radius-sm);
    background: var(--et-surface);
    font-size: .88rem;
    color: var(--et-text-muted);
}
.et-steps-mobile-item.active { border-color: var(--et-primary); background: var(--et-primary-xlight); color: var(--et-primary); font-weight: 700; }
.et-steps-mobile-item.done  { color: var(--et-success); }

/* ── Upload capture layout ───────────────────────────────── */
.et-capture-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.et-capture-drop {
    border: 2px dashed var(--et-border-strong);
    border-radius: var(--et-radius);
    padding: 2.5rem 1.5rem;
    background: var(--et-primary-xlight);
    text-align: center;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .9rem;
    transition: border-color var(--et-transition), background var(--et-transition);
    cursor: pointer;
}
.et-capture-drop:hover,
.et-capture-drop.drag-over {
    border-color: var(--et-primary);
    background: #d4edde;
}

.et-capture-icon {
    width: 3.75rem;
    height: 3.75rem;
    border: 1.5px solid var(--et-border);
    border-radius: var(--et-radius-sm);
    background: var(--et-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--et-primary);
}

.et-preview-frame {
    border: 1px solid var(--et-border);
    border-radius: var(--et-radius);
    background: var(--et-soft, #f1f5f9);
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: var(--et-text-muted);
    text-align: center;
    padding: 1rem;
}
.et-preview-frame img {
    max-width: 100%;
    max-height: 320px;
    border-radius: var(--et-radius-sm);
    object-fit: contain;
}

/* ── Review grid ─────────────────────────────────────────── */
.et-review-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 1.5rem;
}

/* ── Save panel ──────────────────────────────────────────── */
.et-save-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border: 1px solid var(--et-border);
    border-radius: var(--et-radius);
    background: var(--et-primary-xlight);
    padding: 1rem 1.25rem;
    margin-top: 1.25rem;
    flex-wrap: wrap;
}
.et-save-panel-text strong { font-size: .97rem; color: var(--et-text); }
.et-save-panel-text p { font-size: .82rem; color: var(--et-text-muted); margin-top: .25rem; }

/* ── JSON code box ───────────────────────────────────────── */
.et-json-box {
    background: #0b1220;
    color: #e5e7eb;
    border-radius: var(--et-radius);
    padding: 1.1rem 1.25rem;
    overflow: auto;
    font-family: Consolas, Monaco, 'Courier New', monospace;
    font-size: .82rem;
    line-height: 1.6;
    max-height: 560px;
    white-space: pre;
}

/* ── Status dot ──────────────────────────────────────────── */
.et-status-dot {
    display: inline-block;
    width: .52rem;
    height: .52rem;
    border-radius: 50%;
    background: var(--et-success);
    margin-right: .45rem;
    vertical-align: middle;
}

/* ── Process step loading checklist ─────────────────────── */
.et-process-list {
    display: grid;
    gap: .75rem;
    margin-top: 1.5rem;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}
.et-process-item {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .75rem 1rem;
    border: 1px solid var(--et-border);
    border-radius: var(--et-radius-sm);
    background: var(--et-surface);
    font-size: .9rem;
    color: var(--et-text-muted);
}
.et-process-item.done { color: var(--et-success); border-color: #bbf7d0; background: #f0fdf4; }
.et-process-item.active { color: var(--et-primary); border-color: var(--et-border-strong); }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 900px) {
    .et-capture-layout,
    .et-review-grid { grid-template-columns: 1fr; }
    .et-steps { display: none; }
    .et-steps-mobile { display: block; }
}

@media (max-width: 600px) {
    .et-step-label { font-size: .68rem; }
    .et-save-panel { flex-direction: column; align-items: stretch; }
    .et-save-panel .et-btn-row { flex-direction: column; }
    .et-save-panel .et-btn-row .et-btn { width: 100%; justify-content: center; }
}

/* ── Shared btn-row ──────────────────────────────────────── */
.et-btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: .65rem;
    align-items: center;
    margin-top: 1rem;
}

/* ── Success checkmark ───────────────────────────────────── */
.et-success-icon {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    background: #f0fdf4;
    border: 2px solid #bbf7d0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--et-success);
    margin: 0 auto 1rem;
}

/* ═══════════════════════════════════════════════════════════
   BLAZOR ERROR UI
   ═══════════════════════════════════════════════════════════ */
#blazor-error-ui {
    color-scheme: light only;
    background: #fffbeb; border-top: 1px solid #fde68a;
    bottom: 0; left: 0; box-shadow: 0 -2px 8px rgba(0,0,0,.1);
    box-sizing: border-box; display: none;
    padding: .65rem 3.5rem .65rem 1.25rem;
    position: fixed; width: 100%; z-index: 2000;
    font-size: .9rem; color: var(--et-text);
}
#blazor-error-ui .dismiss {
    cursor: pointer; position: absolute;
    right: 1rem; top: 50%; transform: translateY(-50%);
}

/* Product screens: shared by Blazor Web and MAUI (Windows, Android, iOS). */
.et-screen { display: grid; gap: 1.5rem; }
.et-page-heading { display: flex; justify-content: space-between; gap: 1rem; align-items: end; }
.et-page-heading h1 { font-size: 1.7rem; margin-top: .2rem; }
.et-page-heading p:not(.et-kicker) { color: var(--et-text-secondary); margin-top: .35rem; }
.et-kicker { color: var(--et-primary); font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.et-muted, .et-empty { color: var(--et-text-muted); padding: 1.25rem 0; }
.et-metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .9rem; }
.et-stat { min-height: 130px; display: grid; align-content: space-between; border: 1px solid var(--et-border); background: var(--et-surface); border-radius: 8px; box-shadow: var(--et-shadow-sm); }
.et-stat small, .et-expense-row small { color: var(--et-text-muted); font-size: .78rem; }
.et-dashboard-grid, .et-review-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(260px, .85fr); gap: 1rem; }
.et-panel, .et-save-card { background: var(--et-surface); border: 1px solid var(--et-border); border-radius: 8px; padding: 1.2rem; box-shadow: var(--et-shadow-sm); }
.et-panel h2, .et-save-card h2 { font-size: 1rem; }
.et-panel-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: .8rem; }
.et-panel-heading a { font-size: .82rem; font-weight: 700; }
.et-list { display: grid; }
.et-expense-row { display: grid; grid-template-columns: 32px 1fr auto; gap: .7rem; align-items: center; padding: .8rem 0; border-bottom: 1px solid var(--et-border); color: var(--et-text); }
.et-expense-row:last-child { border-bottom: 0; }
.et-expense-row span:nth-child(2) { display: grid; gap: .18rem; }
.et-round-icon { width: 32px; height: 32px; display: inline-grid; place-items: center; border-radius: 50%; background: var(--et-primary-xlight); color: var(--et-primary); font-size: .78rem; font-weight: 800; }
.et-category-list { display: grid; gap: .9rem; }
.et-category-title { display: flex; justify-content: space-between; margin-bottom: .38rem; font-size: .83rem; }
.et-progress { height: 7px; background: #e8f0ec; overflow: hidden; border-radius: 99px; }
.et-progress span { display: block; height: 100%; background: var(--et-primary-light); border-radius: inherit; }
.et-budget-list { display: grid; gap: 1rem; }
.et-budget-row { display: grid; gap: .4rem; }
.et-budget-row small { color: var(--et-text-muted); }
.et-budget-title { display: flex; justify-content: space-between; gap: .8rem; font-size: .86rem; }
.et-budget-progress.is-warning span { background: var(--et-accent); }
.et-budget-progress.is-danger span { background: var(--et-danger); }
.et-capture { width: min(100%, 640px); margin: 1rem auto; display: grid; justify-items: center; gap: 1rem; }
.et-upload-zone { position: relative; width: 100%; min-height: 250px; display: grid; place-content: center; justify-items: center; gap: .6rem; text-align: center; border: 2px dashed var(--et-border-strong); border-radius: 8px; background: #fbfefc; cursor: pointer; }
.et-upload-zone:hover { border-color: var(--et-primary); background: var(--et-primary-xlight); }
.et-upload-zone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.et-camera-actions .et-btn { position: relative; overflow: hidden; }
.et-camera-actions input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.et-upload-zone small, .et-file-name { color: var(--et-text-muted); }
.et-upload-icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; background: var(--et-primary-xlight); color: var(--et-primary); font-size: 1.5rem; font-weight: 800; }
.et-error { color: #b42318; background: #fef3f2; padding: .7rem 1rem; border-radius: 6px; }
.et-entry-switch { width: min(100%, 34rem); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .35rem; margin: 0 0 1rem; padding: .3rem; border: 1px solid var(--et-border); border-radius: 8px; background: #fff; box-shadow: var(--et-shadow-sm); }
.et-entry-mode { min-height: 2.65rem; border: 0; border-radius: 6px; background: transparent; color: var(--et-text-secondary); font: inherit; font-weight: 800; cursor: pointer; }
.et-entry-mode.is-active { background: var(--et-primary); color: #fff; }
.et-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; margin: 1.2rem 0; }
.et-form-grid label, .et-form-wide { display: grid; gap: .35rem; color: var(--et-text-secondary); font-size: .8rem; font-weight: 700; }
.et-form-grid input, .et-form-wide textarea, .et-table-toolbar input { border: 1px solid var(--et-border-strong); border-radius: 5px; padding: .65rem; color: var(--et-text); font: inherit; background: #fff; }
.et-form-wide textarea { width: 100%; min-height: 74px; resize: vertical; margin-top: .35rem; }
.et-section-heading { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-top: 1rem; }
.et-manual-items { display: grid; gap: .65rem; margin-top: .75rem; }
.et-manual-item-row { display: grid; grid-template-columns: minmax(9rem, 1.6fr) repeat(3, minmax(4.8rem, .7fr)) 2rem; gap: .5rem; align-items: center; }
.et-manual-item-row input { min-width: 0; border: 1px solid var(--et-border-strong); border-radius: 5px; background: #fff; color: var(--et-text); font: inherit; padding: .65rem; }
.et-item-list { display: grid; margin-top: .75rem; }
.et-item-list > div { display: flex; justify-content: space-between; gap: .75rem; padding: .7rem 0; border-bottom: 1px solid var(--et-border); }
.et-item-list small { color: var(--et-text-muted); }
.et-save-card { display: grid; align-content: start; justify-items: start; gap: .8rem; }
.et-save-card .et-btn { width: 100%; }
.et-btn-secondary { border: 1px solid var(--et-border-strong); background: #fff; color: var(--et-primary); }
.et-btn-danger { border: 1px solid #f3b3b3; background: var(--et-danger-bg); color: #b42318; }
.et-btn-danger:hover:not(:disabled) { background: #fee2e2; color: #991b1b; text-decoration: none; }
.et-total { color: var(--et-primary); font-size: 1.7rem; }
.et-back { font-size: .85rem; font-weight: 700; display: inline-block; margin-bottom: .65rem; }
.et-details { display: grid; grid-template-columns: 1fr auto; gap: .9rem; margin-top: 1rem; font-size: .9rem; }
.et-details dt { color: var(--et-text-muted); }.et-details dd { font-weight: 700; }
.et-table-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; font-size: .8rem; color: var(--et-text-muted); }
.et-table-toolbar input { width: min(100%, 320px); }
.et-table-head, .et-table-row { display: grid; grid-template-columns: .85fr 1.2fr 1fr .7fr; gap: .7rem; align-items: center; padding: .85rem .2rem; }
.et-table-head { color: var(--et-text-muted); font-weight: 700; font-size: .72rem; text-transform: uppercase; border-bottom: 1px solid var(--et-border); }
.et-table-row { color: var(--et-text); border-bottom: 1px solid var(--et-border); font-size: .88rem; }.et-table-row:hover { background: #f8fcf9; text-decoration: none; }
.et-expense-row-table {
    min-height: 3.2rem;
}
.et-expense-date,
.et-expense-category {
    min-width: 0;
    color: var(--et-text-muted);
}
.et-expense-merchant {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.et-expense-amount {
    color: var(--et-text);
    text-align: right;
}
.et-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--et-accent); margin-right: .4rem; }
.et-edit-items { display: grid; gap: .65rem; }
.et-edit-item-row { display: grid; grid-template-columns: minmax(9rem, 1.7fr) repeat(3, minmax(5rem, .7fr)) minmax(7rem, 1fr) 2rem; gap: .5rem; align-items: center; }
.et-edit-item-row input, .et-form-wide select { border: 1px solid var(--et-border-strong); border-radius: 5px; padding: .65rem; color: var(--et-text); font: inherit; background: #fff; min-width: 0; }
.et-icon-button { width: 2rem; height: 2rem; display: grid; place-items: center; border: 1px solid #f3b3b3; border-radius: 5px; background: var(--et-danger-bg); color: #b42318; cursor: pointer; font-size: 1.1rem; line-height: 1; }
.et-icon-button:hover { background: #fee2e2; }
.et-bars { height: 220px; display: flex; gap: 1rem; align-items: end; border-bottom: 1px solid var(--et-border); padding: 1rem .35rem 0; }.et-bars > div { height: 100%; flex: 1; display: flex; flex-direction: column; justify-content: end; align-items: center; gap: .45rem; }.et-bars span { width: 100%; max-width: 28px; min-height: 3px; background: var(--et-primary-light); border-radius: 4px 4px 0 0; }.et-bars small { font-size: .7rem; color: var(--et-text-muted); }
@media (min-width: 901px) { .et-header { left: var(--et-drawer-width); }.et-hamburger, .et-overlay, .et-drawer-close { display: none; }.et-drawer { transform: none; top: 0; z-index: var(--et-z-header); }.et-page-body { padding-left: var(--et-drawer-width); }.et-page-content { max-width: 1440px; } }
@media (max-width: 900px) { .et-metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }.et-dashboard-grid, .et-review-layout { grid-template-columns: 1fr; }.et-page-heading { align-items: start; }.et-page-heading .et-btn { flex: 0 0 auto; } }
@media (max-width: 900px) { .et-edit-item-row { grid-template-columns: 1fr 1fr; }.et-edit-item-row input:first-child { grid-column: 1 / -1; } }

.et-page-loader {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: grid;
    place-items: center;
    background: rgba(248, 251, 249, 0.82);
    backdrop-filter: blur(2px);
}

.et-page-loader-content {
    display: flex;
    align-items: center;
    gap: .7rem;
    color: #174d35;
    font-weight: 600;
}

.et-page-loader-spinner {
    width: 1.35rem;
    height: 1.35rem;
    border: 3px solid #c9e7d6;
    border-top-color: #138a56;
    border-radius: 50%;
    animation: et-page-loader-spin .7s linear infinite;
}

@keyframes et-page-loader-spin { to { transform: rotate(360deg); } }

/* Modern Reports screen */
.et-report-screen {
    display: grid;
    gap: 1rem;
}

.et-report-hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.et-report-hero h1 {
    font-size: 1.75rem;
}

.et-report-hero p {
    color: #475569;
    margin-top: .25rem;
}

.et-report-export {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    border: 0;
    border-radius: 8px;
    background: #0ea66b;
    color: #fff;
    padding: .8rem 1.25rem;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(14, 166, 107, .24);
}

.et-report-tabs {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    overflow: hidden;
    border: 1px solid #d7e1ea;
    border-radius: 8px 8px 0 0;
    background: #f8fbfd;
}

.et-report-tab {
    min-height: 3rem;
    border: 0;
    border-right: 1px solid #d7e1ea;
    background: transparent;
    color: #334155;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.et-report-tab:last-child {
    border-right: 0;
}

.et-report-tab.is-active {
    background: #fff;
    color: #0f9b65;
    box-shadow: inset 0 -3px 0 #0f9b65;
}

.et-report-toolbar {
    display: grid;
    grid-template-columns: auto auto minmax(16rem, 1fr) auto;
    align-items: center;
    gap: 1rem;
    padding: .95rem 0;
}

.et-report-toolbar > span {
    font-weight: 800;
}

.et-report-segmented {
    display: inline-flex;
    gap: .35rem;
}

.et-report-mode,
.et-report-range {
    min-height: 2.65rem;
    border: 1px solid #d7e1ea;
    border-radius: 7px;
    background: #fff;
    color: #334155;
    padding: 0 1.2rem;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.et-report-mode.is-active {
    border-color: #0f9b65;
    background: #0f9b65;
    color: #fff;
}

.et-report-range.is-active {
    border-color: #0f9b65;
    background: #e7f7f0;
    color: #08744c;
}

.et-report-date {
    min-height: 2.65rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    border: 1px solid #d7e1ea;
    border-radius: 8px;
    background: #fff;
    color: #0f172a;
}

.et-report-picker {
    padding: .2rem .75rem;
}

.et-report-picker input,
.et-report-picker select,
.et-custom-range-fields input {
    min-height: 2.1rem;
    border: 0;
    border-radius: 6px;
    background: #f8fbfd;
    color: #0f172a;
    font: inherit;
    font-weight: 800;
    padding: 0 .55rem;
}

.et-report-picker input,
.et-report-picker select {
    max-width: 10.5rem;
}

.et-custom-range-fields {
    grid-column: 3 / 5;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
}

.et-custom-range-fields label {
    min-height: 2.65rem;
    display: flex;
    align-items: center;
    gap: .6rem;
    border: 1px solid #d7e1ea;
    border-radius: 8px;
    background: #fff;
    color: #334155;
    font-weight: 800;
    padding: .25rem .75rem;
}

.et-custom-range-fields span {
    font-size: .78rem;
    text-transform: uppercase;
}

.et-report-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.et-report-metric,
.et-report-card,
.et-report-empty {
    border: 1px solid #dce6ee;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .04);
}

.et-report-metric {
    min-height: 6.9rem;
    display: grid;
    gap: .4rem;
    align-content: center;
    padding: 1.1rem 1.3rem;
}

.et-report-metric > span {
    color: #334155;
    font-size: .85rem;
    font-weight: 800;
}

.et-report-metric > strong {
    color: #0f172a;
    font-size: 1.7rem;
}

.et-report-metric > div {
    display: flex;
    justify-content: space-between;
    gap: .7rem;
    align-items: center;
}

.et-report-metric small,
.et-report-card-title span {
    color: #64748b;
}

.et-report-metric em,
.et-report-table-row em {
    font-style: normal;
    font-size: .8rem;
    font-weight: 900;
}

.et-trend-good {
    color: #0f9b65;
}

.et-trend-bad {
    color: #ef4444;
}

.et-trend-flat {
    color: #94a3b8;
}

.et-report-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(22rem, .95fr);
    gap: 1rem;
}

.et-report-card {
    min-width: 0;
    padding: 1.15rem;
}

.et-report-card-title {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.et-report-card-title h2 {
    font-size: 1rem;
}

.et-report-round {
    display: grid;
    grid-template-columns: minmax(10rem, .95fr) minmax(0, 1.1fr);
    align-items: center;
    gap: 1rem;
}

.et-report-pie,
.et-report-donut {
    width: min(100%, 11.5rem);
    aspect-ratio: 1;
    border-radius: 50%;
    justify-self: center;
}

.et-report-donut {
    position: relative;
    display: grid;
    place-items: center;
}

.et-report-donut::before {
    position: absolute;
    width: 56%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: #fff;
    content: "";
}

.et-report-donut > div {
    position: relative;
    display: grid;
    gap: .1rem;
    text-align: center;
}

.et-report-donut strong {
    font-size: 1.2rem;
}

.et-report-donut small {
    color: #64748b;
}

.et-report-legend {
    display: grid;
    gap: .55rem;
}

.et-report-legend div {
    display: grid;
    grid-template-columns: .65rem minmax(0, 1fr) auto;
    align-items: center;
    gap: .45rem;
    font-size: .83rem;
}

.et-report-legend i {
    width: .65rem;
    height: .65rem;
    border-radius: 50%;
}

.et-report-legend span {
    overflow: hidden;
    color: #334155;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.et-report-bars-modern {
    height: 15rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(1.8rem, 1fr));
    gap: .65rem;
    align-items: end;
    padding: 1.2rem .35rem .2rem;
    border-bottom: 1px solid #dce6ee;
    background: repeating-linear-gradient(to top, transparent 0, transparent 3rem, #edf2f7 3.05rem);
}

.et-report-bar-modern {
    min-width: 0;
    height: 100%;
    display: grid;
    grid-template-rows: 1fr auto;
    align-items: end;
    gap: .45rem;
}

.et-report-bar-modern span {
    min-height: 4px;
    border-radius: 5px 5px 0 0;
    background: linear-gradient(180deg, #24c798, #0f9b65);
}

.et-report-bar-modern small {
    overflow: hidden;
    color: #64748b;
    font-size: .72rem;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.et-comparison-panel {
    display: grid;
    gap: 1rem;
}

.et-report-filters {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.et-report-filters label {
    display: grid;
    gap: .4rem;
    color: #334155;
    font-size: .78rem;
    font-weight: 900;
}

.et-report-filters input,
.et-report-filters select {
    min-height: 2.65rem;
    border: 1px solid #d7e1ea;
    border-radius: 7px;
    background: #fff;
    color: #0f172a;
    font: inherit;
    padding: 0 .8rem;
}

.et-report-wide {
    grid-column: 1 / -1;
}

.et-report-point-head,
.et-report-point-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: .75rem;
    align-items: center;
    padding: .72rem 0;
    border-bottom: 1px solid #edf2f7;
}

.et-report-point-head {
    color: #64748b;
    font-size: .72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.et-report-point-row span {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: .5rem;
    overflow: hidden;
    color: #334155;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.et-report-point-row i {
    flex: 0 0 .65rem;
    width: .65rem;
    height: .65rem;
    border-radius: 50%;
}

.et-report-point-row em {
    color: #64748b;
    font-style: normal;
    font-weight: 800;
}

.et-calendar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(8.4rem, 1fr));
    gap: .7rem;
}

.et-calendar-day {
    min-height: 5.4rem;
    display: grid;
    gap: .25rem;
    align-content: center;
    border: 1px solid #dce6ee;
    border-radius: 8px;
    background: #f8fbfd;
    padding: .8rem;
}

.et-calendar-day.is-active {
    border-color: #0f9b65;
    background: #ecfdf5;
}

.et-calendar-day small,
.et-calendar-day span {
    color: #64748b;
}

.et-calendar-day strong {
    color: #0f172a;
    font-size: 1.05rem;
}

.et-insight-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
    gap: .8rem;
}

.et-insight-list > div {
    display: grid;
    gap: .25rem;
    border: 1px solid #dce6ee;
    border-radius: 8px;
    background: #f8fbfd;
    padding: 1rem;
}

.et-insight-list span {
    color: #64748b;
    font-size: .78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.et-insight-list strong {
    color: #0f172a;
    font-size: 1.15rem;
}

.et-insight-list small {
    color: #64748b;
}

.et-compare-bars {
    display: grid;
    gap: .8rem;
}

.et-compare-row {
    display: grid;
    grid-template-columns: minmax(8rem, .9fr) minmax(0, 1.7fr) auto;
    gap: .8rem;
    align-items: center;
    font-size: .86rem;
}

.et-compare-track {
    display: grid;
    gap: .25rem;
}

.et-compare-track i,
.et-compare-track b {
    display: block;
    height: .55rem;
    border-radius: 99px;
}

.et-compare-track i {
    background: #0f9b65;
}

.et-compare-track b {
    background: #2f80ed;
}

.et-report-table-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.et-report-table {
    display: grid;
}

.et-report-table-head,
.et-report-table-row {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) .7fr .7fr .55fr;
    gap: .7rem;
    align-items: center;
    padding: .7rem 0;
    border-bottom: 1px solid #e6edf3;
    font-size: .82rem;
}

.et-report-table-head {
    color: #64748b;
    font-size: .72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.et-report-table-row:last-child {
    border-bottom: 0;
}

.et-report-empty {
    display: grid;
    justify-items: start;
    gap: .65rem;
    padding: 1.5rem;
}

.et-report-empty p {
    color: #64748b;
}

.et-report-card-title input {
    min-height: 2.2rem;
    border: 1px solid #d7e1ea;
    border-radius: 7px;
    background: #fff;
    color: #0f172a;
    font: inherit;
    padding: 0 .6rem;
}

.et-report-calendar {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: .45rem;
}

.et-calendar-head {
    color: #64748b;
    font-size: .72rem;
    font-weight: 900;
    text-align: center;
    text-transform: uppercase;
}

.et-calendar-day {
    min-height: 4.4rem;
    display: grid;
    align-content: start;
    gap: .2rem;
    border: 1px solid #e6edf3;
    border-radius: 8px;
    padding: .4rem .5rem;
    background: #fff;
}

.et-calendar-day.is-blank {
    border: 0;
    background: transparent;
}

.et-calendar-day small {
    color: #64748b;
    font-size: .72rem;
    font-weight: 800;
}

.et-calendar-day strong {
    color: #0f9b65;
    font-size: .8rem;
}

.et-calendar-day.has-spend {
    border-color: #bfe6d4;
    background: #f0fbf6;
}

.et-calendar-day.in-period {
    border-color: #0f9b65;
}

.et-calendar-total {
    margin: 0;
    color: #64748b;
    font-size: .85rem;
}

.et-insight-list {
    margin: 0;
    display: grid;
    gap: .5rem;
    padding-left: 1.1rem;
    color: #334155;
    font-size: .9rem;
}

.et-bottom-nav {
    display: none;
}

@media (max-width: 1100px) {
    .et-report-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .et-report-trend {
        grid-column: 1 / -1;
    }
}

@media (max-width: 760px) {
    .et-report-screen {
        gap: .85rem;
    }

    .et-report-hero {
        align-items: start;
    }

    .et-report-export {
        display: none;
    }

    .et-report-tabs {
        display: flex;
        overflow-x: auto;
        border-radius: 8px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .et-report-tabs::-webkit-scrollbar {
        display: none;
    }

    .et-report-tab {
        flex: 0 0 auto;
        min-width: 7.4rem;
        padding: .85rem 1rem;
        font-size: .85rem;
    }

    .et-report-toolbar {
        grid-template-columns: 1fr;
        gap: .7rem;
        padding-top: .2rem;
    }

    .et-report-toolbar > span {
        display: none;
    }

    .et-report-segmented {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: .35rem;
    }

    .et-report-calendar {
        gap: .25rem;
    }

    .et-calendar-day {
        min-height: 3.4rem;
        padding: .3rem .35rem;
    }

    .et-calendar-day strong {
        font-size: .68rem;
    }

    .et-report-mode,
    .et-report-range,
    .et-report-date {
        width: 100%;
    }

    .et-report-picker {
        justify-content: space-between;
    }

    .et-report-picker input,
    .et-report-picker select {
        max-width: 9rem;
    }

    .et-custom-range-fields {
        grid-column: auto;
        grid-template-columns: 1fr;
    }

    .et-report-kpis,
    .et-report-grid,
    .et-report-table-grid,
    .et-report-filters {
        grid-template-columns: 1fr;
    }

    .et-report-metric {
        min-height: 5.9rem;
    }

    .et-report-round {
        grid-template-columns: minmax(8rem, .8fr) minmax(0, 1.1fr);
    }

    .et-report-card {
        padding: .95rem;
    }

    .et-compare-row {
        grid-template-columns: 1fr;
        gap: .35rem;
    }

    .et-report-table-head {
        display: none;
    }

    .et-report-table-row {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .et-report-table-row span:nth-child(3),
    .et-report-table-row em {
        display: none;
    }

    .et-bottom-nav {
        position: fixed;
        left: .8rem;
        right: .8rem;
        bottom: .65rem;
        z-index: 1028;
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: .25rem;
        border: 1px solid rgba(15, 23, 42, .08);
        border-radius: 18px;
        background: rgba(255, 255, 255, .96);
        box-shadow: 0 14px 40px rgba(15, 23, 42, .18);
        padding: .35rem;
        backdrop-filter: blur(14px);
    }

    .et-bottom-nav-item {
        min-width: 0;
        min-height: 3.25rem;
        display: grid;
        place-items: center;
        gap: .1rem;
        border: 0;
        border-radius: 14px;
        background: transparent;
        color: #64748b;
        font: inherit;
        font-size: .68rem;
        font-weight: 800;
        text-decoration: none;
        cursor: pointer;
    }

    .et-bottom-nav-item:hover {
        color: #0f9b65;
        text-decoration: none;
    }

    .et-bottom-nav-item.active {
        background: #0f9b65;
        color: #fff;
    }

    .et-bottom-nav-item span {
        display: grid;
        place-items: center;
    }

    .et-fab-add {
        right: 1.2rem;
        bottom: 5.35rem;
        width: 3.75rem;
        height: 3.75rem;
        box-shadow: 0 12px 28px rgba(15, 107, 65, .32);
    }

    .et-fab-add span {
        font-size: 2rem;
    }
}

.et-report-periods {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin: 0 0 1rem;
}

.et-period-button {
    min-width: 4.8rem;
    padding: .45rem .75rem;
    border: 1px solid #cfe0d6;
    border-radius: 4px;
    background: #fff;
    color: #486357;
    font: inherit;
    font-size: .85rem;
    font-weight: 600;
}

.et-period-button.is-active {
    border-color: #138a56;
    background: #138a56;
    color: #fff;
}

.et-chart-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) repeat(2, minmax(260px, .9fr));
    gap: 1rem;
    margin-top: 1rem;
}

.et-trend-panel { min-height: 19rem; }
.et-chart-panel { min-height: 19rem; }

.et-report-bars {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(1.6rem, 1fr));
    align-items: end;
    gap: .55rem;
    height: 14rem;
    padding: 1rem .25rem 0;
    border-bottom: 1px solid #dbe7df;
}

.et-report-bar-column {
    display: grid;
    grid-template-rows: 1fr auto;
    align-items: end;
    min-width: 0;
    height: 100%;
    gap: .5rem;
}

.et-report-bar-column span {
    display: block;
    min-height: 2px;
    border-radius: 3px 3px 0 0;
    background: #138a56;
}

.et-report-bar-column small {
    overflow: hidden;
    color: #63776c;
    font-size: .7rem;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.et-round-chart-layout {
    display: grid;
    grid-template-columns: minmax(8rem, .9fr) minmax(0, 1.15fr);
    align-items: center;
    gap: 1rem;
    min-height: 13.75rem;
}

.et-donut-chart, .et-pie-chart {
    width: min(100%, 10.5rem);
    aspect-ratio: 1;
    border-radius: 50%;
    justify-self: center;
}

.et-donut-chart {
    display: grid;
    place-items: center;
    position: relative;
}

.et-donut-chart::before {
    position: absolute;
    width: 59%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: #fff;
    content: "";
}

.et-donut-chart > div {
    position: relative;
    display: grid;
    gap: .1rem;
    color: #174d35;
    text-align: center;
}

.et-donut-chart strong { font-size: 1.35rem; }
.et-donut-chart small { color: #63776c; font-size: .68rem; }

.et-chart-legend { display: grid; gap: .5rem; }
.et-chart-legend > div { display: grid; grid-template-columns: .55rem minmax(0, 1fr) auto; align-items: center; gap: .4rem; font-size: .78rem; }
.et-chart-legend i { width: .55rem; height: .55rem; border-radius: 50%; }
.et-chart-legend span { overflow: hidden; color: #486357; text-overflow: ellipsis; white-space: nowrap; }
.et-chart-legend strong { color: #174d35; font-size: .75rem; }

@media (max-width: 1050px) { .et-chart-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }.et-trend-panel { grid-column: 1 / -1; } }
@media (max-width: 640px) { .et-chart-grid { grid-template-columns: 1fr; }.et-trend-panel { grid-column: auto; }.et-round-chart-layout { grid-template-columns: minmax(7rem, .8fr) minmax(0, 1.2fr); }.et-report-bars { gap: .3rem; }.et-period-button { flex: 1 1 calc(50% - .35rem); } }
@media (max-width: 560px) { .et-page-content { padding: 1.1rem .8rem 5.5rem; }.et-page-heading h1 { font-size: 1.35rem; }.et-metric-grid { gap: .65rem; }.et-stat { min-height: 108px; padding: .85rem; }.et-stat-value { font-size: 1.3rem; }.et-form-grid { grid-template-columns: 1fr; }.et-entry-switch { width: 100%; }.et-manual-item-row { grid-template-columns: 1fr 1fr; }.et-manual-item-row input:first-child { grid-column: 1 / -1; }.et-manual-item-row .et-icon-button { justify-self: end; }.et-table-head { display: none; }.et-table-row { grid-template-columns: .9fr 1.1fr; }.et-table-row span:nth-child(3) { display: none; }.et-table-row strong:last-child { text-align: right; }.et-table-toolbar { align-items: stretch; flex-direction: column; }.et-table-toolbar input { width: 100%; }.et-table-panel { padding: .8rem; }.et-expense-table { display: grid; gap: .65rem; }.et-expense-row-table { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "merchant amount" "date category"; gap: .28rem .75rem; align-items: center; padding: .85rem; border: 1px solid var(--et-border); border-radius: 8px; background: #fff; box-shadow: 0 6px 16px rgba(15, 23, 42, .04); }.et-expense-row-table span:nth-child(3) { display: flex; justify-content: flex-end; }.et-expense-merchant { grid-area: merchant; font-size: .95rem; }.et-expense-amount { grid-area: amount; font-size: .95rem; }.et-expense-date { grid-area: date; font-size: .76rem; }.et-expense-category { grid-area: category; min-width: 0; overflow: hidden; font-size: .76rem; text-align: right; text-overflow: ellipsis; white-space: nowrap; }.et-expense-row-table:hover { background: #fff; } }

/* Monthly payment controls shared by web and native clients. */
.et-recurrence-picker { margin: 1rem 0; padding: 1rem; border: 1px solid #dce8e0; border-radius: 12px; background: #f6faf7; }
.et-recurrence-toggle { display: flex; gap: .65rem; align-items: center; font-weight: 600; }
.et-recurrence-toggle input { width: auto; margin: 0; accent-color: #198754; }
.et-recurrence-picker select { display: block; min-width: 7rem; margin-top: .4rem; padding: .6rem; }
.et-recurrence-picker p { margin: .75rem 0 0; }
.et-recurring-label { display: block; margin-top: .25rem; color: #52715e; font-size: .75rem; font-weight: 400; white-space: normal; }

/* Editable expense statuses and pagination; scoped to the expense grid. */
.et-expenses-grid .et-table-head, .et-expenses-grid .et-table-row { grid-template-columns: minmax(90px,.9fr) minmax(110px,1.25fr) minmax(80px,.8fr) minmax(75px,.7fr) minmax(115px,1fr) auto; }
.et-expenses-grid .et-table-row > * { min-width: 0; }
.et-expenses-grid select { border: 1px solid var(--et-border-strong); border-radius: 5px; padding: .55rem; background: #fff; color: var(--et-text); font: inherit; }
.et-expense-status select { width: 100%; }
.et-status-label { display: none; }
.et-grid-unsaved { display: block; margin-top: .25rem; color: #805500; font-size: .75rem; }
.et-grid-success { color: #166534; }
.et-grid-filter { display: flex; gap: .5rem; align-items: center; }
.et-grid-pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem; padding-top: 1rem; font-size: .85rem; }
.et-grid-pagination label, .et-grid-page-buttons { display: flex; align-items: center; gap: .6rem; }
.et-expenses-grid button:disabled { opacity: .5; cursor: not-allowed; }
@media (max-width: 900px) {
    .et-expenses-grid .et-table-head { display: none; }
    .et-expenses-grid .et-expense-row-table { grid-template-columns: minmax(0,1fr) auto; grid-template-areas: "merchant amount" "date category" "status actions"; gap: .6rem .8rem; padding: .85rem; border: 1px solid var(--et-border); border-radius: 8px; margin-bottom: .7rem; }
    .et-expenses-grid .et-expense-merchant { grid-area: merchant; }
    .et-expenses-grid .et-expense-amount { grid-area: amount; text-align: right; }
    .et-expenses-grid .et-expense-date { grid-area: date; }
    .et-expenses-grid .et-expense-category { grid-area: category; display: flex; justify-content: flex-end; }
    .et-expenses-grid .et-expense-status { grid-area: status; }
    .et-expenses-grid .et-expense-actions { grid-area: actions; align-self: end; }
    .et-expenses-grid .et-status-label { display: block; font-size: .75rem; margin-bottom: .3rem; color: var(--et-text-muted); }
    .et-grid-page-buttons { flex-wrap: wrap; }
}
