:root {
    --bg: #f5f7fb;
    --bg-soft: #f0f4f8;
    --panel: #ffffff;
    --panel-muted: #fbfcfe;
    --line: #e5eaf3;
    --line-strong: #d7e0ee;
    --text: #1f2a3d;
    --muted: #66758a;
    --primary: #1677ff;
    --primary-soft: #e8f3ff;
    --success: #15a85d;
    --success-soft: #e8f7ee;
    --danger: #ea4335;
    --danger-soft: #fdecec;
    --warning: #f59e0b;
    --warning-soft: #fff6e1;
    --shadow: 0 10px 28px rgba(31, 42, 61, 0.08);
    --radius-xl: 20px;
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(245, 247, 251, 1)),
        var(--bg);
}

body.modal-open {
    position: fixed;
    overflow: hidden;
    width: 100%;
}

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

.page-backdrop,
.login-backdrop {
    position: fixed;
    inset: 0;
    pointer-events: none;
}

.page-backdrop {
    background:
        radial-gradient(circle at top right, rgba(22, 119, 255, 0.06), transparent 18%),
        radial-gradient(circle at top left, rgba(17, 168, 105, 0.06), transparent 16%);
}

.login-body {
    min-height: 100vh;
    background:
        radial-gradient(circle at 12% 20%, rgba(22, 119, 255, 0.12), transparent 22%),
        radial-gradient(circle at 88% 14%, rgba(21, 168, 93, 0.12), transparent 20%),
        linear-gradient(135deg, #f8fbff 0%, #f2f5fa 46%, #f7f9fc 100%);
}

.login-backdrop {
    background:
        linear-gradient(120deg, rgba(255, 255, 255, 0.55), transparent 42%),
        radial-gradient(circle at 68% 72%, rgba(255, 255, 255, 0.2), transparent 28%);
}

.shell {
    width: min(1440px, calc(100% - 40px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(16px);
}

.site-header .shell {
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand-block {
    display: flex;
    align-items: center;
    padding: 10px 0;
}

.brand {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand-subtitle {
    color: var(--muted);
    font-size: 12px;
}

.nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    justify-content: flex-end;
}

.nav a {
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: #3d4d62;
    border: 1px solid transparent;
    transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.nav a:hover {
    color: var(--primary);
    background: var(--primary-soft);
    border-color: #cfe2ff;
}

.nav a.active {
    color: var(--primary);
    background: #eaf3ff;
    border-color: #cfe2ff;
}

.page {
    padding: 16px 0 40px;
}

.notice {
    padding: 14px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    font-size: 14px;
    border: 1px solid transparent;
}

.notice.success {
    background: var(--success-soft);
    color: #16603c;
    border-color: #cfead8;
}

.notice.error {
    background: var(--danger-soft);
    color: #a33535;
    border-color: #f6cccc;
}

.toast-stack {
    position: fixed;
    right: 24px;
    bottom: 24px;
    display: grid;
    gap: 12px;
    z-index: 320;
    pointer-events: none;
}

.toast {
    width: min(360px, calc(100vw - 32px));
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid transparent;
    box-shadow: 0 12px 28px rgba(31, 42, 61, 0.14);
    background: #fff;
    pointer-events: auto;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.toast-success {
    background: #f3fbf6;
    color: #16603c;
    border-color: #cfead8;
}

.toast-error {
    background: #fff5f5;
    color: #a33535;
    border-color: #f6cccc;
}

.hidden {
    display: none !important;
}

.toast-body {
    font-size: 14px;
    line-height: 1.6;
}

.toast-close {
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    opacity: 0.72;
}

.toast-close:hover {
    opacity: 1;
}

.toast-hide {
    opacity: 0;
    transform: translateY(8px);
}

.actions,
.hero-actions,
.action-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.actions {
    margin-bottom: 18px;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.summary-card,
.hero-card,
.card,
.login-showcase,
.login-panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.summary-card {
    padding: 20px;
}

.summary-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.summary-card span {
    display: block;
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 10px;
}

.summary-card-head > span,
.summary-option span {
    margin-bottom: 0;
}

.summary-card strong {
    display: block;
    font-size: 30px;
    letter-spacing: -0.04em;
    margin-bottom: 6px;
}

.summary-card small {
    color: var(--muted);
    font-size: 13px;
}

.summary-option {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
}

.summary-option input {
    margin: 0;
}

.profile-summary-grid {
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.profile-card,
.profile-action-card {
    padding: 24px;
}

.profile-card {
    margin-bottom: 18px;
}

.profile-meta-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.profile-meta-item {
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: rgba(247, 250, 255, 0.92);
}

.profile-meta-item span {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 13px;
}

.profile-meta-item strong {
    font-size: 16px;
    color: var(--text);
}

.profile-action-list {
    display: grid;
    gap: 18px;
}

.profile-action-head {
    align-items: center;
}

.profile-action-body {
    margin-top: 18px;
}

.profile-action-body.is-hidden {
    display: none;
}

.profile-form-error {
    margin: 0 0 14px;
    color: var(--danger);
    font-size: 14px;
    font-weight: 600;
}

.profile-field-error {
    color: var(--danger);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.5;
}

.field-error {
    display: block;
    margin-top: 6px;
    color: var(--danger);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.5;
}

.taxonomy-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.taxonomy-tree-card,
.taxonomy-detail-card,
.taxonomy-action-card {
    padding: 24px;
}

.taxonomy-side {
    display: grid;
    gap: 18px;
}

.taxonomy-group + .taxonomy-group {
    margin-top: 14px;
}

.taxonomy-group-title {
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: #5a708c;
    list-style: none;
    cursor: pointer;
    user-select: none;
}

.taxonomy-group-title::-webkit-details-marker,
.taxonomy-node-summary::-webkit-details-marker {
    display: none;
}

.taxonomy-group-title::before,
.taxonomy-node-summary::before {
    content: "▾";
    display: inline-block;
    margin-right: 8px;
    color: #7b8ea6;
    transition: transform 0.16s ease;
}

.taxonomy-group:not([open]) > .taxonomy-group-title::before,
.taxonomy-node:not([open]) > .taxonomy-node-summary::before {
    transform: rotate(-90deg);
}

.taxonomy-tree-root {
    display: grid;
    gap: 8px;
}

.taxonomy-node {
    display: grid;
    gap: 6px;
}

.taxonomy-node-summary {
    display: flex;
    align-items: center;
    list-style: none;
    cursor: pointer;
}

.taxonomy-children {
    display: grid;
    gap: 6px;
    padding-left: 14px;
    border-left: 2px solid #e4ebf5;
}

.taxonomy-link {
    display: block;
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.taxonomy-link-root {
    flex: 1;
    padding: 9px 11px;
    border: 1px solid #d8e2ef;
    background: #f7fafe;
    color: #1e3550;
    font-weight: 700;
    font-size: 13px;
}

.taxonomy-link-child {
    padding: 8px 10px;
    border: 1px solid transparent;
    color: #32455d;
    background: #fff;
    font-size: 13px;
}

.taxonomy-link:hover,
.taxonomy-link.active {
    background: #edf4ff;
    border-color: #9fc4ff;
    color: #0f5ed7;
}

.taxonomy-meta-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.taxonomy-meta-item {
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: rgba(247, 250, 255, 0.92);
}

.taxonomy-meta-item span,
.taxonomy-note span {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 13px;
}

.taxonomy-meta-item strong {
    color: var(--text);
    font-size: 16px;
}

.taxonomy-note {
    margin-top: 16px;
    padding: 16px 18px;
    border-radius: var(--radius-md);
    background: #f7fafe;
    border: 1px solid var(--line);
}

.taxonomy-note p {
    margin: 0;
    color: #32455d;
    line-height: 1.6;
}

.taxonomy-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.taxonomy-empty-actions {
    display: flex;
    justify-content: flex-start;
}

.taxonomy-inline-form {
    margin-top: 12px;
}

.budget-panels,
.budget-action-grid,
.budget-detail-grid {
    display: grid;
    gap: 18px;
}

.budget-action-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 12px;
}

.budget-range-field {
    min-width: 0;
}

.budget-range-inline {
    flex-wrap: nowrap;
    gap: 10px;
    width: 100%;
}

.budget-period-wrap {
    min-width: 0;
    flex: 1 1 0;
    gap: 6px;
    padding: 0 10px;
}

.budget-period-wrap select {
    min-width: 0;
    min-height: 32px;
    width: 100%;
    padding: 0 22px 0 0;
    border: 0;
    border-radius: 0;
    background-color: transparent;
    box-shadow: none;
}

.budget-period-wrap select:focus {
    box-shadow: none;
}

.budget-filter-actions {
    grid-column: 1 / -1;
    margin-top: 0;
    justify-content: flex-start;
}

.budget-tab-switch {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    border-radius: 999px;
    background: #edf4ff;
}

.budget-tab-link {
    padding: 8px 14px;
    border-radius: 999px;
    color: var(--muted);
    font-weight: 600;
    text-decoration: none;
}

.budget-tab-link.active {
    background: #fff;
    color: var(--brand);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}

.budget-baseline-grid {
    display: grid;
    grid-template-columns: minmax(0, 3.4fr) minmax(240px, 1fr);
    gap: 28px;
    flex: 1;
    min-height: 0;
}

.budget-month-edit-grid {
    grid-template-columns: minmax(0, 1fr);
}

.budget-baseline-box {
    padding: 26px 28px;
    border: 1px solid #dfe8f4;
    border-radius: 20px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.budget-baseline-box h3 {
    margin: 0;
    font-size: 28px;
    line-height: 1.15;
    letter-spacing: 0.01em;
}

.budget-baseline-hint {
    color: #73839a;
    font-size: 18px;
    font-weight: 500;
}

.budget-inline-head {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    margin-bottom: 20px;
}

.budget-inline-head h3 {
    margin: 0;
}

.budget-inline-add {
    width: 100%;
    min-width: 0;
}

.budget-inline-add .enhanced-select,
.budget-inline-add select {
    width: 100%;
}

.budget-inline-list {
    display: grid;
    gap: 10px;
}

.budget-inline-row,
.budget-check-row {
    display: grid;
    grid-template-columns: minmax(max-content, auto) minmax(0, 1fr) auto;
    align-items: start;
    gap: 18px;
    padding: 14px 0;
    border-bottom: 1px solid #eef2f8;
}

.budget-inline-row:last-child,
.budget-check-row:last-child {
    border-bottom: 0;
}

.budget-inline-row span,
.budget-check-row span {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    color: #32455d;
    font-weight: 600;
    max-width: 100%;
    font-size: 16px;
    line-height: 1.4;
    word-break: break-word;
    min-width: 0;
}

.budget-inline-tag {
    display: inline-flex;
    margin-left: 8px;
    padding: 3px 10px;
    border-radius: 999px;
    background: #eef6ff;
    color: #2d6cdf;
    font-style: normal;
    font-size: 12px;
    font-weight: 600;
    vertical-align: middle;
}

.budget-inline-meta {
    margin-left: 8px;
    color: #73839a;
    display: inline-flex;
    flex-wrap: wrap;
    font-style: normal;
    font-size: 14px;
    font-weight: 500;
}

.is-missing-category span {
    color: #8a94a6;
}

.is-missing-category .budget-amount-input:disabled {
    color: #8a94a6;
    background: #f6f8fc;
    cursor: not-allowed;
}

.budget-baseline-modal {
    padding: 4px;
    align-items: stretch;
}

.budget-baseline-dialog {
    width: min(3000px, calc(100vw - 4px));
    min-height: calc(100vh - 8px);
    max-height: calc(100vh - 8px);
    padding: 40px 44px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.budget-baseline-dialog form {
    display: flex;
    flex: 1;
    min-height: 0;
    flex-direction: column;
}

.budget-amount-input,
.budget-inline-row input[type="number"] {
    width: 100%;
    min-height: 25px;
    padding: 2px 8px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--text);
    font-size: 13px;
    line-height: 1.2;
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.budget-amount-input:focus,
.budget-inline-row input[type="number"]:focus {
    outline: none;
    border-color: #91c5ff;
    box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.12);
}

.budget-baseline-actions {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e8eef7;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.75) 0%, #ffffff 32%);
    position: sticky;
    bottom: 0;
    z-index: 2;
}

@media (max-width: 1100px) {
    .budget-baseline-grid {
        grid-template-columns: 1fr;
    }

    .budget-baseline-box {
        min-height: 360px;
    }

    .budget-baseline-dialog {
        width: min(100vw - 20px, 920px);
        padding: 24px;
    }

    .budget-inline-row,
    .budget-check-row {
        grid-template-columns: 1fr;
        align-items: start;
    }
}

.budget-inline-check {
    display: flex;
    align-items: center;
    gap: 10px;
}

.budget-inline-check input {
    width: auto;
    min-height: auto;
}

.budget-progress {
    min-width: 170px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.budget-progress-track {
    flex: 1;
    min-width: 110px;
    height: 14px;
    overflow: hidden;
    border-radius: 999px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(241, 245, 251, 0.95)),
        #edf1f7;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.08);
}

.budget-progress-fill {
    height: 100%;
    border-radius: inherit;
    position: relative;
    overflow: hidden;
}

.budget-bar-normal {
    background: linear-gradient(90deg, #34c97b 0%, #17a663 100%);
}

.budget-bar-warning {
    background: linear-gradient(90deg, #ffcb57 0%, #f59e0b 100%);
}

.budget-bar-overspent {
    background: linear-gradient(90deg, #ff8a7a 0%, #ea4335 100%);
}

.budget-progress-fill::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.2) 0,
            rgba(255, 255, 255, 0.08) 35%,
            rgba(255, 255, 255, 0) 100%
        );
}

.budget-progress-text {
    min-width: 52px;
    text-align: right;
    font-size: 13px;
    font-weight: 700;
    color: #4d5f77;
    white-space: nowrap;
}

.budget-status-normal {
    color: #16603c;
    background: var(--success-soft);
}

.budget-status-warning {
    color: #8a5a12;
    background: var(--warning-soft);
}

.budget-status-overspent {
    color: #a33535;
    background: var(--danger-soft);
}

.account-filter-grid {
    grid-template-columns: minmax(0, 1fr);
    align-items: end;
    gap: 16px;
}

.filter-tag-row {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 35px;
    align-items: center;
}

.filter-tag-label {
    font-size: 15px;
    font-weight: 700;
    color: #32455d;
    line-height: 1.2;
}

.filter-tag-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-tag {
    min-width: 88px;
    min-height: 40px;
    padding: 7px 16px;
    border: 1px solid #cddcf0;
    border-radius: 14px;
    background: #fff;
    color: #4d6482;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.filter-tag:hover {
    border-color: #b8d0f4;
    color: #256edb;
    background: #f8fbff;
}

.filter-tag.active {
    background: #eaf3ff;
    border-color: #bcd8ff;
    color: #1a73e8;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.search-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    flex: 0 1 760px;
    width: min(760px, 100%);
    margin: 0 auto;
    font-size: 14px;
    font-weight: 600;
    color: #32455d;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 56px;
    padding: 6px 6px 6px 16px;
    border: 1px solid #dbe2ec;
    border-radius: 999px;
    background: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
    overflow: hidden;
}

.search-box:focus-within {
    border-color: #c9d7eb;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.search-box input {
    width: 100%;
    flex: 1 1 auto;
    min-height: 36px;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    font-size: 16px;
    color: var(--text);
}

.account-filter-grid .search-box input {
    border: none !important;
    outline: none;
    box-shadow: none !important;
    background: transparent;
    appearance: none;
}

.search-box input::placeholder {
    color: #c2cad6;
}

.search-box input:focus {
    outline: none;
    box-shadow: none;
}

.search-submit {
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 999px;
    background: #3d86f4;
    color: #fff;
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
    transition: background 0.16s ease, transform 0.16s ease;
    flex: 0 0 auto;
    margin-left: auto;
}

.search-submit:hover {
    background: #2c74e0;
}

.search-submit:active {
    transform: scale(0.98);
}

.account-filter-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-start;
    margin-top: 0;
}

.hero-card {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    padding: 24px;
    margin-bottom: 18px;
    background:
        linear-gradient(180deg, rgba(248, 251, 255, 1), rgba(255, 255, 255, 1));
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-card h2,
.section-head h2 {
    margin: 10px 0 6px;
    font-size: 28px;
    line-height: 1.1;
}

.hero-card p,
.section-head p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.card {
    padding: 20px;
    margin-bottom: 18px;
    overflow: hidden;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 12px;
    margin-bottom: 18px;
}

.filter-card {
    background: var(--panel-muted);
    padding: 14px 18px 12px;
    overflow: visible;
    position: relative;
    z-index: 30;
}

.table-card {
    padding: 0 14px 16px;
}

.guide-hero {
    align-items: center;
}

.guide-card {
    background:
        linear-gradient(180deg, rgba(251, 252, 254, 1), rgba(255, 255, 255, 1));
}

.guide-principles,
.guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.guide-grid-single {
    grid-template-columns: 1fr;
}

.guide-principle,
.guide-item {
    height: 100%;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: #fff;
}

.guide-principle h3,
.guide-item h3 {
    margin: 0 0 10px;
    font-size: 18px;
}

.guide-principle p,
.guide-summary {
    margin: 0;
    color: var(--muted);
    line-height: 1.75;
}

.guide-list {
    margin: 12px 0 0;
    padding-left: 20px;
    color: #34475d;
    line-height: 1.8;
}

.guide-list li + li {
    margin-top: 8px;
}

.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 1080px;
    margin-top: 0;
}

.table th,
.table td {
    padding: 14px 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
    white-space: nowrap;
    font-size: 14px;
}

.table th {
    position: sticky;
    top: 8px;
    z-index: 10;
    background: #f9fbff;
    color: #4b5d74;
    font-weight: 700;
}

.table tbody tr:hover {
    background: #fafcff;
}

.table-centered th,
.table-centered td {
    text-align: center;
    vertical-align: middle;
}

.table-centered .cell-title,
.table-centered .cell-subtitle,
.table-centered .action-links {
    justify-content: center;
    text-align: center;
}

.table-centered .cell-subtitle {
    margin-top: 6px;
}

.cell-title {
    font-weight: 600;
    color: var(--text);
}

.cell-subtitle {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

.amount {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.amount-income {
    color: var(--success);
}

.amount-expense {
    color: var(--danger);
}

.amount-transfer {
    color: var(--primary);
}

.amount-adjust {
    color: #d97706;
}

.amount-cash {
    color: var(--success);
}

.amount-investment {
    color: var(--primary);
}

.amount-fixed-asset {
    color: #d9a300;
}

.amount-liability {
    color: var(--danger);
}

.type-pill,
.status-pill,
.flow-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.type-pill {
    color: #2d4f7b;
    background: #edf4ff;
}

.type-pill-cash {
    color: #16603c;
    background: #e8f7ee;
}

.type-pill-investment {
    color: #1257c0;
    background: #e8f3ff;
}

.type-pill-fixed-asset {
    color: #8a6400;
    background: #fff4d6;
}

.type-pill-liability {
    color: #a33535;
    background: #fdecec;
}

.status-pill.status-active {
    color: #16603c;
    background: var(--success-soft);
}

.status-pill.status-inactive {
    color: #8a5a12;
    background: var(--warning-soft);
}

.flow-badge-income {
    color: #16603c;
    background: var(--success-soft);
}

.flow-badge-expense {
    color: #a33535;
    background: var(--danger-soft);
}

.flow-badge-transfer {
    color: #235ea7;
    background: #e9f2ff;
}

.flow-badge-adjust {
    color: #9a5300;
    background: #fff2df;
}

.action-links {
    align-items: center;
}

.action-links-inline {
    flex-wrap: nowrap;
    white-space: nowrap;
}

.action-links form {
    margin: 0;
}

.action-links a,
.link-button {
    border: none;
    background: transparent;
    color: var(--primary);
    cursor: pointer;
    font: inherit;
    padding: 0;
}

.action-links-inline a,
.action-links-inline .link-button {
    display: inline-flex;
    align-items: center;
}

.action-links a.button-secondary,
.action-links-inline a.button-secondary {
    color: #38516e;
}

.action-links a.button-secondary:hover,
.action-links-inline a.button-secondary:hover {
    color: #28486f;
    text-decoration: none;
}

.action-links a:hover,
.link-button:hover {
    color: #0f5ed7;
    text-decoration: underline;
}

.inline-form {
    display: inline-flex;
    margin: 0;
}

.link-button.danger {
    color: var(--danger);
}

.form-card {
    max-width: 900px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.filter-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    align-items: end;
}

.flow-filter-grid {
    grid-template-columns: minmax(180px, 1.2fr) repeat(3, minmax(0, 1fr));
}

.form-grid label,
.login-form label,
.field-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #32455d;
}

.field-hint {
    color: var(--muted);
    font-size: 12px;
    font-weight: 400;
    line-height: 1.5;
}

.form-grid input,
.form-grid select,
.login-form input {
    width: 100%;
    min-height: 40px;
    padding: 8px 11px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--text);
    font-size: 14px;
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.form-grid select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 38px;
    background-image:
        linear-gradient(45deg, transparent 50%, #6f8199 50%),
        linear-gradient(135deg, #6f8199 50%, transparent 50%);
    background-position:
        calc(100% - 20px) calc(50% - 2px),
        calc(100% - 14px) calc(50% - 2px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}

.form-grid input:focus,
.form-grid select:focus,
.login-form input:focus {
    outline: none;
    border-color: #91c5ff;
    box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.12);
}

.enhanced-select {
    position: relative;
    width: 100%;
}

.enhanced-select.open {
    z-index: 140;
}

.enhanced-select-native {
    position: absolute !important;
    inset: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
    z-index: -1 !important;
}

.enhanced-select-trigger {
    width: 100%;
    min-height: 40px;
    padding: 8px 42px 8px 12px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background:
        linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    color: var(--text);
    font-size: 14px;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.enhanced-select-trigger:hover {
    border-color: #c6d6ec;
    background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}

.enhanced-select-trigger:focus-visible,
.enhanced-select.open .enhanced-select-trigger {
    outline: none;
    border-color: #91c5ff;
    box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.12);
}

.enhanced-select-trigger[disabled] {
    cursor: not-allowed;
    opacity: 0.62;
    background: #f7f9fc;
}

.enhanced-select-value {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.enhanced-select-value.tag-value {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    max-width: calc(100% - 4px);
    padding: 3px 10px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1f4f92;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.enhanced-select-icons {
    position: absolute;
    right: 12px;
    top: 50%;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transform: translateY(-50%);
    pointer-events: none;
    color: #7c8ea5;
}

.enhanced-select-search-icon {
    font-size: 13px;
    opacity: 0.9;
}

.enhanced-select-caret {
    width: 9px;
    height: 9px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-1px);
    transform-origin: center;
    transition: transform 0.16s ease;
}

.enhanced-select.open .enhanced-select-caret {
    transform: rotate(-135deg) translate(-1px, -1px);
}

.enhanced-select-panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 120;
    display: none;
    padding: 10px;
    border: 1px solid #d8e3f2;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 18px 36px rgba(31, 42, 61, 0.16);
}

.enhanced-select.open-upward .enhanced-select-panel {
    top: auto;
    bottom: calc(100% + 8px);
}

.enhanced-select.open .enhanced-select-panel {
    display: block;
}

.enhanced-select-search-wrap {
    position: relative;
    margin-bottom: 8px;
}

.enhanced-select-search-wrap::before {
    content: "⌕";
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #7c8ea5;
    font-size: 13px;
    pointer-events: none;
}

.enhanced-select-search {
    width: 100%;
    min-height: 36px;
    padding: 8px 12px 8px 32px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #f8fbff;
    color: var(--text);
    font-size: 14px;
}

.enhanced-select-search:focus {
    outline: none;
    border-color: #91c5ff;
    box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.12);
    background: #fff;
}

.enhanced-select-options {
    max-height: 240px;
    overflow-y: auto;
    display: block;
}

.enhanced-select-options.enhanced-select-options-tag {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: none;
    overflow: visible;
}

.enhanced-select-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-height: 0;
    height: auto;
    margin: 0;
    padding: 8px 12px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    appearance: none;
    -webkit-appearance: none;
    box-sizing: border-box;
    font: inherit;
    color: var(--text);
    font-size: 14px;
    text-align: left;
    vertical-align: top;
    cursor: pointer;
    line-height: 1.35;
    white-space: normal;
    transition: background 0.14s ease, color 0.14s ease;
}

.enhanced-select-tag .enhanced-select-trigger {
    padding-right: 42px;
}

.enhanced-select-tag .enhanced-select-panel {
    padding: 12px;
}

.enhanced-select-tag .enhanced-select-option {
    width: auto;
    min-width: 0;
    padding: 7px 12px;
    border: 1px solid #d7e4f5;
    border-radius: 999px;
    background: #f8fbff;
    color: #36516f;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
}

.enhanced-select-tag .enhanced-select-option + .enhanced-select-option {
    margin-top: 0;
}

.enhanced-select-tag .enhanced-select-option:hover,
.enhanced-select-tag .enhanced-select-option:focus {
    background: #eef5ff;
    border-color: #bfd7fb;
    color: var(--primary);
}

.enhanced-select-tag .enhanced-select-option.active {
    background: linear-gradient(180deg, #e8f2ff 0%, #dcecff 100%);
    border-color: #9fc3ff;
    color: #184eaa;
    box-shadow: 0 6px 14px rgba(22, 119, 255, 0.14);
}

.enhanced-select-tag .enhanced-select-option.empty {
    background: #f5f7fb;
    color: var(--muted);
    border-style: dashed;
}

.enhanced-select-option-label {
    flex: 1 1 auto;
    min-width: 0;
}

.enhanced-select-option-marker {
    flex: 0 0 auto;
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
}

.enhanced-select-option + .enhanced-select-option {
    margin-top: 4px;
}

.enhanced-select-option:focus {
    outline: none;
    background: #f7f9fc;
}

.enhanced-select-option:hover {
    background: #f7f9fc;
    color: var(--primary);
}

.enhanced-select-option.empty {
    color: var(--muted);
}

.enhanced-select-option.active {
    background: #edf5ff;
    color: #1f4f92;
    font-weight: 600;
    box-shadow: none;
}

.enhanced-select-option.is-disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.enhanced-select-empty {
    padding: 10px 12px;
    color: var(--muted);
    font-size: 13px;
}

.full-width {
    grid-column: 1 / -1;
}

.range-wide {
    grid-column: span 2;
}

.form-actions {
    grid-column: 1 / -1;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 16px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    background: var(--primary);
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.button:hover {
    background: #0f66dc;
}

.button-secondary {
    background: #fff;
    color: #38516e;
    border-color: var(--line-strong);
}

.button-secondary:hover {
    background: #f5f8fc;
    color: #28486f;
}

.neutral-secondary-button {
    color: #1f2a3d;
}

.neutral-secondary-button:hover {
    color: #111827;
    background: #f7f9fc;
}

.button-disabled {
    opacity: 0.48;
    pointer-events: none;
}

.danger-button {
    background: var(--danger);
}

.danger-button:hover {
    background: #d73c2f;
}

.danger-outline-button {
    color: var(--danger);
    border-color: #f1c1bb;
    background: #fff;
}

.danger-outline-button:hover {
    color: #c7372c;
    border-color: #e79f98;
    background: #fff6f5;
}

.range-field {
    display: grid;
    gap: 10px;
}

.range-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: start;
}

.range-inputs {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.date-input-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    padding: 0 8px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: #fff;
    min-width: 144px;
}

.date-input-wrap span,
.field-title {
    color: #32455d;
    font-size: 14px;
    font-weight: 600;
    flex: 0 0 auto;
}

.field-title {
    min-width: 0;
}

.date-input-wrap input {
    min-height: 32px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: var(--text);
}

.date-input-wrap input:focus {
    box-shadow: none;
}

.range-separator {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.quick-preset-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding-top: 0;
    align-items: center;
}

.quick-preset {
    min-height: 36px;
    padding: 0 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line-strong);
    background: transparent;
    color: #6a7c93;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: color 0.16s ease, background 0.16s ease, border-color 0.16s ease;
    white-space: nowrap;
}

.quick-preset:hover {
    color: #2e5fa7;
    background: #f6f9fe;
    border-color: #d9e5f7;
}

.quick-preset.active {
    color: var(--primary);
    background: #eef5ff;
    border-color: #cfe2ff;
    box-shadow: none;
}

.empty {
    color: var(--muted);
    text-align: center;
    padding: 30px 12px;
}

.inline-summary {
    margin: 0 0 10px;
    padding: 0 2px;
    color: var(--primary);
    font-size: 14px;
    line-height: 1.8;
}

.inline-summary-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 10px;
    flex-wrap: nowrap;
}

.inline-summary-row .inline-summary {
    margin: 0;
    flex: 1 1 auto;
    min-width: 0;
}

.transaction-batch-text {
    display: inline-block;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}

.transaction-batch-copy {
    display: inline-block;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
    border: none;
    background: transparent;
    padding: 0;
    color: var(--text);
    font: inherit;
    cursor: copy;
}

.transaction-batch-copy:hover {
    color: var(--primary);
    text-decoration: underline;
}

.inline-summary strong {
    font-weight: 700;
}

.pagination-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin: 0;
    padding: 16px 20px 20px;
    border-top: 1px solid var(--line);
}

.pagination-meta {
    color: var(--muted);
    font-size: 13px;
}

.pagination-actions {
    display: flex;
    gap: 10px;
}

.overlay-mask {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.24);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
    z-index: 180;
}

.overlay-mask.show {
    opacity: 1;
    pointer-events: auto;
}

.side-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: min(520px, 100%);
    height: 100vh;
    padding: 24px;
    background: #fff;
    box-shadow: -16px 0 40px rgba(15, 23, 42, 0.12);
    transform: translateX(100%);
    transition: transform 0.22s ease;
    z-index: 190;
    overflow-y: auto;
}

.side-drawer.open {
    transform: translateX(0);
}

.drawer-head,
.dialog-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 18px;
}

.drawer-head h3,
.dialog-head h3 {
    margin: 0 0 6px;
    font-size: 24px;
}

.drawer-head p,
.dialog-text {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.drawer-close {
    border: none;
    background: transparent;
    color: #7b8ca3;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.drawer-form {
    grid-template-columns: 1fr 1fr;
}

.import-tips {
    padding: 14px 16px;
    border-radius: var(--radius-md);
    background: #f6f9fc;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.7;
}

.import-tips p {
    margin: 0 0 8px;
    color: var(--text);
    font-weight: 600;
}

.import-tips ul {
    margin: 0;
    padding-left: 18px;
}

.import-error-block {
    white-space: pre-line;
}

.dialog-modal {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
    z-index: 200;
}

.dialog-modal.open {
    opacity: 1;
    pointer-events: auto;
}

.dialog-card {
    width: min(460px, 100%);
    padding: 24px;
    border-radius: var(--radius-lg);
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.form-dialog-card {
    width: min(760px, 100%);
    max-height: calc(100vh - 48px);
    overflow-y: auto;
}

.budget-baseline-modal {
    padding: 4px;
    place-items: center;
}

.budget-baseline-modal .budget-baseline-dialog {
    width: min(1000px, calc(100vw - 96px));
    max-width: none;
    min-height: calc(100vh - 72px);
    max-height: calc(100vh - 72px);
    padding: 34px 38px;
    overflow-y: auto;
}

.login-shell {
    width: min(1220px, calc(100% - 40px));
    margin: 0 auto;
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.2fr 0.86fr;
    gap: 28px;
    align-items: center;
}

.login-showcase,
.login-panel {
    padding: 34px;
}

.login-showcase {
    background:
        linear-gradient(145deg, #145fc1, #0a4ea8 52%, #0f7f7a);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.12);
}

.login-showcase .eyebrow {
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
}

.login-showcase h1 {
    margin: 18px 0 14px;
    font-size: clamp(40px, 5vw, 64px);
    line-height: 1.02;
    letter-spacing: -0.05em;
}

.login-showcase p {
    margin: 0;
    color: rgba(255, 255, 255, 0.84);
    line-height: 1.8;
    font-size: 16px;
}

.login-highlights {
    display: grid;
    gap: 12px;
    margin-top: 28px;
}

.login-highlights article {
    display: grid;
    gap: 6px;
    padding: 16px 18px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.12);
}

.login-highlights span {
    color: rgba(255, 255, 255, 0.76);
    font-size: 13px;
    line-height: 1.7;
}

.login-panel-head {
    margin-bottom: 18px;
}

.login-panel-head h2 {
    margin: 0 0 8px;
    font-size: 30px;
}

.login-panel-head p,
.login-tip p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.login-form {
    display: grid;
    gap: 16px;
}

.login-button {
    width: 100%;
}

.login-tip {
    margin-top: 18px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    background: var(--primary-soft);
    border: 1px solid #d7e9ff;
}

.login-tip span {
    display: inline-block;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.brand-subtitle {
    margin-top: 4px;
    font-size: 12px;
    color: var(--text-muted);
}

.auth-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.auth-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    background: #eef3ff;
    color: var(--text-main);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

.auth-tab.active {
    background: var(--primary);
    color: #fff;
}

.auth-panel.hidden,
.notice.hidden {
    display: none;
}

.inline-form {
    margin-top: 12px;
}

.login-tip.compact {
    margin-top: 0;
}

.totp-setup-box {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 16px;
    align-items: center;
    margin-bottom: 18px;
}

.totp-qr {
    width: 160px;
    height: 160px;
    border-radius: var(--radius-md);
    border: 1px solid #dbe6ff;
    background: #fff;
}

.auth-screen {
    position: relative;
    overflow-x: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 16% 10%, rgba(255, 226, 199, 0.95), transparent 28%),
        radial-gradient(circle at 82% 8%, rgba(188, 224, 255, 0.92), transparent 26%),
        linear-gradient(180deg, #edf4ff 0%, #bfe0ff 100%);
}

.auth-sky,
.auth-glow {
    position: fixed;
    inset: 0;
    pointer-events: none;
}

.auth-sky {
    background:
        radial-gradient(circle at 70% 18%, rgba(255, 255, 255, 0.56), transparent 14%),
        linear-gradient(120deg, rgba(255, 255, 255, 0.42), transparent 38%);
}

.auth-glow-left,
.auth-glow-right {
    filter: blur(18px);
}

.auth-glow-left {
    background: radial-gradient(circle at 14% 20%, rgba(255, 205, 145, 0.26), transparent 24%);
}

.auth-glow-right {
    background: radial-gradient(circle at 88% 18%, rgba(122, 184, 255, 0.28), transparent 26%);
}

.auth-shell {
    position: relative;
    z-index: 1;
    width: min(920px, calc(100% - 72px));
    margin: 0 auto;
    padding: 20px 0;
}

.auth-hero {
    text-align: center;
    margin-bottom: 18px;
}

.auth-hero h1 {
    margin: 0;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.08;
    letter-spacing: -0.03em;
    font-weight: 800;
    color: #111827;
}

.auth-hero-highlight {
    background: linear-gradient(90deg, #ff8a63 0%, #d36cff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.auth-hero h1 small {
    display: block;
    margin-top: 12px;
    font-size: clamp(20px, 2.4vw, 28px);
    line-height: 1.2;
    font-weight: 700;
    color: #111827;
    letter-spacing: -0.01em;
}

.auth-card {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    min-height: 460px;
    border: 1px solid rgba(255, 255, 255, 0.62);
    background: rgba(244, 251, 255, 0.78);
    box-shadow: 0 24px 70px rgba(72, 108, 160, 0.15);
    backdrop-filter: blur(18px);
}

.auth-side {
    padding: 32px 26px;
    border-right: 1px solid #d7e5f7;
}

.auth-side-inner {
    display: grid;
    gap: 18px;
}

.auth-side h2 {
    margin: 0;
    font-size: 42px;
    line-height: 1;
    color: #111827;
}

.auth-side-tip {
    margin: 0;
    color: #3f7cf0;
    font-size: 16px;
}

.auth-side-copy {
    display: grid;
    gap: 8px;
    color: #8492a6;
    font-size: 15px;
}

.auth-side-copy strong {
    color: #66758a;
    font-size: 18px;
}

.auth-main {
    padding: 34px 36px 28px;
}

.auth-main-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
}

.auth-tab-row {
    display: flex;
    align-items: center;
    gap: 30px;
}

.auth-main-tab {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    font-size: 22px;
    font-weight: 700;
    color: #1f2a3d;
}

.auth-main-tab.active {
    color: #176ff5;
}

.auth-main-tab.active::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 100%;
    height: 4px;
    border-radius: 999px;
    background: #176ff5;
}

.auth-link-strong {
    color: #176ff5;
    font-size: 18px;
    font-weight: 700;
}

.auth-form {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.auth-input-row {
    display: grid;
    grid-template-columns: 140px 1fr;
    align-items: center;
    min-height: 64px;
    border: 1px solid #d4dde8;
    background: rgba(255, 255, 255, 0.88);
}

.auth-input-row span {
    padding-left: 28px;
    font-size: 16px;
    color: #242b36;
}

.auth-input-row input {
    width: 100%;
    height: 100%;
    border: 0;
    background: transparent;
    padding: 0 24px;
    font-size: 16px;
    color: #1f2a3d;
    outline: none;
}

.auth-input-row input::placeholder {
    color: #a2adba;
}

.auth-password-row {
    grid-template-columns: 140px 1fr 54px;
}

.auth-eye {
    border: 0;
    background: transparent;
    font-size: 18px;
    cursor: pointer;
    color: #98a4b3;
}

.auth-eye.active {
    color: #176ff5;
}

.auth-field-tip {
    min-height: 18px;
    margin-top: -8px;
    font-size: 13px;
    color: #8c98a9;
}

.auth-field-tip.error {
    color: #d93025;
}

.auth-field-tip.success {
    color: #1a9b58;
}

.auth-submit {
    margin-top: 8px;
    width: 100%;
    min-height: 58px;
    border: 0;
    background: linear-gradient(90deg, #1c67ea 0%, #2d73ee 100%);
    color: #fff;
    font-size: 24px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.auth-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 30px rgba(23, 111, 245, 0.2);
}

.auth-helper-links {
    display: flex;
    align-items: center;
    gap: 28px;
    margin-top: 20px;
    flex-wrap: wrap;
    color: #1f2a3d;
    font-size: 15px;
}

.auth-helper-links a,
.auth-text-button {
    color: #1f2a3d;
}

.auth-text-button {
    border: 0;
    background: transparent;
    padding: 0;
    font-size: 16px;
    cursor: pointer;
}

.auth-inline-tip {
    margin-top: -2px;
    color: #6b7788;
    font-size: 15px;
    line-height: 1.7;
}

.auth-totp-box {
    display: grid;
    gap: 16px;
    margin-top: 28px;
}

@media (max-width: 1100px) {
    .summary-grid,
    .login-shell {
        grid-template-columns: 1fr;
    }

    .hero-card,
    .account-filter-top,
    .account-filter-tabs,
    .site-header .shell,
    .section-head,
    .totp-setup-box {
        flex-direction: column;
        align-items: flex-start;
    }

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

    .auth-side {
        border-right: 0;
        border-bottom: 1px solid #d7e5f7;
    }

    .profile-meta-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .taxonomy-layout {
        grid-template-columns: 1fr;
    }

    .taxonomy-meta-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .budget-baseline-grid,
    .budget-detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .shell,
    .login-shell {
        width: min(100% - 24px, 100%);
    }

    .table th {
        top: 8px;
    }

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

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

    .filter-tag-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .filter-tag {
        min-width: 84px;
        min-height: 38px;
        padding: 7px 14px;
    }

    .budget-filter-grid {
        display: grid;
        grid-template-columns: 1fr;
    }

    .budget-filter-grid > label {
        width: auto;
        flex: initial;
    }

    .search-box {
        min-height: 50px;
        padding: 5px 8px 5px 12px;
    }

    .search-box input {
        font-size: 15px;
    }

    .search-submit {
        width: 40px;
        height: 40px;
        font-size: 22px;
    }

    .range-wide {
        grid-column: 1 / -1;
    }

    .range-layout {
        grid-template-columns: 1fr;
    }

    .range-inputs {
        width: 100%;
        flex-wrap: wrap;
    }

    .range-separator {
        display: none;
    }

    .brand {
        font-size: 20px;
    }

    .login-showcase,
    .login-panel,
    .card,
    .hero-card,
    .summary-card {
        padding: 18px;
    }

    .profile-card,
    .profile-action-card {
        padding: 18px;
    }

    .profile-meta-grid {
        grid-template-columns: 1fr;
    }

    .taxonomy-meta-grid {
        grid-template-columns: 1fr;
    }

    .profile-action-head {
        align-items: flex-start;
    }

    .taxonomy-tree-card,
    .taxonomy-detail-card,
    .taxonomy-action-card {
        padding: 18px;
    }

    .budget-inline-row {
        flex-direction: column;
        align-items: stretch;
    }

    .budget-inline-row input[type="number"] {
        width: 100%;
    }

    .pagination-bar,
    .drawer-form {
        grid-template-columns: 1fr;
    }

    .inline-summary-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .totp-setup-box {
        grid-template-columns: 1fr;
    }

    .auth-shell {
        width: min(100% - 20px, 100%);
        padding: 24px 0;
    }

    .auth-hero {
        margin-bottom: 24px;
    }

    .auth-hero p {
        font-size: 15px;
    }

    .auth-side,
    .auth-main {
        padding: 28px 22px;
    }

    .auth-side h2 {
        font-size: 44px;
    }

    .auth-qr-placeholder {
        width: min(220px, 100%);
        height: auto;
        aspect-ratio: 1 / 1;
    }

    .auth-main-top,
    .auth-tab-row,
    .auth-helper-links {
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
    }

    .auth-main-tab {
        font-size: 20px;
    }

    .auth-input-row {
        grid-template-columns: 1fr;
        min-height: auto;
        padding: 14px 0 0;
    }

    .auth-password-row {
        grid-template-columns: 1fr auto;
        align-items: end;
    }

    .auth-input-row span {
        padding: 0 18px 10px;
        font-size: 15px;
        grid-column: 1 / -1;
    }

    .auth-input-row input {
        min-height: 54px;
        padding: 0 18px 14px;
        font-size: 16px;
    }

    .auth-eye {
        padding: 0 18px 14px 0;
    }

    .auth-submit {
        min-height: 58px;
        font-size: 22px;
    }
}

@media (max-width: 560px) {
    .filter-grid {
        grid-template-columns: 1fr;
    }

    .filter-tag-group {
        gap: 8px;
    }

    .range-wide {
        grid-column: auto;
    }
}
