/* ============================================================
   USL 统一登录系统 · 样式表
   零外部依赖，可直接内网部署
   ============================================================ */

:root {
    --bg: #F4F6FA;
    --surface: #FFFFFF;
    --surface-2: #FAFBFD;
    --border: #E4E8EF;
    --border-strong: #D2D9E4;
    --text: #1B2432;
    --text-2: #5A6577;
    --text-3: #8B95A7;
    --accent: #185FA5;
    --accent-hover: #124B84;
    --accent-weak: #EAF2FB;
    --success: #0F6E56;
    --success-weak: #E1F5EE;
    --warn: #854F0B;
    --warn-weak: #FAEEDA;
    --danger: #A32D2D;
    --danger-weak: #FCEBEB;
    --purple: #534AB7;
    --purple-weak: #EEEDFE;
    --radius: 10px;
    --radius-lg: 14px;
    --shadow-sm: 0 1px 2px rgba(16, 24, 40, .04);
    --shadow-md: 0 4px 16px rgba(16, 24, 40, .07);
    --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
    --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
            "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
hr { border: 0; border-top: 1px solid var(--border); margin: 20px 0; }

h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.35; }
h1 { font-size: 20px; }
h2 { font-size: 17px; }
h3 { font-size: 15px; }
p { margin: 0 0 12px; }

code, pre, .mono { font-family: var(--mono); font-size: 12.5px; }

/* ---------------------------------------------------------- 布局 */
.app { display: flex; min-height: 100vh; }

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 232px;
    background: var(--surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 30;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 18px;
    height: 58px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.brand-mark {
    width: 30px; height: 30px;
    border-radius: 8px;
    background: var(--accent);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 700; letter-spacing: .5px;
    flex-shrink: 0;
}

.brand-text { font-size: 14px; font-weight: 600; line-height: 1.2; }
.brand-text small { display: block; font-size: 11px; font-weight: 400; color: var(--text-3); margin-top: 1px; }

.sidebar-nav { flex: 1; overflow-y: auto; padding: 12px 10px 24px; }

.nav-group { margin-bottom: 4px; }

.nav-group-title {
    padding: 12px 10px 6px;
    font-size: 11px;
    color: var(--text-3);
    letter-spacing: .6px;
    font-weight: 500;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 10px;
    border-radius: 7px;
    color: var(--text-2);
    font-size: 13.5px;
    margin-bottom: 1px;
    position: relative;
    transition: background .12s, color .12s;
}
.nav-item:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.nav-item.active { background: var(--accent-weak); color: var(--accent); font-weight: 500; }
.nav-item.active::before {
    content: '';
    position: absolute; left: -10px; top: 8px; bottom: 8px;
    width: 3px; border-radius: 0 3px 3px 0; background: var(--accent);
}
.nav-item svg { width: 16px; height: 16px; opacity: .8; flex-shrink: 0; }
.nav-item .count {
    margin-left: auto;
    background: var(--danger);
    color: #fff;
    font-size: 10.5px;
    padding: 0 6px;
    border-radius: 8px;
    line-height: 16px;
}

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

.topbar {
    height: 58px;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 20;
}

.topbar-title { font-size: 14px; font-weight: 600; }
.topbar-crumb { color: var(--text-3); font-size: 12.5px; }
.topbar-spacer { flex: 1; }

.user-chip {
    display: flex; align-items: center; gap: 8px;
    padding: 5px 8px 5px 5px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: var(--surface);
    cursor: pointer;
    font-size: 13px;
    color: var(--text-2);
    position: relative;
}
.user-chip:hover { border-color: var(--border-strong); }

.avatar {
    width: 26px; height: 26px; border-radius: 50%;
    background: var(--accent-weak); color: var(--accent);
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 600; flex-shrink: 0;
    overflow: hidden;
}
.avatar.lg { width: 56px; height: 56px; font-size: 20px; }
.avatar.xs { width: 22px; height: 22px; font-size: 10px; }

.dropdown { position: relative; }
.dropdown-menu {
    position: absolute; right: 0; top: calc(100% + 6px);
    min-width: 168px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 5px;
    display: none;
    z-index: 50;
}
.dropdown.open .dropdown-menu { display: block; }
.dropdown-menu a, .dropdown-menu button {
    display: block; width: 100%; text-align: left;
    padding: 7px 10px; border-radius: 6px; border: 0; background: none;
    font-size: 13px; color: var(--text-2); cursor: pointer; font-family: inherit;
}
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.dropdown-menu .danger { color: var(--danger); }
.dropdown-sep { height: 1px; background: var(--border); margin: 5px 0; }

.content { padding: 24px 28px 40px; max-width: none; width: 100%; }

@media (min-width: 1680px) {
    .content { padding: 28px 36px 48px; }
}

.page-head {
    display: flex; align-items: flex-start; gap: 16px;
    margin-bottom: 20px; flex-wrap: wrap;
}
.page-head h1 { font-size: 20px; }
.page-head .sub { color: var(--text-3); font-size: 13px; margin-top: 3px; }
.page-head-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------------------------------------------------------- 卡片 */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 18px;
    overflow: hidden;
}
.card-head {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; gap: 10px;
    background: var(--surface);
}
.card-head h2, .card-head h3 { font-size: 14px; font-weight: 600; }
.card-head .sub { font-size: 12.5px; color: var(--text-3); }
.card-head-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.card-body { padding: 18px; }
.card-body.tight { padding: 0; }
.card-foot { padding: 12px 18px; border-top: 1px solid var(--border); background: var(--surface-2); }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-side { grid-template-columns: minmax(0, 1fr) 340px; }

@media (max-width: 1080px) {
    .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-side, .grid-3 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
    .sidebar { display: none; }
    .main { margin-left: 0; }
    .grid-2, .grid-4 { grid-template-columns: minmax(0, 1fr); }
    .content { padding: 16px; }
}

/* ---------------------------------------------------------- 统计卡 */
.stat {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px 18px;
    box-shadow: var(--shadow-sm);
}
.stat-label { font-size: 12.5px; color: var(--text-3); display: flex; align-items: center; gap: 6px; }
.stat-value { font-size: 26px; font-weight: 600; margin: 6px 0 2px; letter-spacing: -.3px; }
.stat-foot { font-size: 12px; color: var(--text-3); }
.stat-value .unit { font-size: 13px; font-weight: 400; color: var(--text-3); margin-left: 3px; }

/* ---------------------------------------------------------- 按钮 */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    height: 34px; padding: 0 14px;
    border-radius: 8px;
    border: 1px solid var(--border-strong);
    background: var(--surface);
    color: var(--text);
    font-size: 13.5px; font-family: inherit; font-weight: 500;
    cursor: pointer;
    transition: all .12s;
    white-space: nowrap;
    text-decoration: none;
}
.btn:hover { background: var(--surface-2); border-color: var(--border-strong); text-decoration: none; color: var(--text); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: #8f2727; border-color: #8f2727; color: #fff; }
.btn-ghost { border-color: transparent; background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12.5px; border-radius: 7px; }
.btn-lg { height: 40px; padding: 0 20px; font-size: 14px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-icon { width: 34px; padding: 0; }
.btn-icon.btn-sm { width: 28px; }

/* ---------------------------------------------------------- 徽标 */
.badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 1px 8px; border-radius: 20px;
    font-size: 11.5px; font-weight: 500; line-height: 19px;
    background: var(--surface-2); color: var(--text-2);
    border: 1px solid var(--border);
    white-space: nowrap;
}
.badge-success { background: var(--success-weak); color: var(--success); border-color: transparent; }
.badge-warn { background: var(--warn-weak); color: var(--warn); border-color: transparent; }
.badge-danger { background: var(--danger-weak); color: var(--danger); border-color: transparent; }
.badge-info { background: var(--accent-weak); color: var(--accent); border-color: transparent; }
.badge-purple { background: var(--purple-weak); color: var(--purple); border-color: transparent; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; display: inline-block; }

/* ---------------------------------------------------------- 表格 */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data th {
    text-align: left; font-weight: 500; color: var(--text-3); font-size: 12.5px;
    padding: 10px 14px; background: var(--surface-2);
    border-bottom: 1px solid var(--border); white-space: nowrap;
}
table.data td {
    padding: 11px 14px; border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: var(--surface-2); }
table.data .num { font-variant-numeric: tabular-nums; }
table.data .actions { text-align: right; white-space: nowrap; }
table.data .actions a, table.data .actions button { margin-left: 6px; }
.cell-main { font-weight: 500; color: var(--text); }
.cell-sub { font-size: 12px; color: var(--text-3); margin-top: 1px; }

.kv { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.kv th { text-align: left; color: var(--text-3); font-weight: 400; padding: 9px 0; width: 120px; vertical-align: top; }
.kv td { padding: 9px 0; }

/* ---------------------------------------------------------- 表单 */
.field { margin-bottom: 16px; }
.label {
    display: block; font-size: 13px; font-weight: 500;
    margin-bottom: 6px; color: var(--text);
}
.label .req { color: var(--danger); margin-left: 2px; }
.hint { font-size: 12px; color: var(--text-3); margin-top: 5px; line-height: 1.55; }
.input, .select, .textarea {
    width: 100%;
    height: 36px;
    padding: 0 11px;
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
    font-size: 13.5px;
    font-family: inherit;
    transition: border-color .12s, box-shadow .12s;
}
.textarea { height: auto; min-height: 84px; padding: 9px 11px; resize: vertical; line-height: 1.6; }
.input:focus, .select:focus, .textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(24, 95, 165, .12);
}
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.input[readonly] { background: var(--surface-2); color: var(--text-2); }
.mono-input { font-family: var(--mono); font-size: 12.5px; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.form-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 16px; }
@media (max-width: 760px) {
    .form-grid, .form-grid-3 { grid-template-columns: minmax(0, 1fr); }
}

.check { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; cursor: pointer; }
.check input { width: 15px; height: 15px; accent-color: var(--accent); }
.check-list { display: flex; flex-wrap: wrap; gap: 10px 18px; max-height: 220px; overflow-y: auto; padding: 4px 2px; }

.form-actions {
    display: flex; gap: 10px; align-items: center;
    padding-top: 6px; margin-top: 4px;
}
.form-actions .right { margin-left: auto; }

/* 开关 */
.switch { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-size: 13.5px; }
.switch input { display: none; }
.switch .track {
    width: 38px; height: 21px; border-radius: 12px;
    background: #CFD7E3; position: relative; transition: background .15s; flex-shrink: 0;
}
.switch .track::after {
    content: ''; position: absolute; top: 2px; left: 2px;
    width: 17px; height: 17px; border-radius: 50%; background: #fff;
    transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.15);
}
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { transform: translateX(17px); }

/* 单选卡片 */
.radio-cards { display: grid; gap: 10px; }
.radio-card {
    display: flex; gap: 10px; align-items: flex-start;
    padding: 12px 14px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all .12s;
}
.radio-card:hover { border-color: var(--accent); }
.radio-card input { margin-top: 3px; accent-color: var(--accent); }
.radio-card .t { font-size: 13.5px; font-weight: 500; }
.radio-card .d { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.radio-card.on { border-color: var(--accent); background: var(--accent-weak); }

/* ---------------------------------------------------------- 提示条 */
.alert {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 11px 14px;
    border-radius: var(--radius);
    font-size: 13.5px;
    margin-bottom: 16px;
    border: 1px solid transparent;
    line-height: 1.6;
}
.alert-success { background: var(--success-weak); color: var(--success); }
.alert-error { background: var(--danger-weak); color: var(--danger); }
.alert-warn { background: var(--warn-weak); color: var(--warn); }
.alert-info { background: var(--accent-weak); color: var(--accent); }
.alert .close { margin-left: auto; cursor: pointer; opacity: .5; background: none; border: 0; font-size: 16px; color: inherit; line-height: 1; }
.alert .close:hover { opacity: 1; }

/* ---------------------------------------------------------- 标签页 */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 20px; overflow-x: auto; }
.tab {
    padding: 9px 14px;
    font-size: 13.5px;
    color: var(--text-2);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    white-space: nowrap;
    text-decoration: none;
}
.tab:hover { color: var(--text); text-decoration: none; }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 500; }

/* 分段控件 */
.segmented { display: inline-flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 2px; }
.segmented a, .segmented button {
    padding: 4px 12px; border-radius: 6px; font-size: 12.5px;
    color: var(--text-2); border: 0; background: none; cursor: pointer; font-family: inherit;
}
.segmented a.active, .segmented button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); font-weight: 500; }
.segmented a:hover { text-decoration: none; }

/* ---------------------------------------------------------- 分页 */
.pager { display: flex; gap: 6px; align-items: center; padding: 14px 18px; flex-wrap: wrap; }
.pager .info { font-size: 12.5px; color: var(--text-3); margin-right: auto; }
.pager a, .pager span {
    min-width: 30px; height: 30px; padding: 0 8px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--border); border-radius: 7px;
    font-size: 13px; color: var(--text-2); background: var(--surface);
}
.pager a:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.pager .current { background: var(--accent); border-color: var(--accent); color: #fff; }
.pager .disabled { opacity: .45; pointer-events: none; }

/* ---------------------------------------------------------- 空状态 */
.empty { text-align: center; padding: 44px 20px; color: var(--text-3); }
.empty .icon { font-size: 30px; opacity: .35; margin-bottom: 10px; }
.empty .t { font-size: 14px; color: var(--text-2); margin-bottom: 4px; }
.empty .d { font-size: 12.5px; margin-bottom: 14px; }

/* ---------------------------------------------------------- 应用卡片 */
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 14px; }
.app-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
    display: flex; flex-direction: column; gap: 10px;
    transition: border-color .12s, box-shadow .12s;
    color: inherit;
}
.app-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); text-decoration: none; }
.app-card-head { display: flex; gap: 11px; align-items: center; }
.app-logo {
    width: 38px; height: 38px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; font-weight: 600; flex-shrink: 0; overflow: hidden;
}
.app-logo img { width: 100%; height: 100%; object-fit: cover; }
.app-name { font-size: 14px; font-weight: 600; color: var(--text); line-height: 1.3; }
.app-desc { font-size: 12.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; min-height: 34px; }
.app-meta { display: flex; gap: 12px; font-size: 12px; color: var(--text-3); border-top: 1px solid var(--border); padding-top: 10px; margin-top: auto; }

.tile {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 9px; padding: 20px 12px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-lg); color: var(--text);
    transition: all .12s; text-align: center;
}
.tile:hover { border-color: var(--accent); box-shadow: var(--shadow-md); text-decoration: none; transform: translateY(-1px); }
.tile .name { font-size: 13px; font-weight: 500; }
.tile .sub { font-size: 11.5px; color: var(--text-3); }

/* ---------------------------------------------------------- 文档区 */
.md { font-size: 14px; line-height: 1.75; color: var(--text); }
.md h1 { font-size: 22px; margin: 8px 0 16px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.md h2 { font-size: 17px; margin: 28px 0 12px; padding-left: 10px; border-left: 3px solid var(--accent); }
.md h3 { font-size: 15px; margin: 20px 0 8px; }
.md h4 { font-size: 14px; margin: 16px 0 6px; color: var(--text-2); }
.md p { margin: 0 0 12px; }
.md ul, .md ol { margin: 0 0 14px; padding-left: 22px; }
.md li { margin-bottom: 5px; }
.md li.md-task { list-style: none; margin-left: -20px; }
.md blockquote {
    margin: 0 0 14px; padding: 10px 14px;
    background: var(--warn-weak); color: var(--warn);
    border-left: 3px solid #EF9F27; border-radius: 0 8px 8px 0;
    font-size: 13px;
}
.md code {
    background: #F1F4F9; color: #B4355C;
    padding: 1px 5px; border-radius: 4px; font-size: 12.5px;
}
.md a { color: var(--accent); }
.md-table { overflow-x: auto; margin-bottom: 16px; }
.md-table table { width: 100%; border-collapse: collapse; font-size: 13px; }
.md-table th { background: var(--surface-2); text-align: left; padding: 8px 12px; border: 1px solid var(--border); font-weight: 500; color: var(--text-2); }
.md-table td { padding: 8px 12px; border: 1px solid var(--border); vertical-align: top; }

.md-code { margin-bottom: 16px; border-radius: var(--radius); overflow: hidden; border: 1px solid #E1E6EF; }
.md-code-bar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 5px 12px; background: #F7F9FC; border-bottom: 1px solid #E1E6EF;
    font-size: 11.5px; color: var(--text-3); font-family: var(--mono);
}
.md-copy {
    border: 0; background: none; color: var(--text-2); cursor: pointer;
    font-size: 11.5px; font-family: inherit; padding: 2px 6px; border-radius: 4px;
}
.md-copy:hover { background: #E9EEF6; color: var(--accent); }
.md-code pre { margin: 0; padding: 13px 15px; background: #FBFCFE; overflow-x: auto; }
.md-code code { background: none; color: #24313F; padding: 0; font-size: 12.5px; line-height: 1.7; }

/* 文档侧栏 */
.doc-shell { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
@media (max-width: 1080px) { .doc-shell { grid-template-columns: minmax(0, 1fr); } }
.doc-aside { position: sticky; top: 76px; }

.secret-box {
    display: flex; align-items: center; gap: 8px;
    background: var(--surface-2); border: 1px dashed var(--border-strong);
    border-radius: 8px; padding: 8px 10px;
    font-family: var(--mono); font-size: 12px; color: var(--text-2);
    word-break: break-all;
}
.secret-box .val { flex: 1; }

.code-block {
    background: #FBFCFE; border: 1px solid var(--border);
    border-radius: 8px; padding: 11px 13px;
    font-family: var(--mono); font-size: 12px; color: #24313F;
    overflow-x: auto; white-space: pre; line-height: 1.7;
}

/* ---------------------------------------------------------- 步骤条 */
.steps { display: flex; gap: 0; margin-bottom: 24px; }
.step { flex: 1; display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--text-3); }
.step .n {
    width: 24px; height: 24px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: var(--surface-2); border: 1px solid var(--border-strong);
    font-size: 12px; flex-shrink: 0;
}
.step.on { color: var(--text); font-weight: 500; }
.step.on .n { background: var(--accent); border-color: var(--accent); color: #fff; }
.step.done .n { background: var(--success-weak); border-color: transparent; color: var(--success); }

/* ---------------------------------------------------------- 图表 */
.bars { display: flex; align-items: flex-end; gap: 10px; height: 120px; padding-top: 8px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.bar {
    width: 100%; max-width: 42px; border-radius: 5px 5px 0 0;
    background: var(--accent-weak); min-height: 3px;
    position: relative; transition: background .15s;
}
.bar.hi { background: var(--accent); }
.bar-col:hover .bar { background: var(--accent); }
.bar-label { font-size: 11px; color: var(--text-3); }
.bar-val { font-size: 11px; color: var(--text-2); }

/* ---------------------------------------------------------- 登录页 */
.auth-wrap { min-height: 100vh; display: flex; background: var(--surface); }
.auth-side {
    width: 44%; max-width: 560px;
    background: #16324F;
    color: #fff;
    padding: 44px;
    display: flex; flex-direction: column;
    position: relative; overflow: hidden;
}
.auth-side::after {
    content: ''; position: absolute; right: -120px; bottom: -140px;
    width: 380px; height: 380px; border-radius: 50%;
    background: rgba(255, 255, 255, .04);
}
.auth-side::before {
    content: ''; position: absolute; right: 40px; top: -80px;
    width: 220px; height: 220px; border-radius: 50%;
    background: rgba(255, 255, 255, .03);
}
.auth-band { display: flex; align-items: center; gap: 10px; position: relative; z-index: 2; }
.auth-band .mark {
    width: 34px; height: 34px; border-radius: 9px;
    background: rgba(255,255,255,.14); display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 13px;
}
.auth-side h1 { font-size: 30px; line-height: 1.35; margin: 0 0 14px; font-weight: 600; position: relative; z-index: 2; }
.auth-side p { color: rgba(255,255,255,.68); font-size: 14px; line-height: 1.8; max-width: 380px; position: relative; z-index: 2; }
.auth-features { margin-top: auto; display: flex; flex-direction: column; gap: 14px; position: relative; z-index: 2; }
.auth-feature { display: flex; gap: 10px; align-items: flex-start; }
.auth-feature .tick {
    width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0; margin-top: 2px;
    background: rgba(255,255,255,.16); display: flex; align-items: center; justify-content: center;
    font-size: 10px;
}
.auth-feature .tx { font-size: 13px; color: rgba(255,255,255,.8); line-height: 1.5; }
.auth-main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 32px; }
.auth-card { width: 100%; max-width: 372px; }
.auth-card h2 { font-size: 22px; margin-bottom: 6px; }
.auth-card .lead { font-size: 13.5px; color: var(--text-3); margin-bottom: 26px; }
.auth-foot { margin-top: 26px; font-size: 12px; color: var(--text-3); text-align: center; line-height: 1.7; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--text-3); font-size: 12px; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.wecom-btn {
    display: flex; align-items: center; justify-content: center; gap: 9px;
    width: 100%; height: 42px; border-radius: 9px;
    border: 1px solid #D8E1EC; background: #fff;
    color: #1B2432; font-size: 14px; font-weight: 500; font-family: inherit;
    cursor: pointer; transition: all .12s; text-decoration: none;
}
.wecom-btn:hover { border-color: #2E7BD6; background: #F6FAFF; text-decoration: none; color: #1B2432; }
.wecom-icon {
    width: 20px; height: 20px; border-radius: 5px; background: #2E7BD6;
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-size: 10px; font-weight: 700;
}

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

/* ---------------------------------------------------------- 授权页 / 窄卡片 */
.center-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 32px 20px; background: var(--bg); }
.center-card {
    width: 100%; max-width: 440px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 16px; box-shadow: var(--shadow-md);
    padding: 28px;
    text-align: center;
}
.center-card .app-icon {
    width: 54px; height: 54px; border-radius: 13px; margin: 0 auto 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; font-weight: 600;
}
.consent-title { font-size: 17px; font-weight: 600; margin-bottom: 6px; }
.consent-sub { font-size: 13px; color: var(--text-3); margin-bottom: 20px; }
.consent-user {
    display: flex; align-items: center; gap: 10px;
    background: var(--surface-2); border-radius: 10px; padding: 10px 12px;
    margin-bottom: 18px; text-align: left;
}
.consent-user .n { font-size: 13.5px; font-weight: 500; }
.consent-user .s { font-size: 12px; color: var(--text-3); }
.consent-scopes { text-align: left; margin-bottom: 20px; }
.consent-scopes .h { font-size: 12px; color: var(--text-3); margin-bottom: 8px; }
.consent-scope { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; margin-bottom: 7px; color: var(--text-2); }
.consent-scope .b { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); margin-top: 8px; flex-shrink: 0; }
.consent-actions { display: flex; gap: 10px; }
.consent-actions .btn { flex: 1; height: 40px; }

/* ---------------------------------------------------------- 其他 */
.muted { color: var(--text-3); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; }
.flex { display: flex; align-items: center; gap: 8px; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.flex-wrap { flex-wrap: wrap; }
.right { margin-left: auto; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.w-full { width: 100%; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-plain { list-style: none; margin: 0; padding: 0; }
.list-row {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 13px;
}
.list-row:last-child { border-bottom: 0; }

.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li {
    display: flex; gap: 10px; align-items: flex-start;
    padding: 11px 0; border-bottom: 1px solid var(--border); font-size: 13.5px;
}
.checklist li:last-child { border-bottom: 0; }
.checklist .ic {
    width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700; margin-top: 1px;
}
.checklist .ic.ok { background: var(--success-weak); color: var(--success); }
.checklist .ic.bad { background: var(--danger-weak); color: var(--danger); }
.checklist .t { font-weight: 500; }
.checklist .d { color: var(--text-3); font-size: 12.5px; margin-top: 2px; word-break: break-all; }

.copy-inline {
    border: 0; background: var(--surface-2); color: var(--text-3);
    border-radius: 5px; padding: 1px 6px; font-size: 11.5px; cursor: pointer;
    font-family: inherit; margin-left: 4px;
}
.copy-inline:hover { background: var(--accent-weak); color: var(--accent); }

table.tree td { padding: 9px 14px; }
.tree-indent { display: inline-block; }
.tree-toggle {
    width: 16px; height: 16px; display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer; color: var(--text-3); user-select: none; font-size: 10px;
}

.modal-mask {
    position: fixed; inset: 0; background: rgba(20, 28, 40, .45);
    display: none; align-items: center; justify-content: center; z-index: 100; padding: 20px;
}
.modal-mask.open { display: flex; }
.modal {
    background: var(--surface); border-radius: 14px; width: 100%; max-width: 520px;
    max-height: 86vh; overflow-y: auto; box-shadow: 0 20px 50px rgba(0,0,0,.2);
}
.modal-head { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; }
.modal-head h3 { font-size: 15px; }
.modal-body { padding: 20px; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; }

.toast-host { position: fixed; top: 16px; right: 16px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast {
    background: #1B2432; color: #fff; padding: 9px 16px; border-radius: 9px;
    font-size: 13px; box-shadow: var(--shadow-md); animation: toastIn .18s ease;
}
@keyframes toastIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
