﻿/* =========================================================
   学员学习行为数据洞察研判平台 v1.0
   视觉系统：墨玉 · 青碧（学术研判风）
   ========================================================= */
:root {
    --bg: #f1efe8;
    --bg-deep: #e9e6dc;
    --surface: #ffffff;
    --surface-2: #faf9f5;
    --ink: #14201e;
    --ink-2: #47574f;
    --ink-3: #7d8b85;
    --line: #e4e0d4;
    --line-strong: #d3cebe;
    --brand: #0f8f7b;
    --brand-deep: #0a6357;
    --brand-soft: #e4f2ee;
    --brand-mid: #35bda4;
    --gold: #b8913c;
    --gold-soft: #f6efdd;
    --danger: #b0443a;
    --danger-soft: #f8e9e6;
    --warn: #b97d22;
    --warn-soft: #faf0dc;
    --info: #3d6584;
    --info-soft: #e9f0f5;
    --sidebar: #0c1817;
    --radius: 14px;
    --radius-sm: 9px;
    --shadow-sm: 0 1px 2px rgba(18, 32, 30, .05);
    --shadow: 0 1px 2px rgba(18, 32, 30, .04), 0 16px 34px -22px rgba(18, 32, 30, .45);
    --shadow-lg: 0 40px 90px -40px rgba(10, 26, 24, .55), 0 4px 14px rgba(10, 26, 24, .12);
    --font: "PingFang SC", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans SC", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--ink);
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; color: var(--ink); }
i { font-style: normal; }
::selection { background: rgba(15, 143, 123, .2); }

/* 滚动条 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #c9c4b5; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #b0aa98; }
::-webkit-scrollbar-track { background: transparent; }

/* =========================================================
   登录 / 注册
   ========================================================= */
.auth-body {
    min-height: 100vh;
    background:
        radial-gradient(1100px 600px at 88% -10%, #1c3f39 0%, transparent 60%),
        radial-gradient(900px 700px at -10% 110%, #23433c 0%, transparent 55%),
        linear-gradient(140deg, #0a1514 0%, #0f221f 45%, #0b1b19 100%);
    display: flex;
    overflow: hidden;
    position: relative;
}
.auth-body::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .028) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .028) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(circle at 30% 40%, #000 10%, transparent 75%);
    pointer-events: none;
}
.auth-visual {
    flex: 1.15;
    padding: 56px 64px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #eaf3f0;
    z-index: 1;
}
.auth-brand { display: flex; align-items: center; gap: 14px; }
.auth-brand .mark {
    width: 46px; height: 46px; border-radius: 12px;
    background: linear-gradient(150deg, #2fd0b2, #0b7a69);
    display: grid; place-items: center;
    font-size: 22px; font-weight: 700; color: #04211c;
    box-shadow: 0 12px 30px -12px rgba(53, 189, 164, .8);
}
.auth-brand strong { font-size: 17px; letter-spacing: 1px; }
.auth-brand span { display: block; font-size: 11px; letter-spacing: 3px; color: #7e9d97; }
.auth-hero { max-width: 620px; }
.auth-hero .eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 11px; letter-spacing: 4px; color: #5f8d85;
    border: 1px solid rgba(53, 189, 164, .3);
    padding: 6px 14px; border-radius: 99px; margin-bottom: 26px;
}
.auth-hero h1 {
    font-size: 44px; line-height: 1.28; font-weight: 600; letter-spacing: 2px;
    background: linear-gradient(100deg, #ffffff 20%, #a9d8cd 95%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.auth-hero p { margin-top: 20px; color: #8faca6; font-size: 14.5px; line-height: 2; max-width: 520px; }
.auth-metrics { display: flex; gap: 46px; margin-top: 46px; }
.auth-metrics div strong { font-size: 30px; font-weight: 600; color: #d8efe8; letter-spacing: 1px; }
.auth-metrics div span { display: block; font-size: 12px; color: #6c8a84; letter-spacing: 1px; margin-top: 4px; }
.auth-foot { font-size: 12px; color: #56736d; letter-spacing: 1px; }

.auth-panel {
    width: 470px;
    background: #fbfaf6;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 56px 58px;
    position: relative;
    z-index: 2;
    box-shadow: -30px 0 80px rgba(0, 0, 0, .35);
}
.auth-panel::before {
    content: "";
    position: absolute; left: 0; top: 12%; height: 76%; width: 1px;
    background: linear-gradient(transparent, var(--gold), transparent);
    opacity: .5;
}
.auth-panel h2 { font-size: 26px; letter-spacing: 2px; font-weight: 600; }
.auth-panel .sub { color: var(--ink-3); margin: 10px 0 34px; font-size: 13px; letter-spacing: .5px; }
.field { margin-bottom: 20px; }
.field label { display: block; font-size: 12px; color: var(--ink-2); letter-spacing: 1px; margin-bottom: 8px; }
.field .control { position: relative; }
.field input, .field select, .field textarea {
    width: 100%;
    height: 46px;
    border: 1px solid var(--line-strong);
    background: #fff;
    border-radius: 10px;
    padding: 0 14px 0 42px;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}
.field textarea { height: auto; padding: 12px 14px; line-height: 1.7; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(15, 143, 123, .1);
}
.field .control > i {
    position: absolute; left: 15px; top: 50%; transform: translateY(-50%);
    color: var(--ink-3); font-size: 15px;
}
.field.no-icon input { padding-left: 14px; }
.btn-primary-lg {
    width: 100%; height: 48px; border-radius: 10px;
    background: linear-gradient(120deg, #0d7c6c, #14a58d);
    color: #fff; font-size: 15px; letter-spacing: 3px; font-weight: 500;
    box-shadow: 0 18px 36px -20px rgba(13, 124, 108, .95);
    transition: transform .18s, box-shadow .18s;
}
.btn-primary-lg:hover { transform: translateY(-1px); box-shadow: 0 22px 40px -18px rgba(13, 124, 108, .9); }
.auth-links { display: flex; justify-content: space-between; margin-top: 22px; font-size: 13px; color: var(--ink-2); }
.auth-links a:hover { color: var(--brand); }
.auth-note { margin-top: 34px; font-size: 11.5px; color: var(--ink-3); line-height: 1.9; border-top: 1px dashed var(--line); padding-top: 18px; }
.auth-error {
    display: none; margin-bottom: 18px; padding: 10px 14px; border-radius: 8px;
    background: var(--danger-soft); color: var(--danger); font-size: 13px;
    border-left: 3px solid var(--danger);
}
.auth-error.show { display: block; animation: shake .3s; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

/* =========================================================
   应用框架
   ========================================================= */
.app-body { overflow: hidden; }
.app-shell { display: flex; height: 100vh; }
.sidebar {
    width: 252px;
    flex-shrink: 0;
    background:
        radial-gradient(420px 260px at 100% 0%, rgba(53, 189, 164, .16), transparent 70%),
        linear-gradient(180deg, #0e1c1a 0%, #0a1514 100%);
    color: #c7d6d2;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: margin-left .28s ease;
    z-index: 40;
}
.sidebar::after {
    content: "";
    position: absolute; inset: 0;
    background-image: linear-gradient(rgba(255, 255, 255, .022) 1px, transparent 1px);
    background-size: 100% 44px;
    pointer-events: none;
}
.brand {
    height: 76px; display: flex; align-items: center; gap: 12px;
    padding: 0 22px; border-bottom: 1px solid rgba(255, 255, 255, .06);
    position: relative; z-index: 1;
}
.brand-mark {
    width: 38px; height: 38px; border-radius: 10px;
    background: linear-gradient(150deg, #2fd0b2, #0b6f61);
    color: #06211d; font-weight: 700; font-size: 19px;
    display: grid; place-items: center;
    box-shadow: 0 10px 24px -12px rgba(47, 208, 178, .9);
}
.brand-text strong { display: block; color: #eaf4f1; font-size: 14.5px; letter-spacing: 1px; }
.brand-text span { font-size: 9.5px; letter-spacing: 2.2px; color: #5e7d77; }
.sidebar-scroll { flex: 1; overflow-y: auto; padding: 14px 12px 20px; position: relative; z-index: 1; }
.sidebar-scroll::-webkit-scrollbar-thumb { background: #243c37; }
.nav-home {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px; border-radius: 9px; font-size: 13.5px;
    background: rgba(255, 255, 255, .045);
    border: 1px solid rgba(255, 255, 255, .06);
    color: #dbe9e5; margin-bottom: 14px;
}
.nav-home i { color: var(--brand-mid); font-size: 14px; }
.nav-home em { margin-left: auto; font-size: 9px; letter-spacing: 1.5px; color: #5d7b75; font-style: normal; }
.nav-home:hover { background: rgba(53, 189, 164, .12); }
.nav-home.active { background: rgba(53, 189, 164, .16); border-color: rgba(53, 189, 164, .35); color: #fff; }
.nav-group { margin-bottom: 6px; }
.nav-group-title {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 12px 8px; font-size: 11px; letter-spacing: 1.6px;
    color: #5f7d77; text-transform: uppercase;
}
.nav-group-title i { font-size: 12px; color: #4f6f69; }
.nav-item {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 12px 9px 16px; border-radius: 8px;
    font-size: 13.2px; color: #a8bcb7; position: relative;
    transition: background .16s, color .16s;
    margin-bottom: 2px;
}
.nav-item i { font-size: 13.5px; color: #5f8179; transition: color .16s; }
.nav-item:hover { background: rgba(255, 255, 255, .05); color: #fff; }
.nav-item:hover i { color: var(--brand-mid); }
.nav-item.active {
    background: linear-gradient(90deg, rgba(53, 189, 164, .22), rgba(53, 189, 164, .04));
    color: #ffffff;
}
.nav-item.active::before {
    content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px;
    border-radius: 0 3px 3px 0; background: var(--brand-mid);
    box-shadow: 0 0 14px rgba(53, 189, 164, .8);
}
.nav-item.active i { color: var(--brand-mid); }
.sidebar-foot {
    padding: 14px 20px 18px; border-top: 1px solid rgba(255, 255, 255, .06);
    font-size: 10.5px; color: #55736d; letter-spacing: .5px;
    position: relative; z-index: 1;
}
.foot-badge { display: flex; align-items: center; gap: 6px; color: #7f9c96; margin-bottom: 6px; }
.foot-badge i { color: var(--gold); }
.foot-org { color: #47615b; }

.app-main { flex: 1; display: flex; flex-direction: column; min-width: 0; background: var(--bg); }
.topbar {
    height: 66px; flex-shrink: 0; background: rgba(255, 255, 255, .86);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
    display: flex; align-items: center; gap: 18px; padding: 0 26px;
    position: relative; z-index: 30;
}
.menu-toggle { display: none; }
.crumb { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-3); letter-spacing: .4px; }
.crumb i { font-size: 9px; color: #b9b3a3; }
.crumb strong { color: var(--ink); font-size: 13.5px; font-weight: 600; letter-spacing: .5px; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.pulse-indicator {
    display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--brand-deep);
    background: var(--brand-soft); padding: 5px 12px; border-radius: 99px; letter-spacing: .5px;
}
.pulse-indicator .dot {
    width: 6px; height: 6px; border-radius: 50%; background: var(--brand);
    box-shadow: 0 0 0 3px rgba(15, 143, 123, .18); animation: pulse 2s infinite;
}
@keyframes pulse { 50% { opacity: .4; } }
.icon-btn {
    width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center;
    color: var(--ink-2); position: relative; transition: background .16s, color .16s;
}
.icon-btn:hover { background: var(--bg-deep); color: var(--ink); }
.icon-btn i { font-size: 16px; }
.badge-dot {
    position: absolute; top: 8px; right: 9px; width: 6px; height: 6px;
    border-radius: 50%; background: var(--danger); border: 1px solid #fff;
}
.user-chip {
    display: flex; align-items: center; gap: 10px; padding: 5px 10px 5px 6px;
    border-radius: 99px; cursor: pointer; position: relative;
    transition: background .16s; margin-left: 6px;
}
.user-chip:hover { background: var(--bg-deep); }
.avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: linear-gradient(145deg, #12766a, #2bb79f);
    color: #eafffa; display: grid; place-items: center;
    font-size: 13px; font-weight: 600; flex-shrink: 0;
}
.avatar.lg { width: 44px; height: 44px; font-size: 17px; }
.user-meta strong { display: block; font-size: 12.5px; line-height: 1.3; }
.user-meta span { font-size: 10.5px; color: var(--ink-3); }
.user-chip > i { font-size: 10px; color: var(--ink-3); }
.user-menu {
    position: absolute; right: 0; top: 52px; width: 262px;
    background: #fff; border-radius: 14px; box-shadow: var(--shadow-lg);
    border: 1px solid var(--line); padding: 8px; display: none;
    animation: dropIn .18s ease;
}
.user-chip.open .user-menu { display: block; }
@keyframes dropIn { from { opacity: 0; transform: translateY(-6px); } }
.user-menu-head { display: flex; gap: 12px; padding: 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.user-menu-head strong { display: block; font-size: 13.5px; }
.user-menu-head span { font-size: 11px; color: var(--ink-3); }
.user-menu a, .user-menu button {
    display: flex; align-items: center; gap: 10px; width: 100%;
    padding: 9px 12px; border-radius: 8px; font-size: 13px; color: var(--ink-2); text-align: left;
}
.user-menu a:hover, .user-menu button:hover { background: var(--surface-2); color: var(--ink); }
.user-menu .ver { padding: 10px 12px 4px; font-size: 10px; color: var(--ink-3); border-top: 1px solid var(--line); margin-top: 6px; }

.main-area { flex: 1; overflow-y: auto; padding: 26px 30px 46px; position: relative; }
.page-loading { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 120px 0; color: var(--ink-3); font-size: 13px; }
.spinner-ring {
    width: 32px; height: 32px; border-radius: 50%;
    border: 2px solid var(--line-strong); border-top-color: var(--brand);
    animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* =========================================================
   页面结构
   ========================================================= */
.page { animation: pageIn .34s ease; }
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } }
.page-head {
    display: flex; align-items: flex-end; gap: 20px; margin-bottom: 22px; flex-wrap: wrap;
}
.page-head .titles { flex: 1; min-width: 240px; }
.page-eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 10px; letter-spacing: 3px; color: var(--gold); font-weight: 600;
    margin-bottom: 7px;
}
.page-eyebrow::before { content: ""; width: 18px; height: 1px; background: var(--gold); }
.page-head h1 { font-size: 24px; letter-spacing: 1px; font-weight: 600; line-height: 1.3; }
.page-head .desc { color: var(--ink-3); font-size: 12.5px; margin-top: 6px; letter-spacing: .3px; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    height: 38px; padding: 0 16px; border-radius: 9px;
    border: 1px solid var(--line-strong); background: #fff; color: var(--ink-2);
    font-size: 13px; white-space: nowrap; transition: all .16s;
}
.btn i { font-size: 14px; }
.btn:hover { border-color: var(--brand); color: var(--brand-deep); background: var(--brand-soft); }
.btn.primary {
    background: linear-gradient(120deg, #0d7c6c, #12a086);
    border-color: transparent; color: #fff;
    box-shadow: 0 12px 24px -14px rgba(13, 124, 108, .9);
}
.btn.primary:hover { filter: brightness(1.05); color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-3); }
.btn.ghost:hover { background: var(--bg-deep); color: var(--ink); }
.btn.danger { color: var(--danger); border-color: #ecd3cf; background: #fff; }
.btn.danger:hover { background: var(--danger-soft); border-color: var(--danger); }
.btn.sm { height: 30px; padding: 0 11px; font-size: 12px; border-radius: 7px; }
.btn.sm i { font-size: 12px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* KPI */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; margin-bottom: 20px; }
.kpi {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 18px 20px 16px; position: relative; overflow: hidden;
    box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s;
}
.kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.kpi::after {
    content: ""; position: absolute; right: -30px; top: -30px; width: 100px; height: 100px;
    border-radius: 50%; background: radial-gradient(circle, rgba(15, 143, 123, .09), transparent 68%);
}
.kpi .k-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.kpi .k-label { font-size: 12px; color: var(--ink-3); letter-spacing: .6px; }
.kpi .k-icon {
    width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center;
    background: var(--brand-soft); color: var(--brand-deep); font-size: 15px;
}
.kpi .k-value {
    font-size: 30px; font-weight: 600; letter-spacing: -.5px; line-height: 1.1;
    font-variant-numeric: tabular-nums;
}
.kpi .k-value small { font-size: 13px; color: var(--ink-3); font-weight: 400; margin-left: 3px; letter-spacing: 0; }
.kpi .k-foot { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 11.5px; color: var(--ink-3); }
.trend-up { color: var(--brand-deep); background: var(--brand-soft); padding: 2px 7px; border-radius: 5px; font-size: 11px; }
.trend-down { color: var(--danger); background: var(--danger-soft); padding: 2px 7px; border-radius: 5px; font-size: 11px; }
.kpi.gold .k-icon { background: var(--gold-soft); color: #8d6c22; }
.kpi.info .k-icon { background: var(--info-soft); color: var(--info); }

/* 卡片 / 网格 */
.grid { display: grid; gap: 16px; }
.grid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.split-23 { grid-template-columns: 1.35fr 1fr; }
.card {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
}
.card-head {
    display: flex; align-items: center; gap: 12px;
    padding: 16px 20px; border-bottom: 1px solid var(--line);
}
.card-head h3 { font-size: 14px; font-weight: 600; letter-spacing: .5px; display: flex; align-items: center; gap: 8px; }
.card-head h3 i { color: var(--brand); font-size: 14px; }
.card-head .hint { font-size: 11.5px; color: var(--ink-3); }
.card-head .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.card-body { padding: 18px 20px; }
.card-body.tight { padding: 10px 12px; }
.card-body.flush { padding: 0; }
.chart { width: 100%; height: 300px; }
.chart.sm { height: 220px; }
.chart.lg { height: 380px; }

/* =========================================================
   筛选条
   ========================================================= */
.filter-bar {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 14px 16px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
    margin-bottom: 16px; box-shadow: var(--shadow-sm);
}
.filter-bar .grow { flex: 1; min-width: 200px; }
.search-box { position: relative; }
.search-box i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--ink-3); font-size: 13px; }
.search-box input {
    width: 100%; height: 38px; border: 1px solid var(--line); background: var(--surface-2);
    border-radius: 9px; padding: 0 12px 0 36px; outline: none; transition: all .16s;
}
.search-box input:focus { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px rgba(15, 143, 123, .09); }
.select {
    height: 38px; border: 1px solid var(--line); background: var(--surface-2);
    border-radius: 9px; padding: 0 30px 0 12px; outline: none; min-width: 120px;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%237d8b85'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center;
    transition: border-color .16s;
}
.select:focus { border-color: var(--brand); }
.filter-divider { width: 1px; height: 24px; background: var(--line); margin: 0 2px; }
.result-meta { font-size: 12px; color: var(--ink-3); margin-left: auto; }
.result-meta b { color: var(--ink); font-weight: 600; }

/* =========================================================
   表格
   ========================================================= */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data thead th {
    background: var(--surface-2); text-align: left; font-weight: 500;
    color: var(--ink-3); font-size: 11.5px; letter-spacing: .6px;
    padding: 11px 16px; white-space: nowrap; border-bottom: 1px solid var(--line);
    position: sticky; top: 0; z-index: 2;
}
table.data tbody td { padding: 13px 16px; border-bottom: 1px solid #f0ede4; vertical-align: middle; }
table.data tbody tr { transition: background .14s; }
table.data tbody tr:hover { background: #f8faf7; }
table.data tbody tr:last-child td { border-bottom: none; }
.cell-name { display: flex; align-items: center; gap: 10px; }
.cell-name .nm { font-weight: 500; color: var(--ink); cursor: pointer; }
.cell-name .nm:hover { color: var(--brand-deep); text-decoration: underline; text-underline-offset: 3px; }
.cell-sub { font-size: 11px; color: var(--ink-3); margin-top: 1px; }
.avatar.sm { width: 30px; height: 30px; font-size: 12px; }
.num { font-variant-numeric: tabular-nums; }
.strong-num { font-weight: 600; font-variant-numeric: tabular-nums; }
.row-actions { display: flex; gap: 4px; justify-content: flex-end; white-space: nowrap; }
.act-btn {
    padding: 4px 9px; border-radius: 6px; font-size: 12px; color: var(--ink-2);
    transition: background .14s, color .14s;
}
.act-btn:hover { background: var(--brand-soft); color: var(--brand-deep); }
.act-btn.danger:hover { background: var(--danger-soft); color: var(--danger); }

/* 状态药丸 */
.pill {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 9px; border-radius: 99px; font-size: 11.5px; line-height: 1.5;
    background: #f1efe8; color: var(--ink-2); white-space: nowrap;
}
.pill::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .8; }
.pill.green { background: var(--brand-soft); color: var(--brand-deep); }
.pill.red { background: var(--danger-soft); color: var(--danger); }
.pill.amber { background: var(--warn-soft); color: var(--warn); }
.pill.blue { background: var(--info-soft); color: var(--info); }
.pill.gray { background: #f0eee7; color: #7b8079; }
.pill.purple { background: #f0edf7; color: #6b5d99; }
.pill.gold { background: var(--gold-soft); color: #8d6c22; }
.pill.plain::before { display: none; }

.tag-chip {
    display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px;
    border-radius: 6px; font-size: 11px; border: 1px solid currentColor;
    opacity: .95; white-space: nowrap;
}

/* 分页 */
.pager {
    display: flex; align-items: center; gap: 6px; padding: 14px 18px;
    border-top: 1px solid var(--line); font-size: 12.5px; color: var(--ink-3);
}
.pager .info { margin-right: auto; }
.pager button {
    min-width: 32px; height: 32px; padding: 0 9px; border-radius: 7px;
    border: 1px solid var(--line); background: #fff; color: var(--ink-2); font-size: 12.5px;
}
.pager button:hover:not(:disabled) { border-color: var(--brand); color: var(--brand-deep); }
.pager button.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.pager button:disabled { opacity: .4; cursor: not-allowed; }

/* =========================================================
   弹窗（叠层）
   ========================================================= */
.modal-layer { position: fixed; inset: 0; z-index: 200; pointer-events: none; }
.modal-mask {
    position: fixed; inset: 0; background: rgba(9, 22, 20, .52);
    backdrop-filter: blur(4px); opacity: 0; transition: opacity .22s;
    pointer-events: auto;
}
.modal-mask.show { opacity: 1; }
.modal {
    position: fixed; left: 50%; top: 50%; transform: translate(-50%, -46%) scale(.98);
    width: min(760px, calc(100vw - 40px)); max-height: 86vh;
    background: #fdfcf9; border-radius: 18px; overflow: hidden;
    box-shadow: var(--shadow-lg); opacity: 0; transition: all .26s cubic-bezier(.2, .8, .3, 1);
    pointer-events: auto; display: flex; flex-direction: column;
    border: 1px solid rgba(255, 255, 255, .6);
}
.modal.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.modal.wide { width: min(1080px, calc(100vw - 40px)); }
.modal.narrow { width: min(520px, calc(100vw - 40px)); }
.modal-head {
    padding: 20px 24px 16px; border-bottom: 1px solid var(--line);
    display: flex; align-items: flex-start; gap: 14px; position: relative;
    background: linear-gradient(180deg, #fff, #fbfaf6);
}
.modal-head::before {
    content: ""; position: absolute; left: 0; top: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--brand), var(--brand-mid) 40%, var(--gold));
    opacity: .85;
}
.modal-head .m-icon {
    width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center;
    background: var(--brand-soft); color: var(--brand-deep); font-size: 18px; flex-shrink: 0;
}
.modal-head h3 { font-size: 16.5px; font-weight: 600; letter-spacing: .6px; }
.modal-head p { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.modal-close {
    margin-left: auto; width: 32px; height: 32px; border-radius: 8px;
    display: grid; place-items: center; color: var(--ink-3);
}
.modal-close:hover { background: var(--bg-deep); color: var(--ink); }
.modal-body { padding: 22px 24px 30px; overflow-y: auto; flex: 1; min-height: 0; }
.modal-body.flush { padding: 0; }
.modal-foot {
    padding: 14px 24px; border-top: 1px solid var(--line);
    display: flex; justify-content: flex-end; gap: 10px; background: #fbfaf6;
}
.modal-foot .left { margin-right: auto; display: flex; gap: 8px; }

/* 详情头部 */
.detail-hero {
    padding: 22px 24px; display: flex; gap: 18px; align-items: center;
    background: linear-gradient(120deg, #0e2320, #123a33 62%, #0e2a25);
    color: #eaf5f1; position: relative; overflow: hidden;
}
.detail-hero::after {
    content: ""; position: absolute; right: -60px; top: -60px; width: 240px; height: 240px;
    border-radius: 50%; border: 1px solid rgba(53, 189, 164, .25);
    box-shadow: inset 0 0 60px rgba(53, 189, 164, .1);
}
.detail-hero .avatar { width: 58px; height: 58px; font-size: 22px; background: linear-gradient(145deg, #1d8d7c, #47d3b8); color: #04211c; }
.detail-hero h2 { font-size: 19px; letter-spacing: 1px; font-weight: 600; }
.detail-hero .meta { font-size: 11.5px; color: #8fb3ab; margin-top: 4px; display: flex; gap: 14px; flex-wrap: wrap; }
.detail-hero .score-box { margin-left: auto; text-align: right; position: relative; z-index: 1; }
.detail-hero .score-box strong { font-size: 34px; font-weight: 600; color: #7ce3cb; font-variant-numeric: tabular-nums; }
.detail-hero .score-box span { display: block; font-size: 10px; letter-spacing: 2px; color: #7ea39b; }

/* TAB */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); padding: 0 24px; background: #fff; overflow-x: auto; }
.tab {
    padding: 13px 14px; font-size: 13px; color: var(--ink-3); position: relative; white-space: nowrap;
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--brand-deep); font-weight: 500; }
.tab.active::after {
    content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px;
    background: var(--brand); border-radius: 2px;
}
.tab-pane { display: none; padding: 20px 24px; }
.tab-pane.active { display: block; animation: pageIn .2s; }

/* 信息栅格 */
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px 22px; }
.info-item label { display: block; font-size: 11px; color: var(--ink-3); letter-spacing: .6px; margin-bottom: 4px; }
.info-item div { font-size: 13.5px; color: var(--ink); }
.info-item.wide { grid-column: 1 / -1; }
.sep { height: 1px; background: var(--line); margin: 18px 0; }
.mini-title { font-size: 12px; color: var(--ink-2); font-weight: 600; letter-spacing: .5px; margin-bottom: 12px; display: flex; align-items: center; gap: 7px; }
.mini-title i { color: var(--brand); }

/* 表单 */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.form-grid .full { grid-column: 1 / -1; }
.form-item label { display: block; font-size: 12px; color: var(--ink-2); margin-bottom: 6px; }
.form-item label em { color: var(--danger); font-style: normal; margin-left: 2px; }
.form-item input, .form-item select, .form-item textarea {
    width: 100%; border: 1px solid var(--line-strong); border-radius: 9px;
    padding: 0 12px; height: 40px; outline: none; background: #fff; transition: all .16s;
}
.form-item textarea { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.7; }
.form-item input:focus, .form-item select:focus, .form-item textarea:focus {
    border-color: var(--brand); box-shadow: 0 0 0 3px rgba(15, 143, 123, .1);
}
.form-item .tip { font-size: 11px; color: var(--ink-3); margin-top: 4px; }
.form-section {
    grid-column: 1 / -1; font-size: 12px; color: var(--brand-deep); font-weight: 600;
    padding: 6px 0 2px; border-bottom: 1px dashed var(--line);
    display: flex; align-items: center; gap: 7px;
}

/* 空态 */
.empty { text-align: center; padding: 56px 20px; color: var(--ink-3); }
.empty i { font-size: 34px; color: #cfcaba; display: block; margin-bottom: 12px; }
.empty p { font-size: 13px; }
.empty .sub { font-size: 11.5px; margin-top: 4px; color: #a8a397; }

/* Toast */
.toast-wrap { position: fixed; top: 22px; left: 50%; transform: translateX(-50%); z-index: 400; display: flex; flex-direction: column; gap: 10px; align-items: center; pointer-events: none; }
.toast {
    display: flex; align-items: center; gap: 9px; padding: 11px 20px;
    background: #10211e; color: #e9f6f2; border-radius: 10px; font-size: 13px;
    box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .6);
    animation: toastIn .24s ease; pointer-events: auto;
}
.toast i { font-size: 15px; color: #4fd6ba; }
.toast.error i { color: #f08a7d; }
.toast.out { animation: toastOut .22s forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-12px) scale(.97); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-8px); } }

/* 确认框 */
.confirm-box { text-align: center; padding: 8px 4px; }
.confirm-box .c-icon {
    width: 52px; height: 52px; border-radius: 50%; margin: 0 auto 16px;
    display: grid; place-items: center; background: var(--warn-soft); color: var(--warn); font-size: 22px;
}
.confirm-box h4 { font-size: 15px; margin-bottom: 8px; }
.confirm-box p { font-size: 12.5px; color: var(--ink-3); line-height: 1.8; }

/* =========================================================
   业务组件
   ========================================================= */
.hero-panel {
    background: linear-gradient(118deg, #0e2421 0%, #14332d 55%, #0f2723 100%);
    border-radius: 18px; padding: 26px 30px; color: #e9f5f1; position: relative;
    overflow: hidden; margin-bottom: 20px; box-shadow: var(--shadow);
}
.hero-panel::before {
    content: ""; position: absolute; inset: 0;
    background-image: radial-gradient(circle at 85% 20%, rgba(53, 189, 164, .28), transparent 45%),
        linear-gradient(rgba(255, 255, 255, .03) 1px, transparent 1px);
    background-size: auto, 100% 38px;
}
.hero-panel .inner { position: relative; z-index: 1; display: flex; align-items: center; gap: 34px; flex-wrap: wrap; }
.hero-panel h2 { font-size: 22px; letter-spacing: 1.5px; font-weight: 600; }
.hero-panel .hello { font-size: 12px; color: #80a49c; letter-spacing: 2px; margin-bottom: 8px; }
.hero-panel .sub { font-size: 12.5px; color: #8fb3ab; margin-top: 8px; max-width: 520px; line-height: 1.9; }
.hero-stats { display: flex; gap: 40px; margin-left: auto; }
.hero-stats .hs strong { font-size: 26px; font-weight: 600; color: #85e7d1; font-variant-numeric: tabular-nums; }
.hero-stats .hs span { display: block; font-size: 11px; color: #7b9d96; letter-spacing: 1px; }

.quick-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.quick-item {
    border: 1px solid var(--line); border-radius: 12px; padding: 16px;
    display: flex; flex-direction: column; gap: 10px; background: #fff;
    transition: all .18s; position: relative; overflow: hidden;
}
.quick-item:hover { border-color: var(--brand); transform: translateY(-2px); box-shadow: var(--shadow); }
.quick-item i { font-size: 19px; color: var(--brand); }
.quick-item strong { font-size: 13px; font-weight: 500; }
.quick-item span { font-size: 11px; color: var(--ink-3); }

.todo-list { display: flex; flex-direction: column; }
.todo-item {
    display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--line);
    align-items: flex-start;
}
.todo-item:last-child { border-bottom: none; }
.todo-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; flex-shrink: 0; background: var(--brand); }
.todo-dot.red { background: var(--danger); }
.todo-dot.amber { background: var(--warn); }
.todo-item .t-main { flex: 1; min-width: 0; }
.todo-item .t-title { font-size: 13px; }
.todo-item .t-meta { font-size: 11px; color: var(--ink-3); margin-top: 2px; }
.todo-item .t-time { font-size: 11px; color: var(--ink-3); white-space: nowrap; }

.timeline { position: relative; padding-left: 22px; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 1px; background: var(--line-strong); }
.tl-item { position: relative; padding-bottom: 18px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
    content: ""; position: absolute; left: -21px; top: 5px; width: 9px; height: 9px;
    border-radius: 50%; background: #fff; border: 2px solid var(--brand);
}
.tl-item.warn::before { border-color: var(--warn); }
.tl-item.danger::before { border-color: var(--danger); }
.tl-title { font-size: 13px; }
.tl-meta { font-size: 11px; color: var(--ink-3); margin-top: 2px; }

.progress { height: 6px; background: #eeece3; border-radius: 99px; overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--brand), var(--brand-mid)); }
.progress.gold > i { background: linear-gradient(90deg, #b8913c, #dfc177); }
.progress.red > i { background: linear-gradient(90deg, #a94a3f, #cf7a6d); }

.seg-bar { display: flex; height: 8px; border-radius: 99px; overflow: hidden; background: #eeece3; }
.seg-bar span { display: block; height: 100%; }

.stat-list { display: flex; flex-direction: column; gap: 14px; }
.stat-row { display: flex; align-items: center; gap: 12px; font-size: 12.5px; }
.stat-row .lbl { width: 96px; color: var(--ink-2); flex-shrink: 0; }
.stat-row .bar { flex: 1; }
.stat-row .val { width: 52px; text-align: right; color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* 卡片型列表 */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.obj-card {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: 18px; transition: all .18s; position: relative; overflow: hidden;
}
.obj-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #d8d3c4; }
.obj-card::before {
    content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
    background: linear-gradient(180deg, var(--brand), transparent);
}
.obj-card .oc-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.obj-card .oc-title { font-size: 14.5px; font-weight: 600; }
.obj-card .oc-sub { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }
.obj-card .oc-desc { font-size: 12.5px; color: var(--ink-2); line-height: 1.75; min-height: 44px; }
.obj-card .oc-foot {
    display: flex; align-items: center; gap: 10px; margin-top: 14px; padding-top: 12px;
    border-top: 1px dashed var(--line); font-size: 11.5px; color: var(--ink-3);
}
.obj-card .oc-foot .right { margin-left: auto; display: flex; gap: 4px; }
.mini-kv { display: flex; gap: 20px; margin-top: 10px; }
.mini-kv div { font-size: 11px; color: var(--ink-3); }
.mini-kv strong { display: block; font-size: 16px; color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }

/* 规则卡 */
.rule-card { border-left: 3px solid var(--brand); }
.rule-card.high { border-left-color: var(--danger); }
.rule-card.mid { border-left-color: var(--warn); }
.rule-card.low { border-left-color: var(--info); }

/* 评分星 */
.stars { color: var(--gold); font-size: 12px; letter-spacing: 1px; }

/* 分段控件 */
.segmented { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 9px; padding: 3px; gap: 2px; }
.segmented button { padding: 5px 13px; border-radius: 7px; font-size: 12px; color: var(--ink-3); }
.segmented button.active { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }

/* 热度 / 标签云 */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 10px; }
.tag-cloud .cloud-item {
    display: flex; align-items: center; gap: 8px; padding: 10px 15px;
    border: 1px solid var(--line); border-radius: 10px; background: #fff;
    font-size: 12.5px; transition: all .16s; cursor: pointer;
}
.tag-cloud .cloud-item:hover { border-color: var(--brand); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.tag-cloud .cloud-item b { font-size: 15px; font-weight: 600; }
.tag-cloud .cloud-item small { color: var(--ink-3); font-size: 11px; }

/* 时间轴（热力图例） */
.heat-legend { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--ink-3); }
.heat-scale { display: flex; gap: 3px; }
.heat-scale i { width: 12px; height: 12px; border-radius: 3px; display: block; }

/* 表格内的小进度 */
.inline-bar { display: flex; align-items: center; gap: 8px; min-width: 110px; }
.inline-bar .progress { flex: 1; height: 5px; }
.inline-bar span { font-size: 11.5px; color: var(--ink-3); width: 34px; text-align: right; font-variant-numeric: tabular-nums; }

/* 选中栏 */
.bulk-bar {
    display: flex; align-items: center; gap: 12px; padding: 10px 16px;
    background: var(--brand-soft); border-bottom: 1px solid #cfe8e1; font-size: 12.5px; color: var(--brand-deep);
}
.bulk-bar .right { margin-left: auto; display: flex; gap: 8px; }

/* 文件/报告预览 */
.report-paper {
    background: #fff; border: 1px solid var(--line); border-radius: 12px;
    padding: 28px 32px; font-size: 13px; line-height: 2; color: var(--ink-2);
}
.report-paper h2 { font-size: 19px; color: var(--ink); letter-spacing: 1px; text-align: center; margin-bottom: 6px; }
.report-paper .report-meta { text-align: center; font-size: 11px; color: var(--ink-3); margin-bottom: 22px; }
.report-paper h4 { font-size: 13.5px; color: var(--brand-deep); margin: 18px 0 6px; }
.report-paper p { margin-bottom: 8px; }

/* 分栏详情 */
.two-col { display: grid; grid-template-columns: 1.4fr 1fr; gap: 22px; }

/* 响应式 */
@media (max-width: 1280px) {
    .grid.split-23 { grid-template-columns: 1fr; }
    .two-col { grid-template-columns: 1fr; }
}
@media (max-width: 1100px) {
    .sidebar { position: fixed; left: 0; top: 0; bottom: 0; margin-left: -260px; box-shadow: var(--shadow-lg); }
    .sidebar.open { margin-left: 0; }
    .menu-toggle { display: grid; }
    .main-area { padding: 20px 18px 40px; }
    .auth-visual { display: none; }
    .auth-panel { width: 100%; }
}
@media (max-width: 760px) {
    .grid.c2, .grid.c3 { grid-template-columns: 1fr; }
    .kpi-grid { grid-template-columns: repeat(2, 1fr); }
    .form-grid { grid-template-columns: 1fr; }
    .topbar { padding: 0 14px; gap: 10px; }
    .pulse-indicator, .user-meta, .crumb span { display: none; }
    .page-head h1 { font-size: 20px; }
    .page-actions { width: 100%; }
    .hero-stats { margin-left: 0; gap: 26px; }
}

/* ===== 补充：组织树与权限树 ===== */
.org-row { border-radius: 8px; transition: background .15s; }
.org-row:hover { background: #f8faf7; }
.menu-tree label { cursor: pointer; user-select: none; }
.menu-tree label:hover { color: #0a6357; }
.menu-tree input[type=checkbox] { accent-color: #0f8f7b; width: 14px; height: 14px; }

/* ===== 补充：日期输入 ===== */
input[type=date] { color: #47574f; }
input[type=date]::-webkit-calendar-picker-indicator { opacity: .5; cursor: pointer; }

/* ===== 补充：详情弹窗内滚动区 ===== */
.tab-body { padding-bottom: 4px; }
.detail-hero + .tabs { position: sticky; top: 0; z-index: 3; }

/* ===== 补充：卡片标题省略 ===== */
.obj-card .oc-title { overflow: hidden; text-overflow: ellipsis; }

/* ===== 补充：表格最小宽度与列防挤压 ===== */
table.data { min-width: 900px; }
table.data thead th, table.data tbody td { white-space: nowrap; }
.cell-name .nm, .cell-sub { white-space: nowrap; }
table.data td .ellipsis { display: block; max-width: 320px; overflow: hidden; text-overflow: ellipsis; }



/* ===== 补充：固定操作列与文本换行 ===== */
table.data .sticky-col { background: #fff; }
table.data tbody tr:hover .sticky-col { background: #f8faf7; }
.info-item div { overflow-wrap: anywhere; word-break: break-word; }
.stars { white-space: nowrap; }
.tab-body { padding-bottom: 4px; }





/* ===== 补充：中等视口表格紧凑模式 ===== */
@media (max-width: 1280px) {
    table.data { font-size: 12.5px; min-width: 860px; }
    table.data thead th, table.data tbody td { padding: 10px 11px; }
    .act-btn { padding: 3px 6px; font-size: 11.5px; }
    table.data .avatar.sm { width: 26px; height: 26px; font-size: 11px; }
    .row-actions { gap: 2px; }
}

/* ===== 补充：窄视口操作按钮进一步压缩 ===== */
@media (max-width: 1280px) {
    .row-actions .act-btn { padding: 3px 5px; font-size: 11px; }
    table.data { letter-spacing: -.1px; }
}
