/* ==========================================================================
   基础：设计变量、重置、背景光斑、毛玻璃
   管理员后台主色靛蓝，机构后台主色青绿（.area-agent 覆盖 --primary）
   ========================================================================== */

:root {
    color-scheme: light;
    --font: "Inter", "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
    --mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;

    --bg: #eef1f8;
    --text: #0f172a;
    --text-2: #475569;
    --text-3: #94a3b8;
    --line: rgba(15, 23, 42, .07);
    --line-strong: rgba(15, 23, 42, .13);

    --glass: rgba(255, 255, 255, .58);
    --glass-strong: rgba(255, 255, 255, .8);
    --glass-border: rgba(255, 255, 255, .72);
    --blur: blur(22px) saturate(170%);

    --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
    --shadow: 0 8px 28px rgba(30, 41, 89, .08);
    --shadow-lg: 0 28px 70px rgba(30, 41, 89, .18);

    --radius-lg: 22px;
    --radius: 16px;
    --radius-sm: 11px;
    --radius-xs: 8px;

    --primary: #4f46e5;
    --primary-2: #7c3aed;
    --primary-600: #4338ca;
    --primary-soft: rgba(79, 70, 229, .1);
    --primary-ring: rgba(79, 70, 229, .22);

    --ok: #059669;
    --ok-soft: rgba(5, 150, 105, .11);
    --warn: #d97706;
    --warn-soft: rgba(217, 119, 6, .12);
    --danger: #dc2626;
    --danger-soft: rgba(220, 38, 38, .1);
    --info: #0284c7;
    --info-soft: rgba(2, 132, 199, .1);

    --sidebar-w: 248px;
    --gap: 18px;
}

.area-agent {
    --primary: #0d9488;
    --primary-2: #0891b2;
    --primary-600: #0f766e;
    --primary-soft: rgba(13, 148, 136, .11);
    --primary-ring: rgba(13, 148, 136, .24);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

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

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.55;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, p { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
img { max-width: 100%; display: block; }
code, pre, .mono { font-family: var(--mono); font-size: 12.5px; }
small { font-size: 12px; }

:focus-visible { outline: 3px solid var(--primary-ring); outline-offset: 2px; }

::selection { background: var(--primary-soft); }

/* ---------- 背景光斑（固定在视口后方，毛玻璃透出色彩） ---------- */
.backdrop {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    background:
        radial-gradient(1200px 600px at 100% 0%, #e0e7ff 0%, transparent 60%),
        radial-gradient(900px 700px at 0% 100%, #dbeafe 0%, transparent 55%),
        var(--bg);
}
.backdrop i {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    opacity: .55;
}
.backdrop i:nth-child(1) { width: 520px; height: 520px; left: -120px; top: -140px; background: #a5b4fc; }
.backdrop i:nth-child(2) { width: 460px; height: 460px; right: -100px; top: 30%; background: #93c5fd; }
.backdrop i:nth-child(3) { width: 420px; height: 420px; left: 35%; bottom: -200px; background: #f0abfc; opacity: .35; }

.area-agent .backdrop {
    background:
        radial-gradient(1200px 600px at 100% 0%, #ccfbf1 0%, transparent 60%),
        radial-gradient(900px 700px at 0% 100%, #cffafe 0%, transparent 55%),
        var(--bg);
}
.area-agent .backdrop i:nth-child(1) { background: #5eead4; }
.area-agent .backdrop i:nth-child(2) { background: #7dd3fc; }
.area-agent .backdrop i:nth-child(3) { background: #a7f3d0; }

/* ---------- 毛玻璃面板 ---------- */
.glass {
    background: var(--glass);
    -webkit-backdrop-filter: var(--blur);
    backdrop-filter: var(--blur);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow);
}

/* 不支持 backdrop-filter 的浏览器提高不透明度，保证可读 */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .glass { background: var(--glass-strong); }
}

/* ---------- 图标 ---------- */
.icon {
    width: 20px;
    height: 20px;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.icon-sm { width: 16px; height: 16px; }

/* ---------- 文字工具 ---------- */
.muted { color: var(--text-2); }
.strong { font-weight: 600; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.text-ok { color: var(--ok); }
.text-danger { color: var(--danger); }
.link { color: var(--primary); font-weight: 500; font-size: 13px; }
.link:hover { text-decoration: underline; }
