:root {
    --bg: #f4f7fc;
    --bg-soft: #edf2fb;
    --surface: #ffffff;
    --surface-alt: #f7f9fe;
    --surface-muted: #eef2f8;
    --text: #111827;
    --muted: #6b7280;
    --muted-deep: #475467;
    --line: #e5eaf3;
    --brand: #0d47c9;
    --brand-deep: #0a39a4;
    --brand-soft: #dfe9ff;
    --success: #0f9f65;
    --success-soft: #dcf8ea;
    --danger: #d64545;
    --danger-soft: #fde7e7;
    --warning: #d4a015;
    --warning-soft: #fff4cc;
    --ink-soft: #1f2a44;
    --shadow-sm: 0 8px 24px rgba(26, 49, 94, 0.06);
    --shadow-md: 0 16px 42px rgba(26, 49, 94, 0.1);
    --shadow-lg: 0 28px 70px rgba(26, 49, 94, 0.12);
    --radius-xl: 32px;
    --radius-lg: 28px;
    --radius-md: 22px;
    --radius-sm: 18px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: 'Manrope', sans-serif;
    background:
        radial-gradient(circle at top left, rgba(13, 71, 201, 0.08), transparent 26%),
        radial-gradient(circle at bottom right, rgba(13, 71, 201, 0.06), transparent 20%),
        linear-gradient(180deg, #f8fbff 0%, #f2f5fb 100%);
}

a {
    color: inherit;
}

.app-wrapper,
.top-header,
.main-content {
    position: relative;
}

.app-container {
    width: min(100%, 1160px);
}

.top-header {
    padding: 18px 0 8px;
}

.top-appbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 4px 0 18px;
    border-bottom: 1px solid rgba(17, 24, 39, 0.06);
}

.brand-cluster {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
}

.brand-mark {
    width: 48px;
    height: 48px;
    padding: 9px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #ffffff, #eef4ff);
    box-shadow: var(--shadow-sm);
    flex: 0 0 48px;
}

.brand-mark img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand-copy {
    display: inline-flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.brand-logo {
    width: auto;
    height: 26px;
    max-width: 148px;
    object-fit: contain;
}

.brand-name {
    color: var(--ink-soft);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.appbar-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.appbar-icon {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--ink-soft);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    text-decoration: none;
}

.appbar-icon.active {
    background: #edf3ff;
    color: var(--brand);
}

.appbar-icon.logout-shortcut {
    background: linear-gradient(180deg, #fff5f5, #fee9e9);
    color: var(--danger);
    box-shadow: inset 0 0 0 1px rgba(214, 69, 69, 0.12);
}

.appbar-icon.has-dot::after {
    content: '';
    position: absolute;
    top: 8px;
    right: 10px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--brand);
}

.page-intro {
    padding: 10px 0 4px;
}

.page-intro.compact {
    padding-top: 6px;
}

.eyebrow {
    margin: 0;
    color: var(--brand);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.page-heading,
.auth-card-top h2,
.trend-card h3 {
    font-family: 'DM Serif Display', serif;
    letter-spacing: -0.04em;
}

.page-heading {
    font-size: clamp(2.2rem, 7vw, 3.5rem);
    line-height: 0.98;
}

.page-subtitle {
    color: var(--muted);
    max-width: 42ch;
    font-size: 0.96rem;
}

.main-content {
    padding: 8px 0 164px;
}

.main-content.no-bottom-nav {
    padding-bottom: 36px;
}

.section-card,
.summary-card,
.record-card,
.auth-card,
.trend-card,
.hero-card,
.mini-stat-card,
.movement-card,
.filter-panel {
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.99) 0%, #ffffff 62%, #f8fbff 100%);
    border: 1px solid rgba(229, 234, 243, 0.9);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.section-card,
.hero-card,
.trend-card,
.filter-panel {
    padding: 22px;
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.section-title {
    margin: 0;
    font-size: 1.18rem;
    font-weight: 800;
}

.header-link {
    color: var(--brand);
    text-decoration: none;
    font-size: 0.84rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.overview-chip-row,
.chip-row,
.filter-pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.overview-chip,
.status-chip,
.chip-link,
.filter-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid transparent;
    background: var(--surface-muted);
    color: var(--muted-deep);
    font-size: 0.84rem;
    font-weight: 700;
    text-decoration: none;
}

.overview-chip.positive,
.status-chip.success {
    background: var(--success-soft);
    color: var(--success);
}

.overview-chip.negative {
    background: var(--danger-soft);
    color: var(--danger);
}

.status-chip.danger {
    background: var(--danger-soft);
    color: var(--danger);
}

.status-chip.warning {
    background: var(--warning-soft);
    color: var(--warning);
}

.status-chip.muted,
.chip-link {
    background: #f1f4fa;
    color: var(--muted-deep);
}

.filter-pill.active {
    background: var(--brand);
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

button.filter-pill {
    border: 0;
    cursor: pointer;
}

.hero-card {
    position: relative;
    overflow: hidden;
    background: linear-gradient(150deg, #ffffff 0%, #ffffff 56%, #edf4ff 100%);
}

.hero-card::after {
    content: '';
    position: absolute;
    right: -40px;
    bottom: -50px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(13, 71, 201, 0.13), rgba(13, 71, 201, 0));
    pointer-events: none;
}

.hero-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
}

.hero-card-value {
    margin: 14px 0 12px;
    font-size: clamp(2.3rem, 8vw, 4rem);
    line-height: 0.95;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.hero-card-value.positive {
    color: var(--success);
}

.hero-card-value.negative {
    color: var(--danger);
}

.hero-card-note {
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--success);
    font-weight: 700;
}

.hero-card-note.muted {
    color: var(--muted);
}

.card-icon-badge,
.quick-card i,
.metric-icon {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-soft);
    color: var(--brand);
    font-size: 1.25rem;
}

.metric-icon.success {
    background: var(--success-soft);
    color: var(--success);
}

.metric-icon.danger {
    background: var(--danger-soft);
    color: var(--danger);
}

.metric-icon.warning {
    background: var(--warning-soft);
    color: var(--warning);
}

.summary-grid,
.hero-stat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.customer-stat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.summary-card,
.mini-stat-card {
    padding: 20px;
}

.mini-stat-card {
    position: relative;
    overflow: hidden;
    background: linear-gradient(150deg, #ffffff 0%, #ffffff 60%, #f3f7ff 100%);
}

.mini-stat-card::after {
    content: '';
    position: absolute;
    right: -24px;
    bottom: -30px;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(13, 71, 201, 0.12), rgba(13, 71, 201, 0));
    pointer-events: none;
}

.mini-stat-top {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.summary-card {
    min-height: 134px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.summary-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.home-summary-card {
    min-height: 176px;
}

.summary-label {
    margin: 0;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.summary-value {
    font-size: clamp(1.45rem, 6vw, 2.4rem);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.04em;
}

.summary-value.positive {
    color: var(--success);
}

.summary-value.negative {
    color: var(--danger);
}

.summary-note {
    margin: 0;
    color: var(--muted);
    font-size: 0.84rem;
}

.tone-success {
    background: linear-gradient(180deg, rgba(15, 159, 101, 0.06), #fff 70%);
}

.tone-danger {
    background: linear-gradient(180deg, rgba(214, 69, 69, 0.06), #fff 70%);
}

.tone-default {
    background: linear-gradient(180deg, rgba(13, 71, 201, 0.08), #fff 70%);
}

.tone-muted {
    background: linear-gradient(180deg, rgba(120, 138, 168, 0.07), #fff 70%);
}

.progress-track {
    height: 6px;
    border-radius: 999px;
    background: #e7ecf5;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--brand), #4d79f6);
}

.progress-fill.success {
    background: linear-gradient(90deg, var(--success), #58c190);
}

.progress-fill.danger {
    background: linear-gradient(90deg, var(--danger), #ee7c7c);
}

.mini-stat-card h4 {
    margin: 0 0 8px;
    font-size: 0.78rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink-soft);
    font-weight: 900;
}

.mini-stat-card strong {
    display: block;
    margin-bottom: 12px;
    font-size: 1.95rem;
    line-height: 1;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.mini-stat-card p {
    margin: 10px 0 0;
    color: var(--muted-deep);
    font-size: 0.86rem;
    font-weight: 700;
}

.active-customer-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.customer-avatars {
    display: flex;
    align-items: center;
}

.customer-avatars span {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: -8px;
    border: 2px solid #fff;
    background: linear-gradient(145deg, #dce5ff, #f5f7ff);
    color: var(--brand);
    font-size: 0.7rem;
    font-weight: 800;
}

.customer-avatars span:first-child {
    margin-left: 0;
}

.quick-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.quick-card {
    padding: 18px;
    border-radius: var(--radius-md);
    background: var(--surface);
    border: 1px solid rgba(229, 234, 243, 0.95);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: center;
    justify-content: center;
    min-height: 128px;
    text-align: center;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.quick-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: inherit;
}

.quick-card i {
    margin: 0;
}

.quick-card span {
    font-weight: 800;
    font-size: 0.94rem;
}

.search-shell {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
    min-height: 56px;
    border-radius: 20px;
    background: var(--surface-alt);
    border: 1px solid var(--line);
}

.custom-range-panel {
    padding: 18px;
    border-radius: 24px;
    background: var(--surface-alt);
    border: 1px solid var(--line);
}

.custom-range-copy {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.custom-range-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    align-items: end;
}

.custom-range-action {
    display: flex;
    align-items: end;
}

.search-shell i {
    color: var(--muted);
}

.search-shell .form-control {
    border: 0;
    padding-left: 0;
    background: transparent;
    box-shadow: none;
}

.stack-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.page-filter-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.showcase-card {
    position: relative;
    overflow: hidden;
    padding: 0;
    background: linear-gradient(150deg, #ffffff 0%, #ffffff 62%, #f6f9ff 100%);
}

.showcase-card::after {
    content: '';
    position: absolute;
    inset: auto -30px -36px auto;
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(13, 71, 201, 0.1), rgba(13, 71, 201, 0));
    pointer-events: none;
}

.showcase-card.account-card::after {
    background: radial-gradient(circle, rgba(13, 71, 201, 0.12), rgba(13, 71, 201, 0));
}

.showcase-card.account-card {
    background: linear-gradient(150deg, #ffffff 0%, #ffffff 62%, #eef5ff 100%);
}

.showcase-card.expense-card::after {
    background: radial-gradient(circle, rgba(214, 69, 69, 0.12), rgba(214, 69, 69, 0));
}

.showcase-card.expense-card {
    background: linear-gradient(150deg, #ffffff 0%, #ffffff 62%, #fff3f3 100%);
}

.showcase-card.debt-card::after {
    background: radial-gradient(circle, rgba(212, 160, 21, 0.14), rgba(212, 160, 21, 0));
}

.showcase-card.debt-card {
    background: linear-gradient(150deg, #ffffff 0%, #ffffff 62%, #fff8e8 100%);
}

.showcase-inner {
    position: relative;
    z-index: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.showcase-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.showcase-main {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    min-width: 0;
    flex: 1;
}

.showcase-icon {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-soft);
    color: var(--brand);
    font-size: 1.18rem;
    box-shadow: inset 0 0 0 1px rgba(13, 71, 201, 0.08);
    flex: 0 0 52px;
}

.showcase-icon.success {
    background: var(--success-soft);
    color: var(--success);
    box-shadow: inset 0 0 0 1px rgba(15, 159, 101, 0.12);
}

.showcase-icon.danger {
    background: var(--danger-soft);
    color: var(--danger);
    box-shadow: inset 0 0 0 1px rgba(214, 69, 69, 0.12);
}

.showcase-icon.warning {
    background: var(--warning-soft);
    color: var(--warning);
    box-shadow: inset 0 0 0 1px rgba(212, 160, 21, 0.12);
}

.showcase-copy {
    min-width: 0;
    flex: 1;
}

.showcase-kicker {
    margin: 0 0 6px;
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.showcase-title {
    margin: 0;
    font-size: 1.04rem;
    font-weight: 900;
    line-height: 1.2;
}

.showcase-subtitle {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 700;
}

.showcase-value {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    text-align: right;
}

.showcase-value strong {
    font-size: 1.18rem;
    line-height: 1;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.showcase-value span {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 800;
}

.showcase-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.showcase-note {
    margin: 0;
    padding-top: 16px;
    border-top: 1px dashed rgba(107, 114, 128, 0.22);
    color: var(--muted-deep);
    font-size: 0.9rem;
    font-weight: 700;
}

.showcase-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.showcase-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.showcase-avatar {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #eef3ff, #f7f9ff);
    color: var(--brand);
    font-size: 1rem;
    font-weight: 900;
    letter-spacing: 0.02em;
    box-shadow: inset 0 0 0 1px rgba(13, 71, 201, 0.08);
    flex: 0 0 52px;
}

.showcase-avatar i {
    font-size: 1.2rem;
}

.showcase-avatar.success {
    background: var(--success-soft);
    color: var(--success);
    box-shadow: inset 0 0 0 1px rgba(15, 159, 101, 0.12);
}

.showcase-avatar.warning {
    background: var(--warning-soft);
    color: var(--warning);
    box-shadow: inset 0 0 0 1px rgba(212, 160, 21, 0.14);
}

.showcase-avatar.muted {
    background: #eef2f7;
    color: var(--muted);
    box-shadow: inset 0 0 0 1px rgba(120, 138, 168, 0.12);
}

.quick-account-preview {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 20px;
    background: var(--surface-alt);
}

.quick-account-copy h4 {
    margin: 0;
    font-size: 1.02rem;
    font-weight: 800;
}

.quick-entry-note {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 700;
}

.account-button-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.account-choice {
    min-height: 72px;
    border: 1px solid var(--line);
    border-radius: 22px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--surface-alt);
    color: var(--text);
    font-weight: 800;
    text-align: left;
}

.account-choice.active {
    border-color: rgba(13, 71, 201, 0.2);
    background: #e9f0ff;
    box-shadow: 0 10px 20px rgba(13, 71, 201, 0.08);
}

.account-choice-icon {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-soft);
    color: var(--brand);
    flex: 0 0 38px;
}

.account-choice-icon.success {
    background: var(--success-soft);
    color: var(--success);
}

.account-choice-icon.warning {
    background: var(--warning-soft);
    color: var(--warning);
}

.account-choice-icon.muted {
    background: #eef2f7;
    color: var(--muted);
}

.showcase-split {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.showcase-empty {
    margin-top: 8px;
}

.record-card,
.movement-card {
    padding: 18px;
}

.activity-card {
    align-items: center;
}

.movement-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: start;
    gap: 14px;
    background: linear-gradient(150deg, #ffffff 0%, #ffffff 60%, #eef4ff 100%);
}

.movement-icon {
    width: 44px;
    height: 44px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-muted);
    color: var(--brand);
    font-size: 1.1rem;
}

.movement-icon.success {
    background: var(--success-soft);
    color: var(--success);
}

.movement-icon.danger {
    background: var(--danger-soft);
    color: var(--danger);
}

.movement-icon.warning {
    background: var(--warning-soft);
    color: var(--warning);
}

.movement-body h4,
.record-main h4 {
    margin: 0 0 4px;
    font-size: 1.02rem;
    font-weight: 800;
}

.movement-body p,
.record-main p,
.record-note,
.movement-meta {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 700;
}

.movement-side {
    text-align: right;
}

.money {
    font-size: 1.1rem;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.money.positive {
    color: var(--success);
}

.money.negative {
    color: var(--danger);
}

.record-card.compact {
    padding: 16px 18px;
}

.record-main,
.record-metrics {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.record-metrics {
    margin-top: 14px;
    flex-wrap: wrap;
}

.record-note {
    margin-top: 12px;
}

.action-pills {
    display: flex;
    align-items: center;
    gap: 8px;
}

.icon-action {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f1f5fd;
    color: var(--brand);
}

.icon-action.danger {
    background: var(--danger-soft);
    color: var(--danger);
}

.icon-action.success {
    background: var(--success-soft);
    color: var(--success);
}

.icon-action:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    box-shadow: none;
}

.filter-panel {
    padding: 18px;
}

.filter-panel .form-control,
.filter-panel .form-select {
    background: var(--surface-alt);
}

.trend-card {
    background: linear-gradient(180deg, #dfe8fb 0%, #dbe7fb 100%);
}

.trend-card .eyebrow {
    color: var(--brand);
}

.trend-card h3 {
    margin: 8px 0 0;
    font-size: 2rem;
    line-height: 1;
}

.trend-chart {
    margin-top: 26px;
    height: 220px;
    display: flex;
    align-items: end;
    gap: 10px;
}

.trend-bar {
    flex: 1 1 0;
    border-radius: 10px 10px 0 0;
    background: linear-gradient(180deg, rgba(13, 71, 201, 0.38), rgba(13, 71, 201, 0.84));
    min-height: 28px;
}

.trend-bar.faded {
    background: linear-gradient(180deg, rgba(13, 71, 201, 0.18), rgba(13, 71, 201, 0.45));
}

.trend-axis {
    margin-top: 12px;
    display: flex;
    justify-content: space-between;
    color: var(--muted-deep);
    font-size: 0.74rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.detail-item {
    padding: 16px;
    border-radius: 20px;
    background: var(--surface-alt);
    border: 1px solid var(--line);
}

.detail-item span {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.detail-item strong {
    font-size: 0.96rem;
    font-weight: 800;
}

.form-label {
    margin-bottom: 0.55rem;
    color: var(--ink-soft);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.form-control,
.form-select {
    min-height: 56px;
    padding: 0.95rem 1rem;
    border-radius: 22px;
    border: 1px solid var(--line);
    background: var(--surface-alt);
    color: var(--text);
}

.form-control::placeholder {
    color: #9aa4b2;
}

.form-control:focus,
.form-select:focus {
    background: #fff;
    border-color: rgba(13, 71, 201, 0.3);
    box-shadow: 0 0 0 0.25rem rgba(13, 71, 201, 0.12);
}

textarea.form-control {
    min-height: 118px;
    resize: vertical;
}

.btn {
    min-height: 54px;
    border: 0;
    border-radius: 999px;
    padding: 0.95rem 1.3rem;
    font-weight: 800;
}

.btn-brand {
    background: linear-gradient(180deg, var(--brand), var(--brand-deep));
    color: #fff;
    box-shadow: 0 16px 28px rgba(13, 71, 201, 0.25);
}

.btn-brand:hover,
.btn-brand:focus {
    color: #fff;
    background: linear-gradient(180deg, var(--brand-deep), #082f8a);
}

.btn-soft {
    background: #eef2f8;
    color: var(--ink-soft);
}

.btn-danger-soft {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--danger-soft);
    color: var(--danger);
    text-decoration: none;
}

.toast-stack {
    z-index: 1095;
}

.modal-backdrop {
    --bs-backdrop-opacity: 0.5;
    backdrop-filter: blur(8px);
}

.sheet-modal {
    --bs-modal-zindex: 1085;
}

.sheet-modal .modal-dialog {
    margin: auto 0 0;
    max-width: 100%;
    min-height: calc(100% - 0.75rem);
    display: flex;
    align-items: end;
    pointer-events: auto;
}

.sheet-modal .modal-content {
    border: 0;
    border-radius: 34px 34px 0 0;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 -20px 60px rgba(17, 24, 39, 0.12);
    pointer-events: auto;
}

.sheet-modal .modal-header {
    padding: 26px 24px 8px;
    border-bottom: 0;
}

.sheet-modal .modal-title {
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.sheet-modal .btn-close {
    width: 42px;
    height: 42px;
    margin: 0;
    border-radius: 50%;
    background-color: #f2f4fa;
    opacity: 1;
}

.sheet-modal .modal-body {
    padding: 8px 24px 26px;
}

.sheet-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 24px;
}

.mode-switch {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.mode-chip {
    padding: 14px;
    border-radius: 999px;
    background: #eff3f9;
    text-align: center;
    font-weight: 800;
    cursor: pointer;
}

.btn-check:checked + .mode-chip {
    background: var(--brand);
    color: #fff;
}

.empty-state {
    padding: 24px 16px;
    text-align: center;
    color: var(--muted);
}

.bottom-nav {
    position: fixed;
    left: 50%;
    bottom: 10px;
    transform: translateX(-50%);
    width: min(calc(100% - 18px), 760px);
    padding: 16px 18px 14px;
    border-radius: 32px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(229, 234, 243, 0.96);
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: end;
    gap: 10px;
    box-shadow: 0 18px 48px rgba(26, 49, 94, 0.18);
    z-index: 20;
}

.floating-fab {
    position: fixed;
    right: 18px;
    bottom: 122px;
    width: 72px;
    min-height: 72px;
    padding: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    font-size: 1.45rem;
    box-shadow: 0 20px 36px rgba(13, 71, 201, 0.3);
}

.bottom-nav-side {
    display: flex;
    flex: 1 1 0;
    align-items: flex-end;
    justify-content: space-evenly;
    gap: 4px;
}

.bottom-nav-side-right {
    justify-content: space-evenly;
}

.bottom-nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 0;
    padding: 8px 4px;
    border-radius: 22px;
    text-decoration: none;
    color: var(--muted-deep);
    font-size: 0.58rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.bottom-nav-link span:last-child {
    line-height: 1.1;
    white-space: normal;
    text-align: center;
}

.bottom-nav-icon {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    transition: all 0.2s ease;
    font-size: 1.05rem;
}

.bottom-nav-link.active:not(.bottom-nav-home) {
    color: var(--brand);
    background: #edf3ff;
}

.bottom-nav-home {
    margin-top: -34px;
    padding: 0 8px 4px;
}

.bottom-nav-home .bottom-nav-icon {
    width: 62px;
    height: 62px;
    border-radius: 22px;
    background: linear-gradient(180deg, var(--brand), var(--brand-deep));
    color: #fff;
    box-shadow: 0 16px 28px rgba(13, 71, 201, 0.28);
}

.bottom-nav-home.active {
    transform: translateY(-2px);
    color: var(--brand);
}

.mini-customer-card .record-main {
    display: flex;
    align-items: center;
    gap: 14px;
}

.customer-card-main {
    align-items: flex-start;
}

.customer-debt-card .action-pills {
    flex-wrap: wrap;
    justify-content: flex-end;
}

.customer-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 700;
    background: #eef3ff;
    color: #0d47c9;
    flex: 0 0 46px;
}

.customer-modal-avatar {
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
}

.customer-copy {
    min-width: 0;
    flex: 1;
}

.customer-copy h4 {
    margin: 0 0 4px;
    font-size: 1rem;
    font-weight: 700;
}

.customer-copy p {
    margin: 0 0 8px;
    color: #6b7280;
    font-size: 0.92rem;
    word-break: break-word;
}

.customer-debt-strip {
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.customer-debt-metric {
    padding: 12px 14px;
    border-radius: 18px;
    background: var(--success-soft);
}

.customer-debt-metric.danger {
    background: var(--danger-soft);
}

.customer-debt-metric span {
    display: block;
    margin-bottom: 6px;
    color: var(--muted-deep);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.range-chip {
    white-space: nowrap;
}

.auth-body .main-content {
    padding-top: 16px;
}

.auth-body {
    background:
        radial-gradient(circle at 15% 20%, rgba(64, 166, 255, 0.16), transparent 24%),
        radial-gradient(circle at 85% 15%, rgba(13, 71, 201, 0.16), transparent 22%),
        linear-gradient(180deg, #f7fbff 0%, #edf3fb 100%);
}

.auth-shell {
    min-height: calc(100vh - 160px);
    display: flex;
    align-items: center;
}

.auth-layout {
    width: min(100%, 1100px);
    margin: 0 auto;
    display: grid;
    gap: 22px;
}

.auth-showcase,
.auth-card {
    position: relative;
    overflow: hidden;
}

.auth-showcase {
    padding: 32px;
    border-radius: var(--radius-xl);
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.22), transparent 24%),
        linear-gradient(145deg, #081938 0%, #0d47c9 56%, #3ea2ff 100%);
    color: #fff;
    box-shadow: var(--shadow-lg);
}

.auth-showcase::before,
.auth-showcase::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.auth-showcase::before {
    inset: auto auto -70px -70px;
    width: 220px;
    height: 220px;
    background: rgba(255, 255, 255, 0.08);
}

.auth-showcase::after {
    inset: 24px -60px auto auto;
    width: 170px;
    height: 170px;
    background: rgba(255, 255, 255, 0.08);
}

.auth-showcase-top,
.auth-proof-grid {
    position: relative;
    z-index: 1;
}

.auth-showcase-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.auth-logo {
    width: auto;
    height: 42px;
    object-fit: contain;
    filter: drop-shadow(0 14px 28px rgba(8, 25, 56, 0.22));
}

.brand-badge-light {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.auth-showcase h2 {
    position: relative;
    z-index: 1;
    margin: 28px 0 14px;
    max-width: 11ch;
    font-family: 'DM Serif Display', serif;
    font-size: clamp(2.5rem, 5vw, 4.4rem);
    line-height: 0.96;
    letter-spacing: -0.04em;
}

.auth-showcase > p {
    position: relative;
    z-index: 1;
    max-width: 52ch;
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 1rem;
}

.auth-feature-list {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 12px;
    margin-top: 28px;
}

.auth-feature {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 14px;
    padding: 16px 18px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.11);
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(10px);
}

.auth-feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    font-size: 1.18rem;
}

.auth-feature h3,
.auth-panel-copy h3 {
    margin: 0;
    font-size: 1.02rem;
    font-weight: 900;
}

.auth-feature p {
    margin: 6px 0 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.92rem;
}

.auth-proof-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 20px;
}

.auth-proof-card {
    padding: 16px 18px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.auth-proof-card strong {
    display: block;
    margin-bottom: 8px;
    font-size: 1rem;
    font-weight: 900;
}

.auth-proof-card span {
    display: block;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.9rem;
    font-weight: 700;
}

.auth-card {
    width: min(100%, 520px);
    padding: 28px;
    margin-left: auto;
}

.auth-card-top {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

.auth-card-icon {
    width: 64px;
    height: 64px;
    padding: 10px;
    border-radius: 22px;
    object-fit: contain;
    background: linear-gradient(180deg, #eef4ff, #ffffff);
    box-shadow: var(--shadow-sm);
}

.brand-badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: var(--brand-soft);
    color: var(--brand);
    font-size: 0.8rem;
    font-weight: 800;
}

.auth-card-top h2 {
    margin: 12px 0 8px;
    font-size: clamp(2.2rem, 7vw, 3.2rem);
}

.auth-card-top p,
.finance-panel p,
.auth-panel-copy p {
    margin: 0;
    color: var(--muted);
}

.auth-panel-copy,
.finance-panel {
    margin-top: 18px;
    padding: 22px;
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, #edf3ff, #f8fbff);
    border: 1px solid rgba(13, 71, 201, 0.08);
}

.finance-panel-chip {
    display: inline-flex;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--brand);
    font-size: 0.8rem;
    font-weight: 800;
}

.finance-panel h3 {
    margin: 14px 0 10px;
    font-size: 1.7rem;
    font-weight: 900;
}

.select2-container--bootstrap-5 {
    width: 100% !important;
}

.select2-container--open,
.select2-container--bootstrap-5.select2-container--open {
    z-index: 2090 !important;
}

.select2-container--bootstrap-5 .select2-selection {
    min-height: 56px !important;
    border-radius: 22px !important;
    border-color: var(--line) !important;
    background: var(--surface-alt) !important;
    box-shadow: none !important;
    padding: 0.48rem 0.5rem !important;
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered {
    line-height: 38px !important;
    color: var(--text) !important;
}

.select2-container--bootstrap-5 .select2-dropdown {
    border-radius: 18px !important;
    border-color: var(--line) !important;
    overflow: hidden;
    z-index: 2091 !important;
}

@media (min-width: 768px) {
    .main-content {
        padding-top: 18px;
    }

    .auth-layout {
        grid-template-columns: minmax(0, 1.1fr) minmax(420px, 0.9fr);
        align-items: center;
    }

    .summary-grid,
    .hero-stat-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .customer-stat-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .quick-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .sheet-modal .modal-dialog {
        max-width: 720px;
        margin: 1.8rem auto;
    }

    .sheet-modal .modal-content {
        border-radius: 34px;
    }

    .sheet-actions {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 767.98px) {
    .page-heading {
        font-size: clamp(1.95rem, 9vw, 2.8rem);
    }

    .auth-showcase h2 {
        max-width: none;
    }

    .summary-grid,
    .hero-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .top-header {
        padding-top: 10px;
    }

    .top-appbar {
        padding-bottom: 14px;
    }

    .page-subtitle {
        font-size: 0.9rem;
    }

    .brand-logo {
        height: 22px;
        max-width: 128px;
    }

    .section-card,
    .hero-card,
    .trend-card,
    .filter-panel,
    .summary-card,
    .mini-stat-card,
    .record-card,
    .movement-card,
    .auth-card {
        border-radius: 26px;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }

    .movement-card {
        grid-template-columns: auto 1fr;
    }

    .movement-side {
        grid-column: 2 / 3;
        text-align: left;
    }

    .showcase-head,
    .showcase-foot {
        flex-direction: column;
        align-items: stretch;
    }

    .showcase-value {
        align-items: flex-start;
        text-align: left;
    }

    .record-main {
        align-items: flex-start;
    }

    .customer-card-main {
        display: grid !important;
        grid-template-columns: auto 1fr;
        align-items: start;
        gap: 12px;
    }

    .customer-debt-card .action-pills {
        grid-column: 1 / -1;
        justify-content: flex-start;
        padding-top: 4px;
    }

    .customer-debt-strip {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .customer-copy .showcase-meta {
        gap: 6px;
    }

    .bottom-nav {
        width: min(calc(100% - 10px), 760px);
        bottom: 6px;
        padding: 16px 12px 12px;
        gap: 6px;
    }

    .bottom-nav-side {
        gap: 2px;
    }

    .bottom-nav-link {
        font-size: 0.52rem;
    }

    .bottom-nav-home {
        margin-top: -28px;
    }

    .bottom-nav-home .bottom-nav-icon {
        width: 56px;
        height: 56px;
    }

    .floating-fab {
        right: 16px;
        bottom: 118px;
    }

    .custom-range-grid {
        grid-template-columns: 1fr;
    }

    .auth-shell {
        min-height: auto;
    }

    .auth-showcase,
    .auth-card {
        padding: 24px;
    }

    .auth-showcase h2 {
        font-size: clamp(2.2rem, 10vw, 3.3rem);
    }

    .auth-proof-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 399.98px) {
    .customer-avatar {
        width: 42px;
        height: 42px;
        flex-basis: 42px;
    }

    .customer-copy h4 {
        font-size: 0.95rem;
    }

    .customer-debt-metric {
        padding: 10px 12px;
    }

    .customer-debt-card .action-pills {
        gap: 6px;
    }

    .customer-debt-card .icon-action {
        width: 38px;
        height: 38px;
        border-radius: 12px;
    }
}
