/* =========================================================
   派尔特医疗后台 · 视觉样式
   设计变量与前端效果图保持一致
   ========================================================= */
:root {
    --brand: #0A66A8;
    --brand-2: #1487CE;
    --brand-deep: #074B7D;
    --accent: #0E9C8C;
    --accent-soft: #E6F7F4;
    --bg: #F4F7FA;
    --ink: #0E2433;
    --ink-2: #35505F;
    --muted: #6B7E8C;
    --line: #E2EAF0;
    --line-soft: #EEF4F8;
    --white: #FFFFFF;
    --danger: #D64545;
    --danger-soft: #FDECEC;
    --warn: #B97A08;
    --warn-soft: #FFF6E5;
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 22px;
    --shadow-sm: 0 2px 8px rgba(14, 36, 51, .05);
    --shadow: 0 10px 30px rgba(10, 102, 168, .08);
    --shadow-lg: 0 24px 60px rgba(10, 102, 168, .16);
    --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body {
    font-family: var(--font);
    color: var(--ink);
    background: var(--bg);
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-2); }
h1, h2, h3, h4, p { margin: 0; }
em { font-style: normal; color: var(--danger); }
button { font-family: inherit; }
input, select, textarea { font-family: inherit; }
img { display: block; }

.ico { display: inline-block; vertical-align: -3px; flex: none; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.muted { color: var(--muted); }
[hidden] { display: none !important; }

/* ========================= 按钮 ========================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 38px;
    padding: 0 16px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    background: var(--white);
    color: var(--ink);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all .18s ease;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
    background: linear-gradient(135deg, var(--brand-2), var(--brand));
    color: #fff;
    box-shadow: 0 8px 18px rgba(10, 102, 168, .22);
}
.btn-primary:hover { color: #fff; box-shadow: 0 12px 22px rgba(10, 102, 168, .3); }

.btn-ghost {
    background: var(--white);
    border-color: var(--line);
    color: var(--ink-2);
}
.btn-ghost:hover { border-color: #BBD3E3; color: var(--brand); }

.btn-danger {
    background: var(--danger-soft);
    border-color: #F3C9C9;
    color: var(--danger);
}
.btn-danger:hover { background: #F9DEDE; color: #B93434; }

.btn-sm { height: 30px; padding: 0 10px; font-size: 12.5px; font-weight: 500; }

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--white);
    color: var(--ink-2);
    cursor: pointer;
    transition: all .18s ease;
}
.icon-btn:hover { color: var(--brand); border-color: #BBD3E3; background: #F7FBFE; }

/* ========================= 标签 / 徽章 ========================= */
.badge {
    display: inline-flex;
    align-items: center;
    height: 24px;
    padding: 0 9px;
    border-radius: 999px;
    background: #EEF4F9;
    color: var(--brand);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}
.badge.teal { background: var(--accent-soft); color: var(--accent); }
.badge.ok { background: #E7F7F1; color: #12805F; }
.badge.off { background: #F1F4F7; color: var(--muted); }

.badge-btn {
    display: inline-flex;
    align-items: center;
    height: 26px;
    padding: 0 11px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all .16s ease;
}
.badge-btn.ok { background: #E7F7F1; color: #12805F; border-color: #CBEBDD; }
.badge-btn.off { background: #F1F4F7; color: var(--muted); border-color: #E2E9EF; }
.badge-btn:disabled { opacity: .55; cursor: not-allowed; }
.badge-btn:not(:disabled):hover { filter: brightness(.96); }

/* ========================= 登录页 ========================= */
.login-body {
    background:
        radial-gradient(1200px 700px at 8% 0%, #EAF3FA 0%, transparent 60%),
        radial-gradient(900px 600px at 100% 100%, #E9F7F4 0%, transparent 55%),
        var(--bg);
}

.login-shell {
    display: grid;
    grid-template-columns: minmax(420px, 1.05fr) minmax(430px, .95fr);
    min-height: 100vh;
    padding: 28px;
    gap: 24px;
}

.login-brand {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 46px 52px;
    border-radius: var(--radius-xl);
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(700px 460px at 88% 8%, rgba(14, 156, 140, .38), transparent 62%),
        radial-gradient(600px 520px at 4% 96%, rgba(20, 135, 206, .55), transparent 60%),
        linear-gradient(150deg, #0B5E9B 0%, #0A66A8 45%, #074B7D 100%);
    box-shadow: var(--shadow-lg);
}

.login-brand::after {
    content: "";
    position: absolute;
    right: -120px;
    top: -90px;
    width: 380px;
    height: 380px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 50%;
}
.login-brand::before {
    content: "";
    position: absolute;
    right: -40px;
    bottom: -140px;
    width: 420px;
    height: 420px;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 50%;
}

.brand { display: flex; align-items: center; gap: 12px; position: relative; z-index: 2; }
.brand-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .26);
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: .5px;
}
.brand-img { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; display: block; }
.brand-name { font-size: 17px; font-weight: 700; letter-spacing: .5px; line-height: 1.3; }
.brand-en { font-size: 10.5px; letter-spacing: 2px; color: rgba(255, 255, 255, .62); text-transform: uppercase; }

.login-brand-main { position: relative; z-index: 2; max-width: 460px; }
.login-tag {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .2);
    font-size: 11px;
    letter-spacing: 2px;
}
.login-brand-main h1 {
    margin: 22px 0 16px;
    font-size: 38px;
    line-height: 1.32;
    font-weight: 700;
    letter-spacing: 1px;
}
.login-brand-main p { color: rgba(255, 255, 255, .72); font-size: 14.5px; max-width: 400px; }
.login-points { margin-top: 30px; display: grid; gap: 12px; }
.login-point {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: rgba(255, 255, 255, .82);
}
.login-point i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #6FE3D2;
    box-shadow: 0 0 0 4px rgba(111, 227, 210, .18);
}
.login-brand-foot {
    position: relative;
    z-index: 2;
    font-size: 12px;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, .5);
}

.login-main { display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-card {
    width: 100%;
    max-width: 420px;
    padding: 40px 40px 30px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
}
.login-head h2 { font-size: 25px; letter-spacing: .5px; }
.login-head p { margin-top: 8px; color: var(--muted); font-size: 13.5px; }

.alert {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 20px;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    line-height: 1.5;
}
.alert.error { background: var(--danger-soft); color: #B93434; border: 1px solid #F3C9C9; }
.alert.success { background: #E7F7F1; color: #12805F; border: 1px solid #CBEBDD; }
.alert-ico { flex: none; padding-top: 2px; }

.login-form { margin-top: 24px; display: grid; gap: 18px; }

.field { display: grid; gap: 7px; align-content: start; }
.field > span { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field > small { color: var(--muted); font-size: 12px; }

.input {
    width: 100%;
    height: 44px;
    padding: 0 13px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #FBFDFE;
    color: var(--ink);
    font-size: 13.5px;
    outline: none;
    transition: all .18s ease;
}
.input::placeholder { color: #9CAEB9; }
.input:hover { border-color: #C9DCE8; }
.input:focus {
    border-color: var(--brand-2);
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(20, 135, 206, .12);
}
.input[readonly] { background: #F4F7FA; color: var(--ink-2); cursor: default; }
textarea.input { height: auto; min-height: 84px; padding: 10px 13px; line-height: 1.6; resize: vertical; }
select.input {
    cursor: pointer;
    appearance: none;
    padding-right: 32px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B7E8C' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 11px center;
}

.input-ico { position: relative; }
.input-ico .input { padding-left: 40px; height: 46px; }
.input-ico-mark {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #8AA3B2;
    display: flex;
}

.captcha-row { display: grid; grid-template-columns: 1fr 128px; gap: 10px; align-items: stretch; }
.captcha-box {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 46px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #F7FBFD;
    cursor: pointer;
    overflow: hidden;
    transition: border-color .18s ease;
}
.captcha-box:hover { border-color: #BBD3E3; }
.captcha-box img { width: 126px; height: 44px; object-fit: cover; }

.login-submit { height: 46px; margin-top: 4px; font-size: 15px; letter-spacing: 1px; }

.login-foot {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 26px;
    padding-top: 18px;
    border-top: 1px solid var(--line-soft);
    color: var(--muted);
    font-size: 12px;
}

/* ========================= 后台框架 ========================= */
.admin-body { overflow-x: hidden; }

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

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 30;
    display: flex;
    flex-direction: column;
    width: 248px;
    padding: 20px 14px 16px;
    background: linear-gradient(180deg, #0B2E45 0%, #09304C 48%, #072B44 100%);
    color: #E8F1F8;
    transition: transform .22s ease;
}

.sidebar .brand { padding: 4px 8px 18px; }
.sidebar .brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--brand-2), var(--brand));
    border: none;
    font-size: 18px;
    box-shadow: 0 8px 18px rgba(10, 102, 168, .35);
}
.sidebar .brand-name { font-size: 15px; color: #fff; }
.sidebar .brand-en { color: rgba(232, 241, 248, .42); font-size: 9.5px; }

.nav {
    flex: 1;
    overflow-y: auto;
    display: grid;
    align-content: start;
    gap: 4px;
    padding: 6px 2px;
    scrollbar-width: thin;
}
.nav::-webkit-scrollbar { width: 5px; }
.nav::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .16); border-radius: 4px; }

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    color: rgba(232, 241, 248, .74);
    font-size: 13.5px;
    transition: all .16s ease;
    border: 1px solid transparent;
}
.nav-item:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.nav-item.on {
    background: linear-gradient(90deg, rgba(20, 135, 206, .34), rgba(20, 135, 206, .12));
    border-color: rgba(107, 178, 226, .28);
    color: #fff;
    box-shadow: inset 2px 0 0 var(--brand-2);
}
.nav-ico { display: inline-flex; color: rgba(232, 241, 248, .6); }
.nav-item.on .nav-ico, .nav-group-head.on .nav-ico { color: #7FC4EC; }
.nav-text { flex: 1; }

.nav-group-head {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: rgba(232, 241, 248, .74);
    font-size: 13.5px;
    text-align: left;
    cursor: pointer;
    transition: all .16s ease;
}
.nav-group-head:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.nav-group-head.on { color: #fff; }
.nav-group-head .chev { transition: transform .2s ease; color: rgba(232, 241, 248, .5); }

.nav-sub {
    display: grid;
    gap: 2px;
    max-height: 0;
    overflow: hidden;
    padding-left: 10px;
    transition: max-height .25s ease;
}
.nav-group.open .nav-sub { max-height: 400px; }
.nav-group.open .nav-group-head .chev { transform: rotate(180deg); }
.nav-sub .nav-item { font-size: 13px; padding: 8px 12px; }

.side-foot { padding: 12px 8px 0; }
.side-foot-line { height: 1px; background: rgba(255, 255, 255, .1); margin-bottom: 12px; }
.side-foot-text { font-size: 11px; letter-spacing: .4px; color: rgba(232, 241, 248, .38); }

.main {
    flex: 1;
    min-width: 0;
    margin-left: 248px;
    display: flex;
    flex-direction: column;
}

/* ========================= 顶栏 ========================= */
.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 14px;
    height: 66px;
    padding: 0 26px;
    background: rgba(255, 255, 255, .92);
    border-bottom: 1px solid var(--line);
}
.menu-toggle { display: none; }
.topbar-title h1 { font-size: 16px; font-weight: 700; line-height: 1.3; }
.topbar-sub { font-size: 11.5px; letter-spacing: 1.5px; color: var(--muted); text-transform: uppercase; }
.topbar-space { flex: 1; }

.user-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 12px 5px 5px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #FBFDFE;
}
.avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-2), var(--brand));
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}
.user-meta { display: grid; line-height: 1.25; }
.user-meta b { font-size: 13px; }
.user-meta i { font-style: normal; font-size: 11.5px; color: var(--muted); }

.content { padding: 22px 26px 34px; }

/* ========================= 页面头部 ========================= */
.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}
.page-head > div:first-child { min-width: 0; }
.page-head h2 { font-size: 20px; letter-spacing: .3px; }
.page-head p { margin-top: 5px; color: var(--muted); font-size: 13px; }
.page-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-left: auto; }
.page-date {
    padding: 7px 14px;
    border-radius: 999px;
    background: var(--white);
    border: 1px solid var(--line);
    color: var(--muted);
    font-size: 12.5px;
    font-family: var(--mono);
}
.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 32px;
    padding: 0 15px;
    border-radius: 999px;
    background: linear-gradient(135deg, #F2A900, #E58E00);
    color: #fff;
    font-size: 12.5px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(229, 142, 0, .22);
    transition: filter .18s ease, transform .18s ease;
}
.lang-switch:hover { filter: brightness(.96); transform: translateY(-1px); }
.lang-switch svg { width: 14px; height: 14px; }

/* ========================= 卡片 ========================= */
.card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 18px 20px;
}
.card + .card:not(.stat-card), .stat-grid + .two-col, .two-col + .card, .card + .table-card { margin-top: 18px; }

.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 14px;
    margin-bottom: 6px;
    border-bottom: 1px solid var(--line-soft);
}
.card-head h4 { font-size: 15px; }

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}
.stat-card { display: flex; align-items: center; gap: 14px; padding: 18px; }
.stat-ico {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    flex: none;
}
.stat-ico.blue { background: #EAF3FA; color: var(--brand); }
.stat-ico.teal { background: var(--accent-soft); color: var(--accent); }
.stat-ico.indigo { background: #EEF0FD; color: #5A63C8; }
.stat-ico.amber { background: var(--warn-soft); color: var(--warn); }
.stat-label { color: var(--muted); font-size: 12.5px; }
.stat-value { font-size: 26px; font-weight: 700; letter-spacing: .5px; line-height: 1.25; }

.two-col {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    gap: 16px;
    margin-top: 18px;
}
.two-col .card + .card { margin-top: 0; }

.welcome-card {
    position: relative;
    overflow: hidden;
    color: #fff;
    border: none;
    background:
        radial-gradient(600px 320px at 92% 0%, rgba(14, 156, 140, .4), transparent 60%),
        linear-gradient(140deg, #0B5E9B, #0A66A8 55%, #074B7D);
    box-shadow: 0 18px 38px rgba(10, 102, 168, .22);
}
.welcome-glow {
    position: absolute;
    right: -70px;
    top: -90px;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .16);
}
.welcome-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; position: relative; }
.welcome-tag {
    font-size: 10.5px;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, .62);
}
.welcome-role {
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .2);
    font-size: 12px;
}
.welcome-card h3 { margin: 18px 0 8px; font-size: 22px; position: relative; }
.welcome-card p { color: rgba(255, 255, 255, .74); font-size: 13.5px; position: relative; }
.welcome-card p b { color: #fff; }
.welcome-foot {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 26px;
    margin-top: 26px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, .14);
}
.welcome-kv { display: grid; gap: 2px; }
.welcome-kv i { font-style: normal; font-size: 11.5px; color: rgba(255, 255, 255, .55); }
.welcome-kv b { font-size: 13px; font-weight: 600; }

.info-list { display: grid; padding-top: 6px; }
.info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 11px 2px;
    border-bottom: 1px dashed var(--line-soft);
    font-size: 13px;
}
.info-row:last-child { border-bottom: none; }
.info-row span { color: var(--muted); }
.info-row b { font-family: var(--mono); font-size: 12.5px; font-weight: 600; }

/* ========================= 表格 ========================= */
.table-wrap { width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th {
    padding: 11px 14px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .6px;
    color: var(--muted);
    background: #F8FBFD;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}
.data-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--line-soft);
    vertical-align: middle;
}
.data-table tbody tr:hover { background: #F9FCFE; }
.data-table tbody tr:last-child td { border-bottom: none; }

.cell-user { display: flex; align-items: center; gap: 10px; }
.cell-user > span:last-child { display: grid; line-height: 1.35; }
.cell-user b { font-size: 13px; }
.cell-user i { font-style: normal; font-size: 11.5px; color: var(--muted); }
.mini-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    flex: none;
    border-radius: 9px;
    background: #EAF3FA;
    color: var(--brand);
    font-size: 13px;
    font-weight: 700;
}
.cell-menu { display: flex; align-items: center; gap: 9px; }
.cell-menu.child { padding-left: 14px; }
.menu-ico { display: inline-flex; color: var(--brand); }
.tree-line {
    width: 14px;
    height: 1px;
    background: #C9DCE8;
    position: relative;
    flex: none;
}
.tree-line::before {
    content: "";
    position: absolute;
    left: 0;
    top: -11px;
    width: 1px;
    height: 11px;
    background: #C9DCE8;
}

.row-child { background: #FCFEFF; }
.row-child td { color: var(--ink-2); }
.row-parent td { font-weight: 500; }

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

.sort-input { width: 64px; height: 32px; padding: 0 8px; font-size: 12.5px; text-align: center; }
.menu-table .sort-input { width: 62px; }

.empty {
    padding: 34px 0 !important;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
}

/* ========================= 分页 ========================= */
.pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding-top: 16px;
}
.pager .pager-info {
    min-width: 0;
    height: auto;
    padding: 0;
    border: 0;
    background: none;
    color: var(--muted);
    font-size: 12.5px;
    display: inline-block;
}
.pager ul, .pager .pagination {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
    flex-wrap: wrap;
}
.pager li { list-style: none; }
.pager a, .pager span, .pager .current {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--white);
    color: var(--ink-2);
    font-size: 12.5px;
    transition: all .16s ease;
}
.pager a:hover { border-color: #BBD3E3; color: var(--brand); }
.pager .active a, .pager .active span, .pager li.active span, .pager span.current {
    background: linear-gradient(135deg, var(--brand-2), var(--brand));
    border-color: transparent;
    color: #fff;
    box-shadow: 0 6px 14px rgba(10, 102, 168, .2);
}

/* ========================= 表单 / 弹窗 ========================= */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; align-items: start; gap: 16px; }
.field-wide { grid-column: 1 / -1; }

.modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.modal.open { display: flex; }
.modal-mask {
    position: absolute;
    inset: 0;
    background: rgba(6, 30, 47, .48);
}
.modal-card {
    position: relative;
    width: 100%;
    max-width: 560px;
    max-height: calc(100vh - 48px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: 0 30px 70px rgba(6, 30, 47, .28);
    animation: modalIn .18s ease;
}
.modal-wide { max-width: 720px; }
.modal-card-lg { max-width: 860px; }
@keyframes modalIn {
    from { opacity: 0; transform: translateY(8px) scale(.99); }
    to { opacity: 1; transform: none; }
}
.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 22px;
    border-bottom: 1px solid var(--line-soft);
}
.modal-head h3 { font-size: 16px; }
.modal-body { padding: 20px 22px; overflow-y: auto; flex: 1; min-height: 0; }
/* 当 body/foot 被 <form> 包裹时，让 form 成为填满卡片的弹性列，保证 body 独立滚动、foot 常驻可见 */
.modal-card > form { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.modal-foot {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 22px 18px;
    border-top: 1px solid var(--line-soft);
}
.modal-tip { color: var(--muted); font-size: 13px; margin-bottom: 16px; }
.modal-tip b { color: var(--brand); }

.hint-box {
    margin-top: 16px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    background: var(--warn-soft);
    border: 1px solid #F5E3BF;
    color: var(--warn);
    font-size: 12.5px;
}

.perm-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin: 20px 0 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-2);
}
.perm-head small { color: var(--muted); font-weight: 400; font-size: 12px; }

.perm-tree { display: grid; gap: 10px; }
.perm-group {
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #FBFDFE;
}
.perm {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    font-size: 13px;
    user-select: none;
}
.perm input { accent-color: var(--brand); width: 15px; height: 15px; cursor: pointer; }
.perm-parent { font-weight: 600; }
.perm-children {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin-top: 10px;
    padding: 10px 0 0 24px;
    border-top: 1px dashed var(--line);
}
.perm-child { color: var(--ink-2); }
.perm-ico { display: inline-flex; color: var(--brand); }

/* ========================= 提示条 ========================= */
.toast {
    position: fixed;
    right: 26px;
    top: 22px;
    z-index: 200;
    display: flex;
    align-items: center;
    gap: 9px;
    max-width: 420px;
    padding: 12px 18px;
    border-radius: var(--radius);
    background: var(--white);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    font-size: 13px;
    transform: translateY(-14px);
    opacity: 0;
    pointer-events: none;
    transition: all .24s ease;
}
.toast.show { transform: none; opacity: 1; }
.toast.success { border-color: #CBEBDD; }
.toast.success .toast-ico { color: #12805F; }
.toast.error { border-color: #F3C9C9; }
.toast.error .toast-ico { color: var(--danger); }
.toast-ico { display: inline-flex; }

/* ========================= 通用工具类与可视化组件 ========================= */
.text-danger { color: var(--danger); font-weight: 600; }
.mt-lg { margin-top: 18px; }

/* 筛选栏 */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
}
.filter-bar .field { min-width: 0; }
.field-grow { flex: 1 1 240px; min-width: 240px; }
.field-fixed { flex: none; }
.field-w120 { width: 120px; }
.field-w130 { width: 130px; }
.field-w140 { width: 140px; }
.field-w150 { width: 150px; }
.field-w160 { width: 160px; }
.field-w170 { width: 170px; }
.field-w180 { width: 180px; }
.field-w200 { width: 200px; }

/* 堆叠单元格：主信息 + 次要信息 */
.cell-stack { line-height: 1.5; }
.cell-sub { color: var(--muted); font-size: 11.5px; line-height: 1.5; }

/* 表格内控件 */
.cell-select { width: 100%; height: 32px; padding: 0 8px; font-size: 12px; }
.cell-input { width: 100%; }
.mt-sm { margin-top: 8px; }

/* 复选 / 选项组 */
.check-list { display: flex; flex-wrap: wrap; gap: 18px; padding: 8px 0; }
.check-item { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }

/* 小号输入（JSON 文本域等密集场景） */
.input-sm { font-size: 11.5px; }

/* 空状态图标 */
.empty-ico { color: #C2D2DE; }

/* 按钮 loading（防重复提交） */
.btn-loading { pointer-events: none; opacity: .78; }
.btn-loading::after {
    content: "";
    display: inline-block;
    width: 13px;
    height: 13px;
    margin-left: 6px;
    border-radius: 50%;
    border: 2px solid currentColor;
    border-top-color: transparent;
    animation: btnSpin .7s linear infinite;
    vertical-align: -2px;
}
@keyframes btnSpin { to { transform: rotate(360deg); } }

/* 统一确认弹窗 */
.confirm-modal .modal-card { max-width: 420px; }
.confirm-body {
    display: flex;
    gap: 14px;
    padding: 24px 22px 6px;
    align-items: flex-start;
}
.confirm-ico {
    flex: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.confirm-ico.warn { background: var(--warn-soft); color: var(--warn); }
.confirm-ico.danger { background: var(--danger-soft); color: var(--danger); }
.confirm-text h4 { font-size: 15px; margin-bottom: 5px; }
.confirm-text p { color: var(--muted); font-size: 13px; line-height: 1.6; }

/* ========================= 响应式 ========================= */
@media (max-width: 1180px) {
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .two-col { grid-template-columns: 1fr; }
}

@media (max-width: 991px) {
    .login-shell { grid-template-columns: 1fr; padding: 18px; }
    .login-brand { min-height: 260px; padding: 30px 28px; }
    .login-brand-main h1 { font-size: 27px; margin: 14px 0 10px; }
    .login-points { display: none; }
    .login-brand-foot { margin-top: 22px; }

    .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
    .sidebar.open { transform: none; }
    .main { margin-left: 0; }
    .menu-toggle { display: inline-flex; }
    .topbar { padding: 0 16px; }
    .content { padding: 18px 16px 28px; }
}

@media (max-width: 720px) {
    .stat-grid { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .captcha-row { grid-template-columns: 1fr 116px; }
    .captcha-box img { width: 112px; }
    .login-card { padding: 28px 22px 24px; }
    .login-foot { flex-direction: column; gap: 4px; }
    .user-meta { display: none; }
    .user-chip { padding: 3px; border: none; background: none; }
    .page-head { align-items: flex-start; }
    .data-table th, .data-table td { padding: 10px; }
}

/* ========================= JSON 子表单（人性化录入） ========================= */
.json-field { display: flex; flex-direction: column; gap: 8px; }
.jf-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: flex-end;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #FAFCFE;
}
.jf-cell { display: flex; flex-direction: column; gap: 5px; flex: 1 1 160px; min-width: 120px; }
.jf-cell > span { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.jf-row .input { height: 36px; font-size: 12.5px; }
/* 主表单：中英文各自独立成行；富文本等整行铺满 */
.form-grid > .lang-zh, .form-grid > .lang-en { grid-column: 1 / -1; }
/* JSON 子表单：文字短的字段一行两个，长字段（议题等）整行 */
.jf-row .jf-cell, .jf-obj .jf-cell { flex: 1 1 calc(50% - 8px); min-width: 0; }
.jf-row .jf-cell.jf-wide, .jf-obj .jf-cell.jf-wide { flex: 1 0 100%; }
.jf-del {
    flex: none;
    width: 32px;
    height: 32px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--muted);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transition: all .18s ease;
}
.jf-del:hover { border-color: var(--danger); color: var(--danger); background: var(--danger-soft); }
.jf-add { align-self: flex-start; }
.jf-obj { display: flex; flex-wrap: wrap; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #FAFCFE; }
.jf-obj .input { height: 38px; }

/* ============================================================
 * 2026-11 上传组件 & 富文本编辑器 样式
 * ============================================================ */

/* --- 原表单输入隐藏（值由组件管理） --- */
.adm-up-input { display: none !important; }

/* --- 上传组件容器 --- */
.adm-up { margin-top: 4px; }
.adm-up-grid { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; }

/* 单个图块 */
.adm-up-item {
    position: relative; width: 108px; border: 1px solid #e3e8ef; border-radius: 8px;
    background: #fafbfc; overflow: hidden; display: flex; flex-direction: column;
}
.adm-up-item .adm-up-thumb {
    width: 108px; height: 108px; background: #eef2f6; display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
.adm-up-item .adm-up-thumb img,
.adm-up-item .adm-up-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.adm-up-item .adm-up-name {
    font-size: 11px; color: #6b7785; padding: 5px 6px; line-height: 1.35; word-break: break-all;
    max-height: 34px; overflow: hidden;
}
.adm-up-item.is-clickable { cursor: pointer; }
.adm-up-item .adm-up-del {
    position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; line-height: 20px;
    padding: 0; border: none; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff;
    font-size: 15px; cursor: pointer; text-align: center; opacity: 1; z-index: 2;
    box-shadow: 0 1px 4px rgba(0,0,0,.25); transition: background .15s;
}
.adm-up-item .adm-up-del:hover { background: rgba(185,52,52,.95); }

/* 文件图标块 */
.adm-up-file-ico {
    width: 108px; height: 108px; display: flex; align-items: center; justify-content: center;
    font-size: 16px; font-weight: 700; color: #fff; letter-spacing: .5px;
    background: linear-gradient(135deg, #4a90d9, #0a66a8);
}
.adm-up-item[data-url$=".pdf"] .adm-up-file-ico { background: linear-gradient(135deg, #e8756b, #c0392b); }
.adm-up-item[data-url$=".doc"] .adm-up-file-ico,
.adm-up-item[data-url$=".docx"] .adm-up-file-ico { background: linear-gradient(135deg, #5b9bd5, #2e5a9e); }
.adm-up-item[data-url$=".xls"] .adm-up-file-ico,
.adm-up-item[data-url$=".xlsx"] .adm-up-file-ico { background: linear-gradient(135deg, #70ad47, #375623); }
.adm-up-item[data-url$=".zip"] .adm-up-file-ico,
.adm-up-item[data-url$=".rar"] .adm-up-file-ico,
.adm-up-item[data-url$=".7z"] .adm-up-file-ico { background: linear-gradient(135deg, #f0a04b, #b9670e); }

/* 添加 / 空态 块 */
.adm-up-add-tile, .adm-up-empty {
    width: 108px; height: 108px; border: 1px dashed #c3cdd9; border-radius: 8px; background: #fafbfc;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    cursor: pointer; color: #8b97a7; transition: all .15s;
}
.adm-up-add-tile:hover, .adm-up-empty:hover { border-color: var(--brand); color: var(--brand); background: #f3f9fd; }
.adm-up-add-ico { font-size: 26px; line-height: 1; font-weight: 300; }
.adm-up-add-txt { font-size: 11.5px; }

/* 操作条（单文件：更换/移除） */
.adm-up-bar { display: flex; gap: 8px; align-items: center; width: 100%; margin-top: 8px; }
.danger-text { color: #b93434; border-color: #f0c9c9; background: #fff5f5; }
.danger-text:hover { color: #fff !important; background: #b93434 !important; border-color: #b93434 !important; }

/* 上传中状态 */
.adm-up-item.uploading { opacity: .9; }
.adm-up-spin {
    width: 28px; height: 28px; border: 3px solid #e3e8ef; border-top-color: var(--brand);
    border-radius: 50%; animation: adm-up-spin .8s linear infinite;
}
@keyframes adm-up-spin { to { transform: rotate(360deg); } }
.adm-up-progress { width: 100%; padding: 4px 6px 6px; position: relative; }
.adm-up-progress-bar { display: block; height: 4px; background: var(--brand); border-radius: 2px; transition: width .2s; }
.adm-up-progress-txt { position: absolute; right: 6px; top: 5px; font-size: 10px; color: #6b7785; }

/* 多图模式稍微紧凑 */
.adm-up-multi .adm-up-item,
.adm-up-multi .adm-up-add-tile { width: 96px; }
.adm-up-multi .adm-up-item .adm-up-thumb,
.adm-up-multi .adm-up-file-ico { width: 96px; height: 96px; }

/* --- 富文本编辑器 --- */
.adm-rt { border: 1px solid #dfe5ed; border-radius: 8px; overflow: hidden; background: #fff; }
.adm-rt .adm-rt-bar { border-bottom: 1px solid #eef1f5; }
.adm-rt .adm-rt-ed { min-height: 220px; }
.adm-rt-fallback textarea { display: block !important; width: 100%; }

/* wangEditor 高度与外观贴合后台 */
.adm-rt .w-e-text-container { min-height: 220px !important; height: 260px !important; }
.adm-rt .w-e-toolbar { border-bottom: none !important; background: #fafbfc !important; }
.adm-rt .w-e-text-container [data-slate-editor] { padding: 10px 14px !important; line-height: 1.75; }
.adm-rt .w-e-text-container img,
.adm-rt .w-e-text-container video { max-width: 100%; border-radius: 6px; margin: 6px 0; }

/* 语言切换时富文本容器跟随显隐（与 .lang-zh/.lang-en 一致） */

/* ============================================================
   顶部多页签导航（参考主流后台 TagsView；状态存 sessionStorage）
   ============================================================ */
.tabs-bar{display:flex;align-items:flex-end;gap:6px;padding:8px 18px 0;background:var(--white);border-bottom:1px solid var(--line);overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;flex:0 0 auto}
.tabs-bar:empty{display:none}
.ptab{flex:0 0 auto;display:inline-flex;align-items:center;gap:4px;height:32px;padding:0 4px 0 14px;border:1px solid var(--line);border-bottom:0;border-radius:8px 8px 0 0;background:var(--bg);color:var(--muted);font-size:12.5px;line-height:1;cursor:pointer;white-space:nowrap;user-select:none;transition:color .15s,background .15s}
.ptab:first-child{margin-left:0}
.ptab:hover{color:var(--brand);background:#EDF5FB}
.ptab.on{background:var(--white);color:var(--brand);font-weight:600;border-color:var(--brand);position:relative;z-index:1}
.ptab.on::after{content:"";position:absolute;left:0;right:0;bottom:-1px;height:2px;background:var(--white)}
.ptab .ptab-x{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;margin-left:2px;border:0;border-radius:50%;background:transparent;color:var(--muted);cursor:pointer;transition:background .15s,color .15s}
.ptab .ptab-x:hover{background:var(--danger);color:#fff}

/* ============================================================
   语言下拉（数据源 config/app.php langs，可扩展多语言）+ 左上工具条
   ============================================================ */
.lang-select{appearance:none;-webkit-appearance:none;height:34px;padding:0 30px 0 12px;border:0;border-radius:9px;background:#22314a url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23eaf1f8' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 11px center;color:#eaf1f8;font-size:12.5px;font-weight:600;cursor:pointer;outline:none;transition:background-color .15s}
.lang-select:hover{background-color:#2b3d5c}
.table-toolbar{display:flex;align-items:center;gap:10px;margin:14px 18px 0}
