/* ==========================================================================
   股票AI智能系统 — 全局设计系统
   --------------------------------------------------------------------------
   - 亮色主题，禁用暗色
   - 所有表单 / 表格 / 滚动条 / 弹窗 / 提示在此统一定义
   - 禁止使用任何外链资源
   ========================================================================== */

/* ---------- CSS 变量 ---------- */
:root {
    --primary:        #3B82F6;   /* 淡蓝主色 (blue-500) */
    --primary-hover:  #2563EB;   /* hover 加深 (blue-600) */
    --primary-light:  #EFF6FF;   /* 浅底 (blue-50) */
    --primary-soft:   #DBEAFE;   /* 软底 (blue-100) */

    --success:        #10B981;
    --success-light:  #D1FAE5;
    --warning:        #F59E0B;
    --warning-light:  #FEF3C7;
    --danger:         #EF4444;
    --danger-light:   #FEE2E2;
    --info:           #0EA5E9;
    --info-light:     #E0F2FE;

    --bg-page:        #F8FAFC;
    --bg-card:        #FFFFFF;
    --bg-soft:        #F1F5F9;
    --bg-hover:       #F8FAFC;

    --text-primary:   #0F172A;
    --text-secondary: #64748B;
    --text-muted:     #94A3B8;
    --text-inverse:   #FFFFFF;

    --border-color:   #E2E8F0;
    --border-strong:  #CBD5E1;

    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;

    --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
    --shadow-md: 0 4px 12px rgba(15, 23, 42, .08);
    --shadow-lg: 0 10px 32px rgba(15, 23, 42, .12);

    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
                 "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
    --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, "PingFang SC Mono", monospace;

    --topbar-h:  56px;
    --sidebar-w: 200px;

    --transition: all 160ms ease;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-page);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }
img, svg { display: inline-block; vertical-align: middle; }

/* ---------- 滚动条 ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 5px;
    border: 2px solid transparent;
    background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: #94A3B8; background-clip: padding-box; border: 2px solid transparent; }
* { scrollbar-width: thin; scrollbar-color: #CBD5E1 transparent; }

/* ---------- 通用文本 ---------- */
.text-primary   { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted     { color: var(--text-muted); }
.text-success   { color: var(--success); }
.text-danger    { color: var(--danger); }
.text-warning   { color: var(--warning); }
.text-center    { text-align: center; }
.text-right     { text-align: right; }
.text-mono      { font-family: var(--font-mono); }
.fw-bold        { font-weight: 600; }
.fw-semibold    { font-weight: 500; }

/* ---------- 图标 ---------- */
.icon { stroke-linecap: round; stroke-linejoin: round; color: currentColor; }
.icon-sm { width: 16px; height: 16px; }
.icon-md { width: 20px; height: 20px; }
.icon-lg { width: 28px; height: 28px; }
.icon-xl { width: 40px; height: 40px; }

/* ==========================================================================
   表单
   ========================================================================== */
.form { display: flex; flex-direction: column; gap: 16px; }
.form-row { display: flex; flex-direction: column; gap: 6px; }
.form-row.inline { flex-direction: row; align-items: center; gap: 12px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid.cols-1 { grid-template-columns: 1fr; }
.form-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.form-label {
    font-size: 13px;
    color: var(--text-primary);
    font-weight: 500;
}
.form-label .required { color: var(--danger); margin-left: 2px; }
.form-help { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.form-error { font-size: 12px; color: var(--danger); margin-top: 2px; }

.form-input,
.form-select,
.form-textarea,
input[type="text"],
input[type="password"],
input[type="number"],
input[type="email"],
input[type="search"],
input[type="date"],
input[type="time"],
textarea,
select {
    width: 100%;
    height: 38px;
    padding: 0 12px;
    font-family: inherit;
    font-size: 14px;
    color: var(--text-primary);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    outline: none;
    transition: var(--transition);
    appearance: none;
    -webkit-appearance: none;
}
textarea, .form-textarea {
    height: auto;
    min-height: 96px;
    padding: 10px 12px;
    line-height: 1.6;
    resize: vertical;
}
.form-input:hover,
.form-select:hover,
.form-textarea:hover,
input:hover, textarea:hover, select:hover {
    border-color: var(--border-strong);
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus,
input:focus, textarea:focus, select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, .18);
}
.form-input::placeholder,
.form-textarea::placeholder,
input::placeholder, textarea::placeholder {
    color: var(--text-muted);
}
.form-input:disabled,
.form-select:disabled,
.form-textarea:disabled,
input:disabled, textarea:disabled, select:disabled {
    background: var(--bg-soft);
    color: var(--text-muted);
    cursor: not-allowed;
}

/* select 自定义箭头 */
select, .form-select {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    padding-right: 32px;
}

/* checkbox / radio 自定义 */
.checkbox, .radio {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    font-size: 14px;
}
.checkbox input[type="checkbox"],
.radio input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0; height: 0;
}
.checkbox .box,
.radio .box {
    width: 16px;
    height: 16px;
    border: 1.5px solid var(--border-strong);
    background: var(--bg-card);
    transition: var(--transition);
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.checkbox .box { border-radius: 4px; }
.radio .box    { border-radius: 50%; }
.checkbox input:checked + .box,
.radio input:checked + .box {
    background: var(--primary);
    border-color: var(--primary);
}
.checkbox input:checked + .box::after {
    content: '';
    width: 8px; height: 4px;
    border-left: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(-45deg) translate(1px, -1px);
}
.radio input:checked + .box::after {
    content: '';
    width: 6px; height: 6px;
    background: #fff;
    border-radius: 50%;
}
.checkbox input:focus + .box,
.radio input:focus + .box {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, .18);
}
.checkbox input:disabled + .box,
.radio input:disabled + .box {
    background: var(--bg-soft);
    border-color: var(--border-color);
}

/* ==========================================================================
   按钮
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 36px;
    padding: 0 16px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    color: var(--text-primary);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    user-select: none;
    text-decoration: none;
}
.btn:hover { background: var(--bg-soft); border-color: var(--border-strong); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.btn-sm { height: 28px; padding: 0 10px; font-size: 12px; }
.btn-lg { height: 44px; padding: 0 20px; font-size: 15px; }
.btn-block { width: 100%; }

.btn-primary {
    color: #fff;
    background: var(--primary);
    border-color: var(--primary);
}
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }

.btn-success { color: #fff; background: var(--success); border-color: var(--success); }
.btn-success:hover { filter: brightness(.95); }

.btn-danger { color: #fff; background: var(--danger); border-color: var(--danger); }
.btn-danger:hover { filter: brightness(.95); }

.btn-warning { color: #fff; background: var(--warning); border-color: var(--warning); }
.btn-warning:hover { filter: brightness(.95); }

.btn-ghost {
    background: transparent;
    border-color: transparent;
    color: var(--text-secondary);
}
.btn-ghost:hover { background: var(--bg-soft); color: var(--text-primary); }

.btn-link {
    background: transparent;
    border-color: transparent;
    color: var(--primary);
    padding: 0 4px;
    height: auto;
}
.btn-link:hover { background: transparent; text-decoration: underline; }

/* ==========================================================================
   卡片
   ========================================================================== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 20px;
}
.card + .card { margin-top: 16px; }
.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: -20px -20px 16px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}
.card-header h2,
.card-header h3 { margin: 0; font-size: 16px; font-weight: 600; }
.card-actions { display: flex; align-items: center; gap: 8px; }

.placeholder { text-align: center; padding: 60px 20px; color: var(--text-secondary); }
.placeholder h2 { color: var(--text-primary); margin-bottom: 8px; }

/* ==========================================================================
   表格
   ========================================================================== */
.table-wrap {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.table thead th {
    text-align: left;
    padding: 12px 14px;
    background: var(--bg-soft);
    color: var(--text-secondary);
    font-weight: 500;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}
.table tbody td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: var(--bg-hover); }
.table tbody tr.is-selected { background: var(--primary-light); }
.table .col-actions { width: 1%; white-space: nowrap; }
.table .col-num { text-align: right; font-variant-numeric: tabular-nums; font-family: var(--font-mono); }

.table-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

/* 分页 */
.pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    padding: 12px 14px;
    border-top: 1px solid var(--border-color);
    font-size: 13px;
    color: var(--text-secondary);
}
.pagination .pg-info { margin-right: auto; }
.pagination .btn { height: 28px; padding: 0 10px; font-size: 12px; }
.pagination .btn.is-active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ==========================================================================
   徽标 / 标签
   ========================================================================== */
.badge {
    display: inline-flex;
    align-items: center;
    height: 20px;
    padding: 0 8px;
    font-size: 12px;
    font-weight: 500;
    color: var(--primary);
    background: var(--primary-light);
    border-radius: 10px;
    line-height: 1;
}
.badge-success { color: var(--success); background: var(--success-light); }
.badge-danger  { color: var(--danger);  background: var(--danger-light); }
.badge-warning { color: var(--warning); background: var(--warning-light); }
.badge-info    { color: var(--info);    background: var(--info-light); }
.badge-muted   { color: var(--text-secondary); background: var(--bg-soft); }

/* ==========================================================================
   Tooltip
   ========================================================================== */
.tooltip {
    position: relative;
    display: inline-flex;
}
.tooltip[data-tip]:hover::after {
    content: attr(data-tip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 8px;
    font-size: 12px;
    line-height: 1.4;
    color: #fff;
    background: rgba(15, 23, 42, .9);
    border-radius: var(--radius-sm);
    white-space: nowrap;
    pointer-events: none;
    z-index: 2000;
}

/* ==========================================================================
   Modal
   ========================================================================== */
.modal-root {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1000;
}
.modal-mask {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .35);
    backdrop-filter: blur(2px);
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: modal-fade .15s ease;
}
.modal {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    width: 90%;
    max-width: 480px;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: modal-pop .18s ease;
}
.modal-lg { max-width: 720px; }
.modal-xl { max-width: 960px; }
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}
.modal-header h3 { margin: 0; font-size: 16px; font-weight: 600; }
.modal-close {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 4px;
    border-radius: 6px;
}
.modal-close:hover { background: var(--bg-soft); color: var(--text-primary); }
.modal-body { padding: 20px; overflow-y: auto; }
.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 14px 20px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-page);
}

@keyframes modal-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-pop  { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: scale(1); } }

/* ==========================================================================
   Toast
   ========================================================================== */
.toast-root {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}
.toast {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    font-size: 13px;
    pointer-events: auto;
    animation: toast-in .2s ease;
}
.toast-success { border-color: var(--success); color: var(--success); }
.toast-error   { border-color: var(--danger);  color: var(--danger);  }
.toast-warning { border-color: var(--warning); color: var(--warning); }
.toast-info    { border-color: var(--info);    color: var(--info);    }

@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

/* ==========================================================================
   主框架（顶栏 + 侧栏 + 内容）
   ========================================================================== */
.app { min-height: 100vh; display: flex; flex-direction: column; }

.topbar {
    height: var(--topbar-h);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}
.topbar-left  { display: flex; align-items: center; gap: 16px; }
.topbar-right { display: flex; align-items: center; gap: 12px; }

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--primary);
    font-weight: 600;
    font-size: 16px;
}
.brand-text { color: var(--text-primary); }

.user-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--bg-soft);
    border-radius: 20px;
    font-size: 13px;
    color: var(--text-primary);
}

.layout {
    flex: 1;
    display: flex;
    min-height: 0;
}

/* ---------- 侧栏：完全竖向，可折叠的大类 ---------- */
.sidebar {
    width: var(--sidebar-w);
    flex-shrink: 0;
    background: var(--bg-card);
    border-right: 1px solid var(--border-color);
    padding: 12px 10px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-group { display: flex; flex-direction: column; }

.nav-group-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 14px;
    border-radius: var(--radius-md);
    cursor: pointer;
    user-select: none;
    transition: var(--transition);
    background: transparent;
    border: none;
    text-align: left;
    width: 100%;
}
.nav-group-header:hover { background: var(--bg-soft); }
.nav-group-header .nav-icon { color: var(--text-secondary); flex-shrink: 0; }
.nav-group-header .nav-label { flex: 1; }
.nav-group-header .nav-chevron {
    color: var(--text-muted);
    transition: transform .2s ease;
    flex-shrink: 0;
}
.nav-group.is-open  > .nav-group-header .nav-chevron { transform: rotate(90deg); }
.nav-group.is-open  > .nav-group-header { color: var(--primary); }
.nav-group.is-open  > .nav-group-header .nav-icon { color: var(--primary); }

.nav-group-body {
    display: none;
    flex-direction: column;
    gap: 2px;
    margin: 2px 0 6px 8px;
    padding-left: 12px;
    border-left: 1px dashed var(--border-color);
}
.nav-group.is-open > .nav-group-body { display: flex; }

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    color: var(--text-secondary);
    font-size: 13px;
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: var(--transition);
}
.nav-item:hover { background: var(--bg-soft); color: var(--text-primary); }
.nav-item .nav-icon { color: var(--text-muted); flex-shrink: 0; }
.nav-item.is-active {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 500;
}
.nav-item.is-active .nav-icon { color: var(--primary); }

.content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    min-width: 0;
}

/* ==========================================================================
   登录页 — 左装饰 + 右表单
   ========================================================================== */
.auth-layout {
    min-height: 100vh;
    display: flex;
    background: var(--bg-card);
}

/* 左侧装饰栏 */
.auth-decor {
    flex: 1;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    background: linear-gradient(135deg, #1E3A8A 0%, #1D4ED8 30%, #2563EB 60%, #3B82F6 100%);
}
.auth-decor svg.bg-deco {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}
.auth-decor .deco-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 60px 40px;
    max-width: 520px;
}
.auth-decor .deco-mark {
    width: 132px;
    height: 132px;
    margin: 0 auto 28px;
    color: #FFFFFF;
    background: rgba(255, 255, 255, .12);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 20px 60px rgba(15, 23, 42, .25);
}
.auth-decor h1 {
    margin: 0 0 12px;
    font-size: 32px;
    font-weight: 700;
    letter-spacing: 4px;
    text-shadow: 0 2px 16px rgba(15, 23, 42, .3);
}
.auth-decor .slogan {
    font-size: 15px;
    opacity: .88;
    line-height: 1.9;
    margin: 0;
    letter-spacing: 1px;
}
.auth-decor .deco-features {
    margin-top: 32px;
    display: flex;
    justify-content: center;
    gap: 28px;
    font-size: 13px;
    opacity: .85;
}
.auth-decor .deco-features span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* 右侧表单栏 */
.auth-form-side {
    width: 480px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: var(--bg-card);
}
.auth-card {
    width: 100%;
    max-width: 360px;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
}
.auth-header { margin-bottom: 28px; }
.auth-title { margin: 0; font-size: 24px; font-weight: 700; color: var(--text-primary); }
.auth-subtitle { margin: 6px 0 0; color: var(--text-secondary); font-size: 14px; }
.auth-tip { margin-top: 20px; font-size: 12px; color: var(--text-muted); text-align: center; }

@media (max-width: 960px) {
    .auth-layout { flex-direction: column; }
    .auth-decor { min-height: 240px; flex: 0 0 auto; }
    .auth-decor .deco-mark { width: 84px; height: 84px; margin-bottom: 12px; border-radius: 18px; }
    .auth-decor h1 { font-size: 22px; }
    .auth-decor .deco-features { display: none; }
    .auth-form-side { width: 100%; padding: 28px 24px; }
}

/* ==========================================================================
   工具类
   ========================================================================== */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-4  { gap: 4px; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.p-0 { padding: 0; }
.w-full { width: 100%; }
.hidden { display: none !important; }

/* 涨跌色（A 股惯例：红涨绿跌） */
.up   { color: #DC2626; }
.down { color: #16A34A; }

/* ==========================================================================
   策略管理 — 左竖 tab + 右详情布局
   ========================================================================== */
.strategy-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 16px;
    align-items: start;
}
.strategy-aside {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: sticky;
    top: 16px;
}
.strategy-aside .aside-title {
    padding: 8px 10px 6px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.strategy-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
    transition: var(--transition);
    border: 1px solid transparent;
}
.strategy-tab:hover { background: var(--bg-soft); color: var(--text-primary); }
.strategy-tab.is-active {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary-soft);
    font-weight: 500;
}
.strategy-tab .tab-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.strategy-tab .tab-active-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    flex-shrink: 0;
}
.strategy-tab.is-empty {
    justify-content: center;
    border: 1px dashed var(--border-color);
    color: var(--primary);
    margin-top: 4px;
}

.strategy-detail {
    min-width: 0;
}
.strategy-detail .detail-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}
.strategy-detail .detail-title {
    margin: 0 0 4px;
    font-size: 18px;
    font-weight: 600;
}
.strategy-detail .detail-class {
    font-size: 12px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}
.strategy-detail .detail-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.dim-card {
    background: var(--bg-soft);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    margin-bottom: 8px;
}
.dim-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}
.dim-card-head strong { font-size: 14px; }
.dim-card .ai-prompt {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.7;
    white-space: pre-wrap;
    background: var(--bg-card);
    border-radius: 6px;
    padding: 8px 10px;
    border: 1px solid var(--border-color);
}

/* ==========================================================================
   安全视觉组件 (Secure UI pack)
   --------------------------------------------------------------------------
   为登录 / 关键操作场景提供"专业安全感"的装饰组件：
     .secure-strip       TLS 加密通道状态条（含脉冲绿点）
     .enc-chip           加密指纹小徽章（可切换 .active）
     .slide-unlock       滑动解锁按钮（配套 JS 见 UI/examples/login.example.html）
     .sec-badges/-badge  安全协议徽章组
     .sec-fingerprint    伪会话指纹行
   组件均纯装饰不做真实加密，用于增强用户对安全性的感知。
   ========================================================================== */

/* TLS 加密通道状态条 */
.secure-strip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    margin-bottom: 18px;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: var(--radius-md);
    color: #047857;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.2px;
}
.secure-strip svg { flex-shrink: 0; }
.secure-strip .pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    flex-shrink: 0;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.65);
    animation: sec-pulse 1.6s infinite;
}
@keyframes sec-pulse {
    0%   { box-shadow: 0 0 0 0   rgba(16, 185, 129, 0.65); }
    70%  { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);    }
    100% { box-shadow: 0 0 0 0   rgba(16, 185, 129, 0);    }
}

/* 标签行：form-label + 右侧加密指纹 chip */
.label-with-chip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}
.label-with-chip .form-label { margin-bottom: 0; }

/* 加密指纹 chip */
.enc-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 8px;
    border-radius: 11px;
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.22);
    color: var(--primary-hover);
    font-size: 10.5px;
    font-weight: 600;
    font-family: var(--font-mono);
    letter-spacing: 0.5px;
    transition: var(--transition);
}
.enc-chip svg { color: var(--primary); }
.enc-chip .enc-hex {
    min-width: 52px;
    text-align: center;
    display: inline-block;
}
.enc-chip.active {
    background: rgba(59, 130, 246, 0.14);
    border-color: rgba(59, 130, 246, 0.4);
}

/* 滑动解锁 */
.slide-unlock {
    position: relative;
    margin-top: 22px;
    height: 52px;
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, #F1F5F9 0%, #E2E8F0 100%);
    border: 1px solid var(--border-strong);
    overflow: hidden;
    user-select: none;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.05);
    touch-action: none;
}
.slide-unlock::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg,
        transparent 35%,
        rgba(255, 255, 255, 0.55) 50%,
        transparent 65%);
    background-size: 220% 100%;
    animation: slide-shimmer 2.6s linear infinite;
    pointer-events: none;
}
@keyframes slide-shimmer {
    0%   { background-position: 220%  0; }
    100% { background-position: -220% 0; }
}
.slide-unlock .slide-fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 52px;
    background: linear-gradient(90deg, var(--primary) 0%, #60A5FA 100%);
    transition: width 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
    pointer-events: none;
}
.slide-unlock .slide-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 500;
    color: #475569;
    pointer-events: none;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.65);
    letter-spacing: 0.5px;
}
.slide-unlock .slide-thumb {
    position: absolute;
    left: 2px;
    top: 2px;
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.12);
    transition: left 0.28s cubic-bezier(0.2, 0.8, 0.2, 1),
                background 0.2s, border-color 0.2s, color 0.2s;
    color: var(--primary);
    touch-action: none;
}
.slide-unlock .slide-thumb:hover { border-color: #93C5FD; }
.slide-unlock .slide-thumb:active { cursor: grabbing; }
.slide-unlock .slide-thumb .thumb-icon-check { display: none; }
.slide-unlock.dragging .slide-thumb,
.slide-unlock.dragging .slide-fill { transition: none; }
.slide-unlock.unlocked .slide-fill {
    background: linear-gradient(90deg, #059669 0%, var(--success) 100%);
}
.slide-unlock.unlocked .slide-thumb {
    background: var(--success);
    color: var(--text-inverse);
    border-color: var(--success);
}
.slide-unlock.unlocked .slide-thumb .thumb-icon-lock  { display: none; }
.slide-unlock.unlocked .slide-thumb .thumb-icon-check { display: block; }
.slide-unlock.unlocked .slide-text {
    color: var(--text-inverse);
    text-shadow: none;
    font-weight: 600;
}
.slide-unlock.unlocked::before { animation: none; background: none; }

/* 安全协议徽章 */
.security-footer { margin-top: 16px; }
.sec-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    margin-bottom: 10px;
}
.sec-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    font-family: var(--font-mono);
    background: var(--bg-soft);
    border: 1px solid var(--border-color);
    color: #475569;
    letter-spacing: 0.4px;
}
.sec-badge svg { color: var(--text-secondary); }

/* 会话指纹行 */
.sec-fingerprint {
    text-align: center;
    font-size: 11px;
    color: var(--text-muted);
    font-family: var(--font-mono);
    letter-spacing: 0.3px;
}
.sec-fingerprint code {
    color: var(--text-secondary);
    background: none;
    padding: 0;
    font-family: inherit;
}
