﻿:root {
    --app-primary: #0b2f4a;
    --app-primary-dark: #062238;
    --app-primary-soft: rgba(15, 107, 99, .12);
    --app-bg: #f3f8f6;
    --app-bg-secondary: #e6f1ed;
    --app-surface: rgba(255,255,255,.96);
    --app-surface-strong: #ffffff;
    --app-text: #102638;
    --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(15,107,99,.16);
}

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; }

.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 (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: #0b2f4a;
    --app-primary-dark: #062238;
    --app-primary-soft: rgba(15,107,99,.13);
}
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: #0b2f4a;
    --app-primary-dark: #062238;
    --app-primary-soft: rgba(15,107,99,.13);
    --app-bg: #f3f8f6;
    --app-bg-secondary: #e6f1ed;
}
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;
    }
}
.sales-screen-card {
    overflow: hidden;
}
.sales-screen {
    min-height: 210px;
    border-radius: 1.1rem;
    padding: 1rem;
    margin-bottom: 1rem;
    color: #fff;
    background: linear-gradient(150deg,#123d61,#1f8f78);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.14);
}
.sales-screen--accounts {
    background: linear-gradient(150deg,#173955,#f2be63);
}
.sales-screen--family {
    background: linear-gradient(150deg,#123d61,#67c587);
}
.sales-screen span,
.sales-screen small {
    color: rgba(255,255,255,.78);
}
.sales-screen b {
    font-size: 1.8rem;
}


/* === Kazafin brand + PWA polish === */
:root {
  --kazafin-blue: #0b2f4a;
  --kazafin-green: #2fbf71;
  --kazafin-green-dark: #0f6b63;
}
.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%;
  }
}


.flash-overlay {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(11, 47, 74, .34);
    backdrop-filter: blur(8px);
}
.flash-dialog {
    position: relative;
    width: min(100%, 420px);
    padding: 1.55rem 1.35rem 1.2rem;
    border-radius: 1.35rem;
    border: 1px solid rgba(255, 255, 255, .72);
    background: #ffffff;
    box-shadow: 0 26px 70px rgba(11, 47, 74, .24);
    text-align: center;
    pointer-events: auto;
}
.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(--app-text);
    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; }
.profile-dailies-toggle { border-top: 1px solid var(--app-border); padding-top: 1rem; }
.profile-linked-list {
    display: grid;
    gap: .85rem;
}
.profile-linked-member {
    border: 1px solid var(--app-border);
    border-radius: 1rem;
    background: color-mix(in srgb, var(--app-primary) 8%, white 92%);
    box-shadow: var(--app-shadow-sm);
    overflow: hidden;
}
body.dark-mode .profile-linked-member {
    background: color-mix(in srgb, var(--app-primary) 12%, #101a2f 88%);
}
.profile-linked-member__main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.1rem;
}
.profile-linked-member__info {
    min-width: 0;
    padding-inline-start: .15rem;
}
.profile-linked-member__info .small {
    overflow-wrap: anywhere;
}
.profile-linked-member__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: .5rem;
    padding-inline-end: .15rem;
}
.profile-linked-member__actions .btn,
.profile-linked-member__actions .badge {
    white-space: nowrap;
}
@media (max-width: 767.98px) {
    .profile-linked-member__main {
        align-items: stretch;
        flex-direction: column;
        padding: 1rem;
    }
    .profile-linked-member__actions {
        justify-content: flex-start;
    }
.profile-linked-member__actions .btn {
        flex: 1 1 auto;
    }
}
.admin-user-list {
    display: grid;
    gap: 1rem;
}
.admin-user-card {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(180px, .45fr) minmax(280px, .75fr);
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    border: 1px solid var(--app-border);
    border-radius: 1rem;
    background: color-mix(in srgb, var(--app-primary) 8%, white 92%);
    box-shadow: var(--app-shadow-sm);
}
body.dark-mode .admin-user-card {
    background: color-mix(in srgb, var(--app-primary) 12%, #101a2f 88%);
}
.admin-user-card__identity {
    display: flex;
    align-items: center;
    gap: .85rem;
    min-width: 0;
}
.admin-user-avatar {
    width: 2.75rem;
    height: 2.75rem;
    min-width: 2.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: .9rem;
    background: var(--app-primary);
    color: #fff;
    font-weight: 800;
}
.admin-user-card__text,
.admin-user-card__meta {
    min-width: 0;
}
.admin-user-card__text strong,
.admin-user-card__text span,
.admin-user-card__meta span {
    display: block;
    overflow-wrap: anywhere;
}
.admin-user-card__badges {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    margin-top: .55rem;
}
.admin-user-card__meta {
    color: var(--app-muted);
    font-size: .86rem;
    display: grid;
    gap: .25rem;
}
.admin-user-card__actions,
.admin-plan-form {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: .5rem;
}
.admin-plan-form .form-select {
    width: auto;
    min-width: 112px;
}
.admin-access-item__agent {
    max-width: 760px;
    overflow-wrap: anywhere;
}
@media (max-width: 1199.98px) {
    .admin-user-card {
        grid-template-columns: 1fr;
        align-items: stretch;
    }
    .admin-user-card__actions,
    .admin-plan-form {
        justify-content: flex-start;
    }
}
@media (max-width: 767.98px) {
    .admin-user-card__actions .btn,
    .admin-plan-form .btn,
    .admin-plan-form .form-select {
        width: 100%;
    }
}
.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; }
}


.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;
    }
}


.family-stat-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.family-priority-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.family-member-card {
    align-items: stretch;
}
.family-avatar,
.emoji-badge {
    width: 2.6rem;
    height: 2.6rem;
    min-width: 2.6rem;
    border-radius: .95rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(47,111,237,.1);
    color: var(--app-primary);
    font-weight: 800;
    box-shadow: inset 0 0 0 1px rgba(47,111,237,.12);
}
body.dark-mode .family-avatar,
body.dark-mode .emoji-badge {
    background: rgba(47,111,237,.18);
}
.hero-chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
}
.hero-chip {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .55rem .8rem;
    border-radius: 999px;
    border: 1px solid var(--app-border);
    background: rgba(255,255,255,.72);
    font-weight: 600;
}
body.dark-mode .hero-chip {
    background: rgba(15,23,42,.62);
}
@media (max-width: 991.98px) {
    .family-stat-grid,
    .family-priority-grid {
        grid-template-columns: 1fr 1fr;
    }
}
@media (max-width: 767.98px) {
    .family-stat-grid,
    .family-priority-grid {
        grid-template-columns: 1fr;
    }
}

.sales-page{min-height:100vh;color:#123d61;background:linear-gradient(180deg,#ffffff 0%,#edf8f1 42%,#dff3e8 100%)}
.sales-nav,.sales-hero,.sales-section{width:min(1180px,calc(100% - 2rem));margin:0 auto}
.sales-nav{padding:1rem 0;display:flex;align-items:center;justify-content:space-between;gap:1rem}
.sales-brand{display:inline-flex;align-items:center;gap:.75rem;color:inherit;text-decoration:none}
.sales-brand img{width:3.25rem;height:3.25rem}.sales-brand strong,.sales-brand small{display:block}.sales-brand small{color:#60758a;font-weight:600}
.sales-nav nav,.sales-actions{display:flex;align-items:center;gap:.75rem;flex-wrap:wrap}
.sales-nav a,.sales-btn{color:#123d61;text-decoration:none;font-weight:800}
.sales-btn{min-height:2.9rem;border:1px solid rgba(18,61,97,.16);background:rgba(255,255,255,.82);border-radius:.9rem;padding:.72rem 1rem;display:inline-flex;align-items:center;justify-content:center;gap:.45rem}
.sales-btn--solid{border:0;color:#fff!important;background:linear-gradient(135deg,#123d61 0%,#1f8f78 62%,#67c587 100%);box-shadow:0 18px 36px rgba(18,61,97,.18)}
.sales-hero{min-height:76vh;display:grid;grid-template-columns:minmax(0,1fr) minmax(330px,.82fr);gap:2rem;align-items:center;padding:2rem 0 3rem}
.sales-pill{display:inline-flex;align-items:center;gap:.5rem;border-radius:999px;padding:.62rem .85rem;background:rgba(31,143,120,.1);color:#1f8f78;font-weight:800}
.sales-hero h1{font-size:clamp(3.2rem,10vw,7rem);line-height:.9;font-weight:900;margin:1rem 0;letter-spacing:0}
.sales-hero p,.sales-section__head p{color:#60758a;font-size:1.08rem;max-width:42rem}.sales-actions{margin-top:1.4rem}
.sales-preview{background:#123d61;color:#fff;border-radius:1.75rem;padding:1.1rem;box-shadow:0 30px 70px rgba(18,61,97,.22)}
.sales-preview__top{display:flex;gap:.38rem;margin-bottom:1rem}.sales-preview__top span{width:.7rem;height:.7rem;border-radius:50%;background:rgba(255,255,255,.32)}
.sales-preview__header,.sales-list div{display:flex;justify-content:space-between;gap:1rem;align-items:center}.sales-preview__header small,.sales-preview__header strong{display:block}.sales-preview__header small{color:#b8c7d4;font-weight:700}.sales-preview__header strong{font-size:1.25rem}
.sales-metrics{display:grid;grid-template-columns:repeat(3,1fr);gap:.75rem;margin:1rem 0}.sales-metrics article,.sales-list{border:1px solid rgba(255,255,255,.13);background:rgba(255,255,255,.08);border-radius:1rem;padding:.9rem}.sales-metrics small,.sales-list span{color:#c7d3df}.sales-metrics strong{display:block;margin-top:.3rem}.sales-list div{padding:.75rem 0;border-bottom:1px solid rgba(255,255,255,.12)}.sales-list div:last-child{border-bottom:0}
.sales-section{padding:2.5rem 0}.sales-section__head{max-width:48rem;margin-bottom:1.4rem}.sales-section__head h2{font-size:clamp(1.9rem,4vw,3rem);font-weight:900;margin-bottom:.6rem}
.sales-grid{display:grid;gap:1rem}.sales-grid--features{grid-template-columns:repeat(3,minmax(0,1fr))}.sales-grid--plans{grid-template-columns:repeat(4,minmax(0,1fr))}
.sales-grid article{background:rgba(255,255,255,.9);border:1px solid rgba(18,61,97,.1);border-radius:1.2rem;padding:1.25rem;box-shadow:0 18px 42px rgba(18,61,97,.07)}.sales-grid article>i{width:2.8rem;height:2.8rem;display:inline-flex;align-items:center;justify-content:center;border-radius:.9rem;background:rgba(31,143,120,.12);color:#1f8f78;font-size:1.25rem;margin-bottom:.8rem}.sales-grid h3{font-weight:900}.sales-grid p,.sales-grid li{color:#60758a}.sales-grid--plans article strong{display:block;font-size:2rem;margin:.5rem 0}.sales-grid--plans .is-featured{border-color:rgba(31,143,120,.42);transform:translateY(-.35rem)}.sales-plan-badge{display:inline-flex;border-radius:999px;padding:.35rem .65rem;color:#fff;background:#1f8f78;font-weight:800;font-size:.8rem}
@media (max-width:991.98px){.sales-nav{flex-direction:column;align-items:flex-start}.sales-hero,.sales-grid--features,.sales-grid--plans{grid-template-columns:1fr}.sales-hero{min-height:auto}.sales-nav nav{justify-content:flex-start}}

/* Brand refresh: finance, agenda and control */
.theme-default {
    --app-primary: #0b2f4a;
    --app-primary-dark: #062238;
    --app-primary-soft: rgba(15, 107, 99, .13);
}
.auth-showcase {
    background:
        radial-gradient(circle at 18% 12%, rgba(244,189,79,.24), transparent 30%),
        linear-gradient(145deg, #0b2f4a 0%, #0f6b63 58%, #2fbf71 100%) !important;
}
.auth-main::before { background: rgba(47,191,113,.30) !important; }
.auth-main::after { background: rgba(244,189,79,.24) !important; }
.kazafin-kicker,
.page-kicker {
    color: #0f6b63;
}
.brand-mark,
.auth-logo,
.dashboard-stat-icon,
.icon-chip {
    color: #0b2f4a;
}
.btn-primary,
.sales-btn--solid {
    background: linear-gradient(135deg, #0b2f4a 0%, #0f6b63 62%, #2fbf71 100%) !important;
    border-color: transparent !important;
}
.btn-outline-primary {
    color: #0b2f4a !important;
    border-color: rgba(15,107,99,.35) !important;
}
.btn-outline-primary:hover {
    color: #fff !important;
    background: #0f6b63 !important;
}
.sales-page {
    color: #102638;
    background:
        radial-gradient(circle at 78% 8%, rgba(244,189,79,.22), transparent 28%),
        radial-gradient(circle at 10% 18%, rgba(47,191,113,.20), transparent 30%),
        linear-gradient(180deg, #dcece7 0%, #c9ded8 48%, #b5cec8 100%) !important;
}
.sales-brand small,
.sales-hero p,
.sales-section__head p,
.sales-grid p,
.sales-grid li {
    color: #5d7180 !important;
}
.sales-pill {
    background: rgba(15,107,99,.11) !important;
    color: #0f6b63 !important;
}
.sales-preview {
    background: linear-gradient(145deg, #0b2f4a 0%, #0f4656 52%, #0f6b63 100%) !important;
    box-shadow: 0 30px 70px rgba(11,47,74,.24) !important;
}
.sales-grid article > i {
    background: rgba(47,191,113,.13) !important;
    color: #0f6b63 !important;
}
.sales-grid--plans .is-featured {
    border-color: rgba(244,189,79,.58) !important;
    box-shadow: 0 22px 54px rgba(11,47,74,.13);
}
.sales-plan-badge {
    background: #c9891c !important;
}
.sales-screen--home,
.sales-screen--accounts,
.sales-screen--family {
    background: linear-gradient(145deg, #0b2f4a 0%, #0f6b63 100%) !important;
}

/* Product polish pass: consistent dashboard/admin/family/report cards */
.dashboard-stats-grid {
    align-items: stretch;
}
.dashboard-stat-card {
    min-height: 172px;
}
.dashboard-stat-card .card-body {
    min-height: 172px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: .75rem;
}
.dashboard-stat-card small {
    font-size: .78rem;
    line-height: 1.25;
}
.dashboard-stat-card .display-6,
.dashboard-stat-card .h3 {
    font-size: clamp(1.55rem, 3.4vw, 2.05rem) !important;
    line-height: 1.05;
    margin: 0;
    letter-spacing: 0;
    overflow-wrap: anywhere;
}
.dashboard-stat-icon {
    flex: 0 0 auto;
}
.priority-panel,
.account-card,
.agenda-card,
.reports-chart-card,
.report-compare-card {
    border-radius: 1rem !important;
}
.priority-item {
    min-height: 76px;
}
.priority-item__left strong,
.timeline-item__content strong,
.account-card h2,
.agenda-card h2 {
    font-size: .98rem;
    line-height: 1.25;
}
.family-page .card-body,
.reports-chart-card .card-body {
    font-size: .95rem;
}
.form-panel .form-control,
.form-panel .form-select,
.account-card .form-control,
.account-card .form-select {
    min-height: 46px;
}
.auth-brand-logo {
    width: 3.1rem;
    height: 3.1rem;
    border-radius: 1rem;
    box-shadow: 0 14px 28px rgba(18,61,97,.18);
}
@media (max-width: 575.98px) {
    .dashboard-stat-card,
    .dashboard-stat-card .card-body {
        min-height: 150px;
    }
    .dashboard-stat-card .display-6,
    .dashboard-stat-card .h3 {
        font-size: 1.5rem !important;
    }
}

/* Contrast guardrails for all user themes */
body.theme-default { --app-primary: #0b2f4a; --app-primary-dark: #062238; --app-primary-soft: rgba(15,107,99,.14); }
body.theme-emerald { --app-primary: #047857; --app-primary-dark: #065f46; --app-primary-soft: rgba(4,120,87,.14); }
body.theme-violet { --app-primary: #6d28d9; --app-primary-dark: #581c87; --app-primary-soft: rgba(109,40,217,.14); }
body.theme-graphite { --app-primary: #475569; --app-primary-dark: #334155; --app-primary-soft: rgba(71,85,105,.16); }
body.theme-rose { --app-primary: #be185d; --app-primary-dark: #9d174d; --app-primary-soft: rgba(190,24,93,.14); }
body.theme-teal { --app-primary: #0f766e; --app-primary-dark: #115e59; --app-primary-soft: rgba(15,118,110,.14); }
body.theme-amber { --app-primary: #b45309; --app-primary-dark: #92400e; --app-primary-soft: rgba(180,83,9,.15); }
body.theme-indigo { --app-primary: #4f46e5; --app-primary-dark: #3730a3; --app-primary-soft: rgba(79,70,229,.14); }
body.theme-mint { --app-primary: #15803d; --app-primary-dark: #166534; --app-primary-soft: rgba(21,128,61,.14); }
body.theme-coral { --app-primary: #be123c; --app-primary-dark: #9f1239; --app-primary-soft: rgba(190,18,60,.14); }
body.theme-sky { --app-primary: #0369a1; --app-primary-dark: #075985; --app-primary-soft: rgba(3,105,161,.14); }
body.theme-lavender { --app-primary: #6d28d9; --app-primary-dark: #5b21b6; --app-primary-soft: rgba(109,40,217,.14); }

body.dark-mode.theme-default { --app-primary: #5eead4; --app-primary-dark: #2dd4bf; --app-primary-soft: rgba(45,212,191,.16); }
body.dark-mode.theme-emerald { --app-primary: #6ee7b7; --app-primary-dark: #34d399; --app-primary-soft: rgba(52,211,153,.16); }
body.dark-mode.theme-violet { --app-primary: #c4b5fd; --app-primary-dark: #a78bfa; --app-primary-soft: rgba(167,139,250,.17); }
body.dark-mode.theme-graphite { --app-primary: #cbd5e1; --app-primary-dark: #94a3b8; --app-primary-soft: rgba(203,213,225,.14); }
body.dark-mode.theme-rose { --app-primary: #f9a8d4; --app-primary-dark: #f472b6; --app-primary-soft: rgba(244,114,182,.16); }
body.dark-mode.theme-teal { --app-primary: #5eead4; --app-primary-dark: #2dd4bf; --app-primary-soft: rgba(45,212,191,.16); }
body.dark-mode.theme-amber { --app-primary: #fcd34d; --app-primary-dark: #fbbf24; --app-primary-soft: rgba(251,191,36,.16); }
body.dark-mode.theme-indigo { --app-primary: #a5b4fc; --app-primary-dark: #818cf8; --app-primary-soft: rgba(129,140,248,.17); }
body.dark-mode.theme-mint { --app-primary: #86efac; --app-primary-dark: #4ade80; --app-primary-soft: rgba(74,222,128,.16); }
body.dark-mode.theme-coral { --app-primary: #fda4af; --app-primary-dark: #fb7185; --app-primary-soft: rgba(251,113,133,.16); }
body.dark-mode.theme-sky { --app-primary: #7dd3fc; --app-primary-dark: #38bdf8; --app-primary-soft: rgba(56,189,248,.16); }
body.dark-mode.theme-lavender { --app-primary: #c4b5fd; --app-primary-dark: #a78bfa; --app-primary-soft: rgba(167,139,250,.17); }

body.dark-mode {
    --bs-body-color: var(--app-text);
    --bs-secondary-color: var(--app-muted);
    --bs-border-color: var(--app-border);
}
body.dark-mode a:not(.btn):not(.bottom-nav__item):not(.sales-btn) { color: var(--app-primary); }
body.dark-mode .bottom-nav__item,
body.dark-mode .dropdown-item,
body.dark-mode .nav-link,
body.dark-mode .list-group-item,
body.dark-mode .filter-pill,
body.dark-mode .mini-calendar__day,
body.dark-mode .header-icon-btn {
    color: #dbe7f6 !important;
}
body.dark-mode .bottom-nav__item.active,
body.dark-mode .filter-pill.is-active,
body.dark-mode .mini-calendar__day.is-today .mini-calendar__number {
    color: #ffffff !important;
}
body.dark-mode .btn-outline-primary {
    color: var(--app-primary) !important;
    border-color: color-mix(in srgb, var(--app-primary) 46%, transparent) !important;
}
body.dark-mode .btn-outline-primary:hover,
body.dark-mode .btn-outline-primary:focus {
    background: color-mix(in srgb, var(--app-primary) 18%, transparent) !important;
    color: #ffffff !important;
}
body.dark-mode .btn-primary {
    color: #06101d !important;
    background: linear-gradient(135deg, var(--app-primary), var(--app-primary-dark)) !important;
}
body.dark-mode .text-primary,
body.dark-mode .page-kicker,
body.dark-mode .icon-chip,
body.dark-mode .emoji-badge,
body.dark-mode .family-avatar {
    color: var(--app-primary) !important;
}
body.dark-mode .form-control::placeholder { color: #94a3b8 !important; }
body.dark-mode .badge.text-bg-light,
body.dark-mode .badge.bg-light {
    background: rgba(15,23,42,.72) !important;
    color: #e5eefb !important;
    border-color: rgba(148,163,184,.24) !important;
}

/* Marketing/app polish pass */
.sales-page--pro {
    position: relative;
    overflow: hidden;
}
.sales-page--pro::before,
.sales-page--pro::after {
    content: '';
    position: fixed;
    z-index: 0;
    pointer-events: none;
    border-radius: 999px;
    filter: blur(12px);
}
.sales-page--pro::before {
    width: 22rem;
    height: 22rem;
    left: -8rem;
    top: 8rem;
    background: rgba(47,191,113,.18);
}
.sales-page--pro::after {
    width: 24rem;
    height: 24rem;
    right: -9rem;
    top: 3rem;
    background: rgba(244,189,79,.20);
}
.sales-page--pro > * {
    position: relative;
    z-index: 1;
}
.sales-nav--pro {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(18px);
    background: rgba(220,236,231,.74);
    border-bottom: 1px solid rgba(18,61,97,.08);
}
.sales-hero--pro {
    min-height: calc(100dvh - 5.5rem);
}
.sales-hero--pro h1 {
    max-width: 48rem;
    font-size: clamp(2.8rem, 7vw, 6.5rem);
    line-height: .92;
    letter-spacing: -.05em;
}
.sales-hero--pro p {
    font-size: clamp(1.05rem, 2vw, 1.25rem);
}
.sales-trust-row {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin-top: 1.25rem;
}
.sales-trust-row span {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .65rem .85rem;
    border: 1px solid rgba(18,61,97,.10);
    background: rgba(255,255,255,.68);
    border-radius: 999px;
    color: #123d61;
    font-weight: 800;
}
.sales-preview--pro {
    transform: rotate(1.2deg);
}
.sales-preview--pro:hover {
    transform: rotate(0deg) translateY(-.25rem);
    transition: transform .2s ease;
}
.sales-section--split {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(300px, 1.1fr);
    gap: 1.25rem;
    align-items: center;
}
.sales-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}
.sales-steps article {
    min-height: 13rem;
    padding: 1.25rem;
    border-radius: 1.35rem;
    border: 1px solid rgba(18,61,97,.10);
    background: rgba(255,255,255,.78);
    box-shadow: 0 18px 42px rgba(18,61,97,.07);
}
.sales-steps strong {
    width: 2.8rem;
    height: 2.8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
    color: #fff;
    background: linear-gradient(135deg,#0b2f4a,#0f6b63);
    margin-bottom: 1rem;
}
.auth-panel--app {
    max-width: 1120px;
}
.auth-showcase--app {
    position: relative;
    overflow: hidden;
}
.auth-showcase--app::after {
    content: '';
    position: absolute;
    right: -4rem;
    bottom: -4rem;
    width: 14rem;
    height: 14rem;
    border-radius: 50%;
    background: rgba(255,255,255,.12);
}
.auth-app-preview {
    display: grid;
    gap: .75rem;
    position: relative;
    z-index: 1;
}
.auth-app-preview div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    padding: .9rem 1rem;
    border-radius: 1rem;
    background: rgba(255,255,255,.14);
    border: 1px solid rgba(255,255,255,.16);
}
.auth-app-preview span {
    color: rgba(255,255,255,.76);
    font-weight: 700;
}
.auth-app-preview strong {
    color: #fff;
}
.auth-form-card--app {
    border-radius: 2rem !important;
}
.auth-form-card--app .form-control:focus {
    transform: translateY(-1px);
}
@media (max-width: 991.98px) {
    .sales-section--split,
    .sales-steps {
        grid-template-columns: 1fr;
    }
    .sales-nav--pro {
        position: relative;
    }
    .sales-preview--pro {
        transform: none;
    }
}
@media (max-width: 575.98px) {
    .sales-hero--pro h1 {
        letter-spacing: -.03em;
    }
    .sales-trust-row span,
    .sales-actions .sales-btn {
        width: 100%;
    }
}

/* Native app visual layer */
body.app-shell {
    min-height: 100dvh;
    background:
        radial-gradient(circle at 16% -8%, rgba(244,189,79,.22), transparent 28rem),
        radial-gradient(circle at 88% 2%, rgba(47,191,113,.18), transparent 24rem),
        linear-gradient(180deg, #eef7f3 0%, #dfeee8 44%, #d1e4dd 100%);
}
body.app-shell::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(11,47,74,.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(11,47,74,.035) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(180deg, rgba(0,0,0,.42), transparent 72%);
    z-index: 0;
}
body.dark-mode.app-shell {
    background:
        radial-gradient(circle at 18% -8%, rgba(94,234,212,.16), transparent 26rem),
        radial-gradient(circle at 88% 0%, rgba(252,211,77,.10), transparent 22rem),
        linear-gradient(180deg, #07111f 0%, #0a1727 46%, #0d1a2d 100%);
}
.app-main,
.app-header-compact,
.bottom-nav,
.fab,
.quick-actions {
    position: relative;
    z-index: 1;
}
.app-content {
    padding-top: 1.25rem;
}
.app-topbar-native {
    position: sticky;
    top: 0;
    z-index: 1040;
    padding: .85rem 0 1rem !important;
    background:
        linear-gradient(135deg, rgba(11,47,74,.96), rgba(15,107,99,.94)) !important;
    box-shadow: 0 18px 45px rgba(11,47,74,.22);
    border-bottom: 1px solid rgba(255,255,255,.12);
    backdrop-filter: blur(18px);
}
.topbar-brand-logo {
    width: 2.45rem;
    height: 2.45rem;
    border-radius: .85rem;
    background: rgba(255,255,255,.96);
    padding: .18rem;
    box-shadow: 0 10px 22px rgba(0,0,0,.16);
}
.topbar-greeting span {
    color: #fff;
    font-weight: 900;
    letter-spacing: -.02em;
}
.app-topbar-native .header-icon-btn {
    width: 2.75rem;
    height: 2.75rem;
    min-height: 2.75rem;
    padding: 0;
    border-radius: 1rem;
    background: rgba(255,255,255,.13) !important;
    border: 1px solid rgba(255,255,255,.14);
    color: #fff !important;
    box-shadow: none;
}
.app-topbar-native .header-icon-btn:hover {
    transform: translateY(-1px);
    background: rgba(255,255,255,.22) !important;
}
.page-hero {
    padding: clamp(1.05rem, 2vw, 1.4rem);
    border-radius: 1.75rem;
    background: rgba(255,255,255,.54);
    border: 1px solid rgba(255,255,255,.64);
    box-shadow: 0 18px 50px rgba(11,47,74,.08);
    backdrop-filter: blur(16px);
}
body.dark-mode .page-hero {
    background: rgba(15,23,42,.54);
    border-color: rgba(148,163,184,.14);
}
.section-title {
    letter-spacing: -.035em;
}
.page-kicker {
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--app-primary) 18%, transparent);
}
.card,
.card-soft,
.priority-panel,
.priority-item,
.timeline-item__content,
.account-card,
.agenda-card,
.form-panel {
    border-radius: 1.55rem !important;
    background: rgba(255,255,255,.74) !important;
    border: 1px solid rgba(255,255,255,.72) !important;
    box-shadow: 0 22px 58px rgba(11,47,74,.09) !important;
    backdrop-filter: blur(18px);
}
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 .account-card,
body.dark-mode .agenda-card,
body.dark-mode .form-panel {
    background: rgba(15,23,42,.74) !important;
    border-color: rgba(148,163,184,.13) !important;
    box-shadow: 0 22px 58px rgba(0,0,0,.28) !important;
}
.dashboard-stat-card,
.account-card,
.agenda-card,
.priority-panel {
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.dashboard-stat-card:hover,
.account-card:hover,
.agenda-card:hover,
.priority-panel:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--app-primary) 28%, white 72%) !important;
    box-shadow: 0 28px 70px rgba(11,47,74,.13) !important;
}
.dashboard-stat-icon,
.icon-chip,
.emoji-badge,
.family-avatar {
    border-radius: 1.05rem;
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--app-primary) 18%, transparent);
}
.filter-pills {
    gap: .7rem;
}
.filter-pill {
    background: rgba(255,255,255,.68);
    border-color: rgba(11,47,74,.08);
    box-shadow: 0 10px 24px rgba(11,47,74,.06);
}
.filter-pill.is-active {
    color: #fff;
    background: linear-gradient(135deg, #0b2f4a, #0f6b63);
    box-shadow: 0 16px 34px rgba(11,47,74,.18);
}
.bottom-nav {
    inset: auto max(.75rem, env(safe-area-inset-left)) max(.75rem, env(safe-area-inset-bottom)) max(.75rem, env(safe-area-inset-right));
    padding: .42rem;
    gap: .2rem;
    border-radius: 1.65rem;
    background: rgba(255,255,255,.72);
    border: 1px solid rgba(255,255,255,.68);
    box-shadow: 0 24px 60px rgba(11,47,74,.18);
    backdrop-filter: blur(22px);
}
body.dark-mode .bottom-nav {
    background: rgba(15,23,42,.76);
    border-color: rgba(148,163,184,.14);
}
.bottom-nav__item {
    min-width: 0;
    min-height: 3.55rem;
    border-radius: 1.25rem;
    font-weight: 800;
}
.bottom-nav__item span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.bottom-nav__item.active {
    color: #fff;
    background: linear-gradient(135deg, #0b2f4a, #0f6b63) !important;
    box-shadow: 0 14px 28px rgba(11,47,74,.22);
}
.bottom-nav__item.active::after {
    display: none;
}
.bottom-nav__item.active i {
    color: #fff;
}
.fab {
    right: max(.9rem, env(safe-area-inset-right));
    bottom: calc(5.65rem + env(safe-area-inset-bottom));
    width: 3.85rem;
    height: 3.85rem;
    border: 4px solid rgba(255,255,255,.78) !important;
    background: linear-gradient(135deg, #0b2f4a 0%, #0f6b63 62%, #2fbf71 100%) !important;
    box-shadow: 0 22px 44px rgba(11,47,74,.30) !important;
}
.fab::after {
    display: none;
}
.fab i {
    font-size: 1.45rem;
}
.quick-actions__menu {
    min-width: min(21rem, calc(100vw - 2rem));
    border-radius: 1.5rem !important;
    background: rgba(255,255,255,.88) !important;
    backdrop-filter: blur(22px);
}
.quick-actions__title strong,
.quick-actions__title small {
    display: block;
}
.quick-actions__title strong {
    color: var(--app-text);
}
.quick-actions__title small {
    color: var(--app-muted);
}
.quick-actions__menu .btn {
    justify-content: flex-start;
    gap: .6rem;
}
.mini-calendar__day {
    border-radius: 1.15rem !important;
    background: rgba(255,255,255,.66) !important;
    box-shadow: 0 10px 24px rgba(11,47,74,.05);
}
.mini-calendar__day.is-selected {
    background: linear-gradient(135deg, rgba(11,47,74,.94), rgba(15,107,99,.92)) !important;
    color: #fff !important;
}
.mini-calendar__day.is-selected small,
.mini-calendar__day.is-selected .mini-calendar__number {
    color: #fff !important;
}
.form-control,
.form-select {
    border-radius: 1.05rem;
    border-color: rgba(11,47,74,.12);
    background: rgba(255,255,255,.72);
}
.btn {
    border-radius: 1.05rem;
}
@media (min-width: 992px) {
    .bottom-nav {
        max-width: 660px;
    }
}
@media (max-width: 767.98px) {
    .app-content {
        padding-top: .85rem;
    }
    .page-hero {
        border-radius: 1.35rem;
        align-items: stretch;
    }
    .page-hero .btn {
        width: 100%;
    }
    .topbar-brand-logo {
        width: 2.25rem;
        height: 2.25rem;
    }
    .topbar-greeting span {
        max-width: 9rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .app-topbar-native .header-icon-btn {
        width: 2.45rem;
        height: 2.45rem;
        min-height: 2.45rem;
        border-radius: .9rem;
    }
    .bottom-nav {
        inset: auto max(.45rem, env(safe-area-inset-left)) max(.45rem, env(safe-area-inset-bottom)) max(.45rem, env(safe-area-inset-right));
        width: auto;
        max-width: none;
        border-radius: 1.35rem;
        padding: .3rem;
        gap: .12rem;
    }
    .bottom-nav__item {
        min-height: 3.15rem;
        padding: .46rem .12rem;
        font-size: .62rem;
        border-radius: 1rem;
    }
    .bottom-nav__item i {
        font-size: .98rem;
    }
    .fab {
        width: 3.25rem;
        height: 3.25rem;
        right: max(.75rem, env(safe-area-inset-right));
        bottom: calc(4.95rem + env(safe-area-inset-bottom));
        border-width: 3px !important;
    }
    .fab i {
        font-size: 1.2rem;
    }
}
@media (max-width: 390px) {
    .bottom-nav__item {
        min-height: 2.95rem;
        font-size: .56rem;
    }
    .bottom-nav__item i {
        font-size: .9rem;
    }
    .fab {
        bottom: calc(4.65rem + env(safe-area-inset-bottom));
    }
}

/* Hard position fix: keep app dock and FAB inside the viewport */
body.app-shell .bottom-nav {
    position: fixed !important;
    left: 50% !important;
    right: auto !important;
    bottom: calc(.85rem + env(safe-area-inset-bottom)) !important;
    transform: translateX(-50%) !important;
    width: min(660px, calc(100vw - 1.5rem)) !important;
    max-width: calc(100vw - 1.5rem) !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}
body.app-shell .quick-actions {
    position: fixed !important;
    right: calc(1rem + env(safe-area-inset-right)) !important;
    bottom: calc(5.85rem + env(safe-area-inset-bottom)) !important;
    left: auto !important;
    z-index: 1060 !important;
}
body.app-shell .quick-actions .fab {
    position: static !important;
    right: auto !important;
    bottom: auto !important;
    transform: none !important;
}
@media (max-width: 767.98px) {
    body.app-shell .bottom-nav {
        bottom: calc(.55rem + env(safe-area-inset-bottom)) !important;
        width: calc(100vw - 1rem) !important;
        max-width: calc(100vw - 1rem) !important;
    }
    body.app-shell .quick-actions {
        right: calc(.75rem + env(safe-area-inset-right)) !important;
        bottom: calc(5.1rem + env(safe-area-inset-bottom)) !important;
    }
}
@media (max-width: 390px) {
    body.app-shell .bottom-nav {
        width: calc(100vw - .7rem) !important;
        max-width: calc(100vw - .7rem) !important;
    }
    body.app-shell .quick-actions {
        bottom: calc(4.8rem + env(safe-area-inset-bottom)) !important;
    }
}

/* Consolidated public/auth essentials after legacy cleanup */
.kazafin-brand-lockup {
    display: inline-flex;
    align-items: center;
    gap: .85rem;
}
.kazafin-brand-copy {
    line-height: 1.08;
}
.kazafin-brand-name {
    font-weight: 900;
    font-size: 1.25rem;
    letter-spacing: -.03em;
}
.kazafin-brand-tag {
    color: rgba(255,255,255,.76);
    font-weight: 700;
    font-size: .88rem;
}
.auth-stage {
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-block: 1.25rem;
}
.auth-main-shell {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
}
.auth-panel--trim {
    width: 100%;
    max-width: 1120px;
    min-height: min(86dvh, 760px);
    margin: 0 auto;
    overflow: hidden;
    border-radius: 2rem;
}
.auth-panel--trim .row {
    margin: 0 !important;
}
.auth-panel--trim [class*="col-"] {
    padding-left: 0;
    padding-right: 0;
}
.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;
    overflow: hidden !important;
}
.auth-panel--trim .auth-form-card .auth-card-inner {
    padding: clamp(1.4rem, 2.8vw, 2rem) !important;
}
.auth-panel--trim .form-control,
.auth-panel--trim .form-select,
.auth-panel--trim .btn {
    min-height: 50px !important;
}
.btn-install {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    font-weight: 800;
}
.btn-install--soft {
    color: #fff !important;
    border-color: rgba(255,255,255,.24) !important;
    background: rgba(255,255,255,.14) !important;
}
.btn-install--soft:hover,
.btn-install--soft:focus {
    background: rgba(255,255,255,.22) !important;
}
@media (max-width: 991.98px) {
    .auth-stage {
        align-items: stretch;
    }
    .auth-panel--trim {
        min-height: auto;
        border-radius: 1.5rem;
    }
    .auth-panel--trim .auth-form-card {
        max-width: 100% !important;
    }
}

/* Structural restore for app chrome after legacy CSS cleanup */
body.app-shell {
    padding-bottom: calc(6.5rem + env(safe-area-inset-bottom)) !important;
}
body.app-shell .app-topbar-native {
    position: sticky !important;
    top: 0 !important;
    width: 100% !important;
}
body.app-shell .topbar-actions {
    min-width: 0;
}
body.app-shell .header-icon-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
    line-height: 1 !important;
    flex: 0 0 auto !important;
}
body.app-shell .bottom-nav {
    display: grid !important;
    align-items: stretch !important;
    grid-auto-flow: column !important;
    overflow: hidden !important;
}
body.app-shell .bottom-nav__item {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: .22rem !important;
    min-width: 0 !important;
    padding: .55rem .2rem !important;
    color: #667085 !important;
    text-align: center !important;
    text-decoration: none !important;
    line-height: 1.18 !important;
    overflow: visible !important;
}
body.app-shell .bottom-nav__item i {
    display: block !important;
    line-height: 1 !important;
}
body.app-shell .bottom-nav__item span {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    line-height: 1.28 !important;
    padding-bottom: .08rem !important;
}
body.dark-mode.app-shell .bottom-nav__item {
    color: #dbe7f6 !important;
}
body.app-shell .bottom-nav__item.active,
body.dark-mode.app-shell .bottom-nav__item.active {
    color: #fff !important;
}
body.app-shell .quick-actions {
    pointer-events: auto;
}
body.app-shell .quick-actions .fab,
body.app-shell .quick-actions .dropdown-menu,
body.app-shell .quick-actions .quick-actions__menu {
    pointer-events: auto;
}

body.app-shell .quick-actions.is-open .quick-actions__menu,
body.app-shell .quick-actions:focus-within .quick-actions__menu,
body.app-shell .quick-actions:hover .quick-actions__menu {
    display: grid !important;
    gap: 9px;
}
@media (max-width: 767.98px) {
    body.app-shell {
        padding-bottom: calc(5.8rem + env(safe-area-inset-bottom)) !important;
    }
    body.app-shell .topbar-greeting {
        min-width: 0;
    }
    body.app-shell .topbar-actions {
        gap: .35rem !important;
    }
    body.app-shell .bottom-nav__item {
        padding: .38rem .1rem .5rem !important;
        gap: .16rem !important;
    }
}

/* Structural restore for agenda calendar after legacy CSS cleanup */
.calendar-nav {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: .75rem !important;
}
.calendar-nav strong {
    flex: 1 1 auto;
    text-align: center;
    font-weight: 900;
    letter-spacing: -.02em;
}
.mini-calendar {
    display: grid !important;
    grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
    gap: .55rem !important;
    width: 100% !important;
}
.mini-calendar__weekday {
    min-width: 0;
    text-align: center;
    font-size: .78rem;
    font-weight: 900;
    color: var(--app-muted);
}
.mini-calendar__day {
    min-width: 0;
    min-height: 4.15rem;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: .25rem;
    padding: .55rem !important;
    text-decoration: none !important;
    color: var(--app-text) !important;
    border: 1px solid rgba(11,47,74,.09) !important;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.mini-calendar__day.is-empty {
    visibility: hidden !important;
    pointer-events: none !important;
}
.mini-calendar__day:hover {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--app-primary) 30%, transparent) !important;
}
.mini-calendar__number {
    width: 1.9rem;
    height: 1.9rem;
    border-radius: 999px;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: 900;
    line-height: 1;
}
.mini-calendar__day.is-today .mini-calendar__number {
    background: var(--app-primary) !important;
    color: #fff !important;
}
.mini-calendar__day.is-selected {
    border-color: transparent !important;
}
.mini-calendar__day.is-selected .mini-calendar__number {
    background: rgba(255,255,255,.18) !important;
}
.mini-calendar__dot {
    width: .52rem;
    height: .52rem;
    border-radius: 999px;
    display: inline-block !important;
    background: var(--app-primary);
}
.mini-calendar__day small {
    font-size: .72rem;
    color: var(--app-muted);
    font-weight: 800;
}
.mini-calendar__day.is-selected .mini-calendar__dot {
    background: #fff;
}
body.dark-mode .mini-calendar__weekday {
    color: var(--app-muted) !important;
}
body.dark-mode .mini-calendar__day {
    color: var(--app-text) !important;
    border-color: rgba(148,163,184,.13) !important;
}
@media (max-width: 767.98px) {
    .mini-calendar {
        gap: .32rem !important;
    }
    .mini-calendar__weekday {
        font-size: .66rem;
    }
    .mini-calendar__day {
        min-height: 3.3rem;
        padding: .36rem !important;
        border-radius: .9rem !important;
    }
    .mini-calendar__number {
        width: 1.55rem;
        height: 1.55rem;
        font-size: .82rem;
    }
    .mini-calendar__day small {
        display: none;
    }
}

/* Theme system v2: unified colors for shell, cards, menus and buttons */
body.theme-default {
    --theme-h: 199;
    --theme-s: 74%;
    --theme-p: #0b5f73;
    --theme-p-dark: #083e56;
    --theme-p-strong: #052b3c;
    --theme-a: #20b486;
    --theme-warm: #e8b44f;
}
body.theme-bronze {
    --theme-h: 34;
    --theme-s: 58%;
    --theme-p: #9a5b2f;
    --theme-p-dark: #6f3f22;
    --theme-p-strong: #1b120b;
    --theme-a: #d6a45f;
    --theme-warm: #f1c178;
}
body.theme-emerald {
    --theme-h: 154;
    --theme-s: 64%;
    --theme-p: #047857;
    --theme-p-dark: #065f46;
    --theme-p-strong: #064e3b;
    --theme-a: #34d399;
    --theme-warm: #f2c94c;
}
body.theme-violet {
    --theme-h: 262;
    --theme-s: 72%;
    --theme-p: #6d28d9;
    --theme-p-dark: #581c87;
    --theme-p-strong: #3b0764;
    --theme-a: #a78bfa;
    --theme-warm: #f0abfc;
}
body.theme-graphite {
    --theme-h: 215;
    --theme-s: 18%;
    --theme-p: #475569;
    --theme-p-dark: #334155;
    --theme-p-strong: #1e293b;
    --theme-a: #94a3b8;
    --theme-warm: #d6b36a;
}
body.theme-rose {
    --theme-h: 333;
    --theme-s: 70%;
    --theme-p: #be185d;
    --theme-p-dark: #9d174d;
    --theme-p-strong: #831843;
    --theme-a: #fb7185;
    --theme-warm: #fbbf24;
}
body.theme-teal {
    --theme-h: 176;
    --theme-s: 70%;
    --theme-p: #0f766e;
    --theme-p-dark: #115e59;
    --theme-p-strong: #134e4a;
    --theme-a: #2dd4bf;
    --theme-warm: #f59e0b;
}
body.theme-amber {
    --theme-h: 35;
    --theme-s: 84%;
    --theme-p: #b45309;
    --theme-p-dark: #92400e;
    --theme-p-strong: #78350f;
    --theme-a: #f59e0b;
    --theme-warm: #22c55e;
}
body.theme-indigo {
    --theme-h: 239;
    --theme-s: 70%;
    --theme-p: #4f46e5;
    --theme-p-dark: #3730a3;
    --theme-p-strong: #312e81;
    --theme-a: #818cf8;
    --theme-warm: #f472b6;
}
body.theme-mint {
    --theme-h: 142;
    --theme-s: 68%;
    --theme-p: #15803d;
    --theme-p-dark: #166534;
    --theme-p-strong: #14532d;
    --theme-a: #86efac;
    --theme-warm: #38bdf8;
}
body.theme-coral {
    --theme-h: 350;
    --theme-s: 78%;
    --theme-p: #be123c;
    --theme-p-dark: #9f1239;
    --theme-p-strong: #881337;
    --theme-a: #fb7185;
    --theme-warm: #f97316;
}
body.theme-sky {
    --theme-h: 201;
    --theme-s: 84%;
    --theme-p: #0369a1;
    --theme-p-dark: #075985;
    --theme-p-strong: #0c4a6e;
    --theme-a: #38bdf8;
    --theme-warm: #34d399;
}
body.theme-lavender {
    --theme-h: 263;
    --theme-s: 64%;
    --theme-p: #7c3aed;
    --theme-p-dark: #6d28d9;
    --theme-p-strong: #4c1d95;
    --theme-a: #c4b5fd;
    --theme-warm: #f0abfc;
}
body[class*="theme-"] {
    --app-primary: var(--theme-p);
    --app-primary-dark: var(--theme-p-dark);
    --app-primary-soft: hsl(var(--theme-h) var(--theme-s) 46% / .14);
    --app-bg: hsl(var(--theme-h) 44% 94%);
    --app-bg-secondary: hsl(var(--theme-h) 38% 88%);
    --app-surface: hsl(var(--theme-h) 42% 98% / .82);
    --app-surface-strong: hsl(var(--theme-h) 42% 99%);
    --app-text: hsl(var(--theme-h) 34% 15%);
    --app-muted: hsl(var(--theme-h) 16% 43%);
    --app-border: hsl(var(--theme-h) 34% 38% / .16);
    --theme-shell-bg:
        radial-gradient(circle at 16% -8%, color-mix(in srgb, var(--theme-warm) 26%, transparent), transparent 28rem),
        radial-gradient(circle at 88% 2%, color-mix(in srgb, var(--theme-a) 24%, transparent), transparent 24rem),
        linear-gradient(180deg, hsl(var(--theme-h) 50% 94%) 0%, hsl(var(--theme-h) 44% 88%) 48%, hsl(var(--theme-h) 38% 82%) 100%);
    --theme-topbar-bg: linear-gradient(135deg, var(--theme-p-strong), var(--theme-p-dark) 54%, var(--theme-p));
    --theme-card-bg: linear-gradient(180deg, hsl(var(--theme-h) 52% 99% / .88), hsl(var(--theme-h) 48% 96% / .78));
    --theme-card-border: hsl(var(--theme-h) 42% 42% / .18);
    --theme-menu-bg: hsl(var(--theme-h) 42% 97% / .82);
    --theme-menu-border: hsl(var(--theme-h) 34% 42% / .18);
    --theme-button-bg: linear-gradient(135deg, var(--theme-p-dark), var(--theme-p) 70%, var(--theme-a));
    --theme-focus-ring: 0 0 0 .25rem hsl(var(--theme-h) var(--theme-s) 46% / .18);
}
body.dark-mode[class*="theme-"] {
    --app-primary: color-mix(in srgb, var(--theme-a) 74%, white 26%);
    --app-primary-dark: var(--theme-a);
    --app-primary-soft: hsl(var(--theme-h) var(--theme-s) 66% / .18);
    --app-bg: hsl(var(--theme-h) 36% 7%);
    --app-bg-secondary: hsl(var(--theme-h) 34% 10%);
    --app-surface: hsl(var(--theme-h) 34% 13% / .82);
    --app-surface-strong: hsl(var(--theme-h) 34% 16%);
    --app-text: hsl(var(--theme-h) 35% 94%);
    --app-muted: hsl(var(--theme-h) 18% 74%);
    --app-border: hsl(var(--theme-h) 36% 78% / .14);
    --theme-shell-bg:
        radial-gradient(circle at 16% -8%, color-mix(in srgb, var(--theme-a) 18%, transparent), transparent 28rem),
        radial-gradient(circle at 88% 2%, color-mix(in srgb, var(--theme-warm) 12%, transparent), transparent 24rem),
        linear-gradient(180deg, hsl(var(--theme-h) 36% 7%) 0%, hsl(var(--theme-h) 36% 9%) 48%, hsl(var(--theme-h) 34% 11%) 100%);
    --theme-topbar-bg: linear-gradient(135deg, hsl(var(--theme-h) 40% 9%), hsl(var(--theme-h) 42% 14%) 58%, color-mix(in srgb, var(--theme-p-dark) 76%, #020617 24%));
    --theme-card-bg: linear-gradient(180deg, hsl(var(--theme-h) 34% 14% / .88), hsl(var(--theme-h) 34% 11% / .82));
    --theme-card-border: hsl(var(--theme-h) 32% 76% / .14);
    --theme-menu-bg: hsl(var(--theme-h) 34% 12% / .88);
    --theme-menu-border: hsl(var(--theme-h) 32% 76% / .16);
    --theme-button-bg: linear-gradient(135deg, color-mix(in srgb, var(--theme-a) 80%, white 20%), var(--theme-a));
    --theme-focus-ring: 0 0 0 .25rem hsl(var(--theme-h) var(--theme-s) 72% / .18);
}
body.app-shell[class*="theme-"] {
    background: var(--theme-shell-bg) !important;
    color: var(--app-text) !important;
}
body.app-shell.theme-bronze {
    --theme-shell-bg:
        radial-gradient(circle at 14% -8%, rgba(241,193,120,.38), transparent 28rem),
        radial-gradient(circle at 86% 2%, rgba(154,91,47,.25), transparent 24rem),
        linear-gradient(180deg, #f4d19a 0%, #d8a765 48%, #b77b43 100%);
    --theme-card-bg: linear-gradient(180deg, rgba(255,238,204,.90), rgba(226,174,107,.78));
    --theme-menu-bg: rgba(45,29,18,.90);
    --theme-menu-border: rgba(241,193,120,.32);
    --app-text: #24170e;
    --app-muted: #5f412d;
    --app-border: rgba(74,45,24,.22);
}
body.dark-mode.app-shell.theme-bronze {
    --theme-shell-bg:
        radial-gradient(circle at 14% -8%, rgba(214,164,95,.20), transparent 28rem),
        radial-gradient(circle at 86% 2%, rgba(154,91,47,.18), transparent 24rem),
        linear-gradient(180deg, #080604 0%, #17100b 46%, #24170e 100%);
    --theme-card-bg: linear-gradient(180deg, rgba(45,29,18,.92), rgba(25,17,12,.86));
    --theme-menu-bg: rgba(12,8,5,.92);
    --theme-menu-border: rgba(214,164,95,.24);
    --app-text: #fff3df;
    --app-muted: #dfc6a5;
    --app-border: rgba(241,193,120,.18);
}
body.app-shell.theme-bronze::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: .22;
    background-image:
        radial-gradient(ellipse 34px 18px at 8% 12%, #050403 0 45%, transparent 48%),
        radial-gradient(ellipse 42px 20px at 24% 28%, rgba(68,36,20,.72) 0 34%, #050403 36% 52%, transparent 55%),
        radial-gradient(ellipse 30px 16px at 47% 16%, #050403 0 42%, transparent 45%),
        radial-gradient(ellipse 46px 22px at 68% 34%, rgba(89,48,26,.68) 0 34%, #050403 36% 52%, transparent 55%),
        radial-gradient(ellipse 32px 18px at 84% 18%, #050403 0 42%, transparent 45%),
        radial-gradient(ellipse 50px 24px at 15% 68%, rgba(89,48,26,.66) 0 34%, #050403 36% 52%, transparent 55%),
        radial-gradient(ellipse 34px 19px at 40% 76%, #050403 0 42%, transparent 45%),
        radial-gradient(ellipse 48px 22px at 76% 72%, rgba(68,36,20,.70) 0 34%, #050403 36% 52%, transparent 55%);
    background-size: 340px 260px;
    mix-blend-mode: multiply;
}
body.dark-mode.app-shell.theme-bronze::after {
    opacity: .16;
    mix-blend-mode: screen;
}
body.app-shell.theme-bronze .app-topbar-native,
body.app-shell.theme-bronze .bottom-nav__item.active,
body.app-shell.theme-bronze .filter-pill.is-active,
body.app-shell.theme-bronze .btn-primary,
body.app-shell.theme-bronze .fab {
    background: linear-gradient(135deg, #110b07 0%, #6f3f22 48%, #d6a45f 100%) !important;
}
body.app-shell.theme-bronze .bottom-nav__item {
    color: #f7ddb1 !important;
}
body.app-shell.theme-bronze .bottom-nav__item.active {
    color: #fff7e8 !important;
}
body.app-shell.theme-bronze .page-kicker,
body.app-shell.theme-bronze .icon-chip,
body.app-shell.theme-bronze .dashboard-stat-icon,
body.app-shell.theme-bronze .emoji-badge,
body.app-shell.theme-bronze .family-avatar {
    background: rgba(111,63,34,.16) !important;
    color: #6f3f22 !important;
}
body.dark-mode.app-shell.theme-bronze .page-kicker,
body.dark-mode.app-shell.theme-bronze .icon-chip,
body.dark-mode.app-shell.theme-bronze .dashboard-stat-icon,
body.dark-mode.app-shell.theme-bronze .emoji-badge,
body.dark-mode.app-shell.theme-bronze .family-avatar {
    background: rgba(214,164,95,.16) !important;
    color: #f1c178 !important;
}

/* Mobile chrome hardening */
body.app-shell .topbar-brand-logo {
    width: 2rem !important;
    height: 2rem !important;
    min-width: 2rem !important;
    padding: 0 !important;
    border-radius: .55rem !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    object-fit: contain !important;
}
@media (max-width: 767.98px) {
    body.app-shell .app-topbar-native {
        padding: .55rem 0 .65rem !important;
    }
    body.app-shell .app-topbar-native .container {
        padding-left: .75rem !important;
        padding-right: .75rem !important;
        gap: .45rem !important;
    }
    body.app-shell .topbar-greeting {
        gap: .45rem !important;
        flex: 1 1 auto !important;
        min-width: 0 !important;
    }
    body.app-shell .topbar-brand-logo {
        width: 1.65rem !important;
        height: 1.65rem !important;
        min-width: 1.65rem !important;
    }
    body.app-shell .topbar-greeting span {
        max-width: 7.25rem !important;
        font-size: .9rem !important;
        line-height: 1.1 !important;
    }
    body.app-shell .topbar-actions {
        flex: 0 0 auto !important;
        gap: .28rem !important;
    }
    body.app-shell .app-topbar-native .header-icon-btn {
        width: 2.05rem !important;
        height: 2.05rem !important;
        min-width: 2.05rem !important;
        min-height: 2.05rem !important;
        border-radius: .72rem !important;
        font-size: .88rem !important;
    }
    body.app-shell .bottom-nav {
        left: 50% !important;
        right: auto !important;
        bottom: calc(.5rem + env(safe-area-inset-bottom)) !important;
        transform: translateX(-50%) !important;
        width: calc(100vw - .8rem) !important;
        max-width: calc(100vw - .8rem) !important;
        min-height: 3.35rem !important;
        padding: .24rem !important;
        gap: .08rem !important;
        border-radius: 1.15rem !important;
        overflow: hidden !important;
    }
    body.app-shell .bottom-nav__item {
        min-height: 2.82rem !important;
        padding: .32rem .05rem .42rem !important;
        border-radius: .85rem !important;
        font-size: .58rem !important;
        gap: .12rem !important;
    }
    body.app-shell .bottom-nav__item i {
        font-size: .9rem !important;
    }
    body.app-shell .bottom-nav__item span {
        line-height: 1.2 !important;
        padding-bottom: .04rem !important;
    }
    body.app-shell .quick-actions {
        right: calc(.65rem + env(safe-area-inset-right)) !important;
        bottom: calc(4.55rem + env(safe-area-inset-bottom)) !important;
    }
    body.app-shell .quick-actions .fab {
        width: 3rem !important;
        height: 3rem !important;
        min-height: 3rem !important;
        border-width: 2px !important;
    }
    body.app-shell .quick-actions .fab i {
        font-size: 1.05rem !important;
    }
}
@media (max-width: 390px) {
    body.app-shell .topbar-greeting span {
        max-width: 5.8rem !important;
    }
    body.app-shell .app-topbar-native .header-icon-btn {
        width: 1.95rem !important;
        height: 1.95rem !important;
        min-width: 1.95rem !important;
        min-height: 1.95rem !important;
    }
    body.app-shell .bottom-nav {
        width: calc(100vw - .5rem) !important;
        max-width: calc(100vw - .5rem) !important;
    }
    body.app-shell .bottom-nav__item {
        font-size: .53rem !important;
    }
}
body.app-shell[class*="theme-"]::before {
    background-image:
        linear-gradient(hsl(var(--theme-h) 42% 32% / .045) 1px, transparent 1px),
        linear-gradient(90deg, hsl(var(--theme-h) 42% 32% / .045) 1px, transparent 1px);
}
body.app-shell[class*="theme-"] .app-topbar-native {
    background: var(--theme-topbar-bg) !important;
}
body.app-shell[class*="theme-"] .card,
body.app-shell[class*="theme-"] .card-soft,
body.app-shell[class*="theme-"] .priority-panel,
body.app-shell[class*="theme-"] .priority-item,
body.app-shell[class*="theme-"] .timeline-item__content,
body.app-shell[class*="theme-"] .account-card,
body.app-shell[class*="theme-"] .agenda-card,
body.app-shell[class*="theme-"] .form-panel,
body.app-shell[class*="theme-"] .page-hero,
body.app-shell[class*="theme-"] .surface-muted,
body.app-shell[class*="theme-"] .empty-inline-state,
body.app-shell[class*="theme-"] .mini-calendar__day,
body.app-shell[class*="theme-"] .quick-actions__menu {
    background: var(--theme-card-bg) !important;
    border-color: var(--theme-card-border) !important;
    color: var(--app-text) !important;
}
body.app-shell[class*="theme-"] .bottom-nav {
    background: var(--theme-menu-bg) !important;
    border-color: var(--theme-menu-border) !important;
}
body.app-shell[class*="theme-"] .bottom-nav__item,
body.app-shell[class*="theme-"] .dropdown-item,
body.app-shell[class*="theme-"] .list-group-item,
body.app-shell[class*="theme-"] .filter-pill {
    color: var(--app-muted) !important;
}
body.app-shell[class*="theme-"] .bottom-nav__item.active,
body.app-shell[class*="theme-"] .filter-pill.is-active,
body.app-shell[class*="theme-"] .btn-primary,
body.app-shell[class*="theme-"] .fab {
    background: var(--theme-button-bg) !important;
    color: #fff !important;
    border-color: transparent !important;
}
body.dark-mode.app-shell[class*="theme-"] .btn-primary {
    color: hsl(var(--theme-h) 38% 8%) !important;
}
body.app-shell[class*="theme-"] .btn-outline-primary {
    color: var(--app-primary) !important;
    border-color: hsl(var(--theme-h) var(--theme-s) 45% / .38) !important;
}
body.app-shell[class*="theme-"] .btn-outline-primary:hover,
body.app-shell[class*="theme-"] .btn-outline-primary:focus {
    background: var(--app-primary-soft) !important;
    color: var(--app-primary-dark) !important;
}
body.dark-mode.app-shell[class*="theme-"] .btn-outline-primary:hover,
body.dark-mode.app-shell[class*="theme-"] .btn-outline-primary:focus {
    color: #fff !important;
}
body.app-shell[class*="theme-"] .form-control,
body.app-shell[class*="theme-"] .form-select,
body.app-shell[class*="theme-"] .input-group-text {
    background: color-mix(in srgb, var(--app-surface-strong) 82%, transparent) !important;
    color: var(--app-text) !important;
    border-color: var(--app-border) !important;
}
body.app-shell[class*="theme-"] .form-control:focus,
body.app-shell[class*="theme-"] .form-select:focus {
    border-color: var(--app-primary) !important;
    box-shadow: var(--theme-focus-ring) !important;
}
body.app-shell[class*="theme-"] .text-muted,
body.app-shell[class*="theme-"] small,
body.app-shell[class*="theme-"] .small {
    color: var(--app-muted) !important;
}
body.app-shell[class*="theme-"] .page-kicker,
body.app-shell[class*="theme-"] .icon-chip,
body.app-shell[class*="theme-"] .dashboard-stat-icon,
body.app-shell[class*="theme-"] .emoji-badge,
body.app-shell[class*="theme-"] .family-avatar {
    background: var(--app-primary-soft) !important;
    color: var(--app-primary) !important;
}
body.app-shell[class*="theme-"] .badge.text-bg-light,
body.app-shell[class*="theme-"] .badge.bg-light {
    background: color-mix(in srgb, var(--app-surface-strong) 78%, transparent) !important;
    color: var(--app-text) !important;
    border: 1px solid var(--app-border) !important;
}
body.app-shell[class*="theme-"] .mini-calendar__day.is-selected {
    background: var(--theme-button-bg) !important;
    color: #fff !important;
}
body.app-shell[class*="theme-"] .mini-calendar__day.is-today .mini-calendar__number {
    background: var(--app-primary) !important;
    color: #fff !important;
}
body.dark-mode.app-shell[class*="theme-"] .mini-calendar__day.is-today .mini-calendar__number {
    color: hsl(var(--theme-h) 38% 8%) !important;
}
body.dark-mode.app-shell[class*="theme-"] .btn-primary,
body.dark-mode.app-shell[class*="theme-"] .fab,
body.dark-mode.app-shell[class*="theme-"] .bottom-nav__item.active,
body.dark-mode.app-shell[class*="theme-"] .filter-pill.is-active {
    color: hsl(var(--theme-h) 38% 8%) !important;
}

/* Production landing restore: mobile-first marketing page */
body.marketing-shell {
    margin: 0 !important;
    min-height: 100dvh !important;
    overflow-x: hidden !important;
    background:
        radial-gradient(circle at 88% 4%, rgba(232,180,79,.22), transparent 28rem),
        radial-gradient(circle at 8% 12%, rgba(47,191,113,.20), transparent 25rem),
        linear-gradient(180deg, #edf7f2 0%, #d8eae3 48%, #c3dcd3 100%) !important;
    color: #102638 !important;
}
body.marketing-shell .sales-page,
body.marketing-shell .sales-page--pro {
    width: 100% !important;
    min-height: 100dvh !important;
    color: #102638 !important;
    background: transparent !important;
    overflow: hidden !important;
}
body.marketing-shell .sales-nav,
body.marketing-shell .sales-hero,
body.marketing-shell .sales-section {
    width: min(1180px, calc(100% - 2rem)) !important;
    margin-inline: auto !important;
    box-sizing: border-box !important;
}
body.marketing-shell .sales-nav {
    position: sticky !important;
    top: 0 !important;
    z-index: 20 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 1rem !important;
    padding: .9rem 0 !important;
    backdrop-filter: blur(18px);
}
body.marketing-shell .sales-brand {
    display: inline-flex !important;
    align-items: center !important;
    gap: .75rem !important;
    min-width: 0 !important;
    color: #102638 !important;
    text-decoration: none !important;
}
body.marketing-shell .sales-brand img {
    width: 3rem !important;
    height: 3rem !important;
    object-fit: contain !important;
}
body.marketing-shell .sales-brand strong,
body.marketing-shell .sales-brand small {
    display: block !important;
    line-height: 1.08 !important;
}
body.marketing-shell .sales-brand small {
    color: #5d7180 !important;
    font-weight: 700 !important;
}
body.marketing-shell .sales-nav nav,
body.marketing-shell .sales-actions,
body.marketing-shell .sales-trust-row {
    display: flex !important;
    align-items: center !important;
    gap: .75rem !important;
    flex-wrap: wrap !important;
}
body.marketing-shell .sales-nav a,
body.marketing-shell .sales-btn {
    color: #123d61 !important;
    text-decoration: none !important;
    font-weight: 900 !important;
}
body.marketing-shell .sales-btn {
    min-height: 2.9rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: .45rem !important;
    padding: .72rem 1rem !important;
    border-radius: 1rem !important;
    border: 1px solid rgba(18,61,97,.16) !important;
    background: rgba(255,255,255,.78) !important;
    box-shadow: 0 12px 28px rgba(18,61,97,.08) !important;
}
body.marketing-shell .sales-btn--solid {
    color: #fff !important;
    border-color: transparent !important;
    background: linear-gradient(135deg,#0b2f4a 0%,#0f6b63 62%,#2fbf71 100%) !important;
    box-shadow: 0 18px 36px rgba(18,61,97,.18) !important;
}
body.marketing-shell .sales-hero {
    min-height: calc(100dvh - 5.5rem) !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(320px, .82fr) !important;
    gap: clamp(1.25rem, 4vw, 2.5rem) !important;
    align-items: center !important;
    padding: clamp(1.25rem, 3vw, 3rem) 0 3rem !important;
}
body.marketing-shell .sales-pill {
    display: inline-flex !important;
    align-items: center !important;
    gap: .5rem !important;
    border-radius: 999px !important;
    padding: .62rem .85rem !important;
    background: rgba(15,107,99,.11) !important;
    color: #0f6b63 !important;
    font-weight: 900 !important;
}
body.marketing-shell .sales-hero h1 {
    max-width: 48rem !important;
    margin: 1rem 0 !important;
    font-size: clamp(2.7rem, 7vw, 6.2rem) !important;
    line-height: .92 !important;
    letter-spacing: -.055em !important;
    font-weight: 950 !important;
}
body.marketing-shell .sales-hero p,
body.marketing-shell .sales-section__head p,
body.marketing-shell .sales-grid p,
body.marketing-shell .sales-grid li,
body.marketing-shell .sales-steps p {
    color: #5d7180 !important;
}
body.marketing-shell .sales-hero p {
    max-width: 42rem !important;
    font-size: clamp(1.02rem, 2vw, 1.22rem) !important;
}
body.marketing-shell .sales-trust-row {
    margin-top: 1.2rem !important;
}
body.marketing-shell .sales-trust-row span {
    display: inline-flex !important;
    align-items: center !important;
    gap: .45rem !important;
    padding: .62rem .85rem !important;
    border-radius: 999px !important;
    background: rgba(255,255,255,.68) !important;
    border: 1px solid rgba(18,61,97,.10) !important;
    color: #123d61 !important;
    font-weight: 800 !important;
}
body.marketing-shell .sales-preview {
    width: 100% !important;
    max-width: 440px !important;
    justify-self: end !important;
    box-sizing: border-box !important;
    color: #fff !important;
    background: linear-gradient(145deg, #0b2f4a 0%, #0f4656 52%, #0f6b63 100%) !important;
    border-radius: 1.75rem !important;
    padding: 1.1rem !important;
    box-shadow: 0 30px 70px rgba(11,47,74,.24) !important;
}
body.marketing-shell .sales-preview__top {
    display: flex !important;
    gap: .38rem !important;
    margin-bottom: 1rem !important;
}
body.marketing-shell .sales-preview__top span {
    width: .7rem !important;
    height: .7rem !important;
    border-radius: 50% !important;
    background: rgba(255,255,255,.32) !important;
}
body.marketing-shell .sales-preview__header,
body.marketing-shell .sales-list div {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 1rem !important;
}
body.marketing-shell .sales-metrics {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: .75rem !important;
    margin: 1rem 0 !important;
}
body.marketing-shell .sales-metrics article,
body.marketing-shell .sales-list {
    border: 1px solid rgba(255,255,255,.13) !important;
    background: rgba(255,255,255,.08) !important;
    border-radius: 1rem !important;
    padding: .9rem !important;
}
body.marketing-shell .sales-metrics small,
body.marketing-shell .sales-list span,
body.marketing-shell .sales-preview__header small {
    color: #c7d3df !important;
}
body.marketing-shell .sales-metrics strong {
    display: block !important;
    margin-top: .3rem !important;
}
body.marketing-shell .sales-list div {
    padding: .75rem 0 !important;
    border-bottom: 1px solid rgba(255,255,255,.12) !important;
}
body.marketing-shell .sales-list div:last-child {
    border-bottom: 0 !important;
}
body.marketing-shell .sales-section {
    padding: clamp(2rem, 5vw, 4rem) 0 !important;
}
body.marketing-shell .sales-section__head {
    max-width: 48rem !important;
    margin-bottom: 1.4rem !important;
}
body.marketing-shell .sales-section__head h2 {
    font-size: clamp(1.9rem, 4vw, 3rem) !important;
    font-weight: 950 !important;
    letter-spacing: -.04em !important;
}
body.marketing-shell .sales-section--split {
    display: grid !important;
    grid-template-columns: minmax(0, .9fr) minmax(300px, 1.1fr) !important;
    gap: 1.25rem !important;
    align-items: center !important;
}
body.marketing-shell .sales-grid,
body.marketing-shell .sales-steps {
    display: grid !important;
    gap: 1rem !important;
}
body.marketing-shell .sales-grid--features {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}
body.marketing-shell .sales-grid--plans {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}
body.marketing-shell .sales-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}
body.marketing-shell .sales-grid article,
body.marketing-shell .sales-steps article {
    min-width: 0 !important;
    background: rgba(255,255,255,.86) !important;
    border: 1px solid rgba(18,61,97,.10) !important;
    border-radius: 1.25rem !important;
    padding: 1.25rem !important;
    box-shadow: 0 18px 42px rgba(18,61,97,.07) !important;
}
body.marketing-shell .sales-grid article > i,
body.marketing-shell .sales-steps strong {
    width: 2.8rem !important;
    height: 2.8rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: .95rem !important;
    background: rgba(47,191,113,.13) !important;
    color: #0f6b63 !important;
    font-size: 1.25rem !important;
    margin-bottom: .8rem !important;
}
body.marketing-shell .sales-steps strong {
    color: #fff !important;
    background: linear-gradient(135deg,#0b2f4a,#0f6b63) !important;
    font-weight: 900 !important;
}
body.marketing-shell .sales-grid h3,
body.marketing-shell .sales-steps h3 {
    font-weight: 950 !important;
}
body.marketing-shell .sales-plan-badge {
    display: inline-flex !important;
    border-radius: 999px !important;
    padding: .35rem .65rem !important;
    color: #fff !important;
    background: #c9891c !important;
    font-weight: 900 !important;
    font-size: .8rem !important;
}
body.marketing-shell .sales-grid--plans .is-featured {
    border-color: rgba(244,189,79,.58) !important;
    box-shadow: 0 22px 54px rgba(11,47,74,.13) !important;
    transform: translateY(-.35rem) !important;
}
body.marketing-shell .sales-grid--plans article strong {
    display: block !important;
    font-size: 2rem !important;
    margin: .5rem 0 !important;
}
@media (max-width: 991.98px) {
    body.marketing-shell .sales-nav {
        position: relative !important;
        align-items: flex-start !important;
        flex-direction: column !important;
    }
    body.marketing-shell .sales-nav nav {
        width: 100% !important;
        justify-content: flex-start !important;
    }
    body.marketing-shell .sales-hero,
    body.marketing-shell .sales-section--split,
    body.marketing-shell .sales-grid--features,
    body.marketing-shell .sales-grid--plans,
    body.marketing-shell .sales-steps {
        grid-template-columns: 1fr !important;
    }
    body.marketing-shell .sales-hero {
        min-height: auto !important;
    }
    body.marketing-shell .sales-preview {
        max-width: 100% !important;
        justify-self: stretch !important;
        transform: none !important;
    }
    body.marketing-shell .sales-grid--plans .is-featured {
        transform: none !important;
    }
}
@media (max-width: 575.98px) {
    body.marketing-shell .sales-nav,
    body.marketing-shell .sales-hero,
    body.marketing-shell .sales-section {
        width: min(100% - 1rem, 1180px) !important;
    }
    body.marketing-shell .sales-brand img {
        width: 2.55rem !important;
        height: 2.55rem !important;
    }
    body.marketing-shell .sales-brand small {
        font-size: .78rem !important;
    }
    body.marketing-shell .sales-nav nav a:not(.sales-btn) {
        font-size: .9rem !important;
    }
    body.marketing-shell .sales-hero {
        padding-top: 1.1rem !important;
        gap: 1.2rem !important;
    }
    body.marketing-shell .sales-hero h1 {
        font-size: clamp(2.25rem, 13vw, 3.35rem) !important;
        line-height: .96 !important;
    }
    body.marketing-shell .sales-actions .sales-btn,
    body.marketing-shell .sales-trust-row span {
        width: 100% !important;
    }
    body.marketing-shell .sales-metrics {
        grid-template-columns: 1fr !important;
    }
    body.marketing-shell .sales-preview {
        border-radius: 1.35rem !important;
        padding: .95rem !important;
    }
body.marketing-shell .sales-list div {
        align-items: flex-start !important;
        flex-direction: column !important;
        gap: .25rem !important;
    }
}

/* Button content alignment guard */
body.app-shell .btn:not(.bottom-nav__item):not(.fab),
body.auth-shell .btn,
body.marketing-shell .sales-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: .45rem !important;
    text-align: center !important;
    vertical-align: middle !important;
    line-height: 1.15 !important;
}
body.app-shell .btn:not(.bottom-nav__item):not(.fab) > i,
body.auth-shell .btn > i,
body.marketing-shell .sales-btn > i {
    line-height: 1 !important;
    flex: 0 0 auto !important;
}
body.app-shell .btn:not(.bottom-nav__item):not(.fab) > span,
body.auth-shell .btn > span,
body.marketing-shell .sales-btn > span {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1.15 !important;
}
body.app-shell form .btn:not(.bottom-nav__item):not(.fab) {
    width: auto;
}
body.app-shell .quick-actions__menu .btn {
    justify-content: flex-start !important;
    text-align: left !important;
}

/* Auth screens restore: login/register stable layout */
body.auth-shell {
    min-height: 100dvh !important;
    margin: 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    padding: 0 !important;
    background:
        radial-gradient(circle at 12% 0%, rgba(232,180,79,.18), transparent 26rem),
        radial-gradient(circle at 88% 8%, rgba(47,191,113,.18), transparent 24rem),
        linear-gradient(180deg, #eef7f3 0%, #d9eae4 52%, #c7ded6 100%) !important;
}
body.auth-shell.dark-mode {
    background:
        radial-gradient(circle at 12% 0%, rgba(232,180,79,.10), transparent 26rem),
        radial-gradient(circle at 88% 8%, rgba(47,191,113,.12), transparent 24rem),
        linear-gradient(180deg, #07111f 0%, #0a1727 52%, #0d1a2d 100%) !important;
}
body.auth-shell .auth-stage {
    min-height: 100dvh !important;
    height: auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: clamp(1rem, 3vw, 2rem) 0 !important;
    overflow: visible !important;
}
body.auth-shell .auth-main-shell {
    width: 100% !important;
    max-width: 1160px !important;
    height: auto !important;
    min-height: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: visible !important;
}
body.auth-shell .auth-panel--app,
body.auth-shell .auth-panel--trim {
    width: min(100%, 1120px) !important;
    max-width: 1120px !important;
    min-height: min(82dvh, 720px) !important;
    margin: 0 auto !important;
    overflow: hidden !important;
    border-radius: 2rem !important;
    background: rgba(255,255,255,.76) !important;
    border: 1px solid rgba(255,255,255,.66) !important;
    box-shadow: 0 30px 80px rgba(11,47,74,.16) !important;
    backdrop-filter: blur(20px) !important;
}
body.auth-shell.dark-mode .auth-panel--app,
body.auth-shell.dark-mode .auth-panel--trim {
    background: rgba(15,23,42,.78) !important;
    border-color: rgba(148,163,184,.14) !important;
    box-shadow: 0 30px 80px rgba(0,0,0,.34) !important;
}
body.auth-shell .auth-panel--trim .row {
    min-height: inherit !important;
    height: 100% !important;
}
body.auth-shell .auth-showcase--app {
    min-height: 100% !important;
    padding: clamp(1.6rem, 3vw, 2.6rem) !important;
    color: #fff !important;
    background:
        radial-gradient(circle at 18% 12%, rgba(241,193,120,.26), transparent 30%),
        linear-gradient(145deg, #0b2f4a 0%, #0f6b63 58%, #2fbf71 100%) !important;
}
body.auth-shell .auth-brand-logo {
    width: 3rem !important;
    height: 3rem !important;
    min-width: 3rem !important;
    object-fit: contain !important;
    border-radius: .9rem !important;
    background: rgba(255,255,255,.94) !important;
    padding: .15rem !important;
}
body.auth-shell .kazafin-brand-name {
    color: #fff !important;
    font-size: 1.35rem !important;
}
body.auth-shell .kazafin-brand-tag {
    color: rgba(255,255,255,.76) !important;
}
body.auth-shell .auth-app-preview {
    display: grid !important;
    gap: .75rem !important;
}
body.auth-shell .auth-app-preview div {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: .8rem !important;
    padding: .85rem .95rem !important;
    border-radius: 1rem !important;
    background: rgba(255,255,255,.14) !important;
    border: 1px solid rgba(255,255,255,.16) !important;
}
body.auth-shell .auth-app-preview span {
    color: rgba(255,255,255,.76) !important;
    font-weight: 800 !important;
}
body.auth-shell .auth-app-preview strong {
    color: #fff !important;
}
body.auth-shell .auth-form-wrap {
    min-height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: clamp(1rem, 2.5vw, 2rem) !important;
}
body.auth-shell .auth-form-card--app,
body.auth-shell .auth-form-card {
    width: 100% !important;
    max-width: 520px !important;
    margin: 0 auto !important;
    background: rgba(255,255,255,.96) !important;
    border: 1px solid rgba(11,47,74,.08) !important;
    border-radius: 1.65rem !important;
    box-shadow: 0 24px 64px rgba(11,47,74,.10) !important;
}
body.auth-shell.dark-mode .auth-form-card--app,
body.auth-shell.dark-mode .auth-form-card {
    background: rgba(15,23,42,.92) !important;
    border-color: rgba(148,163,184,.14) !important;
}
body.auth-shell .auth-card-inner {
    padding: clamp(1.35rem, 3vw, 2rem) !important;
}
body.auth-shell .kazafin-auth-header {
    text-align: center !important;
    margin-bottom: 1.35rem !important;
}
body.auth-shell .auth-form-stack,
body.auth-shell .auth-register-grid {
    display: grid !important;
    gap: 1rem !important;
}
body.auth-shell .auth-register-grid .mb-3,
body.auth-shell .auth-form-stack > div {
    margin-bottom: 0 !important;
}
body.auth-shell .form-label {
    font-weight: 800 !important;
    color: var(--app-text) !important;
}
body.auth-shell .form-control,
body.auth-shell .form-select {
    width: 100% !important;
    min-height: 52px !important;
    border-radius: 1rem !important;
    background: rgba(255,255,255,.92) !important;
    border: 1px solid rgba(11,47,74,.14) !important;
    color: #102638 !important;
}
body.auth-shell.dark-mode .form-control,
body.auth-shell.dark-mode .form-select {
    background: rgba(7,16,30,.76) !important;
    border-color: rgba(148,163,184,.18) !important;
    color: #eef4ff !important;
}
body.auth-shell .form-control:focus,
body.auth-shell .form-select:focus {
    border-color: var(--app-primary) !important;
    box-shadow: 0 0 0 .25rem rgba(15,107,99,.16) !important;
}
body.auth-shell .btn {
    width: 100%;
    min-height: 50px !important;
    border-radius: 1rem !important;
    font-weight: 900 !important;
}
@media (max-width: 991.98px) {
    body.auth-shell .auth-stage {
        align-items: flex-start !important;
        padding: .75rem 0 1rem !important;
    }
    body.auth-shell .auth-main-shell {
        padding-left: .75rem !important;
        padding-right: .75rem !important;
    }
    body.auth-shell .auth-panel--app,
    body.auth-shell .auth-panel--trim {
        min-height: auto !important;
        border-radius: 1.35rem !important;
    }
    body.auth-shell .auth-panel--trim .row {
        min-height: auto !important;
    }
    body.auth-shell .auth-form-wrap {
        padding: .8rem !important;
    }
    body.auth-shell .auth-form-card--app,
    body.auth-shell .auth-form-card {
        max-width: 100% !important;
        border-radius: 1.25rem !important;
    }
}
@media (max-width: 575.98px) {
    body.auth-shell .auth-card-inner {
        padding: 1.1rem !important;
    }
    body.auth-shell .kazafin-auth-header h1 {
        font-size: 1.55rem !important;
    }
    body.auth-shell .form-control,
    body.auth-shell .form-select,
    body.auth-shell .btn {
        min-height: 48px !important;
    }
}

/* Auth mobile fit: prefer centered single-screen forms */
@media (max-width: 575.98px) and (min-height: 700px) {
    body.auth-shell {
        overflow-y: hidden !important;
    }
    body.auth-shell .auth-stage {
        min-height: 100dvh !important;
        height: 100dvh !important;
        align-items: center !important;
        padding: .5rem 0 !important;
    }
    body.auth-shell .auth-main-shell {
        height: auto !important;
    }
    body.auth-shell .auth-panel--app,
    body.auth-shell .auth-panel--trim {
        max-height: calc(100dvh - 1rem) !important;
        overflow: hidden !important;
    }
    body.auth-shell .auth-form-wrap {
        padding: .55rem !important;
    }
    body.auth-shell .auth-card-inner {
        padding: .9rem !important;
    }
    body.auth-shell .kazafin-auth-header {
        margin-bottom: .85rem !important;
    }
    body.auth-shell .kazafin-auth-header .page-kicker {
        padding: .32rem .62rem !important;
        font-size: .74rem !important;
    }
    body.auth-shell .kazafin-auth-header h1 {
        font-size: 1.35rem !important;
        margin-top: .65rem !important;
        margin-bottom: .25rem !important;
    }
    body.auth-shell .kazafin-auth-header p {
        font-size: .88rem !important;
        line-height: 1.25 !important;
    }
    body.auth-shell .auth-form-stack,
    body.auth-shell .auth-register-grid {
        gap: .72rem !important;
    }
    body.auth-shell .form-label {
        margin-bottom: .28rem !important;
        font-size: .88rem !important;
    }
    body.auth-shell .form-control,
    body.auth-shell .form-select,
    body.auth-shell .btn {
        min-height: 44px !important;
        padding-top: .55rem !important;
        padding-bottom: .55rem !important;
    }
    body.auth-shell .form-hint {
        margin-top: .25rem !important;
        font-size: .78rem !important;
    }
}
@media (max-width: 575.98px) and (max-height: 699px) {
    body.auth-shell {
        overflow-y: auto !important;
    }
    body.auth-shell .auth-stage {
        align-items: flex-start !important;
    }
}

/* Public logo/header final polish */
body.marketing-shell .sales-nav,
body.marketing-shell .sales-nav--pro {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}
body.marketing-shell .sales-brand img,
body.auth-shell .auth-brand-logo,
body.auth-shell .kazafin-brand-lockup img.auth-brand-logo {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
}
body.auth-shell .auth-brand-logo {
    width: 3rem !important;
    height: 3rem !important;
    min-width: 3rem !important;
    object-fit: contain !important;
}
body.marketing-shell .sales-nav .sales-btn--solid,
body.marketing-shell .sales-actions .sales-btn--solid,
body.marketing-shell .sales-grid--plans .sales-btn--solid {
    color: #ffffff !important;
    text-shadow: 0 1px 1px rgba(0,0,0,.24) !important;
    background: linear-gradient(135deg, #062238 0%, #0b2f4a 45%, #0f6b63 100%) !important;
    border: 1px solid rgba(255,255,255,.18) !important;
}
body.marketing-shell .sales-nav .sales-btn--solid:hover,
body.marketing-shell .sales-actions .sales-btn--solid:hover,
body.marketing-shell .sales-grid--plans .sales-btn--solid:hover {
    color: #ffffff !important;
    filter: brightness(1.06);
}
body.marketing-shell .sales-nav nav a:not(.sales-btn) {
    color: #102638 !important;
}

/* Emergency production guard: app header must never inherit marketing/image rules */
body.app-shell .app-topbar-native .topbar-brand-logo,
body.app-shell .topbar-greeting > img.topbar-brand-logo {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
    object-fit: contain !important;
    display: block !important;
    flex: 0 0 32px !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}
body.app-shell .app-topbar-native .container {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: nowrap !important;
}
body.app-shell .app-topbar-native .topbar-greeting {
    display: flex !important;
    align-items: center !important;
    flex-direction: row !important;
}
@media (max-width: 767.98px) {
    body.app-shell .app-topbar-native .topbar-brand-logo,
    body.app-shell .topbar-greeting > img.topbar-brand-logo {
        width: 26px !important;
        height: 26px !important;
        min-width: 26px !important;
        max-width: 26px !important;
        min-height: 26px !important;
        max-height: 26px !important;
        flex-basis: 26px !important;
    }
}
