/* ============================================================
   青于蓝一卡通 · iOS 风格移动端界面
   ============================================================ */

:root {
    --bg: #f5f5f7;
    --surface: rgba(255, 255, 255, 0.78);
    --surface-solid: #ffffff;
    --surface-muted: rgba(118, 118, 128, 0.09);
    --text: #101413;
    --text-2: #4b5150;
    --muted: #6d7276;
    --dim: #9a9ea1;
    --line: rgba(60, 60, 67, 0.10);
    --tint: #0d7a63;
    --tint-strong: #0a5e4d;
    --tint-soft: rgba(13, 122, 99, 0.10);
    --positive: #14805c;
    --negative: #c9483c;
    --danger: #c9433b;
    --danger-soft: rgba(255, 59, 48, 0.08);
    --seg-thumb: #ffffff;
    --chip-active-bg: #0d7a63;
    --chip-active-text: #ffffff;
    --shadow: 0 4px 22px rgba(16, 40, 34, 0.05);
    --shadow-lg: 0 20px 60px rgba(16, 40, 34, 0.10);
    --radius: 20px;
    --radius-sm: 14px;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
    "PingFang SC", "Hiragino Sans GB", "Helvetica Neue", "Microsoft YaHei", sans-serif;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #000000;
        --surface: rgba(28, 28, 30, 0.76);
        --surface-solid: #1c1c1e;
        --surface-muted: rgba(118, 118, 128, 0.24);
        --text: #f2f2f7;
        --text-2: #d1d1d6;
        --muted: #98989f;
        --dim: #8b8b91;
        --line: rgba(255, 255, 255, 0.11);
        --tint: #2fd3b0;
        --tint-strong: #7ce8d0;
        --tint-soft: rgba(47, 211, 176, 0.15);
        --positive: #32d74b;
        --negative: #ff6961;
        --danger: #ff6961;
        --danger-soft: rgba(255, 69, 58, 0.14);
        --seg-thumb: #3a3a3c;
        --chip-active-bg: #11604f;
        --chip-active-text: #ffffff;
        --shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
        --shadow-lg: 0 24px 70px rgba(0, 0, 0, 0.6);
    }
}

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100dvh;
    background:
        radial-gradient(120% 70% at 88% -12%, rgba(13, 122, 99, 0.10), transparent 58%),
        radial-gradient(90% 60% at -12% 4%, rgba(0, 122, 255, 0.06), transparent 55%),
        var(--bg);
    background-attachment: fixed;
    color: var(--text);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
    text-rendering: optimizeLegibility;
}

@media (prefers-color-scheme: dark) {
    body {
        background:
            radial-gradient(120% 70% at 88% -12%, rgba(47, 211, 176, 0.10), transparent 58%),
            radial-gradient(90% 60% at -12% 4%, rgba(10, 132, 255, 0.08), transparent 55%),
            var(--bg);
    }
}

a {
    color: var(--tint);
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

button,
input {
    font: inherit;
    color: inherit;
}

:focus-visible {
    outline: 2px solid var(--tint);
    outline-offset: 2px;
}

/* ---------- 顶部导航 ---------- */

.nav {
    position: sticky;
    top: 0;
    z-index: 60;
    padding-top: env(safe-area-inset-top);
    background: var(--surface);
    -webkit-backdrop-filter: saturate(180%) blur(24px);
    backdrop-filter: saturate(180%) blur(24px);
    border-bottom: 0.5px solid var(--line);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 560px;
    height: 52px;
    margin: 0 auto;
    padding: 0 18px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--text);
    font-weight: 600;
    letter-spacing: -0.01em;
}

.brand:active {
    opacity: 0.6;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 27px;
    height: 27px;
    border-radius: 8px;
    background: linear-gradient(150deg, #16957c, #0a5c4c);
    color: #fff;
    box-shadow: 0 3px 10px rgba(10, 92, 76, 0.28);
}

.brand-mark svg {
    width: 17px;
    height: 17px;
}

.brand-name {
    display: flex;
    align-items: baseline;
    gap: 6px;
    font-size: 15px;
}

.brand-sub {
    color: var(--muted);
    font-size: 11.5px;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.logout-form {
    margin: 0;
}

.nav-action {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--surface-muted);
    color: var(--muted);
    cursor: pointer;
    transition: transform 0.2s var(--ease), background 0.2s;
}

.nav-action svg {
    width: 17px;
    height: 17px;
}

.nav-action:active {
    transform: scale(0.9);
    background: rgba(118, 118, 128, 0.2);
}

/* ---------- 布局 ---------- */

.shell {
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
    padding: 22px 18px 8px;
    transition: opacity 0.24s ease, transform 0.24s var(--ease);
}

.is-leaving .shell {
    opacity: 0;
    transform: translateY(-8px);
}

.shell-auth {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 470px;
    min-height: 100dvh;
    padding: 32px 22px calc(32px + env(safe-area-inset-bottom));
}

.page-head {
    margin: 4px 2px 18px;
}

.page-head.compact {
    margin-bottom: 14px;
}

.page-title {
    margin: 0;
    font-size: 30px;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.15;
}

.page-subtitle {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 13.5px;
}

.back-pill {
    display: inline-flex;
    align-items: center;
    gap: 1px;
    margin: 0 0 16px -4px;
    padding: 6px 12px 6px 7px;
    border-radius: 999px;
    background: var(--surface);
    box-shadow: var(--shadow);
    color: var(--tint);
    font-size: 13.5px;
    font-weight: 500;
    transition: background 0.2s, transform 0.2s var(--ease);
}

.back-pill svg {
    width: 16px;
    height: 16px;
}

.back-pill:active {
    transform: scale(0.95);
    background: var(--surface-muted);
}

.section {
    margin-top: 24px;
}

.section-title {
    margin: 0 0 8px 16px;
    color: var(--muted);
    font-size: 12.5px;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.foot {
    padding: 30px 20px calc(28px + env(safe-area-inset-bottom));
    color: var(--dim);
    font-size: 11.5px;
    line-height: 1.7;
    text-align: center;
}

.foot p {
    margin: 2px 0;
}

/* ---------- 玻璃卡片与列表 ---------- */

.group,
.list-group,
.filter-card,
.auth-card,
.empty-card {
    background: var(--surface);
    -webkit-backdrop-filter: saturate(170%) blur(22px);
    backdrop-filter: saturate(170%) blur(22px);
    border: 0.5px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.list-group {
    overflow: hidden;
}

.list-row {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 62px;
    padding: 13px 15px;
    color: var(--text);
    text-decoration: none;
    transition: background 0.18s ease;
}

.list-row + .list-row {
    border-top: 0.5px solid var(--line);
}

a.list-row:active {
    background: var(--surface-muted);
}

.row-main {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.row-title {
    overflow: hidden;
    font-size: 15.5px;
    font-weight: 600;
    letter-spacing: -0.01em;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.row-sub {
    overflow: hidden;
    color: var(--muted);
    font-size: 12.5px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.row-side {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: flex-end;
    gap: 1px;
    text-align: right;
}

.row-value {
    font-size: 16px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

.row-value.is-dim {
    color: var(--dim);
}

.row-caption {
    color: var(--muted);
    font-size: 11px;
    letter-spacing: 0.01em;
}

.row-caption.is-positive {
    color: var(--positive);
}

.is-positive {
    color: var(--positive) !important;
}

.is-negative {
    color: var(--negative) !important;
}

.is-dim {
    color: var(--dim) !important;
}

.chevron {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    color: var(--dim);
}

.chevron svg {
    width: 15px;
    height: 15px;
}

.avatar {
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--surface-muted);
    object-fit: cover;
}

.avatar-text {
    display: grid;
    place-items: center;
    background: linear-gradient(150deg, #1a9a80, #0b6353);
    color: #fff;
    font-size: 19px;
    font-weight: 600;
}

.avatar-sm {
    width: 34px;
    height: 34px;
}

.avatar-sm.avatar-text {
    font-size: 14px;
}

.student-row .row-side {
    margin-right: 2px;
}

/* ---------- 学生详情 ---------- */

.wallet {
    position: relative;
    overflow: hidden;
    padding: 20px 20px 18px;
    border-radius: 26px;
    background:
        radial-gradient(120% 120% at 88% 0%, rgba(255, 255, 255, 0.17), transparent 52%),
        linear-gradient(150deg, #14705f 0%, #0b5146 58%, #083e36 100%);
    box-shadow: 0 18px 44px rgba(8, 62, 52, 0.30), inset 0 1px 0 rgba(255, 255, 255, 0.16);
    color: #fff;
}

.wallet::after {
    position: absolute;
    right: -70px;
    bottom: -110px;
    width: 240px;
    height: 240px;
    border: 34px solid rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    content: "";
    pointer-events: none;
}

.wallet-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.wallet-school {
    overflow: hidden;
    color: rgba(255, 255, 255, 0.78);
    font-size: 13px;
    letter-spacing: 0.01em;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.wallet-chip {
    flex: 0 0 auto;
    padding: 5px 10px;
    border: 0.5px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.86);
    font-size: 11.5px;
    font-weight: 500;
}

.wallet-chip.is-ok {
    background: rgba(52, 199, 89, 0.24);
    color: #d9ffe3;
}

.wallet-chip.is-warn {
    background: rgba(255, 159, 10, 0.22);
    color: #ffe8c2;
}

.wallet-chip.is-dim {
    background: rgba(255, 255, 255, 0.10);
    color: rgba(255, 255, 255, 0.62);
}

.wallet-label {
    margin: 22px 0 0;
    color: rgba(255, 255, 255, 0.62);
    font-size: 12.5px;
    letter-spacing: 0.06em;
}

.wallet-amount {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin: 3px 0 0;
    font-size: 46px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.035em;
    line-height: 1.12;
}

.wallet-cny {
    color: rgba(255, 255, 255, 0.72);
    font-size: 23px;
    font-weight: 600;
    letter-spacing: 0;
}

.wallet-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 26px;
}

.wallet-student {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.wallet-student .avatar {
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.14);
}

.wallet-student-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.wallet-name {
    overflow: hidden;
    color: #fff;
    font-size: 14.5px;
    font-weight: 600;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.wallet-meta {
    overflow: hidden;
    color: rgba(255, 255, 255, 0.58);
    font-size: 11.5px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.wallet-refresh {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.13);
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    transition: transform 0.2s var(--ease), background 0.2s;
}

.wallet-refresh svg {
    width: 17px;
    height: 17px;
}

.wallet-refresh:active {
    transform: scale(0.9);
    background: rgba(255, 255, 255, 0.22);
}

.wallet-refresh.is-spinning svg {
    animation: spin 0.75s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ---------- 统计 ---------- */

.stat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: hidden;
    border: 0.5px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    -webkit-backdrop-filter: saturate(170%) blur(22px);
    backdrop-filter: saturate(170%) blur(22px);
    box-shadow: var(--shadow);
}

.stat-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 15px 16px;
    min-width: 0;
}

.stat + .stat {
    border-left: 0.5px solid var(--line);
}

.stat-label {
    color: var(--muted);
    font-size: 11.5px;
    white-space: nowrap;
}

.stat-value {
    overflow: hidden;
    font-size: 19px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.stat-grid-3 .stat-value {
    font-size: 17px;
}

.stat-grid-3 .stat {
    padding: 15px 12px;
}

/* ---------- 操作图标 ---------- */

.action-row {
    min-height: 66px;
}

.row-icon {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border-radius: 50%;
}

.row-icon svg {
    width: 18px;
    height: 18px;
}

.row-icon.is-consume {
    background: rgba(255, 59, 48, 0.10);
    color: #e0574c;
}

.row-icon.is-recharge,
.row-icon.is-income {
    background: rgba(31, 157, 107, 0.12);
    color: var(--positive);
}

.row-icon.is-sick {
    background: rgba(255, 159, 10, 0.13);
    color: #b97505;
}

.row-icon.is-personal {
    background: rgba(10, 108, 214, 0.10);
    color: #0a6cd6;
}

.row-icon.is-other {
    background: var(--surface-muted);
    color: var(--muted);
}

@media (prefers-color-scheme: dark) {
    .row-icon.is-consume {
        background: rgba(255, 105, 97, 0.16);
        color: #ff8a84;
    }

    .row-icon.is-sick {
        background: rgba(255, 159, 10, 0.18);
        color: #ffd48a;
    }

    .row-icon.is-personal {
        background: rgba(10, 132, 255, 0.18);
        color: #7ab8ff;
    }
}

/* ---------- 信息行 ---------- */

.info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 46px;
    padding: 11px 16px;
    font-size: 15px;
}

.info-row + .info-row {
    border-top: 0.5px solid var(--line);
}

.info-label {
    flex: 0 0 auto;
    color: var(--text-2);
}

.info-value {
    max-width: 64%;
    color: var(--text);
    font-weight: 500;
    text-align: right;
    overflow-wrap: anywhere;
}

.info-sep {
    margin: 0 3px;
    color: var(--dim);
    font-size: 12px;
    font-weight: 400;
}

/* ---------- Chips ---------- */

.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 2px 1px;
    margin-top: 10px;
}

.chip,
.chip-static {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    padding: 7px 14px;
    border: 0.5px solid transparent;
    border-radius: 999px;
    background: var(--surface-muted);
    color: var(--text-2);
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s, transform 0.2s var(--ease);
}

.chip-static {
    background: var(--tint-soft);
    color: var(--tint);
    font-variant-numeric: tabular-nums;
}

.chip:active {
    transform: scale(0.95);
}

.chip.is-active {
    background: var(--chip-active-bg);
    color: var(--chip-active-text);
}

/* ---------- 分段控制 ---------- */

.segmented {
    position: relative;
    display: flex;
    padding: 4px;
    margin-bottom: 14px;
    border-radius: 14px;
    background: rgba(118, 118, 128, 0.12);
}

.seg-thumb {
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: 0;
    width: 0;
    border-radius: 11px;
    background: var(--seg-thumb);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.10), 0 1px 1px rgba(0, 0, 0, 0.04);
    opacity: 0;
    transition: transform 0.34s var(--ease), width 0.34s var(--ease), opacity 0.2s;
}

.segmented.has-thumb .seg-thumb {
    opacity: 1;
}

.seg-item {
    position: relative;
    z-index: 1;
    flex: 1 1 0;
    padding: 8px 0;
    border-radius: 11px;
    color: var(--text-2);
    font-size: 13.5px;
    font-weight: 600;
    text-align: center;
    transition: color 0.2s ease;
}

.seg-item.is-active {
    color: var(--text);
}

.seg-item:active {
    opacity: 0.7;
}

/* ---------- 筛选卡 ---------- */

.filter-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 14px;
    margin-bottom: 14px;
}

.filter-card .chip-row {
    margin-top: 0;
}

.date-row {
    display: flex;
    align-items: flex-end;
    gap: 8px;
}

.date-field {
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

.date-field span {
    padding-left: 2px;
    color: var(--muted);
    font-size: 11px;
}

.date-field input {
    width: 100%;
    min-height: 42px;
    padding: 9px 11px;
    border: 0;
    border-radius: 11px;
    background: var(--surface-muted);
    color: var(--text);
    font-size: 14px;
    font-variant-numeric: tabular-nums;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
}

.date-field input:focus {
    box-shadow: 0 0 0 2px var(--tint-soft);
}

.date-sep {
    width: 8px;
    height: 1px;
    margin-bottom: 20px;
    background: var(--line);
}

/* ---------- 记录行 ---------- */

.record-row {
    min-height: 66px;
}

.record-row .row-title {
    font-size: 15px;
}

/* ---------- 分页 ---------- */

.pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 16px;
}

.pager-btn {
    padding: 10px 18px;
    border: 0.5px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    color: var(--tint);
    font-size: 13.5px;
    font-weight: 600;
    transition: background 0.18s, transform 0.2s var(--ease);
}

.pager-btn:active {
    transform: scale(0.95);
    background: var(--surface-muted);
}

.pager-btn.is-disabled {
    color: var(--dim);
    opacity: 0.55;
}

.pager-info {
    color: var(--muted);
    font-size: 12.5px;
    font-variant-numeric: tabular-nums;
}

/* ---------- 按钮 ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border: 0;
    border-radius: 14px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.01em;
    text-align: center;
    transition: transform 0.18s var(--ease), background 0.2s, opacity 0.2s, box-shadow 0.2s;
}

.btn:active {
    transform: scale(0.97);
}

.btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
}

.btn-block {
    width: 100%;
}

.btn-lg {
    padding: 15px 20px;
    border-radius: 16px;
    font-size: 16px;
}

.btn-primary {
    background: var(--chip-active-bg);
    color: #fff;
    box-shadow: 0 10px 24px rgba(13, 122, 99, 0.22);
}

.btn-tint {
    background: var(--tint-soft);
    color: var(--tint);
}

.btn-plain {
    background: var(--surface-muted);
    color: var(--text-2);
}

/* ---------- 提示 / 横幅 ---------- */

.flash {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 11px 14px;
    margin-bottom: 14px;
    border: 0.5px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    color: var(--text-2);
    font-size: 13.5px;
    box-shadow: var(--shadow);
    transition: opacity 0.4s, transform 0.4s var(--ease);
}

.flash-dot {
    flex: 0 0 auto;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--tint);
}

.flash-error .flash-dot {
    background: var(--danger);
}

.flash-error {
    color: var(--danger);
}

.flash.is-hiding {
    opacity: 0;
    transform: translateY(-6px);
}

.banner {
    margin-top: 14px;
    padding: 12px 15px;
    border-radius: 15px;
    font-size: 13px;
}

.banner-error {
    border: 0.5px solid rgba(255, 59, 48, 0.16);
    background: var(--danger-soft);
    color: var(--danger);
}

.banner-head {
    margin-bottom: 4px;
    font-weight: 600;
}

.banner-list {
    margin: 0;
    padding-left: 16px;
    line-height: 1.55;
}

/* ---------- 空状态 ---------- */

.empty-card {
    padding: 38px 24px 34px;
    text-align: center;
}

.empty-art {
    display: grid;
    place-items: center;
    width: 68px;
    height: 68px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: var(--tint-soft);
    color: var(--tint);
}

.empty-art svg {
    width: 32px;
    height: 32px;
}

.empty-card h2 {
    margin: 0 0 6px;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.empty-card p {
    margin: 0 0 18px;
    color: var(--muted);
    font-size: 13px;
}

/* ---------- 登录 ---------- */

.auth-view {
    width: 100%;
}

.auth-head {
    margin-bottom: 24px;
    text-align: center;
}

.auth-logo {
    display: grid;
    place-items: center;
    width: 66px;
    height: 66px;
    margin: 0 auto 18px;
    border-radius: 21px;
    background: linear-gradient(150deg, #16957c, #0a5346);
    color: #fff;
    box-shadow: 0 14px 32px rgba(10, 83, 70, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.auth-logo svg {
    width: 34px;
    height: 34px;
}

.auth-title {
    margin: 0;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.auth-subtitle {
    max-width: 290px;
    margin: 8px auto 0;
    color: var(--muted);
    font-size: 13.5px;
    line-height: 1.55;
}

.auth-card {
    padding: 16px;
    border-radius: 22px;
    box-shadow: var(--shadow-lg);
}

.field-group {
    overflow: hidden;
    border-radius: 14px;
    background: var(--surface-muted);
}

.field {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 52px;
    padding: 0 14px;
}

.field + .field {
    border-top: 0.5px solid var(--line);
}

.field-label {
    flex: 0 0 auto;
    width: 60px;
    color: var(--text-2);
    font-size: 14.5px;
}

.field input {
    flex: 1 1 auto;
    min-width: 0;
    padding: 12px 0;
    border: 0;
    background: transparent;
    color: var(--text);
    font-size: 16px;
    outline: none;
}

.field input::placeholder {
    color: var(--dim);
}

.field input:-webkit-autofill,
.field input:-webkit-autofill:hover,
.field input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px var(--surface-solid) inset;
    -webkit-text-fill-color: var(--text);
    transition: background-color 9999s ease-out;
}

.field-control {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    gap: 8px;
    min-width: 0;
}

.field-toggle {
    flex: 0 0 auto;
    padding: 4px 2px;
    border: 0;
    background: none;
    color: var(--tint);
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
}

.auth-card .btn {
    margin-top: 16px;
}

.auth-hint {
    margin: 18px 0 0;
    color: var(--dim);
    font-size: 11.5px;
    line-height: 1.7;
    text-align: center;
}

/* ---------- 错误页 ---------- */

.error-view {
    padding: 46px 4px 24px;
    text-align: center;
}

.error-code {
    color: var(--tint-soft);
    font-size: 84px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.05em;
    line-height: 1;
}

.error-title {
    margin: 6px 0 0;
    font-size: 23px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.error-message {
    max-width: 300px;
    margin: 8px auto 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
}

.error-actions {
    display: grid;
    gap: 10px;
    max-width: 300px;
    margin: 26px auto 0;
}

/* ---------- 动效 ---------- */

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(14px) scale(0.995);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.js .reveal {
    animation: rise 0.62s var(--ease) both;
    animation-delay: var(--d, 0ms);
}

.js .list-group .list-row,
.js .list-group .record-row {
    animation: rise 0.5s var(--ease) both;
    animation-delay: var(--d, 0ms);
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-delay: 0ms !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

/* ---------- 底部功能区切换 ---------- */

.tabbar {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 70;
    padding-bottom: env(safe-area-inset-bottom);
    border-top: 0.5px solid var(--line);
    background: var(--surface);
    -webkit-backdrop-filter: saturate(180%) blur(24px);
    backdrop-filter: saturate(180%) blur(24px);
}

.tabbar-inner {
    display: flex;
    width: 100%;
    max-width: 560px;
    height: 54px;
    margin: 0 auto;
}

.tab-item {
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: var(--muted);
    font-size: 10.5px;
    font-weight: 500;
    letter-spacing: 0.01em;
    transition: color 0.2s ease, opacity 0.2s;
}

.tab-item svg {
    width: 22px;
    height: 22px;
}

.tab-item.is-active {
    color: var(--tint);
}

.tab-item:active {
    opacity: 0.55;
}

body.is-app .shell {
    padding-bottom: 88px;
}

body.is-app .foot {
    padding-bottom: calc(86px + env(safe-area-inset-bottom));
}

/* ---------- 请假 ---------- */

.leave-cta {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--radius);
    background: var(--tint-soft);
    color: var(--tint);
    font-size: 15px;
    font-weight: 600;
    transition: transform 0.2s var(--ease), background 0.2s;
}

.leave-cta:active {
    transform: scale(0.98);
}

.leave-cta-icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--chip-active-bg);
    color: #fff;
}

.leave-cta-icon svg {
    width: 18px;
    height: 18px;
}

.leave-cta-main {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 1px;
}

.leave-cta-sub {
    color: var(--muted);
    font-size: 11.5px;
    font-weight: 400;
}

.leave-row .row-title {
    display: flex;
    align-items: center;
    gap: 6px;
}

.leave-type-tag {
    padding: 2px 7px;
    border-radius: 999px;
    background: var(--surface-muted);
    color: var(--text-2);
    font-size: 10.5px;
    font-weight: 500;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
}

.status-pill.is-ok {
    background: rgba(31, 157, 107, 0.12);
    color: var(--positive);
}

.status-pill.is-warn {
    background: rgba(255, 159, 10, 0.14);
    color: #b06d00;
}

.status-pill.is-bad {
    background: rgba(255, 59, 48, 0.10);
    color: var(--danger);
}

.status-pill.is-muted {
    background: var(--surface-muted);
    color: var(--text-2);
}

.leave-hero {
    padding: 20px;
    background: var(--surface);
    -webkit-backdrop-filter: saturate(170%) blur(22px);
    backdrop-filter: saturate(170%) blur(22px);
    border: 0.5px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.leave-hero-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.leave-hero-type {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.leave-hero-meta {
    margin-top: 6px;
    color: var(--muted);
    font-size: 13px;
}

.leave-hero-time {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-top: 16px;
    font-size: 15px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.leave-hero-time span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 400;
}

.leave-reason {
    margin: 0;
    padding: 13px 16px;
    color: var(--text);
    font-size: 14px;
    line-height: 1.65;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

/* ---------- 表单 ---------- */

.form-group {
    padding: 14px 16px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.form-field + .form-field {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 0.5px solid var(--line);
}

.form-label {
    color: var(--text-2);
    font-size: 13px;
    font-weight: 500;
}

.form-field input[type="text"],
.form-field input[type="date"],
.form-field textarea {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 0;
    border-radius: 11px;
    background: var(--surface-muted);
    color: var(--text);
    font-size: 16px;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
}

.form-field textarea {
    min-height: 96px;
    line-height: 1.6;
    resize: vertical;
}

.form-field input:focus,
.form-field textarea:focus {
    box-shadow: 0 0 0 2px var(--tint-soft);
}

.form-field input::placeholder,
.form-field textarea::placeholder {
    color: var(--dim);
}

.form-split {
    display: flex;
    gap: 10px;
}

.form-split .form-field {
    flex: 1 1 0;
    min-width: 0;
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.choice-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.choice {
    position: relative;
    cursor: pointer;
}

.choice input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.choice span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 70px;
    padding: 8px 16px;
    border-radius: 999px;
    background: var(--surface-muted);
    color: var(--text-2);
    font-size: 13.5px;
    font-weight: 500;
    transition: background 0.2s, color 0.2s, transform 0.2s var(--ease);
}

.choice input:checked + span {
    background: var(--chip-active-bg);
    color: #fff;
}

.choice input:focus-visible + span {
    outline: 2px solid var(--tint);
    outline-offset: 2px;
}

.choice:active span {
    transform: scale(0.96);
}

.form-note {
    margin: 12px 2px 0;
    color: var(--dim);
    font-size: 11.5px;
    line-height: 1.6;
}

.form-actions {
    margin-top: 18px;
}

@media (prefers-color-scheme: dark) {
    .status-pill.is-warn {
        color: #ffd48a;
    }
}

/* ---------- 小屏适配 ---------- */

@media (max-width: 380px) {
    .shell {
        padding-right: 14px;
        padding-left: 14px;
    }

    .page-title {
        font-size: 27px;
    }

    .wallet-amount {
        font-size: 40px;
    }

    .stat-value {
        font-size: 17px;
    }

    .stat-grid-3 .stat-value {
        font-size: 15px;
    }

    .row-value {
        font-size: 15px;
    }

    .date-field input {
        font-size: 13px;
        padding: 9px 8px;
    }
}
