:root {
    --app-primary: #2f6fed;
    --app-primary-dark: #1f4fc0;
    --app-primary-soft: rgba(47, 111, 237, .12);
    --app-bg: #f4f7fb;
    --app-bg-secondary: #edf2f9;
    --app-surface: rgba(255,255,255,.96);
    --app-surface-strong: #ffffff;
    --app-text: #14213d;
    --app-muted: #6b7280;
    --app-border: #e8edf5;
    --app-success: #198754;
    --app-warning: #f59e0b;
    --app-danger: #dc3545;
    --app-shadow: 0 20px 45px rgba(15, 23, 42, 0.08);
    --app-shadow-sm: 0 10px 25px rgba(15, 23, 42, 0.05);
    --app-ring: 0 0 0 .25rem rgba(47,111,237,.15);
}

body.theme-emerald {
    --app-primary: #0f9b8e;
    --app-primary-dark: #0a766c;
    --app-primary-soft: rgba(15, 155, 142, .12);
}

body.theme-violet {
    --app-primary: #7c4dff;
    --app-primary-dark: #5d33db;
    --app-primary-soft: rgba(124, 77, 255, .14);
}

body.theme-sunset {
    --app-primary: #f05a28;
    --app-primary-dark: #cc4317;
    --app-primary-soft: rgba(240, 90, 40, .14);
}

html, body { min-height: 100%; }
body {
    background:
        radial-gradient(circle at top left, rgba(112, 162, 255, .16) 0, transparent 28%),
        radial-gradient(circle at top right, rgba(47, 111, 237, .08) 0, transparent 22%),
        linear-gradient(180deg, #fbfdff 0%, var(--app-bg) 40%, var(--app-bg-secondary) 100%);
    color: var(--app-text);
    transition: background-color .25s ease, color .25s ease;
}

body.dark-mode {
    --app-bg: #09111f;
    --app-bg-secondary: #0b1323;
    --app-surface: rgba(11, 18, 32, .92);
    --app-surface-strong: #101a2f;
    --app-text: #eef4ff;
    --app-muted: #9aa7bd;
    --app-border: rgba(148, 163, 184, .16);
    --app-shadow: 0 20px 45px rgba(0, 0, 0, 0.28);
    --app-shadow-sm: 0 10px 25px rgba(0, 0, 0, 0.18);
    background:
        radial-gradient(circle at top left, rgba(47, 111, 237, .18) 0, transparent 24%),
        radial-gradient(circle at top right, rgba(32, 201, 151, .10) 0, transparent 18%),
        linear-gradient(180deg, #07101e 0%, #08111f 38%, #0b1323 100%);
}

body.dark-mode .text-muted { color: var(--app-muted) !important; }
body.dark-mode .bg-white,
body.dark-mode .navbar,
body.dark-mode .modal-content,
body.dark-mode .dropdown-menu,
body.dark-mode .list-group-item,
body.dark-mode .offcanvas,
body.dark-mode .bottom-nav,
body.dark-mode .card,
body.dark-mode .table,
body.dark-mode .form-control,
body.dark-mode .form-select,
body.dark-mode .input-group-text {
    background-color: var(--app-surface-strong) !important;
    color: var(--app-text) !important;
    border-color: var(--app-border) !important;
}
body.dark-mode .table { --bs-table-bg: transparent; --bs-table-color: var(--app-text); }
body.dark-mode .btn-outline-secondary { color: #d8e3f7; border-color: rgba(216, 227, 247, .25); }
body.dark-mode .btn-outline-secondary:hover { background: rgba(216, 227, 247, .12); color: #fff; }
body.dark-mode .btn-close { filter: invert(1); }
body.dark-mode .navbar-toggler { border-color: rgba(255,255,255,.18); }
body.dark-mode .navbar-toggler-icon { filter: invert(1); }
body.dark-mode .alert-info { background: rgba(64, 161, 255, .12); color: #d7ebff; border-color: rgba(64, 161, 255, .2); }
body.dark-mode .alert-success { background: rgba(25, 135, 84, .16); color: #ddffec; border-color: rgba(25, 135, 84, .22); }
body.dark-mode .alert-danger { background: rgba(220, 53, 69, .16); color: #ffe4e7; border-color: rgba(220, 53, 69, .22); }

.app-shell { padding-bottom: 6.75rem; }
.auth-shell { padding-bottom: 2rem; }
.app-container { max-width: 1160px; }
.app-main {
    position: relative;
}
.app-main::before {
    content: '';
    position: absolute;
    inset: 0 0 auto;
    height: 220px;
    background: linear-gradient(180deg, rgba(47,111,237,.08), transparent 78%);
    pointer-events: none;
}
.app-content { position: relative; z-index: 1; }

.app-header {
    backdrop-filter: blur(18px);
    background: rgba(255,255,255,.78) !important;
    border-color: rgba(255,255,255,.35) !important;
}
body.dark-mode .app-header {
    background: rgba(8, 16, 30, .78) !important;
    border-color: rgba(148, 163, 184, .08) !important;
}
.brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--app-primary), #56b6ff);
    color: #fff;
    box-shadow: 0 10px 22px rgba(47,111,237,.28);
}
.brand-copy { line-height: 1.05; }
.brand-copy small { letter-spacing: .04em; }
.header-chip,
.theme-toggle {
    border: 1px solid var(--app-border);
    background: rgba(255,255,255,.82);
    color: var(--app-text);
    border-radius: 999px;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .45rem .85rem;
    box-shadow: var(--app-shadow-sm);
}
body.dark-mode .header-chip,
body.dark-mode .theme-toggle {
    background: rgba(16, 26, 47, .92);
}
.theme-toggle:hover { background: var(--app-primary-soft); }

.page-hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.35rem;
}
.page-kicker {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .4rem .8rem;
    border-radius: 999px;
    background: var(--app-primary-soft);
    color: var(--app-primary);
    font-size: .83rem;
    font-weight: 700;
    letter-spacing: .02em;
}
.section-title { font-size: clamp(1.3rem, 2vw, 1.8rem); margin-bottom: .3rem; }
.section-subtitle { max-width: 42rem; }

.card {
    border-radius: 1.35rem !important;
    border: 1px solid var(--app-border) !important;
    box-shadow: var(--app-shadow) !important;
    background: var(--app-surface);
    overflow: hidden;
}
.card-soft {
    background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(255,255,255,.9));
}
body.dark-mode .card-soft {
    background: linear-gradient(180deg, rgba(16,26,47,.96), rgba(16,26,47,.88));
}
.modal-content { border-radius: 1.5rem; border: 1px solid var(--app-border); }
.form-control, .form-select {
    min-height: 48px;
    border-radius: 1rem;
    border-color: #dbe3ef;
    background: rgba(255,255,255,.9);
}
body.dark-mode .form-control,
body.dark-mode .form-select,
body.dark-mode .input-group-text {
    background: rgba(7, 16, 30, .72) !important;
}
.form-control:focus, .form-select:focus {
    border-color: rgba(47,111,237,.55);
    box-shadow: var(--app-ring);
}
.btn {
    border-radius: 1rem;
    font-weight: 700;
    min-height: 46px;
}
.btn-primary {
    background: linear-gradient(135deg, var(--app-primary), color-mix(in srgb, var(--app-primary) 70%, white 30%));
    border-color: transparent;
    box-shadow: 0 14px 25px color-mix(in srgb, var(--app-primary) 30%, transparent);
}
.btn-primary:hover,
.btn-primary:focus {
    background: linear-gradient(135deg, var(--app-primary-dark), var(--app-primary));
}
.btn-outline-primary {
    color: var(--app-primary);
    border-color: color-mix(in srgb, var(--app-primary) 28%, white 72%);
}
.btn-outline-primary:hover { background: var(--app-primary-soft); color: var(--app-primary-dark); border-color: transparent; }
.text-primary { color: var(--app-primary) !important; }
.text-muted { color: var(--app-muted) !important; }
.icon-chip {
    width: 2.75rem; height: 2.75rem; border-radius: 1rem; display: inline-flex; align-items: center; justify-content: center;
    background: var(--app-primary-soft); color: var(--app-primary); font-size: 1.25rem;
}
.list-group-item { background: transparent; border-color: var(--app-border); }
.alert { border-radius: 1rem; border-color: transparent; box-shadow: var(--app-shadow-sm); }
.badge { border-radius: 999px; padding: .5em .75em; }

.bottom-nav {
    position: fixed;
    inset: auto .75rem .75rem .75rem;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    z-index: 1030;
    border-radius: 1.4rem;
    overflow: hidden;
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(16px);
    box-shadow: 0 24px 50px rgba(15, 23, 42, 0.12);
    border: 1px solid rgba(255,255,255,.5);
}
body.dark-mode .bottom-nav {
    background: rgba(10, 19, 35, .9);
    border-color: rgba(148, 163, 184, .08);
}
.bottom-nav__item {
    padding: .78rem .25rem;
    border-radius: 1.1rem;
    text-align: center;
    text-decoration: none;
    color: #667085;
    font-size: .78rem;
    display: flex;
    flex-direction: column;
    gap: .2rem;
    align-items: center;
    justify-content: center;
    transition: transform .15s ease, background .15s ease, color .15s ease;
}
.bottom-nav__item i { font-size: 1.12rem; transition: transform .15s ease; }
.bottom-nav__item span { line-height: 1.1; }
.bottom-nav__item:hover { transform: translateY(-1px); }
.bottom-nav__item.active {
    color: var(--app-primary);
    font-weight: 800;
    background: linear-gradient(180deg, color-mix(in srgb, var(--app-primary) 14%, white 86%), color-mix(in srgb, var(--app-primary) 8%, white 92%));
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--app-primary) 22%, white 78%), 0 8px 20px rgba(47,111,237,.16);
    transform: translateY(-2px);
}
.bottom-nav__item.active i { transform: scale(1.08); }
.bottom-nav__item.active::after {
    content: '';
    width: 1.85rem;
    height: .22rem;
    border-radius: 999px;
    background: var(--app-primary);
    margin-top: .12rem;
}
body.dark-mode .bottom-nav__item.active { background: rgba(47,111,237,.16); box-shadow: inset 0 0 0 1px rgba(255,255,255,.06), 0 8px 20px rgba(0,0,0,.2); }
.fab {
    position: fixed; right: 1.1rem; bottom: 6.25rem; width: 60px; height: 60px; z-index: 1035;
    border-radius: 50% !important; box-shadow: 0 14px 28px rgba(47,111,237,.35);
}
.pb-6 { padding-bottom: 6rem !important; }

.auth-main {
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding-block: 2rem;
}
.auth-main::before,
.auth-main::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(50px);
    opacity: .45;
    pointer-events: none;
}
.auth-main::before {
    width: 260px; height: 260px; top: 4%; left: -60px;
    background: color-mix(in srgb, var(--app-primary) 48%, white 52%);
}
.auth-main::after {
    width: 300px; height: 300px; bottom: -30px; right: -90px;
    background: rgba(32, 201, 151, .22);
}
.auth-panel {
    max-width: 1080px;
    width: 100%;
    border-radius: 2rem;
    border: 1px solid rgba(255,255,255,.5);
    background: rgba(255,255,255,.76);
    backdrop-filter: blur(16px);
    box-shadow: 0 26px 60px rgba(15, 23, 42, 0.12);
    overflow: hidden;
}
body.dark-mode .auth-panel {
    background: rgba(10, 19, 35, .78);
    border-color: rgba(148, 163, 184, .08);
}
.auth-showcase {
    background:
        radial-gradient(circle at top left, rgba(255,255,255,.18), transparent 35%),
        linear-gradient(160deg, color-mix(in srgb, var(--app-primary) 80%, #0b1220 20%), color-mix(in srgb, var(--app-primary) 58%, #56b6ff 42%));
    color: #fff;
    padding: clamp(1.8rem, 3vw, 3rem);
    min-height: 100%;
}
.auth-showcase-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: .9rem;
}
.auth-metric,
.glass-card {
    background: rgba(255,255,255,.14);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 1.25rem;
}
.auth-form-wrap { padding: clamp(1.4rem, 2vw, 2.2rem); }
.auth-form-card {
    max-width: 470px;
    margin-inline: auto;
}
.auth-logo {
    width: 58px; height: 58px; border-radius: 18px; display: inline-flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.15); font-size: 1.5rem;
}
.auth-inline-links { display: flex; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }

.hero-landing {
    position: relative;
    overflow: hidden;
    border-radius: 2rem;
    padding: clamp(1.6rem, 3vw, 3rem);
    background:
      radial-gradient(circle at top left, rgba(255,255,255,.18), transparent 32%),
      linear-gradient(140deg, #0f1d3c 0%, color-mix(in srgb, var(--app-primary) 72%, #0f1d3c 28%) 52%, #16b6ac 100%);
    color: #fff;
    box-shadow: 0 26px 60px rgba(15, 23, 42, 0.18);
}
.hero-landing::after {
    content: '';
    position: absolute;
    inset: auto -70px -70px auto;
    width: 220px; height: 220px; border-radius: 50%;
    background: rgba(255,255,255,.12);
}
.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr);
    gap: 1.3rem;
    align-items: stretch;
}
.hero-feature-list,
.hero-proof-list {
    display: grid;
    gap: .9rem;
}
.hero-feature-item,
.hero-proof-item {
    padding: 1rem 1.05rem;
    border-radius: 1.15rem;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.14);
}
.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .8rem;
}
.hero-stat {
    padding: .95rem 1rem;
    border-radius: 1.15rem;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.14);
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .45rem .8rem;
    border-radius: 999px;
    background: rgba(255,255,255,.14);
    border: 1px solid rgba(255,255,255,.15);
    font-size: .82rem;
    font-weight: 700;
}
.landing-secondary-card {
    border-radius: 1.5rem;
    padding: 1.2rem;
    background: rgba(255,255,255,.10);
    border: 1px solid rgba(255,255,255,.12);
}

.empty-state {
    padding: 2.25rem 1.2rem;
    text-align: center;
}
.muted-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--app-border), transparent);
    margin: 1.2rem 0;
}
.surface-muted { background: color-mix(in srgb, var(--app-primary) 8%, white 92%); }
body.dark-mode .surface-muted { background: rgba(47,111,237,.08); }

@media (min-width: 992px) {
    .bottom-nav {
        max-width: 540px;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
    }
}

@media (max-width: 991.98px) {
    .hero-grid,
    .auth-showcase-grid {
        grid-template-columns: 1fr;
    }
    .auth-showcase { min-height: 0; }
}

@media (max-width: 767.98px) {
    .auth-main { padding-block: 1.25rem; }
    .auth-panel { border-radius: 1.5rem; }
    .hero-landing { border-radius: 1.5rem; }
    .hero-stats { grid-template-columns: 1fr; }
    .header-chip span { display: none; }
    .app-main::before { height: 160px; }
}

.dashboard-hero {
    align-items: flex-end;
}
.dashboard-hero-actions {
    display: flex;
    gap: .8rem;
    align-items: center;
    flex-wrap: wrap;
}
.quick-glance {
    padding: 1rem 1.1rem;
    min-width: 180px;
    border-radius: 1.2rem;
    border: 1px solid var(--app-border);
    background: rgba(255,255,255,.72);
    box-shadow: var(--app-shadow-sm);
}
body.dark-mode .quick-glance { background: rgba(16,26,47,.86); }
.dashboard-stats-grid,
.accounts-overview,
.agenda-overview {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}
.accounts-overview,
.agenda-overview { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dashboard-stat-card,
.stat-compact-card {
    position: relative;
}
.dashboard-stat-primary {
    background: linear-gradient(135deg, color-mix(in srgb, var(--app-primary) 16%, white 84%), rgba(255,255,255,.95));
}
body.dark-mode .dashboard-stat-primary {
    background: linear-gradient(135deg, rgba(47,111,237,.14), rgba(16,26,47,.95));
}
.dashboard-stat-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--app-primary-soft);
    color: var(--app-primary);
    font-size: 1.3rem;
}
.dashboard-stat-icon.soft-warning { background: rgba(245, 158, 11, .14); color: #d98a00; }
.dashboard-stat-icon.soft-info { background: rgba(13, 202, 240, .14); color: #087990; }
.dashboard-stat-icon.soft-danger { background: rgba(220, 53, 69, .12); color: var(--app-danger); }
.dashboard-inline-stats {
    display: flex;
    gap: .8rem;
    flex-wrap: wrap;
}
.dashboard-inline-stats span {
    min-width: 110px;
    padding: .75rem .85rem;
    border-radius: 1rem;
    border: 1px solid var(--app-border);
    background: rgba(255,255,255,.6);
}
body.dark-mode .dashboard-inline-stats span { background: rgba(7,16,30,.52); }
.dashboard-inline-stats strong,
.dashboard-inline-stats small {
    display: block;
}
.dashboard-priority-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}
.priority-panel {
    border: 1px solid var(--app-border);
    border-radius: 1.25rem;
    padding: 1rem;
    background: rgba(255,255,255,.45);
}
body.dark-mode .priority-panel { background: rgba(7,16,30,.42); }
.priority-panel__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: .8rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
.stack-list {
    display: grid;
    gap: .75rem;
}
.priority-item {
    display: flex;
    justify-content: space-between;
    gap: .85rem;
    align-items: center;
    padding: .9rem;
    border-radius: 1rem;
    border: 1px solid var(--app-border);
    background: rgba(255,255,255,.74);
}
body.dark-mode .priority-item { background: rgba(16,26,47,.76); }
.priority-item__left,
.priority-item__right {
    display: flex;
    align-items: center;
    gap: .75rem;
}
.priority-item__right {
    flex-direction: column;
    align-items: flex-end;
}
.empty-inline-state {
    border: 1px dashed var(--app-border);
    border-radius: 1.2rem;
    padding: 1.35rem 1rem;
    text-align: center;
    background: rgba(255,255,255,.45);
}
body.dark-mode .empty-inline-state { background: rgba(7,16,30,.42); }
.empty-inline-state.compact { padding: 2rem 1rem; }
.timeline-list {
    position: relative;
    display: grid;
    gap: .95rem;
}
.timeline-list::before {
    content: '';
    position: absolute;
    left: .7rem;
    top: .55rem;
    bottom: .55rem;
    width: 2px;
    background: linear-gradient(180deg, var(--app-primary-soft), transparent);
}
.timeline-item {
    position: relative;
    display: flex;
    gap: 1rem;
    padding-left: 1.8rem;
}
.timeline-item__marker {
    position: absolute;
    left: 0;
    top: .3rem;
    width: 1.2rem;
    height: 1.2rem;
    border-radius: 50%;
    border: 4px solid var(--app-surface-strong);
    box-shadow: 0 0 0 1px var(--app-border);
}
.timeline-item__marker.is-account { background: var(--app-primary); }
.timeline-item__marker.is-appointment { background: #20c997; }
.timeline-item__content {
    width: 100%;
    padding: .95rem 1rem;
    border-radius: 1rem;
    border: 1px solid var(--app-border);
    background: rgba(255,255,255,.76);
}
body.dark-mode .timeline-item__content { background: rgba(16,26,47,.78); }
.filter-pills {
    display: flex;
    gap: .6rem;
    flex-wrap: wrap;
}
.filter-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: .6rem 1rem;
    border-radius: 999px;
    text-decoration: none;
    color: var(--app-text);
    border: 1px solid var(--app-border);
    background: rgba(255,255,255,.75);
    font-weight: 600;
}
body.dark-mode .filter-pill { background: rgba(16,26,47,.78); }
.filter-pill.is-active {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(135deg, var(--app-primary), color-mix(in srgb, var(--app-primary) 70%, white 30%));
}
.account-card__icon.is-positive { background: rgba(25, 135, 84, .12); color: #198754; }
.account-card__icon.is-negative { background: rgba(220, 53, 69, .10); color: #dc3545; }
.account-card__meta,
.agenda-card__meta {
    row-gap: .35rem;
}
.account-card__amount {
    font-size: 1.35rem;
    font-weight: 700;
}
.agenda-filter-info {
    min-height: 48px;
    display: flex;
    align-items: center;
    padding: .85rem 1rem;
    border-radius: 1rem;
    border: 1px dashed var(--app-border);
    background: rgba(255,255,255,.48);
    color: var(--app-muted);
    font-size: .94rem;
}
body.dark-mode .agenda-filter-info { background: rgba(7,16,30,.42); }
.agenda-card__icon { background: rgba(124, 77, 255, .14); color: #7c4dff; }

@media (max-width: 1199.98px) {
    .dashboard-stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 991.98px) {
    .accounts-overview,
    .agenda-overview,
    .dashboard-priority-grid { grid-template-columns: 1fr; }
}

@media (max-width: 767.98px) {
    .dashboard-stats-grid,
    .accounts-overview,
    .agenda-overview { grid-template-columns: 1fr; }
    .priority-item,
    .priority-item__left,
    .priority-item__right {
        align-items: flex-start;
    }
    .priority-item {
        flex-direction: column;
    }
    .priority-item__right { flex-direction: row; }
    .timeline-item { padding-left: 1.6rem; }
    .timeline-list::before { left: .6rem; }
}

:root {
    --app-primary: #2f6fed;
    --app-primary-dark: #1f56c9;
    --app-primary-soft: #e9f1ff;
}
body.theme-emerald {
    --app-primary: #109d74;
    --app-primary-dark: #0b7d5c;
    --app-primary-soft: #e7f8f2;
}
body.theme-violet {
    --app-primary: #7a5af8;
    --app-primary-dark: #6445e8;
    --app-primary-soft: #f1ecff;
}
body.theme-graphite {
    --app-primary: #516175;
    --app-primary-dark: #3e4c5d;
    --app-primary-soft: #edf1f5;
}
body.theme-rose {
    --app-primary: #e882b7;
    --app-primary-dark: #d76aa3;
    --app-primary-soft: #fff0f7;
}

.auth-no-scroll,
.landing-no-scroll {
    min-height: 100dvh;
    overflow: hidden;
}
.auth-main,
.landing-main {
    min-height: 100dvh;
}
.auth-shell .app-container,
.landing-shell .app-container { max-width: 1180px; }
.auth-panel,
.hero-landing {
    min-height: calc(100dvh - 2rem);
    display: flex;
    align-items: center;
}
.auth-panel--compact { width: 100%; }
.auth-showcase,
.hero-landing {
    border-radius: 2rem;
}
.auth-form-wrap { min-height: 100%; }
.auth-form-card {
    margin-inline: auto;
}
@media (max-width: 991.98px) {
    .auth-shell, .landing-shell { overflow: hidden; }
    .auth-panel, .hero-landing { min-height: 100dvh; padding-block: 1rem; }
    .auth-form-card { padding: 1.5rem; }
    .hero-landing { text-align: center; }
    .hero-copy .lead,
    .hero-copy h1 { max-width: 100%; }
}
.hero-landing {
    background: linear-gradient(135deg, rgba(11,23,43,.95), rgba(31,86,201,.9));
    padding: clamp(1.5rem, 4vw, 3rem);
}
.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, .9fr);
    gap: 2rem;
    width: 100%;
}
.hero-copy .lead,
.hero-copy h1 { max-width: 42rem; }
.hero-login-btn { border-radius: 999px; }
.hero-card-wrap { display: flex; justify-content: center; }
.hero-card {
    width: min(100%, 360px);
    border-radius: 1.75rem;
    padding: 1.5rem;
    background: rgba(255,255,255,.14);
    border: 1px solid rgba(255,255,255,.18);
    box-shadow: 0 18px 40px rgba(0,0,0,.22);
    backdrop-filter: blur(12px);
    color: #fff;
}
.hero-card__row { display:flex; justify-content:space-between; gap:1rem; align-items:flex-start; margin-bottom:1.2rem; }
.hero-card__icon {
    width: 3rem; height: 3rem; border-radius: 1rem; display:flex; align-items:center; justify-content:center;
    background: rgba(255,255,255,.18); font-size: 1.25rem;
}
.hero-card__list { display:grid; gap:.75rem; }
.hero-card__list div { display:flex; justify-content:space-between; gap:1rem; border-top:1px solid rgba(255,255,255,.12); padding-top:.75rem; }
.hero-card__footer { margin-top: 1.1rem; color: rgba(255,255,255,.7); font-size: .95rem; }
@media (max-width: 991.98px) {
    .hero-grid { grid-template-columns: 1fr; }
    .landing-topbar { justify-content: center !important; }
}
.accounts-overview,
.agenda-overview { display:none !important; }
.surface-muted { background: rgba(148,163,184,.10); }
.filter-pills { display:flex; gap:.65rem; flex-wrap:wrap; }
.filter-pill {
    padding: .7rem 1rem;
    border-radius: 999px;
    text-decoration: none;
    color: var(--app-text);
    background: rgba(148,163,184,.12);
    font-weight: 700;
}
.filter-pill.is-active { background: var(--app-primary); color: #fff; box-shadow: 0 12px 25px color-mix(in srgb, var(--app-primary) 28%, transparent); }
.empty-state { text-align:center; padding:3.5rem 1.5rem; }
.account-card__amount { font-size: 1.25rem; font-weight: 800; }
.account-card__icon.is-positive { background: rgba(16,157,116,.14); color: #109d74; }
.account-card__icon.is-negative { background: rgba(239,68,68,.14); color: #dc2626; }
.auth-inline-links { display:flex; justify-content:space-between; align-items:center; }
body.dark-mode .surface-muted { background: rgba(148,163,184,.08); }


html, body { max-width: 100%; overflow-x: hidden; }
body { margin: 0; }
body.theme-default {
    --app-primary: #2f6fed;
    --app-primary-dark: #1f56c9;
    --app-primary-soft: #e9f1ff;
    --app-bg: #eff5ff;
    --app-bg-secondary: #dfeafe;
}
body.theme-emerald {
    --app-bg: #eefaf6;
    --app-bg-secondary: #def5ed;
}
body.theme-violet {
    --app-bg: #f3efff;
    --app-bg-secondary: #e7e0ff;
}
body.theme-graphite {
    --app-bg: #eff2f5;
    --app-bg-secondary: #dfe6ec;
}
body.theme-rose {
    --app-bg: #fff2f8;
    --app-bg-secondary: #ffe4f1;
}
body {
    background:
        radial-gradient(circle at top left, color-mix(in srgb, var(--app-primary) 10%, white 90%) 0, transparent 28%),
        linear-gradient(180deg, color-mix(in srgb, var(--app-bg) 78%, white 22%) 0%, var(--app-bg) 48%, var(--app-bg-secondary) 100%);
}
.app-main::before {
    background: linear-gradient(180deg, color-mix(in srgb, var(--app-primary) 14%, transparent), transparent 78%);
}
.card-soft,
.priority-panel,
.priority-item,
.timeline-item__content,
.quick-glance,
.surface-muted,
.auth-panel,
.auth-form-card,
.settings-list .list-group-item,
.quick-actions__menu {
    background: color-mix(in srgb, var(--app-primary) 6%, white 94%) !important;
}
body.dark-mode .card-soft,
body.dark-mode .priority-panel,
body.dark-mode .priority-item,
body.dark-mode .timeline-item__content,
body.dark-mode .quick-glance,
body.dark-mode .surface-muted,
body.dark-mode .auth-panel,
body.dark-mode .auth-form-card,
body.dark-mode .settings-list .list-group-item,
body.dark-mode .quick-actions__menu {
    background: color-mix(in srgb, var(--app-primary) 10%, #101a2f 90%) !important;
}
.form-panel {
    scroll-margin-top: 6rem;
}
.quick-actions__menu {
    min-width: 240px;
    border-radius: 1.25rem;
    margin-bottom: .8rem;
}
.auth-shell,
.landing-shell {
    overflow: hidden;
}
.auth-main,
.landing-main {
    min-height: 100svh;
    min-height: 100dvh;
}
.auth-main {
    padding: 1rem;
}
.auth-panel {
    min-height: min(820px, calc(100svh - 2rem));
    min-height: min(820px, calc(100dvh - 2rem));
}
.auth-form-wrap,
.auth-form-card {
    min-height: 100%;
}
.auth-form-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.hero-landing--compact {
    min-height: 100svh;
    min-height: 100dvh;
    border-radius: 0;
    padding: 1.5rem;
    justify-content: center;
    background: linear-gradient(145deg, color-mix(in srgb, var(--app-primary) 72%, #09111f 28%), color-mix(in srgb, var(--app-primary-dark) 70%, #0f172a 30%));
}
.hero-copy--compact {
    max-width: 720px;
}
.hero-copy--compact .lead,
.hero-copy--compact h1 {
    max-width: 100%;
    margin-inline: auto;
}
@media (max-width: 991.98px) {
    .auth-main { padding: .75rem; }
    .auth-panel {
        min-height: calc(100svh - 1.5rem);
        min-height: calc(100dvh - 1.5rem);
        border-radius: 1.5rem;
    }
    .auth-form-card {
        padding: 1.25rem;
    }
    .hero-landing--compact { padding: 1.25rem; }
}
@media (max-width: 575.98px) {
    .auth-shell,
    .landing-shell {
        overflow: hidden;
    }
    .auth-main,
    .landing-main,
    .auth-panel,
    .hero-landing--compact {
        min-height: 100svh;
        min-height: 100dvh;
    }
    .auth-panel {
        border-radius: 1.25rem;
    }
    .section-title,
    .page-kicker,
    .section-subtitle {
        text-align: left;
    }
}

/* === Final UX polish === */
body.theme-graphite {
    --app-primary: #475569;
    --app-primary-dark: #334155;
    --app-primary-soft: rgba(71, 85, 105, .16);
}
body.theme-rose {
    --app-primary: #e887b1;
    --app-primary-dark: #cf6b98;
    --app-primary-soft: rgba(232, 135, 177, .18);
}
body,
.auth-shell,
.landing-shell {
    overflow-x: hidden;
}
body.theme-default,
body.theme-emerald,
body.theme-violet,
body.theme-graphite,
body.theme-rose {
    background:
        radial-gradient(circle at top left, color-mix(in srgb, var(--app-primary) 14%, white 86%) 0, transparent 30%),
        linear-gradient(180deg, color-mix(in srgb, var(--app-primary) 14%, #d8e3f5 86%) 0%, color-mix(in srgb, var(--app-primary) 18%, #cfd9ea 82%) 100%);
}
body.dark-mode.theme-default,
body.dark-mode.theme-emerald,
body.dark-mode.theme-violet,
body.dark-mode.theme-graphite,
body.dark-mode.theme-rose {
    background:
        radial-gradient(circle at top left, color-mix(in srgb, var(--app-primary) 18%, #111827 82%) 0, transparent 26%),
        linear-gradient(180deg, #0a1220 0%, color-mix(in srgb, var(--app-primary) 12%, #0d1727 88%) 100%);
}
.card-soft,
.quick-glance,
.priority-panel,
.surface-muted,
.auth-panel,
.bottom-nav,
.quick-actions__menu,
.header-chip,
.theme-toggle {
    background: color-mix(in srgb, var(--app-primary) 12%, white 88%);
}
.card-soft {
    border-color: color-mix(in srgb, var(--app-primary) 12%, var(--app-border) 88%) !important;
}
body.dark-mode .card-soft,
body.dark-mode .quick-glance,
body.dark-mode .priority-panel,
body.dark-mode .surface-muted,
body.dark-mode .auth-panel,
body.dark-mode .bottom-nav,
body.dark-mode .quick-actions__menu,
body.dark-mode .header-chip,
body.dark-mode .theme-toggle {
    background: color-mix(in srgb, var(--app-primary) 16%, #0f1728 84%) !important;
}
.btn,
.btn i,
.btn span,
.theme-toggle,
.header-chip,
.filter-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    vertical-align: middle;
}
.btn i,
.theme-toggle i,
.header-chip i {
    line-height: 1;
    font-size: 1rem;
}
.btn-sm { min-height: 38px; }
.auth-no-scroll,
.landing-no-scroll {
    min-height: 100svh;
    overflow: hidden;
}
.auth-stage,
.landing-main--single {
    min-height: 100svh;
    height: 100svh;
}
.auth-main-shell {
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.auth-panel--compact {
    max-width: 1040px;
    width: 100%;
    max-height: calc(100svh - 1.5rem);
}
.auth-form-wrap,
.auth-showcase {
    min-height: min(640px, calc(100svh - 1.5rem));
}
.landing-main {
    padding: 0;
}
.hero-landing--single {
    width: min(920px, calc(100vw - 1.5rem));
    min-height: min(680px, calc(100svh - 1.5rem));
    margin: .75rem auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(1.5rem, 4vw, 3.25rem);
}
.hero-landing--single .lead {
    max-width: 700px;
}
.quick-details {
    border: 1px dashed color-mix(in srgb, var(--app-primary) 18%, var(--app-border) 82%);
    border-radius: 1rem;
    padding: .9rem 1rem;
    background: rgba(255,255,255,.32);
}
body.dark-mode .quick-details {
    background: rgba(255,255,255,.02);
}
.quick-details summary {
    cursor: pointer;
    font-weight: 700;
    color: var(--app-primary);
    list-style: none;
}
.quick-details summary::-webkit-details-marker { display: none; }
.quick-details[open] summary { margin-bottom: .2rem; }
@media (max-width: 991.98px) {
    .auth-main-shell,
    .auth-stage {
        min-height: 100svh;
    }
    .auth-panel--compact {
        max-height: calc(100svh - 1rem);
    }
    .auth-form-wrap {
        min-height: auto;
        padding: 1.25rem;
    }
    .hero-landing--single {
        width: calc(100vw - 1rem);
        min-height: calc(100svh - 1rem);
        margin: .5rem auto;
    }
}
@media (max-width: 767.98px) {
    .hero-landing--single h1,
    .hero-landing--single p,
    .hero-landing--single .hero-badge {
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }
    .hero-actions .btn {
        width: 100%;
    }
    .auth-panel--compact {
        border-radius: 1.25rem;
    }
    .auth-form-card {
        max-width: 100%;
    }
}


/* === Iteration: landing/auth/mobile alignment === */
html:has(body.auth-no-scroll),
html:has(body.landing-no-scroll) {
    height: 100%;
    overflow: hidden;
}
body.auth-no-scroll,
body.landing-no-scroll {
    min-height: 100svh;
    min-height: 100dvh;
    height: 100svh;
    height: 100dvh;
    overflow: hidden !important;
}
.auth-stage,
.landing-main--single {
    min-height: 100svh;
    min-height: 100dvh;
    height: 100svh;
    height: 100dvh;
    overflow: hidden;
}
.auth-main-shell {
    min-height: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.auth-panel--compact {
    max-width: 1040px;
    width: 100%;
    max-height: min(760px, calc(100dvh - 1rem));
}
.auth-showcase,
.auth-form-wrap {
    min-height: min(760px, calc(100dvh - 1rem));
}
.auth-form-wrap {
    padding-block: 1rem;
}
.hero-landing--single {
    width: min(920px, calc(100vw - 1rem));
    min-height: calc(100dvh - 1rem);
    max-height: calc(100dvh - 1rem);
    margin: .5rem auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: clamp(1.2rem, 3vw, 2.4rem);
}
.hero-landing--single h1,
.hero-landing--single p,
.hero-landing--single .hero-badge {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}
.hero-landing--single .lead {
    max-width: 38rem;
    margin-bottom: 1.4rem !important;
}
.hero-actions {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}
.btn,
.hero-actions .btn,
.page-hero .btn,
.form-panel .btn,
.empty-state .btn,
.quick-actions__menu .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    text-align: center;
}
.btn i { display: inline-flex; align-items: center; justify-content: center; }
.form-panel__top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.25rem;
}
.form-panel__title {
    flex: 1;
    min-width: 0;
}
.form-panel__close {
    margin-left: auto;
    flex-shrink: 0;
}
.quick-details {
    background: color-mix(in srgb, var(--app-primary) 6%, white 94%);
}
body.theme-default,
body.theme-emerald,
body.theme-violet,
body.theme-graphite,
body.theme-rose {
    background:
        radial-gradient(circle at top left, color-mix(in srgb, var(--app-primary) 18%, white 82%) 0, transparent 28%),
        linear-gradient(180deg, color-mix(in srgb, var(--app-primary) 20%, #d2deef 80%) 0%, color-mix(in srgb, var(--app-primary) 26%, #c1cfe4 74%) 100%);
}
.card,
.card-soft,
.quick-glance,
.priority-panel,
.surface-muted,
.auth-panel,
.bottom-nav,
.quick-actions__menu,
.header-chip,
.theme-toggle,
.form-panel,
.account-card,
.agenda-card {
    background: color-mix(in srgb, var(--app-primary) 18%, white 82%) !important;
}
body.dark-mode .card,
body.dark-mode .card-soft,
body.dark-mode .quick-glance,
body.dark-mode .priority-panel,
body.dark-mode .surface-muted,
body.dark-mode .auth-panel,
body.dark-mode .bottom-nav,
body.dark-mode .quick-actions__menu,
body.dark-mode .header-chip,
body.dark-mode .theme-toggle,
body.dark-mode .form-panel,
body.dark-mode .account-card,
body.dark-mode .agenda-card {
    background: color-mix(in srgb, var(--app-primary) 18%, #101a2f 82%) !important;
}
@media (max-width: 767.98px) {
    .hero-actions { flex-direction: column; }
    .hero-actions .btn { width: 100%; }
    .auth-panel--compact {
        max-height: calc(100dvh - .75rem);
        border-radius: 1.1rem;
    }
    .auth-form-wrap,
    .auth-showcase {
        min-height: auto;
    }
    .auth-form-wrap {
        padding: 1rem .85rem;
    }
    .auth-form-card {
        padding: .25rem 0;
    }
    .form-panel__top {
        align-items: center;
    }
    .form-panel__title {
        text-align: center;
    }
    .page-hero {
        align-items: center;
    }
    .page-hero > a.btn {
        width: 100%;
    }
}


/* === Iteration: fix public screens, header, theme cards, mobile actions === */
body.theme-graphite {
    --app-primary: #4b5563;
    --app-primary-dark: #374151;
    --app-primary-soft: rgba(75, 85, 99, .16);
}
body.theme-rose {
    --app-primary: #ec8fb0;
    --app-primary-dark: #d87296;
    --app-primary-soft: rgba(236, 143, 176, .16);
}
body.theme-default,
body.theme-emerald,
body.theme-violet,
body.theme-graphite,
body.theme-rose {
    background:
        radial-gradient(circle at top left, color-mix(in srgb, var(--app-primary) 24%, white 76%) 0, transparent 30%),
        linear-gradient(180deg, color-mix(in srgb, var(--app-primary) 18%, #c7d5ea 82%) 0%, color-mix(in srgb, var(--app-primary) 24%, #b8c8e1 76%) 100%);
}
.card,
.card-soft,
.priority-panel,
.priority-item,
.timeline-item__content,
.quick-glance,
.surface-muted,
.auth-panel,
.auth-form-card,
.settings-list .list-group-item,
.quick-actions__menu,
.account-card,
.agenda-card,
.form-panel {
    background: color-mix(in srgb, var(--app-primary) 14%, white 86%) !important;
}
body.dark-mode .card,
body.dark-mode .card-soft,
body.dark-mode .priority-panel,
body.dark-mode .priority-item,
body.dark-mode .timeline-item__content,
body.dark-mode .quick-glance,
body.dark-mode .surface-muted,
body.dark-mode .auth-panel,
body.dark-mode .auth-form-card,
body.dark-mode .settings-list .list-group-item,
body.dark-mode .quick-actions__menu,
body.dark-mode .account-card,
body.dark-mode .agenda-card,
body.dark-mode .form-panel {
    background: color-mix(in srgb, var(--app-primary) 16%, #101a2f 84%) !important;
}
.app-header { display:none !important; }
.app-header-compact {
    position: sticky;
    top: 0;
    z-index: 1030;
    padding: .75rem 0 .25rem;
    background: transparent;
}
.header-icon-btn {
    border: 1px solid var(--app-border);
    background: color-mix(in srgb, var(--app-primary) 10%, white 90%);
    color: var(--app-text);
    border-radius: 999px;
    min-height: 42px;
    padding: .55rem .9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    box-shadow: var(--app-shadow-sm);
}
body.dark-mode .header-icon-btn { background: color-mix(in srgb, var(--app-primary) 14%, #101a2f 86%); }
.auth-shell, .landing-shell, .auth-stage, .landing-main--single { overflow: hidden !important; }
.auth-main-shell {
    min-height: 100dvh;
    padding: .75rem;
}
.auth-panel--trim {
    max-width: 980px;
    min-height: min(700px, calc(100dvh - 1.5rem));
    max-height: min(700px, calc(100dvh - 1.5rem));
    overflow: visible;
}
.auth-panel--trim .auth-showcase,
.auth-panel--trim .auth-form-wrap {
    min-height: min(700px, calc(100dvh - 1.5rem));
}
.auth-showcase { border-radius: 2rem 0 0 2rem; }
.auth-panel--trim .auth-form-card {
    max-width: 500px !important;
    padding: .75rem 0;
}
.auth-main, .auth-stage, .auth-main-shell { background: transparent !important; }
.auth-main::after, .auth-main::before { opacity: .25; }
.hero-landing--single {
    width: min(840px, calc(100vw - 1rem));
    min-height: calc(100dvh - 1rem);
    max-height: calc(100dvh - 1rem);
    padding: 1.5rem;
    justify-content: center;
    overflow: hidden;
}
.hero-landing--single::after { display:none; }
.hero-landing--single .hero-actions { max-width: 440px; margin-inline: auto; }
.hero-landing--single h1 { max-width: 18ch; }
.page-kicker { margin-bottom: .25rem; }
.dashboard-hero .section-subtitle { max-width: 34rem; }
.priority-panel__header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .75rem;
    text-align: center;
}
.priority-panel__header .btn { align-self: center; }
.filter-pills { scroll-margin-top: 5rem; }
#accounts-list, #agenda-list { scroll-margin-top: 5rem; }
.filter-pill { text-decoration: none; }
.btn, .btn span, .btn i { vertical-align: middle; }
.form-panel__top { align-items: center; }
.form-panel__close { margin-left: auto; }
body:not(.dark-mode) .auth-showcase,
body:not(.dark-mode) .hero-landing {
    background:
      radial-gradient(circle at top left, rgba(255,255,255,.2), transparent 34%),
      linear-gradient(145deg, color-mix(in srgb, var(--app-primary) 74%, #11203f 26%), color-mix(in srgb, var(--app-primary) 56%, #61b4ff 44%));
}
@media (max-width: 991.98px) {
    .auth-panel--trim {
        min-height: calc(100dvh - 1rem);
        max-height: calc(100dvh - 1rem);
        border-radius: 1.4rem;
    }
    .auth-panel--trim .auth-form-wrap {
        min-height: calc(100dvh - 1rem);
        align-items: center !important;
        padding: 1rem;
    }
    .auth-panel--trim .auth-form-card { padding: 0; }
}
@media (max-width: 767.98px) {
    body.auth-no-scroll, body.landing-no-scroll { overflow: hidden !important; }
    .hero-landing--single {
        width: calc(100vw - .75rem);
        min-height: calc(100dvh - .75rem);
        max-height: calc(100dvh - .75rem);
        margin: .375rem auto;
        padding: 1.1rem;
    }
    .hero-landing--single .lead { font-size: 1rem; }
    .hero-actions .btn { width: 100%; }
    .auth-panel--trim {
        min-height: calc(100dvh - .75rem);
        max-height: calc(100dvh - .75rem);
    }
    .auth-panel--trim .auth-form-wrap {
        min-height: calc(100dvh - .75rem);
        padding: .85rem;
    }
    .auth-panel--trim .auth-form-card {
        max-width: 100% !important;
    }
    .page-hero { align-items: stretch; }
    .page-hero > a.btn { width: 100%; }
    .page-hero .btn, .form-panel .btn { justify-content: center; }
    .priority-panel__header, .priority-panel__header > div { text-align: center; }
}


/* === Patch: landing crop, themed topbar, shared-family UX === */
body.theme-teal {
    --app-primary: #14b8a6;
    --app-primary-dark: #0f9b8e;
    --app-primary-soft: rgba(20,184,166,.16);
}
body.theme-amber {
    --app-primary: #f59e0b;
    --app-primary-dark: #d97706;
    --app-primary-soft: rgba(245,158,11,.16);
}
body.theme-teal { --app-bg: #e8fbf8; --app-bg-secondary: #d7f8f2; }
body.theme-amber { --app-bg: #fff6e8; --app-bg-secondary: #ffedd0; }

html, body { overflow-x: hidden !important; }
body.landing-no-scroll, body.auth-no-scroll { overflow-y: hidden !important; }
.landing-main--single, .auth-stage {
    min-height: 100dvh;
    height: 100dvh;
    padding: 0;
    overflow: hidden;
}
.hero-landing--single {
    box-sizing: border-box;
    width: min(100%, 760px) !important;
    max-width: calc(100vw - 1.25rem) !important;
    min-height: auto !important;
    max-height: none !important;
    margin: .625rem auto !important;
    padding: clamp(1.2rem, 3vw, 2rem) !important;
    border-radius: 1.9rem !important;
    overflow: hidden !important;
}
.hero-landing--single h1 {
    max-width: 12ch !important;
    line-height: 1.04;
    font-size: clamp(2.15rem, 7vw, 3.4rem);
}
.hero-landing--single .lead {
    max-width: 22ch;
    font-size: clamp(1rem, 3.6vw, 1.45rem);
    margin-inline: auto;
}
.hero-landing--single .hero-actions {
    width: 100%;
    max-width: 560px;
    margin-inline: auto;
}
.hero-landing--single .btn {
    min-height: 58px;
    font-size: 1rem;
}
.auth-panel--trim {
    box-sizing: border-box;
    width: min(100%, 980px) !important;
    max-width: calc(100vw - 1.25rem) !important;
    min-height: auto !important;
    max-height: none !important;
    margin: .625rem auto !important;
    overflow: hidden !important;
}
.auth-panel--trim .row { margin: 0 !important; }
.auth-panel--trim [class*="col-"] { padding-left: 0; padding-right: 0; }
.auth-panel--trim .auth-showcase,
.auth-panel--trim .auth-form-wrap {
    min-height: clamp(520px, calc(100dvh - 1.25rem), 700px) !important;
}
.auth-form-wrap { padding: clamp(1rem, 2vw, 1.8rem) !important; }
.auth-form-card { max-width: 500px !important; width: 100%; }
.auth-panel--trim .form-control,
.auth-panel--trim .form-select { min-height: 50px; }

.themed-topbar {
    position: sticky;
    top: 0;
    z-index: 1040;
    padding: .85rem 0 .9rem !important;
    background: linear-gradient(135deg, color-mix(in srgb, var(--app-primary) 88%, #0f172a 12%), color-mix(in srgb, var(--app-primary-dark) 84%, #0f172a 16%)) !important;
    border-bottom: 1px solid color-mix(in srgb, var(--app-primary) 62%, white 38%);
    box-shadow: 0 12px 28px rgba(15,23,42,.12);
}
.topbar-greeting {
    color: #fff;
    font-weight: 700;
    font-size: clamp(1rem, 2vw, 1.1rem);
    white-space: nowrap;
}
.topbar-actions { margin-top: -0.1rem; }
.themed-topbar .header-icon-btn {
    min-width: 42px;
    min-height: 42px;
    padding: .55rem .78rem;
    color: #fff !important;
    border-color: rgba(255,255,255,.18);
    background: rgba(255,255,255,.12) !important;
}
.themed-topbar .header-icon-btn i { color: #fff; }
.themed-topbar .header-icon-btn:hover { background: rgba(255,255,255,.2) !important; }
.app-main { padding-top: .2rem; }
.card, .card-soft, .priority-panel, .priority-item, .timeline-item__content, .quick-glance, .surface-muted, .account-card, .agenda-card, .form-panel {
    background: color-mix(in srgb, var(--app-primary) 18%, white 82%) !important;
}
body.dark-mode .card, body.dark-mode .card-soft, body.dark-mode .priority-panel, body.dark-mode .priority-item, body.dark-mode .timeline-item__content, body.dark-mode .quick-glance, body.dark-mode .surface-muted, body.dark-mode .account-card, body.dark-mode .agenda-card, body.dark-mode .form-panel {
    background: color-mix(in srgb, var(--app-primary) 18%, #101a2f 82%) !important;
}

@media (max-width: 767.98px) {
  .hero-landing--single {
    max-width: calc(100vw - .75rem) !important;
    margin: .375rem auto !important;
    padding: 1rem !important;
  }
  .hero-landing--single h1 { font-size: clamp(2rem, 11vw, 3rem); }
  .hero-landing--single .lead { max-width: 18ch; }
  .auth-panel--trim {
    max-width: calc(100vw - .75rem) !important;
    margin: .375rem auto !important;
    border-radius: 1.2rem !important;
  }
  .auth-panel--trim .auth-form-wrap {
    min-height: calc(100dvh - .75rem) !important;
    align-items: center !important;
  }
  .topbar-greeting { font-size: 1rem; }
  .themed-topbar { padding: .7rem 0 .85rem !important; }
}

/* === Patch: themes + auth polish मार्च 2026 === */
body.theme-indigo { --app-primary: #5b5ce6; --app-primary-dark: #4344c6; --app-primary-soft: rgba(91,92,230,.16); --app-bg: #ececff; --app-bg-secondary: #dfe0ff; }
body.theme-mint { --app-primary: #22c55e; --app-primary-dark: #16a34a; --app-primary-soft: rgba(34,197,94,.16); --app-bg: #ecfdf3; --app-bg-secondary: #dcfce8; }
body.theme-coral { --app-primary: #fb7185; --app-primary-dark: #e11d48; --app-primary-soft: rgba(251,113,133,.16); --app-bg: #fff1f3; --app-bg-secondary: #ffe4e9; }
body.theme-sky { --app-primary: #38bdf8; --app-primary-dark: #0284c7; --app-primary-soft: rgba(56,189,248,.16); --app-bg: #eef9ff; --app-bg-secondary: #dff4ff; }
body.theme-lavender { --app-primary: #a78bfa; --app-primary-dark: #8b5cf6; --app-primary-soft: rgba(167,139,250,.16); --app-bg: #f5f3ff; --app-bg-secondary: #ede9fe; }

.hero-landing--single h1 {
    font-size: clamp(2.25rem, 6.8vw, 4rem) !important;
    max-width: 14ch;
    margin-inline: auto;
    line-height: 1.04;
}
.hero-landing--single .lead {
    max-width: 32rem;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.45;
    text-wrap: balance;
}
.hero-actions { width: min(100%, 430px); margin-inline: auto; }
.hero-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.auth-form-card .btn,
.auth-inline-links .btn,
.d-grid .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.auth-form-card .btn-outline-primary {
    border-width: 1.5px;
    background: color-mix(in srgb, var(--app-primary) 6%, white 94%);
}
.auth-showcase,
.hero-landing--single {
    isolation: isolate;
}
.hero-landing--single,
.auth-panel--trim,
.auth-showcase,
.auth-form-card {
    overflow: clip !important;
}
.hero-landing--single::before,
.auth-showcase::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
}
@media (max-width: 767.98px) {
    .hero-landing--single h1 { font-size: clamp(2rem, 10vw, 3.1rem) !important; }
    .hero-landing--single .lead { font-size: 1rem; max-width: 22rem; }
}

.calendar-nav{display:flex;align-items:center;justify-content:space-between;gap:.75rem}.mini-calendar{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:.5rem}.mini-calendar__weekday{font-size:.8rem;color:var(--bs-secondary-color);text-align:center;font-weight:600}.mini-calendar__day{min-height:64px;border:1px solid rgba(0,0,0,.08);border-radius:1rem;padding:.45rem;display:flex;flex-direction:column;align-items:flex-start;justify-content:space-between;text-decoration:none;color:inherit;background:rgba(255,255,255,.72)}.dark-mode .mini-calendar__day{background:rgba(15,23,42,.72);border-color:rgba(255,255,255,.08)}.mini-calendar__day.is-empty{pointer-events:none;visibility:hidden}.mini-calendar__day:hover{transform:translateY(-1px);box-shadow:0 10px 30px rgba(15,23,42,.08)}.mini-calendar__day.is-selected{border-color:var(--bs-primary);box-shadow:0 0 0 2px rgba(47,111,237,.18)}.mini-calendar__day.is-today .mini-calendar__number{background:var(--bs-primary);color:#fff}.mini-calendar__number{width:1.9rem;height:1.9rem;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;font-weight:700}.mini-calendar__dot{width:.5rem;height:.5rem;border-radius:999px;background:var(--bs-primary);display:inline-block}.mini-calendar__day small{font-size:.72rem;color:var(--bs-secondary-color)}


@media (max-width: 767.98px) {
    .mini-calendar__day {
        align-items: center;
    }
    .mini-calendar__number {
        align-self: center;
    }
}


.confirm-overlay[hidden] { display: none !important; }
.confirm-overlay {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
    min-height: 100dvh;
    width: 100%;
    padding: max(1.25rem, env(safe-area-inset-top)) 1.25rem max(1.25rem, env(safe-area-inset-bottom));
    background: rgba(9, 17, 31, .56);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    overscroll-behavior: contain;
}
.confirm-overlay.is-active {
    display: flex;
}
.confirm-dialog {
    width: min(100%, 420px);
    border-radius: 1.5rem;
    border: 1px solid var(--app-border);
    background: var(--app-surface);
    box-shadow: 0 24px 60px rgba(15, 23, 42, .24);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}
.confirm-dialog__icon {
    width: 4rem;
    height: 4rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(220, 53, 69, .12);
    color: #dc3545;
    font-size: 1.5rem;
}
.confirm-dialog__actions {
    width: 100%;
    display: flex;
    justify-content: center;
    gap: .75rem;
    flex-wrap: wrap;
}
.confirm-dialog__actions .btn {
    min-width: 132px;
}
body.dark-mode .confirm-dialog {
    background: var(--app-surface-strong);
}
@media (max-width: 576px) {
    .confirm-overlay {
        padding: max(1rem, env(safe-area-inset-top)) 1rem max(1rem, env(safe-area-inset-bottom));
    }
    .confirm-dialog {
        width: 100%;
        max-width: 360px;
        padding: 1.25rem;
    }
    .confirm-dialog__actions {
        flex-direction: column-reverse;
    }
    .confirm-dialog__actions .btn {
        width: 100%;
    }
}


.dashboard-radar-header,
.dashboard-radar-copy,
.dashboard-inline-stats {
    text-align: center;
}

.dashboard-radar-header {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.dashboard-radar-copy {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.dashboard-inline-stats {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 1rem;
    width: 100%;
}

.dashboard-inline-stats span {
    min-width: 180px;
    padding: 1rem 1.25rem;
    border-radius: 18px;
    background: rgba(47, 111, 237, 0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

@media (max-width: 991.98px) {
    .dashboard-inline-stats span {
        min-width: 140px;
        padding: .85rem 1rem;
    }
}


/* === KazaFin brand + PWA polish === */
:root {
  --kazafin-blue: #163e63;
  --kazafin-green: #64b783;
  --kazafin-green-dark: #4b9e68;
}
.brand-mini-logo {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: .45rem;
  background: linear-gradient(135deg, var(--kazafin-green), var(--kazafin-blue));
  color: #fff;
  font-weight: 800;
  font-size: .85rem;
  box-shadow: 0 8px 18px rgba(22,62,99,.22);
}
.hero-badge--brand {
  gap: .55rem;
}
.hero-landing--single {
  min-height: 100dvh !important;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.landing-main--single {
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-landing--single h1 {
  font-size: clamp(2rem, 5.5vw, 3.4rem) !important;
  max-width: 13ch !important;
}
.hero-landing--single .lead {
  max-width: 28rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}
.btn-install {
  background: linear-gradient(135deg, #ffffff, #eff8f4);
  color: var(--kazafin-blue);
  border: 1px solid rgba(255,255,255,.7);
  box-shadow: 0 14px 25px rgba(22,62,99,.16);
}
.btn-install:hover,
.btn-install:focus {
  background: #ffffff;
  color: var(--kazafin-blue);
}
.btn-install--soft {
  background: linear-gradient(135deg, rgba(100,183,131,.15), rgba(22,62,99,.08));
  border: 1px solid rgba(22,62,99,.12);
  color: var(--kazafin-blue);
}
.install-help-text {
  color: rgba(255,255,255,.86);
  font-size: .95rem;
  max-width: 34rem;
  margin-inline: auto;
}
.install-help-text--auth {
  color: var(--app-muted);
  text-align: center;
  font-size: .9rem;
}
.header-icon-btn--danger {
  color: #fff !important;
  background: rgba(220,53,69,.28) !important;
  border-color: rgba(255,255,255,.24);
}
.header-icon-btn--danger:hover {
  background: rgba(220,53,69,.42) !important;
}
.profile-logout-wrap {
  display: flex;
  justify-content: center;
}
.profile-logout-btn {
  min-height: 64px;
  min-width: min(100%, 360px);
  width: min(100%, 360px);
  font-size: 1.15rem;
  border-radius: 1.3rem !important;
  box-shadow: 0 18px 34px rgba(220,53,69,.22);
}
@media (max-width: 767.98px) {
  .hero-landing--single {
    width: min(100%, 720px) !important;
    max-width: calc(100vw - 1rem) !important;
    margin-inline: auto !important;
  }
  .hero-landing--single h1 {
    font-size: clamp(1.8rem, 9vw, 2.7rem) !important;
  }
  .profile-logout-btn {
    min-height: 58px;
    width: 100%;
  }
}


/* === KazaFin identity + centered auth flashes === */
:root {
    --kazafin-ink: #18324c;
    --kazafin-sand: #f7ecd8;
    --kazafin-gold: #c89a3d;
    --kazafin-gold-dark: #a97a21;
    --kazafin-cream: #fff9ef;
}
.auth-shell,
.landing-shell {
    background:
        radial-gradient(circle at top left, rgba(255,255,255,.7), transparent 28%),
        linear-gradient(180deg, #f8efe0 0%, #f4e6d0 100%) !important;
}
.auth-shell .auth-stage,
.landing-shell .landing-main--single {
    position: relative;
}
body:not(.dark-mode) .auth-showcase,
body:not(.dark-mode) .hero-landing {
    background:
        radial-gradient(circle at top left, rgba(255,255,255,.22), transparent 33%),
        linear-gradient(150deg, #16324d 0%, #1d4567 55%, #b88b37 100%) !important;
}
.kazafin-badge,
.kazafin-kicker {
    background: rgba(200,154,61,.16);
    border-color: rgba(200,154,61,.24);
    color: var(--kazafin-ink);
}
.hero-badge--brand.kazafin-badge {
    background: rgba(255,249,239,.18);
    border-color: rgba(255,255,255,.22);
    color: #fff;
}
.brand-mini-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: .8rem;
    background: linear-gradient(160deg, var(--kazafin-gold), var(--kazafin-gold-dark));
    color: #fff;
    font-weight: 800;
    box-shadow: 0 10px 24px rgba(0,0,0,.16);
}
.brand-mini-logo--light {
    width: 2.4rem;
    height: 2.4rem;
    border-radius: .95rem;
    font-size: 1.15rem;
}
.hero-landing--single h1 {
    max-width: 14ch !important;
    font-size: clamp(1.9rem, 5.2vw, 3.15rem);
}
.hero-landing--single .lead {
    max-width: 28ch;
}
.hero-landing--single .btn,
.auth-panel--trim .btn {
    border-radius: 1rem;
    font-weight: 700;
}
.btn-primary,
.btn-install {
    background: linear-gradient(135deg, var(--kazafin-gold) 0%, #d4ab57 100%);
    border-color: transparent;
    color: #fff;
}
.btn-primary:hover,
.btn-primary:focus,
.btn-install:hover,
.btn-install:focus {
    background: linear-gradient(135deg, #b98529 0%, #c99b40 100%);
    color: #fff;
}
.btn-outline-primary {
    color: var(--kazafin-ink);
    border-color: rgba(24,50,76,.2);
}
.btn-outline-primary:hover,
.btn-outline-secondary:hover {
    background: rgba(24,50,76,.06);
    color: var(--kazafin-ink);
}
.auth-panel--trim .auth-form-card {
    max-width: 520px !important;
}
.auth-panel--trim .form-control,
.auth-panel--trim .form-select {
    border-radius: 1rem;
    border-color: rgba(24,50,76,.14);
    padding-inline: 1rem;
}
.auth-panel--trim .form-control:focus,
.auth-panel--trim .form-select:focus {
    border-color: rgba(200,154,61,.6);
    box-shadow: 0 0 0 .2rem rgba(200,154,61,.14);
}
.kazafin-demo-card {
    background: rgba(22,62,99,.06);
    border: 1px solid rgba(22,62,99,.08);
}
.flash-overlay {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(10, 18, 31, .28);
}
.flash-dialog {
    width: min(100%, 420px);
    background: #fff;
    border-radius: 1.6rem;
    border: 1px solid rgba(24,50,76,.08);
    box-shadow: 0 28px 80px rgba(15,23,42,.22);
    padding: 1.35rem 1.2rem 1.2rem;
    position: relative;
    text-align: center;
}
.flash-dialog__close {
    position: absolute;
    top: .85rem;
    right: .85rem;
    width: 2rem;
    height: 2rem;
    border: 0;
    background: transparent;
    color: #6b7280;
    border-radius: 999px;
}
.flash-dialog__icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 1.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: .8rem;
}
.flash-dialog__eyebrow {
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: .3rem;
}
.flash-dialog__title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--kazafin-ink);
    margin-bottom: .45rem;
}
.flash-dialog__message {
    color: #5b6574;
    margin-bottom: 1rem;
}
.flash-dialog--error .flash-dialog__icon {
    background: rgba(220,53,69,.12);
    color: #c52f43;
}
.flash-dialog--error .flash-dialog__eyebrow {
    color: #c52f43;
}
.flash-dialog--success .flash-dialog__icon {
    background: rgba(25,135,84,.12);
    color: #198754;
}
.flash-dialog--success .flash-dialog__eyebrow {
    color: #198754;
}
body.dark-mode .flash-overlay {
    background: rgba(0, 0, 0, .45);
}
body.dark-mode .flash-dialog {
    background: #101a2f;
    border-color: rgba(255,255,255,.08);
}
body.dark-mode .flash-dialog__title {
    color: #eef4ff;
}
body.dark-mode .flash-dialog__message,
body.dark-mode .flash-dialog__close {
    color: #c6d0e1;
}
@media (max-width: 767.98px) {
    .hero-landing--single h1 {
        font-size: clamp(1.75rem, 7vw, 2.4rem);
    }
    .flash-dialog {
        width: min(100%, 360px);
        padding: 1.2rem 1rem 1rem;
    }
}

.install-help-text { display: none !important; }

body.auth-overlay-open { overflow: hidden; }
.flash-overlay { position: fixed !important; inset: 0 !important; z-index: 5000 !important; }
.flash-dialog { pointer-events: auto; }
.profile-dailies-toggle { border-top: 1px solid var(--app-border); padding-top: 1rem; }
.chip-success { background: rgba(25,135,84,.12); color: #198754; }
.chip-danger { background: rgba(220,53,69,.12); color: #dc3545; }
body.dark-mode .chip-success { color: #50d991; }
body.dark-mode .chip-danger { color: #ff8e9a; }

.daily-month-nav { justify-content: flex-end; }
@media (max-width: 767.98px) { .daily-month-nav { width: 100%; justify-content: center; } }


.report-breakdown-item {
    padding: 0.85rem 1rem;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.55);
}

.dark-mode .report-breakdown-item {
    background: rgba(15, 23, 42, 0.5);
    border-color: rgba(148, 163, 184, 0.14);
}


.report-chart-wrap {
    position: relative;
    width: 100%;
}

.report-chart-wrap--flow {
    min-height: 220px;
    max-height: 220px;
}

.report-chart-wrap--category {
    min-height: 220px;
    max-height: 220px;
}

.report-chart-wrap--compact {
    height: 220px;
}

.reports-chart-card canvas {
    width: 100% !important;
    height: 100% !important;
}

@media (max-width: 767.98px) {
    .report-chart-wrap--flow {
        min-height: 240px;
        max-height: 240px;
    }

    .report-chart-wrap--category {
        min-height: 240px;
        max-height: 240px;
    }

    .report-chart-wrap--compact {
        height: 240px;
    }
}
.report-items-list {
    margin-top: 1rem;
}
.report-expense-row {
    padding: 1rem 1.1rem;
    border: 1px solid rgba(148, 163, 184, .18);
    border-radius: 1rem;
    background: rgba(255, 255, 255, .56);
}
.dark-mode .report-expense-row {
    background: rgba(15, 23, 42, .55);
    border-color: rgba(148, 163, 184, .22);
}
.report-expense-main {
    flex: 1 1 320px;
    min-width: 0;
}
.report-expense-meta {
    min-width: 116px;
}
.report-dot {
    opacity: .55;
}
@media (max-width: 991.98px) {
    .report-expense-row {
        align-items: center !important;
        flex-wrap: nowrap !important;
    }
    .report-expense-main {
        flex: 1 1 auto;
    }
    .report-expense-meta {
        width: auto;
        min-width: auto;
        text-align: right !important;
        margin-left: auto;
        flex-shrink: 0;
    }
}

.report-expense-meta { min-width: 170px; }
@media (max-width: 767.98px) {
  .report-expense-row { align-items: flex-start; }
  .report-expense-main { min-width: 0; flex: 1 1 auto; }
  .report-expense-meta { min-width: auto; margin-left: auto; flex: 0 0 auto; white-space: nowrap; }
}


.daily-month-nav { width: auto; }
.daily-private-note-wrap { width: 100%; display: flex; justify-content: flex-end; }
.daily-private-note { margin-left: 0; }
.report-dailies-stats .dashboard-stat-card .display-6 { font-size: clamp(1.6rem, 2vw, 2.2rem); }
.report-compare-card { border: 1px solid rgba(148, 163, 184, .18); border-radius: 1rem; background: rgba(255, 255, 255, .56); padding: 1.1rem; }
body.dark-mode .report-compare-card { background: rgba(15, 23, 42, .55); border-color: rgba(148, 163, 184, .22); }
.report-compare-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 767.98px) {
  .report-compare-grid { grid-template-columns: 1fr; }
  .daily-private-note-wrap { justify-content: flex-end; }
  .bottom-nav { gap: .2rem; padding: .25rem; }
  .bottom-nav__item.active::after { width: 1.3rem; }
}


.daily-list-header {
    position: relative;
    padding: 1rem 1.05rem 0;
    margin: -.25rem -.25rem 1.2rem;
    border-radius: 1.15rem;
    background: linear-gradient(180deg, rgba(47,111,237,.08), rgba(47,111,237,.03));
    border: 1px solid rgba(47,111,237,.10);
}
body.dark-mode .daily-list-header {
    background: linear-gradient(180deg, rgba(47,111,237,.16), rgba(47,111,237,.05));
    border-color: rgba(148,163,184,.16);
}
.daily-list-overline {
    font-size: .76rem;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--app-muted) !important;
    font-weight: 700;
}
.daily-list-title-wrap {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
}
.daily-list-title {
    font-size: clamp(1.02rem, 1.2vw, 1.18rem);
    font-weight: 800;
    letter-spacing: -.01em;
    color: var(--app-text);
}
.daily-list-date-chip {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .45rem .8rem;
    border-radius: 999px;
    background: rgba(255,255,255,.85);
    border: 1px solid rgba(47,111,237,.14);
    color: var(--app-primary);
    font-size: .82rem;
    font-weight: 700;
    box-shadow: var(--app-shadow-sm);
}
body.dark-mode .daily-list-date-chip {
    background: rgba(10,19,35,.9);
    border-color: rgba(148,163,184,.16);
}
.daily-list-header .daily-month-nav {
    margin-top: 1rem !important;
    padding-top: .9rem;
    border-top: 1px solid rgba(148,163,184,.14);
}
.daily-list-header .daily-month-nav .page-kicker {
    background: rgba(255,255,255,.9);
    border: 1px solid rgba(47,111,237,.14);
    box-shadow: var(--app-shadow-sm);
}
body.dark-mode .daily-list-header .daily-month-nav .page-kicker {
    background: rgba(10,19,35,.9);
    border-color: rgba(148,163,184,.16);
}
@media (max-width: 767.98px) {
    .daily-list-header {
        padding: .95rem .95rem 0;
        margin: -.15rem -.15rem 1rem;
    }
    .daily-list-title-wrap {
        align-items: flex-start;
        gap: .55rem;
    }
    .daily-list-date-chip {
        width: 100%;
        justify-content: center;
    }
}
.daily-list-header__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.daily-private-note-wrap {
    margin-left: auto;
    display: flex;
    justify-content: flex-end;
    align-self: flex-start;
}
.daily-list-header .daily-month-nav {
    width: 100%;
    justify-content: flex-start;
}
@media (max-width: 767.98px) {
    .daily-list-header__top {
        align-items: flex-start;
    }
    .daily-list-header .daily-month-nav {
        justify-content: flex-start;
    }
}


/* === Conservative auth/index visual refresh: colors + logo only === */
:root {
  --kazafin-navy: #143a5a;
  --kazafin-navy-soft: #1d4d74;
  --kazafin-emerald: #5fbf90;
  --kazafin-emerald-dark: #3fa876;
  --kazafin-sky: #eaf4fb;
  --kazafin-cream-soft: #f7fbfd;
}

.auth-shell,
.landing-shell {
  background:
    radial-gradient(circle at top left, rgba(95,191,144,.10), transparent 28%),
    radial-gradient(circle at bottom right, rgba(20,58,90,.08), transparent 22%),
    linear-gradient(180deg, #f9fcfe 0%, #eef5fa 100%) !important;
}

body:not(.dark-mode) .auth-showcase,
body:not(.dark-mode) .hero-landing {
  background:
    radial-gradient(circle at top left, rgba(255,255,255,.16), transparent 30%),
    radial-gradient(circle at bottom right, rgba(95,191,144,.24), transparent 26%),
    linear-gradient(145deg, var(--kazafin-navy) 0%, var(--kazafin-navy-soft) 72%, #2f6b7f 100%) !important;
}

.hero-badge--brand.kazafin-badge,
.kazafin-badge-soft {
  background: rgba(255,255,255,.12) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255,255,255,.16) !important;
  backdrop-filter: blur(6px);
}

.kazafin-brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: .9rem;
}

.kazafin-brand-lockup--center {
  justify-content: center;
  text-align: left;
}

.kazafin-brand-lockup--light .kazafin-brand-name,
.kazafin-brand-lockup--light .kazafin-brand-tag {
  color: #ffffff;
}

.kazafin-brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.kazafin-brand-name {
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  font-weight: 800;
  letter-spacing: -.02em;
}

.kazafin-brand-tag {
  font-size: .8rem;
  opacity: .82;
  margin-top: .22rem;
}

.brand-mini-logo {
  position: relative;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: .95rem;
  background: linear-gradient(145deg, var(--kazafin-emerald) 0%, #79d4a8 50%, #dff7ec 50%, var(--kazafin-navy) 100%) !important;
  color: #fff;
  font-weight: 900;
  box-shadow: 0 14px 28px rgba(20,58,90,.22);
}

.brand-mini-logo::after {
  content: '';
  position: absolute;
  inset: .16rem;
  border-radius: .78rem;
  border: 1px solid rgba(255,255,255,.22);
}

.brand-mini-logo--hero {
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 1.1rem;
  font-size: 1rem;
}

.brand-mini-logo--light {
  width: 2.7rem;
  height: 2.7rem;
  border-radius: 1.05rem;
  font-size: 1.05rem;
}

.hero-landing--single h1,
.auth-panel--trim h1,
.auth-panel--trim .h2 {
  color: #ffffff;
}

.auth-panel--trim .auth-form-card h1,
.auth-panel--trim .auth-form-card .h2,
.auth-panel--trim .text-primary {
  color: var(--kazafin-navy) !important;
}

.hero-landing--single .lead,
.auth-showcase p,
.auth-showcase .small {
  color: rgba(255,255,255,.85) !important;
}

.auth-panel--trim .auth-form-card {
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(250,252,254,.96)) !important;
  border: 1px solid rgba(20,58,90,.08) !important;
  box-shadow: 0 24px 54px rgba(20,58,90,.10) !important;
}

.btn-primary,
.btn-install {
  background: linear-gradient(135deg, var(--kazafin-emerald) 0%, var(--kazafin-emerald-dark) 100%) !important;
  color: #fff !important;
  border: 0 !important;
  box-shadow: 0 14px 28px rgba(63,168,118,.24) !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-install:hover,
.btn-install:focus {
  background: linear-gradient(135deg, #56b886 0%, #379868 100%) !important;
  color: #fff !important;
}

.btn-outline-primary,
.btn-outline-secondary {
  color: var(--kazafin-navy) !important;
  border-color: rgba(20,58,90,.18) !important;
}

.btn-outline-primary:hover,
.btn-outline-secondary:hover {
  background: rgba(20,58,90,.05) !important;
  color: var(--kazafin-navy) !important;
}

.kazafin-demo-card {
  background: rgba(95,191,144,.08) !important;
  border: 1px solid rgba(95,191,144,.16) !important;
  color: var(--kazafin-navy);
}

.auth-panel--trim .form-control:focus,
.auth-panel--trim .form-select:focus {
  border-color: rgba(95,191,144,.55) !important;
  box-shadow: 0 0 0 .2rem rgba(95,191,144,.14) !important;
}

@media (max-width: 991.98px) {
  .kazafin-brand-lockup--center {
    justify-content: center;
  }

  .kazafin-brand-copy {
    text-align: left;
  }

  .hero-landing--single h1 {
    color: #ffffff;
  }
}


/* === Auth/onboarding stability fix === */
body.auth-no-scroll,
body.landing-no-scroll {
  overflow-x: hidden !important;
}

.auth-stage,
.landing-main--single {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-main-shell {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
}

.auth-panel--trim {
  width: 100%;
  max-width: 1080px;
  min-height: min(86dvh, 760px);
  margin: 0 auto;
  overflow: hidden;
  border-radius: 2rem;
}

.auth-panel--trim .row {
  min-height: inherit;
}

.auth-showcase,
.auth-form-wrap {
  min-height: inherit;
}

.auth-showcase {
  padding: clamp(1.75rem, 3vw, 2.5rem);
}

.auth-form-wrap {
  padding: clamp(1.25rem, 3vw, 2rem);
}

.auth-form-card {
  width: 100% !important;
  max-width: 520px !important;
  margin-inline: auto;
  padding: clamp(1.35rem, 2.4vw, 2rem);
  box-sizing: border-box;
}

.auth-form-card form,
.auth-form-card .row {
  width: 100%;
  margin-left: 0;
  margin-right: 0;
}

.auth-form-card .row > * {
  padding-left: .5rem;
  padding-right: .5rem;
}

.auth-form-card .form-control,
.auth-form-card .form-select,
.auth-form-card .btn {
  width: 100%;
}

.auth-brand-safe .hero-badge,
.auth-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.hero-landing--single {
  width: 100%;
  max-width: 980px;
  min-height: min(84dvh, 760px);
  padding: clamp(2rem, 4vw, 3rem);
  text-align: center;
}

.hero-landing--single .hero-actions {
  width: 100%;
  max-width: 460px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr;
}

.hero-landing--single .btn {
  width: 100%;
}

@media (min-width: 768px) {
  .hero-landing--single .hero-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 991.98px) {
  .auth-stage {
    align-items: stretch;
  }

  .auth-main-shell {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .auth-panel--trim {
    min-height: auto;
    border-radius: 1.5rem;
  }

  .auth-form-wrap {
    min-height: auto;
    padding: 1rem;
  }

  .auth-form-card {
    max-width: 100% !important;
    padding: 1.35rem;
  }

  .hero-landing--single {
    min-height: auto;
    border-radius: 1.5rem;
    padding: 1.75rem 1.25rem;
  }

  .hero-landing--single h1 {
    font-size: clamp(2rem, 8vw, 2.8rem) !important;
  }
}


/* === Auth forms layout hard fix === */
.auth-panel--trim .auth-form-wrap {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.auth-panel--trim .auth-form-card {
  width: 100% !important;
  max-width: 540px !important;
  margin: 0 auto !important;
  background: rgba(255,255,255,.96) !important;
  border: 1px solid rgba(20,58,90,.08) !important;
  border-radius: 1.75rem !important;
  box-shadow: 0 26px 70px rgba(16,42,67,.12) !important;
  overflow: hidden !important;
}

.auth-panel--trim .auth-form-card .auth-card-inner {
  padding: clamp(1.4rem, 2.8vw, 2rem) !important;
}

.auth-panel--trim .auth-form-card form {
  display: block !important;
  width: 100% !important;
}

.auth-panel--trim .auth-form-card .form-label {
  display: block !important;
  margin-bottom: .5rem !important;
  font-weight: 600 !important;
  color: var(--kazafin-navy, #143a5a) !important;
}

.auth-panel--trim .auth-form-card .form-control,
.auth-panel--trim .auth-form-card .form-select {
  width: 100% !important;
  min-height: 52px !important;
  padding: .85rem 1rem !important;
  border-radius: 1rem !important;
  border: 1px solid rgba(20,58,90,.14) !important;
  background: #fff !important;
  box-shadow: none !important;
}

.auth-panel--trim .auth-form-card .form-control::placeholder {
  color: #8a97a6 !important;
}

.auth-panel--trim .auth-form-card .btn {
  min-height: 50px !important;
  border-radius: 1rem !important;
  font-weight: 700 !important;
}

.auth-form-stack > * + * {
  margin-top: 1rem !important;
}

.auth-register-grid {
  --bs-gutter-x: 1rem !important;
  --bs-gutter-y: 1rem !important;
  margin-right: 0 !important;
  margin-left: 0 !important;
}

.auth-register-grid > [class*="col-"] {
  padding-right: 0 !important;
  padding-left: 0 !important;
}

.auth-register-grid .auth-split {
  display: grid !important;
  gap: 1rem !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.auth-register-grid .auth-actions {
  display: grid !important;
  gap: .75rem !important;
}

.auth-register-grid .form-hint {
  margin-top: .35rem !important;
  font-size: .875rem !important;
  color: #6e7b88 !important;
}

.kazafin-auth-header {
  text-align: center !important;
  margin-bottom: 1.5rem !important;
}

.kazafin-auth-header .page-kicker {
  display: inline-flex !important;
  align-items: center !important;
  gap: .45rem !important;
}

.kazafin-demo-card {
  border-radius: 1rem !important;
  margin-bottom: 1rem !important;
}

.hero-landing--single .kazafin-brand-lockup {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: .9rem !important;
  flex-wrap: wrap !important;
  margin-bottom: 1rem !important;
}

.hero-landing--single .kazafin-brand-copy {
  text-align: left !important;
}

.hero-landing--single .kazafin-brand-name {
  font-size: clamp(1.4rem, 4vw, 1.9rem) !important;
  line-height: 1 !important;
}

.hero-landing--single .kazafin-brand-tag {
  font-size: .92rem !important;
  color: rgba(255,255,255,.76) !important;
}

@media (max-width: 991.98px) {
  .auth-panel--trim {
    max-width: 720px !important;
  }

  .auth-panel--trim .auth-form-card {
    max-width: 100% !important;
  }

  .auth-register-grid .auth-split {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 575.98px) {
  .auth-panel--trim {
    border-radius: 1.25rem !important;
  }

  .auth-panel--trim .auth-form-wrap {
    padding: .9rem !important;
  }

  .auth-panel--trim .auth-form-card .auth-card-inner {
    padding: 1.15rem !important;
  }

  .auth-panel--trim .auth-form-card .form-control,
  .auth-panel--trim .auth-form-card .form-select,
  .auth-panel--trim .auth-form-card .btn {
    min-height: 48px !important;
  }

  .hero-landing--single .kazafin-brand-lockup,
  .hero-landing--single .kazafin-brand-copy {
    justify-content: center !important;
    text-align: center !important;
  }
}
