/* =========================================================
 * 学生请假系统 · iOS 风格蓝白主题
 * ========================================================= */

:root {
    --blue: #007AFF;
    --blue-strong: #0062E6;
    --blue-soft: #E8F2FF;
    --blue-soft-2: #F2F7FF;
    --bg: #F2F2F7;
    --card: #FFFFFF;
    --text: #1C1C1E;
    --text2: #8E8E93;
    --text3: #A1A6B4;
    --line: rgba(60, 60, 67, 0.10);
    --line-strong: rgba(60, 60, 67, 0.16);
    --slate: #5B6B82;
    --slate-soft: #EDF2F9;
    --cyan: #0B7EA4;
    --cyan-soft: #E6F7FB;
    --indigo: #4E63D9;
    --indigo-soft: #EEF0FF;
    --line-blue: #DCE7F5;
    --green: #34C759;
    --red: #FF3B30;
    --orange: #FF9500;
    --purple: #AF52DE;
    --radius: 18px;
    --shadow: 0 1px 2px rgba(16, 24, 40, 0.03), 0 10px 30px rgba(0, 90, 200, 0.06);
    --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

body.app-body {
    background:
        radial-gradient(1000px 460px at 50% -180px, rgba(0, 122, 255, 0.10), transparent 72%),
        linear-gradient(180deg, #F7FAFF 0%, #F2F2F7 380px);
}

body.admin-body {
    background:
        radial-gradient(900px 420px at 18% -160px, rgba(0, 122, 255, 0.08), transparent 72%),
        #F5F7FB;
}

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

button {
    font: inherit;
    color: inherit;
    cursor: pointer;
}

input,
select,
textarea {
    font: inherit;
    color: inherit;
}

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

h1,
h2,
h3,
p,
ul,
dl,
dt,
dd {
    margin: 0;
    padding: 0;
}

ul {
    list-style: none;
}

.muted {
    color: var(--text2);
}

.small {
    font-size: 12.5px;
}

.nowrap {
    white-space: nowrap;
}

.text-link {
    color: var(--blue);
    font-weight: 600;
    font-size: 12.5px;
    white-space: nowrap;
}

/* ---------------- 学生端顶栏 ---------------- */

.topbar {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(255, 255, 255, 0.90);
    -webkit-backdrop-filter: saturate(180%) blur(18px);
    backdrop-filter: saturate(180%) blur(18px);
    border-bottom: 0.5px solid var(--line-blue);
}

.topbar-inner {
    max-width: 760px;
    margin: 0 auto;
    height: 56px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 16px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 9px;
    font-weight: 700;
    letter-spacing: -0.2px;
}

.brand-dot {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: linear-gradient(135deg, #3EA6FF, #0062E6);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    box-shadow: 0 6px 14px rgba(0, 110, 255, 0.28);
    flex: 0 0 auto;
}

.brand-name {
    font-size: 16px;
    white-space: nowrap;
}

.nav-links {
    display: none;
    gap: 2px;
    margin-left: 8px;
}

.nav-link {
    padding: 8px 12px;
    border-radius: 10px;
    color: var(--text2);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-link.active {
    background: var(--blue-soft);
    color: var(--blue);
    font-weight: 600;
}

.spacer {
    flex: 1;
}

.quota-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--blue-soft);
    color: var(--blue);
    font-size: 12px;
    font-weight: 700;
    padding: 6px 10px;
    border-radius: 999px;
    white-space: nowrap;
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 8px;
}

.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #5AB0FF, #007AFF);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    flex: 0 0 auto;
}

.uname {
    font-size: 14px;
    font-weight: 600;
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.icon-btn {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: none;
    background: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text2);
}

.icon-btn:hover {
    background: rgba(120, 130, 150, 0.10);
}

.wrap {
    max-width: 760px;
    margin: 0 auto;
    padding: 20px 16px calc(84px + env(safe-area-inset-bottom));
}

/* ---------------- 底部标签栏 ---------------- */

.tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 70;
    display: flex;
    background: rgba(255, 255, 255, 0.94);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    border-top: 0.5px solid var(--line-blue);
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
}

.tabbar a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 4px 0;
    font-size: 10px;
    color: var(--text3);
}

.tabbar a i {
    font-size: 18px;
}

.tabbar a.active {
    color: var(--blue);
}

@media (max-width: 400px) {
    .uname {
        display: none;
    }

    .brand-name {
        font-size: 15px;
    }
}

@media (min-width: 760px) {
    .tabbar {
        display: none;
    }

    .wrap {
        padding-bottom: 40px;
    }

    .nav-links {
        display: flex;
    }
}

/* ---------------- 通用页面元素 ---------------- */

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

.page-head h1 {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.6px;
    color: #17263A;
    position: relative;
}

.page-head h1::after {
    content: "";
    display: block;
    width: 42px;
    height: 3px;
    margin-top: 8px;
    border-radius: 2px;
    background: linear-gradient(90deg, #007AFF, #8CC4FF);
}

.page-head p {
    color: var(--text2);
    font-size: 13px;
    margin-top: 4px;
}

.page-head-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--blue);
    font-weight: 600;
    margin-bottom: 8px;
}

.flash {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px 14px;
    border-radius: 14px;
    font-size: 13.5px;
    line-height: 1.55;
    margin-bottom: 14px;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.flash i {
    margin-top: 2px;
}

.flash.success {
    background: var(--cyan-soft);
    color: var(--cyan);
}

.flash.error {
    background: #FFEDEC;
    color: #C42B22;
}

.flash.info {
    background: #EAF3FF;
    color: #0A5BD3;
}

.flash a {
    text-decoration: underline;
    font-weight: 600;
}

.flash.hide {
    opacity: 0;
    transform: translateY(-4px);
}

.card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.03), 0 12px 30px rgba(0, 70, 170, 0.07);
    border: 1px solid rgba(0, 90, 200, 0.06);
    padding: 18px;
    margin-bottom: 16px;
}

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

.card-head h2 {
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-head h2 i {
    color: var(--blue);
    font-size: 15px;
}

.badge {
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 9px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
}

.badge.blue {
    background: var(--blue-soft);
    color: var(--blue);
}

.badge.green {
    background: var(--cyan-soft);
    color: var(--cyan);
}

.badge.red {
    background: var(--slate-soft);
    color: var(--slate);
}

.badge.orange {
    background: var(--slate-soft);
    color: var(--slate);
}

.badge.gray {
    background: #F1F3F7;
    color: #6B7280;
}

.badge.slate {
    background: var(--slate-soft);
    color: var(--slate);
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 20px 4px 10px;
}

.section-title h2 {
    font-size: 16px;
    font-weight: 700;
}

.section-link {
    font-size: 12px;
    color: var(--blue);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 44px;
    padding: 0 18px;
    border-radius: 13px;
    border: none;
    background: linear-gradient(135deg, #0A84FF 0%, #0067E0 100%);
    color: #fff;
    font-weight: 600;
    font-size: 15px;
    box-shadow: 0 8px 18px rgba(0, 122, 255, 0.25);
    transition: transform 0.12s ease, opacity 0.12s ease;
    white-space: nowrap;
}

.btn:hover {
    opacity: 0.94;
}

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

.btn.block {
    width: 100%;
}

.btn.sm {
    height: 32px;
    padding: 0 11px;
    border-radius: 9px;
    font-size: 12.5px;
    font-weight: 600;
    box-shadow: none;
}

.btn.ghost {
    background: var(--blue-soft);
    color: var(--blue);
    border: 1px solid #D6E7FF;
    box-shadow: none;
}

.btn.gray {
    background: #EEF2F8;
    color: #3C4A5E;
    border: 1px solid #DDE5F0;
    box-shadow: none;
}

.btn.outline {
    background: #fff;
    color: var(--blue);
    border: 1.5px solid #A9CDFF;
    box-shadow: 0 4px 12px rgba(0, 90, 200, 0.07);
}

.btn.outline:hover {
    background: #F4F9FF;
    border-color: var(--blue);
}

.btn.danger {
    background: #FFECEA;
    color: #D92D20;
    border: 1px solid #FFD5D1;
    box-shadow: none;
}

.btn.white {
    background: #fff;
    color: var(--blue);
    box-shadow: 0 6px 16px rgba(0, 40, 120, 0.18);
}

.btn.glass {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    box-shadow: none;
    border: 1px solid rgba(255, 255, 255, 0.28);
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 18px 0 4px;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 34px;
    padding: 0 14px;
    border-radius: 10px;
    background: #fff;
    border: 0.5px solid var(--line-strong);
    font-size: 13px;
    color: var(--text);
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.page-btn.disabled {
    color: #B9BEC9;
    background: #F7F8FA;
}

.page-info {
    font-size: 12.5px;
    color: var(--text2);
}

.empty-state {
    text-align: center;
    padding: 36px 16px;
    color: var(--text2);
}

.empty-state > i {
    font-size: 34px;
    color: #C3C9D4;
    margin-bottom: 10px;
}

.empty-state p {
    margin-bottom: 14px;
    font-size: 13.5px;
}

/* ---------------- 首页 ---------------- */

.quota-hero {
    background: linear-gradient(135deg, #0A84FF 0%, #0062E6 55%, #0048B5 100%);
    border-radius: 22px;
    padding: 20px;
    color: #fff;
    box-shadow: 0 18px 40px rgba(0, 90, 210, 0.28);
    margin-bottom: 18px;
    position: relative;
    overflow: hidden;
}

.quota-hero::after {
    content: "";
    position: absolute;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    top: -120px;
    right: -70px;
}

.quota-hero-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 13px;
    position: relative;
    z-index: 1;
}

.quota-hero-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-weight: 600;
    opacity: 0.95;
}

.quota-hero-badge {
    background: rgba(255, 255, 255, 0.18);
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 11px;
}

.quota-hero-num {
    font-size: 52px;
    font-weight: 800;
    letter-spacing: -2px;
    line-height: 1.15;
    margin: 8px 0 16px;
    position: relative;
    z-index: 1;
}

.quota-hero-num small {
    font-size: 15px;
    font-weight: 500;
    margin-left: 6px;
    opacity: 0.85;
}

.quota-hero-actions {
    display: flex;
    gap: 10px;
    position: relative;
    z-index: 1;
    flex-wrap: wrap;
}

.redeem-card .card-head {
    margin-bottom: 6px;
}

.redeem-form {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.redeem-form .code-input {
    flex: 1;
    min-width: 200px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid var(--line-strong);
    background: #F8FAFD;
    padding: 0 12px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    letter-spacing: 1.5px;
    font-size: 16px;
    text-align: left;
    outline: none;
}

.redeem-form .code-input:focus {
    border-color: var(--blue);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.10);
}

.record-mini {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    margin-bottom: 10px;
}

.record-mini-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.record-mini-main b {
    font-size: 13.5px;
}

.record-mini-main small {
    color: var(--text3);
    font-size: 11px;
}

.quota-log-card .card-head {
    margin-bottom: 6px;
}

.quota-log-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 0.5px solid var(--line);
}

.quota-log-list li:last-child {
    border-bottom: none;
}

.quota-log-list b {
    display: block;
    font-size: 13px;
    font-weight: 600;
}

.quota-log-list small {
    display: block;
    font-size: 11px;
    color: var(--text3);
}

.quota-change {
    font-weight: 800;
    font-size: 15px;
}

.quota-change.plus {
    color: var(--blue);
}

.quota-change.minus {
    color: var(--slate);
}

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

.group-title {
    font-size: 12.5px;
    color: var(--slate);
    font-weight: 600;
    padding: 0 6px 0 13px;
    margin: 20px 0 8px;
    letter-spacing: 0.2px;
    position: relative;
}

.group-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 12px;
    border-radius: 2px;
    background: linear-gradient(180deg, #007AFF, #7DBBFF);
}

.group {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.03), 0 10px 26px rgba(0, 70, 170, 0.06);
    border: 1px solid rgba(0, 90, 200, 0.06);
    overflow: hidden;
    margin-bottom: 16px;
}

.row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    min-height: 50px;
    border-bottom: 0.5px solid var(--line);
}

.row:last-child {
    border-bottom: none;
}

.row-label {
    font-size: 14.5px;
    flex: 0 0 auto;
    color: #334155;
    font-weight: 500;
}

.row-input {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    text-align: right;
    font-size: 16px;
    outline: none;
    padding: 4px 0;
}

.row-input::placeholder {
    color: #B5BAC6;
}

.row-input[type="datetime-local"] {
    text-align: right;
    font-size: 16px;
    color: var(--text);
}

.row-select {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    text-align: right;
    text-align-last: right;
    font-size: 16px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    padding: 4px 0;
    color: var(--text);
}

.row-static {
    margin-left: auto;
    color: var(--text2);
    font-size: 14.5px;
    text-align: right;
    word-break: break-all;
}

.form-block {
    padding: 14px 16px;
    border-bottom: 0.5px solid var(--line);
}

.form-block:last-child {
    border-bottom: none;
}

.block-label {
    font-size: 14.5px;
    margin-bottom: 10px;
    color: var(--text);
}

.block-textarea {
    width: 100%;
    border: none;
    background: var(--bg);
    border-radius: 12px;
    padding: 12px;
    font-size: 16px;
    line-height: 1.6;
    resize: vertical;
    outline: none;
    min-height: 104px;
}

.block-counter {
    text-align: right;
    font-size: 11px;
    color: var(--text3);
    margin-top: 6px;
}

.seg {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.seg-item {
    position: relative;
}

.seg-item input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.seg-item span {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    border-radius: 10px;
    background: #F3F5F9;
    color: #5A6270;
    font-size: 13.5px;
    font-weight: 600;
    border: 1px solid transparent;
    transition: 0.15s;
}

.seg-item input:checked + span {
    background: #fff;
    border-color: var(--blue);
    color: var(--blue);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.14);
}

.subject-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.subject-option {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    min-height: 64px;
    border-radius: 14px;
    background: #F7FAFD;
    border: 1.5px solid var(--line);
    transition: 0.18s ease;
}

.subject-option:hover {
    border-color: #AFD2FF;
    background: #F2F8FF;
}

.subject-option:active {
    transform: scale(0.985);
}

.subject-option.active {
    background: #EAF3FF;
    border-color: var(--blue);
    box-shadow: 0 6px 18px rgba(0, 122, 255, 0.12);
}

.subject-option-icon {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: #fff;
    color: var(--blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex: 0 0 auto;
    box-shadow: 0 2px 6px rgba(0, 60, 150, 0.08);
}

.subject-option.active .subject-option-icon {
    background: var(--blue);
    color: #fff;
}

.subject-option-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.subject-option-text b {
    font-size: 14px;
    color: var(--text);
}

.subject-option.active .subject-option-text b {
    color: var(--blue);
}

.subject-option-text small {
    font-size: 11px;
    color: var(--text2);
    line-height: 1.4;
}

.subject-option-check {
    margin-left: auto;
    color: #C3C9D4;
    font-size: 17px;
    flex: 0 0 auto;
}

.subject-option.active .subject-option-check {
    color: var(--blue);
}

@media (max-width: 480px) {
    .subject-options {
        grid-template-columns: 1fr;
    }

    .subject-option {
        min-height: 58px;
    }
}

.switch {
    position: relative;
    display: inline-block;
    width: 51px;
    height: 31px;
    flex: 0 0 auto;
    margin-left: auto;
}

.switch input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.switch .slider {
    position: absolute;
    inset: 0;
    background: #E6E8EE;
    border-radius: 999px;
    transition: 0.22s;
    cursor: pointer;
}

.switch .slider::before {
    content: "";
    position: absolute;
    width: 27px;
    height: 27px;
    left: 2px;
    top: 2px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.18);
    transition: 0.22s;
}

.switch input:checked + .slider {
    background: var(--blue);
}

.switch input:checked + .slider::before {
    transform: translateX(20px);
}

.form-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.quota-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--blue-soft);
    color: #0A5BD3;
    border: 1px solid #D6E7FF;
    border-radius: 14px;
    padding: 11px 14px;
    font-size: 13px;
    margin-bottom: 16px;
}

.quota-strip b {
    font-size: 16px;
}

.quota-strip a {
    font-weight: 600;
    text-decoration: underline;
}

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

.record-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.record-card {
    margin-bottom: 0;
}

.record-head {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.record-created {
    margin-left: auto;
    font-size: 11.5px;
    color: var(--text3);
}

.record-range {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
    font-size: 14px;
}

.record-range .range-arrow {
    color: var(--text3);
}

.record-reason-preview {
    margin-top: 8px;
    color: var(--text2);
    font-size: 13px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.record-edit-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.record-detail {
    margin-top: 10px;
    border-top: 0.5px solid var(--line);
    padding-top: 8px;
}

.record-detail summary {
    cursor: pointer;
    color: var(--blue);
    font-size: 13px;
    font-weight: 600;
    list-style: none;
    -webkit-tap-highlight-color: transparent;
}

.record-detail summary::-webkit-details-marker {
    display: none;
}

.record-detail summary::after {
    content: "\f078";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 10px;
    margin-left: 6px;
}

.record-detail[open] summary::after {
    content: "\f077";
}

.kv {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 14px;
    margin-top: 12px;
}

.kv > div {
    background: #F8FAFD;
    border-radius: 10px;
    padding: 9px 11px;
    min-width: 0;
}

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

.kv dt {
    font-size: 11px;
    color: var(--text3);
    margin-bottom: 2px;
}

.kv dd {
    font-size: 13.5px;
    word-break: break-all;
}

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

.share-box {
    margin-top: 12px;
    border-top: 0.5px solid var(--line);
    padding-top: 12px;
}

.share-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 10px;
}

.share-title > span:first-child {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text);
}

.share-title i {
    color: var(--blue);
}

.share-link-row {
    display: flex;
    gap: 8px;
}

.share-link-row .input {
    flex: 1;
    min-width: 0;
    height: 36px;
    border-radius: 9px;
    border: 1px solid var(--line-strong);
    background: #F8FAFD;
    padding: 0 10px;
    font-size: 16px;
    color: var(--text2);
    outline: none;
}

.share-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.share-actions form {
    margin: 0;
}

/* ---------------- 个人主页 ---------------- */

.profile-hero {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.profile-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #5AB0FF, #007AFF);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
    box-shadow: 0 10px 22px rgba(0, 122, 255, 0.28);
    flex: 0 0 auto;
}

.profile-main {
    min-width: 0;
}

.profile-main h2 {
    font-size: 18px;
}

.profile-main p {
    font-size: 12.5px;
    color: var(--text2);
    margin-top: 2px;
}

.profile-stats {
    display: flex;
    gap: 18px;
    margin-left: auto;
}

.profile-stats div {
    text-align: center;
}

.profile-stats b {
    display: block;
    font-size: 20px;
    font-weight: 800;
    color: var(--blue);
}

.profile-stats span {
    font-size: 11px;
    color: var(--text2);
}

@media (max-width: 520px) {
    .profile-stats {
        width: 100%;
        margin-left: 0;
        justify-content: space-around;
        border-top: 0.5px solid var(--line);
        padding-top: 12px;
    }
}

/* ---------------- 登录 / 注册 ---------------- */

.auth-body {
    min-height: 100vh;
    min-height: 100dvh;
    background: #F2F7FF;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 16px calc(28px + env(safe-area-inset-bottom));
    position: relative;
    overflow-x: hidden;
    overflow-x: clip;
    overflow-y: auto;
    overscroll-behavior-y: contain;
}

.auth-deco {
    position: absolute;
    border-radius: 50%;
    filter: blur(10px);
    z-index: 0;
    pointer-events: none;
}

@media (max-width: 640px) {
    .auth-deco {
        display: none;
    }
}

.auth-deco-a {
    width: 520px;
    height: 520px;
    left: -160px;
    top: -200px;
    background: radial-gradient(circle, #BFDEFF 0%, rgba(191, 222, 255, 0) 70%);
}

.auth-deco-b {
    width: 460px;
    height: 460px;
    right: -160px;
    bottom: -180px;
    background: radial-gradient(circle, #D8E9FF 0%, rgba(216, 233, 255, 0) 70%);
}

.auth-shell {
    width: 100%;
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.auth-card {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.94);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-radius: 26px;
    padding: 30px 26px 24px;
    box-shadow: 0 30px 70px rgba(0, 80, 190, 0.15);
    border: 1px solid rgba(0, 90, 200, 0.08);
    position: relative;
    z-index: 2;
}

.auth-card-wide {
    max-width: 460px;
}

.auth-card.landing-card {
    max-width: 420px;
}

.auth-card code,
.install-step code {
    background: #EEF3FA;
    border-radius: 5px;
    padding: 1px 5px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12.5px;
    color: #24405F;
}

@media (max-width: 480px) {
    .auth-body {
        padding: 22px 14px calc(22px + env(safe-area-inset-bottom));
    }

    .auth-card {
        padding: 26px 20px 22px;
        border-radius: 22px;
    }

    .auth-title {
        font-size: 22px;
    }

    .landing-features {
        gap: 6px;
    }

    .landing-feature {
        padding: 10px 5px;
    }
}

@media (max-height: 720px) {
    .auth-body {
        align-items: flex-start;
    }
}

.auth-logo {
    width: 62px;
    height: 62px;
    border-radius: 19px;
    background: linear-gradient(135deg, #3EA6FF, #0062E6);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 27px;
    line-height: 1;
    margin: 0 auto 22px;
    box-shadow: 0 10px 22px rgba(0, 110, 255, 0.22);
    position: relative;
    z-index: 2;
}

.auth-logo i {
    display: block;
    line-height: 1;
}

.auth-logo-admin {
    background: linear-gradient(135deg, #5B8DEF, #2D5BD1);
}

.auth-logo-muted {
    background: #EDF1F7;
    color: #A2AAB8;
    box-shadow: none;
}

.auth-title {
    text-align: center;
    font-size: 23px;
    font-weight: 800;
    letter-spacing: -0.4px;
    line-height: 1.35;
    position: relative;
    z-index: 1;
}

.auth-subtitle {
    text-align: center;
    font-size: 13px;
    color: var(--text2);
    margin: 6px 0 22px;
}

.auth-form .field {
    margin-bottom: 14px;
}

.field label {
    display: block;
    font-size: 12.5px;
    color: var(--text2);
    font-weight: 600;
    margin-bottom: 6px;
    padding-left: 2px;
}

.field .input {
    width: 100%;
    height: 46px;
    border-radius: 13px;
    border: 1px solid var(--line-strong);
    background: #F7FAFD;
    padding: 0 13px;
    outline: none;
    font-size: 16px;
    transition: 0.15s;
}

.field .input:focus {
    border-color: var(--blue);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.10);
}

.field .input::placeholder {
    color: #ADB3C0;
}

.field-input {
    position: relative;
    width: 100%;
}

.field-input .input {
    padding-right: 44px;
}

.field-eye {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: var(--text3);
}

.auth-form .btn {
    margin-top: 8px;
}

.auth-foot {
    text-align: center;
    font-size: 12.5px;
    color: var(--text2);
    margin-top: 16px;
}

.auth-foot a {
    color: var(--blue);
    font-weight: 600;
}

.auth-foot.muted {
    color: var(--text3);
    font-size: 12px;
    margin-top: 8px;
}

.landing-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 6px 0 22px;
}

.landing-feature {
    background: #F7FAFD;
    border-radius: 14px;
    padding: 12px 8px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.landing-feature i {
    color: var(--blue);
    font-size: 17px;
}

.landing-feature b {
    font-size: 12.5px;
}

.landing-feature span {
    font-size: 10.5px;
    color: var(--text3);
}

.landing-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ---------------- 安装向导 ---------------- */

.install-steps {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 18px;
}

.install-step {
    display: flex;
    gap: 12px;
    align-items: center;
    background: #F7FAFD;
    border-radius: 13px;
    padding: 11px 13px;
}

.install-step > span {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--blue-soft);
    color: var(--blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12.5px;
    font-weight: 700;
    flex: 0 0 auto;
}

.install-step b {
    display: block;
    font-size: 13.5px;
}

.install-step small {
    display: block;
    font-size: 11.5px;
    color: var(--text2);
}

.install-config {
    background: #F7FAFD;
    border-radius: 13px;
    padding: 6px 14px;
    margin-bottom: 12px;
}

.install-config div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    font-size: 12.5px;
    border-bottom: 0.5px solid var(--line);
}

.install-config div:last-child {
    border-bottom: none;
}

.install-config span {
    color: var(--text2);
}

.install-done {
    text-align: center;
}

.install-done-icon {
    font-size: 50px;
    color: var(--green);
    margin: 6px 0 12px;
}

.install-done h2 {
    font-size: 20px;
    margin-bottom: 6px;
}

.install-done p {
    font-size: 13px;
    color: var(--text2);
    line-height: 1.7;
}

.install-cred {
    background: #F7FAFD;
    border-radius: 14px;
    padding: 6px 14px;
    margin: 14px 0;
    text-align: left;
}

.install-cred div {
    display: flex;
    justify-content: space-between;
    padding: 9px 0;
    border-bottom: 0.5px solid var(--line);
    font-size: 13px;
}

.install-cred div:last-child {
    border-bottom: none;
}

.install-cred span {
    color: var(--text2);
}

.install-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
}

/* ---------------- 管理后台 ---------------- */

.admin-body {
    background: #F5F7FB;
}

.admin-shell {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 240px;
    background: #fff;
    border-right: 0.5px solid var(--line-blue);
    padding: 22px 14px;
    display: flex;
    flex-direction: column;
    z-index: 80;
    transition: transform 0.25s ease;
}

.admin-brand {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 0 8px;
    margin-bottom: 26px;
}

.admin-brand .brand-dot {
    width: 36px;
    height: 36px;
    border-radius: 11px;
    font-size: 16px;
}

.admin-brand b {
    display: block;
    font-size: 14.5px;
}

.admin-brand small {
    display: block;
    font-size: 10.5px;
    color: var(--text3);
    font-weight: 400;
}

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.admin-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 12px;
    border-radius: 11px;
    color: #5B6472;
    font-size: 14px;
    font-weight: 500;
}

.admin-nav-link i {
    width: 18px;
    text-align: center;
    font-size: 14px;
    color: #8B94A3;
}

.admin-nav-link:hover {
    background: #F4F7FC;
}

.admin-nav-link.active {
    background: var(--blue-soft);
    color: var(--blue);
    font-weight: 700;
}

.admin-nav-link.active i {
    color: var(--blue);
}

.admin-sidebar-foot {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 4px 0;
    border-top: 0.5px solid var(--line);
}

.admin-sidebar-foot a {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 10px;
    border-radius: 9px;
    font-size: 12.5px;
    color: var(--text2);
}

.admin-sidebar-foot a:hover {
    background: #F4F7FC;
    color: var(--text);
}

.admin-main {
    flex: 1;
    min-width: 0;
    margin-left: 240px;
}

.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 60;
    height: 60px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 24px;
    background: rgba(246, 249, 255, 0.90);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border-bottom: 0.5px solid var(--line-blue);
}

.admin-topbar h1 {
    font-size: 17px;
    font-weight: 700;
}

.admin-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--blue);
    background: var(--blue-soft);
    padding: 6px 10px;
    border-radius: 999px;
    font-weight: 600;
}

.admin-menu-btn {
    display: none;
}

.admin-content {
    padding: 24px;
    max-width: 1240px;
}

.admin-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.sidebar-backdrop {
    display: none;
}

@media (max-width: 960px) {
    .admin-sidebar {
        transform: translateX(-105%);
        box-shadow: 0 0 40px rgba(20, 40, 80, 0.16);
    }

    .admin-sidebar.open {
        transform: none;
    }

    .admin-main {
        margin-left: 0;
    }

    .admin-menu-btn {
        display: inline-flex;
    }

    .admin-content {
        padding: 16px;
    }

    .admin-topbar {
        padding: 0 14px;
    }

    .sidebar-backdrop.show {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(20, 30, 50, 0.28);
        z-index: 70;
        -webkit-backdrop-filter: blur(2px);
        backdrop-filter: blur(2px);
    }

    .admin-two-col {
        grid-template-columns: 1fr;
    }
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 18px;
}

.stat-card {
    background: #fff;
    border-radius: 16px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0, 90, 200, 0.06);
}

.stat-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    flex: 0 0 auto;
}

.stat-icon.blue {
    background: var(--blue-soft);
    color: var(--blue);
}

.stat-icon.green {
    background: var(--cyan-soft);
    color: var(--cyan);
}

.stat-icon.orange {
    background: var(--slate-soft);
    color: var(--slate);
}

.stat-icon.purple {
    background: var(--indigo-soft);
    color: var(--indigo);
}

.stat-card b {
    display: block;
    font-size: 23px;
    font-weight: 800;
    line-height: 1.2;
}

.stat-card span {
    font-size: 11.5px;
    color: var(--text2);
}

@media (max-width: 900px) {
    .stat-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 420px) {
    .stat-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .stat-card {
        padding: 12px;
        gap: 9px;
    }

    .stat-icon {
        width: 36px;
        height: 36px;
        font-size: 15px;
    }

    .stat-card b {
        font-size: 19px;
    }
}

.table-wrap {
    overflow-x: auto;
    margin-top: 4px;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
    min-width: 760px;
}

.table th {
    text-align: left;
    font-size: 11.5px;
    color: #6B7A90;
    font-weight: 600;
    padding: 8px 10px;
    background: #F4F8FE;
    white-space: nowrap;
}

.table th:first-child {
    border-radius: 9px 0 0 9px;
}

.table th:last-child {
    border-radius: 0 9px 9px 0;
}

.table td {
    padding: 12px 10px;
    border-bottom: 0.5px solid var(--line);
    vertical-align: middle;
}

.table tr:last-child td {
    border-bottom: none;
}

.table-sub {
    display: block;
    color: var(--text3);
    font-size: 11px;
    margin-top: 2px;
}

.table-user {
    display: flex;
    align-items: center;
    gap: 9px;
}

.row-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.row-actions form {
    margin: 0;
}

.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.search-form {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border-radius: 12px;
    padding: 5px 6px 5px 12px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0, 90, 200, 0.06);
    flex: 1;
    max-width: 520px;
    min-width: 240px;
}

.search-form > i {
    color: var(--text3);
    font-size: 13px;
}

.search-form .input {
    border: none;
    background: transparent;
    height: 34px;
    flex: 1;
    min-width: 0;
    outline: none;
    font-size: 16px;
}

.filter-chips {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.batch-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 0 0 14px;
}

.batch-toolbar .muted {
    white-space: nowrap;
}

.batch-toolbar .btn {
    white-space: nowrap;
}

.select-all-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 12px;
    border-radius: 999px;
    background: #EDF1F7;
    color: #4A5568;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.select-all-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--blue);
    cursor: pointer;
}

.btn:disabled {
    opacity: 0.48;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.table tbody tr.is-selected {
    background: #F2F8FF;
}

.table .check-col {
    width: 42px;
    text-align: center;
}

.table .check-col input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--blue);
    cursor: pointer;
    vertical-align: middle;
}

.settings-example {
    display: block;
    margin-top: 12px;
    padding: 10px 12px;
    background: #F4F7FC;
    border-radius: 10px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px;
    color: #4A5568;
    word-break: break-all;
    line-height: 1.6;
}

.chip {
    padding: 7px 13px;
    border-radius: 999px;
    background: #EDF1F7;
    color: #5B6472;
    font-size: 12.5px;
    font-weight: 600;
}

.chip.active {
    background: var(--blue);
    color: #fff;
    box-shadow: 0 6px 14px rgba(0, 122, 255, 0.22);
}

.code-text {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13px;
    letter-spacing: 1px;
    background: #F4F7FC;
    padding: 5px 8px;
    border-radius: 8px;
    white-space: nowrap;
}

.code-generate-card .inline-form {
    margin-bottom: 6px;
}

.inline-form {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.inline-form .input {
    height: 42px;
    border: 1px solid var(--line-strong);
    border-radius: 11px;
    background: #F8FAFD;
    padding: 0 12px;
    outline: none;
    font-size: 16px;
    min-width: 90px;
    flex: 1;
    max-width: 220px;
}

.inline-form .btn {
    height: 42px;
}

.generate-field {
    display: flex;
    align-items: center;
    gap: 8px;
}

.generate-field label {
    font-size: 13px;
    color: var(--text2);
    white-space: nowrap;
}

.quota-summary {
    background: linear-gradient(135deg, #EAF3FF, #F7FBFF);
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 14px;
}

.quota-summary-num {
    font-size: 40px;
    font-weight: 800;
    color: var(--blue);
    line-height: 1.1;
}

.quota-summary-num small {
    font-size: 14px;
    font-weight: 600;
    margin-left: 4px;
}

.account-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.account-actions form {
    margin: 0;
}

.settings-info div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 0;
    border-bottom: 0.5px solid var(--line);
    font-size: 13.5px;
}

.settings-info div:last-child {
    border-bottom: none;
}

.settings-info span {
    color: var(--text2);
}

.tips-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tips-list li {
    font-size: 13px;
    color: #5A6270;
    padding-left: 16px;
    position: relative;
    line-height: 1.65;
}

.tips-list li::before {
    content: "";
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--blue);
    position: absolute;
    left: 2px;
    top: 8px;
}

.admin-student-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 0.5px solid var(--line);
    flex-wrap: wrap;
}

.admin-student-list li:last-child {
    border-bottom: none;
}

.admin-student-main {
    min-width: 0;
    flex: 1;
}

.admin-student-main b {
    display: block;
    font-size: 14px;
}

.admin-student-main small {
    display: block;
    font-size: 11.5px;
    color: var(--text2);
}

.quota-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--blue-soft);
    color: var(--blue);
    font-size: 12px;
    font-weight: 700;
    padding: 4px 9px;
    border-radius: 999px;
    white-space: nowrap;
}

/* ---------------- 弹窗 ---------------- */

.modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(15, 23, 42, 0.38);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    z-index: 200;
}

.modal.open {
    display: flex;
}

.modal-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 20px;
    padding: 22px;
    box-shadow: 0 30px 80px rgba(10, 30, 60, 0.25);
}

.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.modal-head h3 {
    font-size: 17px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 16px;
}

.modal .field {
    margin-top: 14px;
}

.modal .field label {
    display: block;
    font-size: 12.5px;
    color: var(--text2);
    font-weight: 600;
    margin-bottom: 6px;
}

.modal .field .input {
    width: 100%;
    height: 44px;
    border-radius: 12px;
    border: 1px solid var(--line-strong);
    background: #F8FAFD;
    padding: 0 12px;
    outline: none;
    font-size: 16px;
}

body.modal-open {
    overflow: hidden;
}

/* ---------------- 轻提示 ---------------- */

.toast {
    position: fixed;
    left: 50%;
    bottom: calc(90px + env(safe-area-inset-bottom));
    transform: translateX(-50%) translateY(10px);
    background: rgba(28, 28, 30, 0.92);
    color: #fff;
    font-size: 13px;
    padding: 10px 16px;
    border-radius: 999px;
    z-index: 300;
    opacity: 0;
    transition: 0.25s;
    pointer-events: none;
    max-width: 80vw;
    text-align: center;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

@media (min-width: 760px) {
    .toast {
        bottom: 34px;
    }
}

/* ---------------- 管理员代登录提示条 ---------------- */

.impersonate-bar {
    background: #0A2C5E;
    color: #fff;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 8px 14px;
    flex-wrap: wrap;
}

.impersonate-bar a {
    background: rgba(255, 255, 255, 0.16);
    padding: 4px 10px;
    border-radius: 999px;
    font-weight: 600;
}

/* ====================== 服务条款 ====================== */
.terms-check {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 4px 0 10px;
    font-size: 12.5px;
    line-height: 1.65;
    color: var(--slate);
    cursor: pointer;
    user-select: none;
}

.terms-check input {
    width: 16px;
    height: 16px;
    margin-top: 2px;
    accent-color: var(--blue);
    flex: 0 0 auto;
    cursor: pointer;
}

.terms-check a {
    color: var(--blue);
    font-weight: 600;
}

.terms-content {
    max-height: 52vh;
    overflow-y: auto;
    background: #F6FAFF;
    border: 1px solid #E2EAF6;
    border-radius: 14px;
    padding: 14px 16px;
    font-size: 13px;
    line-height: 1.85;
    color: #3C4A5E;
    text-align: left;
    -webkit-overflow-scrolling: touch;
}

.terms-textarea {
    min-height: 200px;
    background: #F7FAFF;
    border: 1px solid #E2EAF6;
}

/* ====================== 时间选择 ====================== */
.row-picker {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    max-width: 78%;
    min-width: 0;
    border: 0;
    background: transparent;
    padding: 4px 0;
    font-size: 16px;
    color: var(--text);
    text-align: right;
    cursor: pointer;
}

.row-picker span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.row-picker .placeholder {
    color: #B5BAC6;
}

.row-picker i {
    font-size: 12px;
    color: #B9C7DA;
    flex: 0 0 auto;
}

.row-picker.has-value {
    color: var(--blue);
}

.row-picker.has-value i {
    color: #A9CDFF;
}

.dtp-open {
    overflow: hidden;
}

.dtp-modal {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.dtp-modal.open {
    visibility: visible;
    opacity: 1;
}

.dtp-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.38);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.dtp-sheet {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 520px;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 24px 24px 0 0;
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -20px 60px rgba(0, 20, 60, 0.2);
    transform: translateY(110%);
    transition: transform 0.36s cubic-bezier(0.22, 1, 0.36, 1);
}

.dtp-modal.open .dtp-sheet {
    transform: translateY(0);
}

.dtp-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid #EDF1F7;
    flex: 0 0 auto;
}

.dtp-title {
    font-size: 16px;
    font-weight: 700;
    color: #17263A;
}

.dtp-cancel,
.dtp-confirm {
    border: 0;
    background: transparent;
    font-size: 15px;
    padding: 6px 4px;
    cursor: pointer;
}

.dtp-cancel {
    color: #6B7A90;
}

.dtp-confirm {
    color: var(--blue);
    font-weight: 700;
}

.dtp-body {
    padding: 12px 20px 18px;
    overflow-y: auto;
}

.dtp-preview {
    margin: 0 0 8px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #F4F8FF;
    border: 1px solid #E2ECFA;
    color: var(--blue);
    font-weight: 700;
    text-align: center;
    font-size: 15px;
}

.dtp-month {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 8px 0 6px;
    font-size: 15px;
    color: #17263A;
}

.dtp-nav {
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 10px;
    background: #F1F5FB;
    color: var(--blue);
    cursor: pointer;
}

.dtp-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 11px;
    color: #94A3B8;
    margin: 4px 0;
}

.dtp-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.dtp-day-blank {
    height: 40px;
}

.dtp-day {
    height: 40px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: #1C1C1E;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, transform 0.12s ease;
}

.dtp-day:hover {
    background: #F2F7FD;
}

.dtp-day.today {
    color: var(--blue);
    font-weight: 700;
}

.dtp-day.selected {
    background: linear-gradient(135deg, #0A84FF, #0067E0);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 6px 14px rgba(0, 122, 255, 0.25);
}

.dtp-time {
    margin-top: 6px;
    border-top: 1px solid #EDF1F7;
    padding-top: 8px;
}

.dtp-time-label {
    font-size: 11px;
    color: #94A3B8;
    text-align: center;
    margin-bottom: 2px;
}

.dtp-wheels {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 160px;
}

.dtp-wheel {
    position: relative;
    z-index: 1;
    width: 76px;
    height: 160px;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    padding: 60px 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    mask-image: linear-gradient(180deg, transparent 0, #000 18%, #000 82%, transparent 100%);
    -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 18%, #000 82%, transparent 100%);
}

.dtp-wheel::-webkit-scrollbar {
    display: none;
}

.dtp-wheel-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 40px;
    border: 0;
    background: transparent;
    color: #6B7A90;
    font-size: 17px;
    scroll-snap-align: center;
    cursor: pointer;
    transition: color 0.15s ease;
}

.dtp-wheel-item.active {
    color: var(--blue);
    font-weight: 800;
}

.dtp-colon {
    font-size: 20px;
    font-weight: 700;
    color: #94A3B8;
    z-index: 1;
}

.dtp-wheel-mask {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 190px;
    height: 40px;
    background: rgba(0, 122, 255, 0.07);
    border: 1px solid #D6E7FF;
    border-radius: 12px;
    z-index: 0;
    pointer-events: none;
}

@media (min-width: 640px) {
    .dtp-modal {
        align-items: center;
    }

    .dtp-sheet {
        border-radius: 22px;
        max-width: 430px;
        transform: translateY(16px) scale(0.97);
        opacity: 0;
        transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.28s ease;
        padding-bottom: 0;
    }

    .dtp-modal.open .dtp-sheet {
        transform: none;
        opacity: 1;
    }
}

/* ====================== 动效 ====================== */
@keyframes ios-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.leave-form .group {
    animation: ios-in 0.32s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.leave-form .group:nth-of-type(2) {
    animation-delay: 0.04s;
}

.leave-form .group:nth-of-type(3) {
    animation-delay: 0.08s;
}

.record-detail[open] .kv {
    animation: ios-in 0.22s ease both;
}

@media (prefers-reduced-motion: reduce) {
    .leave-form .group,
    .record-detail[open] .kv {
        animation: none;
    }

    .dtp-sheet,
    .dtp-modal {
        transition: none;
    }
}
