:root {
    --finance-ink: #0b1220;
    --finance-muted: #667085;
    --finance-line: rgba(148, 163, 184, .32);
    --finance-panel: rgba(255, 255, 255, .78);
}

.finance-brand-logo {
    display: block;
    width: 168px;
    max-width: 100%;
    height: auto;
}

.fi-simple-layout {
    min-height: 100svh;
    background:
        radial-gradient(circle at 18% 18%, rgba(96, 165, 250, .20), transparent 28%),
        radial-gradient(circle at 82% 12%, rgba(52, 211, 153, .18), transparent 26%),
        linear-gradient(180deg, #fbfcfd 0%, #eef2f7 100%);
}

.fi-simple-main {
    max-width: 1180px !important;
}

.finance-auth-page {
    width: 100%;
}

.finance-auth-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(390px, .72fr);
    gap: 34px;
    align-items: center;
    min-height: min(760px, calc(100svh - 64px));
    padding: 22px;
}

.finance-auth-hero,
.finance-auth-card {
    border: 1px solid rgba(255, 255, 255, .72);
    border-radius: 28px;
    background: var(--finance-panel);
    box-shadow: 0 24px 70px rgba(15, 23, 42, .12);
    backdrop-filter: blur(22px);
}

.finance-auth-hero {
    display: grid;
    gap: 30px;
    min-height: 560px;
    align-content: space-between;
    padding: 36px;
}

.finance-auth-lockup {
    width: min(440px, 100%);
    height: auto;
}

.finance-auth-kicker {
    margin: 0 0 14px;
    color: #2563eb;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.finance-auth-hero h1 {
    max-width: 660px;
    margin: 0;
    color: var(--finance-ink);
    font-size: clamp(34px, 5vw, 64px);
    line-height: 1.05;
    font-weight: 860;
    letter-spacing: 0;
}

.finance-auth-hero p {
    max-width: 620px;
    margin: 18px 0 0;
    color: var(--finance-muted);
    font-size: 16px;
    line-height: 1.7;
}

.finance-auth-metrics,
.finance-auth-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.finance-auth-metrics span,
.finance-auth-footer span {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid var(--finance-line);
    border-radius: 999px;
    background: rgba(255, 255, 255, .62);
    color: #344054;
    font-size: 12px;
    font-weight: 700;
}

.finance-auth-card {
    padding: 28px;
}

.finance-auth-card-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
}

.finance-auth-card-head img {
    width: 54px;
    height: 54px;
}

.finance-auth-card-head h2 {
    margin: 0;
    color: var(--finance-ink);
    font-size: 25px;
    font-weight: 820;
    letter-spacing: 0;
}

.finance-auth-card-head p {
    margin: 4px 0 0;
    color: var(--finance-muted);
    font-size: 13px;
}

.finance-auth-card .fi-sc-form {
    gap: 18px;
}

.finance-auth-card .fi-input-wrp,
.finance-auth-card .fi-btn {
    border-radius: 16px;
}

.finance-auth-card .fi-btn {
    min-height: 46px;
    font-weight: 760;
}

.fi-ac-icon-btn-action[aria-label="列管理"] {
    touch-action: manipulation;
}

.fi-main,
.fi-page,
.fi-page-content,
.fi-section,
.fi-section-content,
.fi-fo-component-ctn,
.fi-ta {
    min-width: 0;
}

.cfos-mobile-scroll-hint {
    display: none;
}

.finance-auth-footer {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(148, 163, 184, .20);
}

@media (max-width: 960px) {
    .fi-simple-main {
        max-width: 100% !important;
    }

    .finance-auth-shell {
        grid-template-columns: 1fr;
        gap: 16px;
        min-height: auto;
        padding: 14px;
    }

    .finance-auth-hero {
        min-height: auto;
        padding: 22px;
    }

    .finance-auth-card {
        padding: 20px;
    }
}

@media (max-width: 640px) {
    html,
    body {
        max-width: 100%;
        overflow-x: hidden;
    }

    .fi-main {
        width: 100%;
        max-width: 100vw;
    }

    .fi-page-content {
        width: 100%;
        max-width: 100%;
        padding-inline: 12px !important;
    }

    .fi-header,
    .fi-header-heading,
    .fi-header-subheading {
        min-width: 0;
    }

    .fi-header-heading {
        overflow-wrap: anywhere;
        line-height: 1.18;
    }

    .fi-header-subheading {
        max-width: 100%;
        overflow-wrap: anywhere;
        line-height: 1.5;
    }

    .fi-ta-ctn,
    .fi-ta-content,
    .fi-ta-content-ctn,
    .fi-ta-table-ctn,
    .fi-ta-table-container,
    [class*="cfos-"][class*="table-wrap"],
    .cfos-table-wrap,
    .cfos-cash-section,
    .overflow-x-auto {
        max-width: 100%;
        overflow-x: auto !important;
        overflow-y: visible;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
        scrollbar-gutter: stable;
    }

    .fi-ta-ctn,
    .fi-ta-content-ctn,
    [class*="cfos-"][class*="table-wrap"],
    .cfos-table-wrap,
    .cfos-cash-section {
        border-radius: 8px;
        box-shadow: inset -14px 0 18px -20px rgba(15, 23, 42, .38);
    }

    .fi-ta table,
    .fi-ta-table,
    [class*="cfos-"][class*="table-wrap"] > table,
    .cfos-table-wrap > table,
    .cfos-cash-section > table,
    .overflow-x-auto > table {
        width: max-content;
        min-width: min(760px, calc(100vw + 360px));
        max-width: none;
    }

    .fi-ta th,
    .fi-ta td,
    [class*="cfos-"][class*="table-wrap"] th,
    [class*="cfos-"][class*="table-wrap"] td,
    .cfos-table-wrap th,
    .cfos-table-wrap td,
    .cfos-cash-section th,
    .cfos-cash-section td {
        white-space: nowrap;
    }

    [class*="cfos-"][class*="table-wrap"] th:first-child,
    [class*="cfos-"][class*="table-wrap"] td:first-child,
    .cfos-table-wrap th:first-child,
    .cfos-table-wrap td:first-child,
    .cfos-cash-section th:first-child,
    .cfos-cash-section td:first-child {
        position: sticky;
        left: 0;
        z-index: 2;
        min-width: min(48vw, 184px);
        max-width: min(58vw, 220px);
        white-space: normal;
        overflow-wrap: anywhere;
        background: #fff;
        box-shadow: 8px 0 14px -14px rgba(15, 23, 42, .38);
    }

    [class*="cfos-"][class*="table-wrap"] th:first-child,
    .cfos-table-wrap th:first-child,
    .cfos-cash-section th:first-child {
        z-index: 3;
        background: #f8fafc;
    }

    .cfos-summary-table th:first-child,
    .cfos-summary-table td:first-child {
        min-width: min(46vw, 172px) !important;
        max-width: min(54vw, 204px) !important;
    }

    .cfos-snapshot-table th:first-child,
    .cfos-snapshot-table td:first-child {
        min-width: min(44vw, 168px) !important;
        max-width: min(54vw, 204px) !important;
    }

    .cfos-monthly-toolbar,
    .cfos-monthly-tools,
    .cfos-monthly-chips,
    .cfos-kpi-grid,
    .cfos-monthly-card,
    .cfos-site-detail-toolbar,
    .cfos-site-detail-controls,
    .cfos-site-detail-actions,
    .cfos-life-toolbar,
    .cfos-life-filters,
    .cfos-chip-row {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }

    .cfos-kpi-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
    }

    .cfos-monthly-toolbar,
    .cfos-monthly-tools,
    .cfos-monthly-chips,
    .cfos-site-detail-toolbar,
    .cfos-site-detail-controls,
    .cfos-site-detail-actions,
    .cfos-life-toolbar,
    .cfos-life-filters,
    .cfos-chip-row {
        display: flex !important;
        flex-wrap: wrap !important;
    }

    .cfos-site-detail-toolbar,
    .cfos-life-toolbar {
        align-items: stretch !important;
    }

    .cfos-site-detail-controls,
    .cfos-life-filters {
        flex-direction: column !important;
    }

    .cfos-site-detail-select,
    .cfos-site-detail-input,
    .cfos-select {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }

    .cfos-site-detail-segment {
        display: grid !important;
        width: 100% !important;
        max-width: 100% !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }

    .cfos-site-detail-mode {
        width: auto !important;
        min-width: 0 !important;
        padding-inline: 10px !important;
        text-align: center !important;
    }

    .cfos-chip {
        max-width: 100%;
        overflow-wrap: anywhere;
        white-space: normal;
    }

    .fi-ta-header-toolbar,
    .fi-ta-filters,
    .fi-ta-pagination,
    .fi-pagination,
    .fi-ac,
    .fi-btn-group,
    .cfos-recon-pagination {
        flex-wrap: wrap;
        max-width: 100%;
    }

    .fi-pagination,
    .fi-ta-pagination {
        gap: 8px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .fi-ac,
    .fi-ta-actions,
    .fi-ta-cell .fi-ac {
        min-width: max-content;
    }

    .fi-modal-window,
    .fi-modal-content {
        max-width: calc(100vw - 24px) !important;
    }

    .cfos-mobile-scroll-hint {
        display: inline-flex;
        align-items: center;
        min-height: 24px;
        border-radius: 999px;
        background: #eff6ff;
        color: #1d4ed8;
        font-size: 12px;
        font-weight: 760;
        line-height: 1.2;
        padding: 3px 9px;
        white-space: nowrap;
    }

    .cfos-panel-head,
    .cfos-list-head,
    .cfos-recon-list-head {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .cfos-panel-head > *,
    .cfos-list-head > *,
    .cfos-recon-list-head > * {
        min-width: 0;
    }

    .fi-ac-icon-btn-action[aria-label="列管理"] {
        min-width: 44px;
        min-height: 44px;
    }

    .fi-dropdown-panel.fi-width-xs {
        position: fixed !important;
        top: auto !important;
        right: 12px !important;
        bottom: max(12px, env(safe-area-inset-bottom)) !important;
        left: 12px !important;
        width: auto !important;
        max-width: none !important;
        max-height: min(72svh, 620px) !important;
        overflow-y: auto !important;
        border-radius: 18px !important;
        box-shadow: 0 22px 70px rgba(15, 23, 42, .24) !important;
        z-index: 60 !important;
        -webkit-overflow-scrolling: touch;
    }
}
