/* ============================================
   工作室资源管理系统 · 简约科技风（苹果风）
   ============================================ */

:root {
  --bg:               #fbfbfd;   /* 页面背景：苹果官网灰 */
  --surface:          #ffffff;   /* 卡片/表面 */
  --text:             #1d1d1f;   /* 主文字 */
  --text-secondary:   #6e6e73;   /* 次要文字 */
  --text-tertiary:    #86868b;   /* 三级文字/表头 */
  --border:           rgba(0,0,0,0.08);
  --border-strong:    #d2d2d7;
  --accent:           #0071e3;   /* 苹果蓝 */
  --accent-hover:     #0077ed;
  --radius:           18px;
  --radius-md:        14px;
  --radius-sm:        10px;
  --shadow:           0 4px 16px rgba(0,0,0,0.04);
  --shadow-hover:     0 8px 28px rgba(0,0,0,0.08);
}

/* ---------- 基础 ---------- */
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
               "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "tnum";
  letter-spacing: -0.01em;
}

main.container {
  max-width: 1200px;
  padding-top: 2.5rem;
  padding-bottom: 3.5rem;
}

h3, h4, h5 {
  letter-spacing: -0.02em;
  font-weight: 600;
}
a { color: var(--accent); text-decoration: none; transition: color .15s; }
a:hover { color: var(--accent-hover); text-decoration: none; }
.text-muted { color: var(--text-secondary) !important; }

/* ---------- 顶部导航（毛玻璃） ---------- */
.navbar-app {
  background: rgba(255,255,255,0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0.7rem 0;
}
.navbar-app .navbar-brand {
  color: var(--text);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}
.navbar-app .navbar-brand i { color: var(--accent); }
.navbar-app .nav-link {
  color: var(--text-secondary);
  font-weight: 400;
  font-size: 0.92rem;
  padding: 0.4rem 0.9rem !important;
  border-radius: var(--radius-sm);
  transition: all .15s;
}
.navbar-app .nav-link:hover { color: var(--text); background: rgba(0,0,0,0.04); }
.navbar-app .nav-link.active { color: var(--accent); font-weight: 500; }
.navbar-app .navbar-toggler { border: none; padding: 0.25rem 0.5rem; }
.navbar-app .navbar-toggler:focus { box-shadow: none; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: none;
}
.card-header {
  background: transparent;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  color: var(--text);
  padding: 1rem 1.25rem;
}

/* ---------- 统计卡片 ---------- */
.stat-card { transition: transform .2s ease, box-shadow .2s ease; }
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.stat-icon {
  width: 52px; height: 52px; border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; flex-shrink: 0;
}
.stat-icon.bg-primary-subtle { background: rgba(0,113,227,0.10);  color: var(--accent); }
.stat-icon.bg-success-subtle { background: rgba(48,209,88,0.12);  color: #1d8a4a; }
.stat-icon.bg-warning-subtle { background: rgba(255,159,10,0.14); color: #b76b00; }
.stat-card .h3 { font-size: 2rem; font-weight: 600; letter-spacing: -0.03em; }

/* ---------- 按钮（胶囊） ---------- */
.btn {
  border-radius: 980px;
  font-weight: 400;
  padding: 0.5rem 1.2rem;
  transition: all .18s;
  letter-spacing: -0.01em;
}
.btn-primary { background: var(--accent); border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-outline-secondary {
  color: var(--text-secondary);
  border-color: var(--border-strong);
  background: transparent;
}
.btn-outline-secondary:hover { background: rgba(0,0,0,0.04); color: var(--text); border-color: var(--border-strong); }
.btn-outline-primary {
  color: var(--accent); border-color: rgba(0,113,227,0.35); background: transparent;
}
.btn-outline-primary:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-outline-danger {
  color: #d63031; border-color: rgba(214,48,49,0.3); background: transparent;
}
.btn-outline-danger:hover { background: #d63031; color: #fff; border-color: #d63031; }
.btn-outline-warning {
  color: #b76b00; border-color: rgba(255,159,10,0.35); background: transparent;
}
.btn-outline-warning:hover { background: #ff9f0a; color: #fff; border-color: #ff9f0a; }
.btn-sm { padding: 0.28rem 0.7rem; font-size: 0.8rem; }
.btn-link { color: var(--accent); }

/* ---------- 表格（去边框、淡分隔） ---------- */
.table { color: var(--text); margin-bottom: 0; }
.table > :not(caption) > * > * { padding: 0.85rem 1rem; vertical-align: middle; }
.table thead th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  background: transparent;
  white-space: nowrap;
}
.table tbody tr { border-bottom: 1px solid var(--border); transition: background .12s; }
.table tbody tr:last-child { border-bottom: none; }
.table tbody tr:hover { background: rgba(0,0,0,0.015); }
.table-light { background: transparent !important; }

/* ---------- 表单 ---------- */
.form-control, .form-select {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  padding: 0.55rem 0.85rem;
  color: var(--text);
  font-size: 0.92rem;
  transition: all .15s;
}
.form-control:focus, .form-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(0,113,227,0.12);
}
.form-select-sm, .form-control-sm { border-radius: var(--radius-sm); }
.form-label { font-weight: 500; color: var(--text); margin-bottom: 0.35rem; font-size: 0.9rem; }

/* 列表页筛选条的内联下拉框 */
.d-inline-block .form-select-sm {
  border-radius: 980px;
  border-color: var(--border);
  padding: 0.2rem 0.7rem;
}

/* ---------- 状态标签（苹果风胶囊） ---------- */
.badge-app {
  display: inline-flex; align-items: center;
  padding: 3px 10px;
  border-radius: 980px;
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0;
  white-space: nowrap;
}
.badge-success  { background: rgba(48,209,88,0.13);  color: #1d8a4a; }
.badge-primary  { background: rgba(0,113,227,0.11);  color: #0066cc; }
.badge-warning  { background: rgba(255,159,10,0.15); color: #b76b00; }
.badge-danger   { background: rgba(255,59,48,0.13);  color: #d23535; }
.badge-secondary{ background: rgba(0,0,0,0.06);      color: var(--text-secondary); }

/* 平台小标签 */
.badge.bg-light.text-dark.border {
  background: rgba(0,0,0,0.04) !important;
  color: var(--text-secondary) !important;
  border-color: var(--border) !important;
  font-weight: 500;
  border-radius: 980px;
  padding: 3px 10px;
}

/* ---------- 列表组 ---------- */
.list-group-item {
  border-color: var(--border);
  padding: 0.7rem 1.25rem;
}
.list-group-item.bg-light { background: var(--bg) !important; }

/* ---------- 工具类 ---------- */
.font-monospace { font-size: 0.85em; color: var(--text-secondary); }
.text-reset:hover { text-decoration: none; }
.text-center.text-muted.py-4 { color: var(--text-tertiary) !important; }

/* ---------- 页脚 ---------- */
.app-footer {
  text-align: center;
  color: var(--text-tertiary);
  font-size: 0.82rem;
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  margin-top: 2rem;
}

/* ---------- 响应式微调 ---------- */
@media (max-width: 768px) {
  .stat-card .h3 { font-size: 1.6rem; }
  main.container { padding-top: 1.5rem; }
}

/* ============================================
   桌面单文件版还原层
   ============================================ */
.app-main { max-width: 1400px !important; }
.nav-shell { max-width: 1400px; }
.brand-mark { margin-right: .2rem; }
.user-menu { margin-left: .5rem; padding-left: .5rem; border-left: 1px solid var(--border); }
.muted { color: var(--text-secondary); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
.req { color: #d23535; }
form { margin: 0; }

.page-head {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem;
  margin-bottom: 1.4rem;
}
.page-head h3 { margin: 0; font-size: 1.65rem; }
.page-head p { margin: .35rem 0 0; color: var(--text-secondary); font-size: .9rem; }
.page-actions { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; justify-content: flex-end; }
.eyebrow { color: var(--accent); font-size: .68rem; letter-spacing: .12em; font-weight: 700; margin-bottom: .35rem; }

.stat-grid {
  display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); gap: 1rem;
}

/* 仪表盘顶部告警带：欠费手机卡和逾期年报直接推到眼前 */
.alert-band { border: 1px solid rgba(255,69,58,.22); border-radius: var(--radius); background: #fff; overflow: hidden; box-shadow: var(--shadow); }
.alert-band-head { display: flex; align-items: baseline; justify-content: space-between; gap: .6rem; padding: .7rem 1rem; border-bottom: 1px solid var(--border); background: rgba(255,69,58,.05); }
.alert-band-head span { font-weight: 650; font-size: .88rem; color: #a3231a; }
.alert-band-head small { color: var(--text-secondary); font-size: .75rem; }
.alert-band-list { display: flex; flex-direction: column; }
.alert-item { display: flex; align-items: center; gap: .7rem; padding: .68rem 1rem; border-bottom: 1px solid var(--border); color: inherit; text-decoration: none; transition: background .15s ease; }
.alert-item:last-child { border-bottom: 0; }
.alert-item:hover { background: #fafafa; }
.alert-item > i { flex: none; font-size: 1rem; }
.alert-item > span:not(.alert-cta) { flex: 1; min-width: 0; }
.alert-item b { display: block; font-size: .84rem; font-weight: 600; }
.alert-item em { display: block; font-style: normal; font-size: .75rem; color: var(--text-secondary); margin-top: .1rem; }
.alert-item.urgent > i { color: #d7382b; }
.alert-item.warn > i { color: #c8860f; }
.alert-cta { flex: none; padding: .24rem .62rem; border-radius: 999px; background: rgba(0,113,227,.08); color: #0066cc; font-size: .73rem; font-weight: 600; }
.spinner-dot { display: inline-block; width: .7em; height: .7em; margin-right: .25em; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spinner-rotate .7s linear infinite; vertical-align: -.05em; }
@keyframes spinner-rotate { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner-dot { animation-duration: 2s; } }
.form-error-summary { display: flex; align-items: flex-start; gap: .55rem; margin-bottom: 1.1rem; padding: .8rem .95rem; border: 1px solid rgba(255,69,58,.3); border-radius: 10px; background: rgba(255,69,58,.07); color: #a3231a; font-size: .84rem; }
.form-error-summary i { margin-top: .1rem; }
.form-text.hint-warn { color: #a3231a; font-weight: 550; }
.muted-note { color: var(--text-secondary); font-size: .72rem; line-height: 1.45; font-weight: 420; }
.pager { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .6rem; margin-top: 1.1rem; }
.pager-info { color: var(--text-secondary); font-size: .78rem; }
.pager-links { display: flex; align-items: center; gap: .35rem; }
.pager-links a,.pager-links .disabled { padding: .34rem .72rem; border: 1px solid var(--border); border-radius: 8px; font-size: .78rem; text-decoration: none; }
.pager-links a { color: #0066cc; background: #fff; }
.pager-links a:hover { background: rgba(0,113,227,.06); }
.pager-links .disabled { color: var(--text-tertiary); background: #f6f6f7; }
.pager-current { padding-inline: .5rem; color: var(--text-secondary); font-size: .78rem; font-weight: 600; }
.stat-card.stat-alert { border-color: rgba(255,69,58,.35); box-shadow: 0 0 0 1px rgba(255,69,58,.12), var(--shadow); }
.stat-card.stat-alert .stat-meta { color: #a3231a; font-weight: 600; }
.stat-link { color: inherit; }
.stat-card {
  min-height: 150px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .58rem; padding: 1rem; overflow: hidden; position: relative; text-align: center;
}
.stat-card::after { content: ''; width: 90px; height: 90px; position: absolute; right: -35px; top: -35px; border-radius: 50%; opacity: .08; background: currentColor; }
.stat-card .stat-icon { width: 48px; height: 48px; font-size: 1.4rem; background: rgba(0,113,227,.08); }
.stat-copy { min-width: 0; width: 100%; display: flex; flex-direction: column; align-items: center; }
.stat-label { color: var(--text-secondary); font-size: .84rem; font-weight: 540; line-height: 1.25; }
.stat-num { font-size: 1.7rem; font-weight: 650; letter-spacing: -.04em; line-height: 1.2; margin: .12rem 0; }
.stat-meta { color: var(--text-secondary); font-size: .78rem; line-height: 1.3; text-wrap: balance; }
.tone-blue { color: #0066cc; }.tone-green { color: #1d8a4a; }.tone-orange { color: #b76b00; }.tone-purple { color: #7b4cc9; }
.tone-license { color: #91620a; }
.tone-blue .muted,.tone-green .muted,.tone-orange .muted,.tone-purple .muted { color: var(--text-secondary); }

.section-title { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 1.7rem 0 .8rem; }
.section-title > div { display: flex; align-items: baseline; gap: .65rem; }
.section-title span { font-size: 1.02rem; font-weight: 650; }
.section-title small { color: var(--text-secondary); font-size: .8rem; font-weight: 400; }
.section-title > a { font-size: .82rem; }
.availability-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1rem; }
.compact-list-card { padding: .35rem 0; overflow: hidden; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: .6rem; padding: .85rem 1rem; font-weight: 650; border-bottom: 1px solid var(--border); }
.card-head a { font-size: .78rem; font-weight: 500; }
.compact-row { display: flex; justify-content: space-between; align-items: center; gap: .7rem; padding: .65rem 1rem; border-bottom: 1px solid var(--border); }
.compact-row:last-child { border-bottom: 0; }
.compact-row > span:first-child { min-width: 0; }
.compact-row b { display: block; font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compact-row small { display: block; color: var(--text-secondary); margin-top: .12rem; font-size: .72rem; }
.empty-inline { padding: 1rem; color: var(--text-tertiary); text-align: center; font-size: .85rem; }

.filter-bar {
  display: flex; align-items: center; flex-wrap: wrap; gap: .5rem;
  padding: .75rem; background: rgba(255,255,255,.62); border: 1px solid var(--border);
  border-radius: var(--radius-md); margin-bottom: 1rem;
}
.filter-bar .form-select { width: auto; min-width: 132px; }
.filter-bar .form-control { width: min(340px,100%); }
.filter-bar .form-select,.filter-bar .form-control { font-size: .88rem; color: #2d3035; }
.filter-bar.filter-bar-compact {
  width: fit-content; max-width: 100%; min-width: 132px; padding: 0;
  background: transparent; border: 0; box-shadow: none;
}

.res-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .9rem; align-items: stretch; }
.res-card2 {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  position: relative; overflow: hidden; display: flex; flex-direction: column; min-width: 0; height: 100%;
  box-shadow: var(--shadow); transition: transform .18s, box-shadow .18s;
}
.res-card2:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.res-card2::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--border-strong); }
.res-card2.st-idle::before { background: #30d158; }
.res-card2.st-in_use::before { background: var(--accent); }
.res-card2.st-maintenance::before,.res-card2.st-suspended::before,.res-card2.st-overdue::before,.res-card2.st-abnormal::before { background: #ff9f0a; }
.res-card2.st-retired::before,.res-card2.st-banned::before { background: #ff3b30; }
.rc-top { display: flex; justify-content: space-between; align-items: flex-start; gap: .7rem; padding: 1rem 1rem .78rem 1.15rem; }
.rc-title { font-weight: 720; font-size: 1.1rem; line-height: 1.25; color: #17191c; overflow-wrap: anywhere; }
.rc-sub { color: #5d6269; font-size: .84rem; font-weight: 520; margin-top: .26rem; overflow-wrap: anywhere; }
.rc-metrics {
  display: grid; grid-template-columns: repeat(3,minmax(0,1fr));
  margin: 0 1rem .82rem 1.15rem; padding: .72rem .18rem;
  border: 1px solid rgba(20,22,25,.1); border-radius: 11px; background: #f6f6f7;
}
.rc-metric { position: relative; min-width: 0; padding: 0 .4rem; text-align: center; }
.rc-metric + .rc-metric { border-left: 1px solid var(--border); }
.rc-metric > i { position: absolute; left: .62rem; top: 50%; transform: translateY(-50%); color: #9b6509; font-size: 1rem; }
.rc-metric > span { display: block; width: 100%; min-width: 0; text-align: center; }
.rc-metric b,.rc-metric small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-metric b { color: #23262a; font-size: .98rem; font-weight: 720; line-height: 1.15; }
.rc-metric small { margin-top: .2rem; color: #666b72; font-size: .7rem; font-weight: 520; }
.rc-metric .metric-date { font-size: .78rem; letter-spacing: 0; }
.rc-metric .metric-phone { font-size: .78rem; letter-spacing: -.02em; }
.deposit-metric b { color: #8d5a04; }
.deposit-metric.is-empty b { color: #555b62; font-size: .82rem; font-weight: 650; }
.rc-info { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .66rem .85rem; padding: 0 1rem .9rem 1.15rem; }
.rc-field {
  min-width: 0; min-height: 48px; display: flex; flex-direction: column;
  align-items: center; justify-content: flex-start; text-align: center; padding: .1rem .25rem;
}
.rc-field.full { grid-column: 1/-1; }
.rc-field .k { display: block; min-height: 1.1rem; color: #666b72; font-size: .75rem; font-weight: 560; margin-bottom: .24rem; }
.rc-field .k i { width: 1rem; color: #9c680f; display: inline-block; }
.rc-field .v { display: block; width: 100%; color: #25282c; font-size: .91rem; font-weight: 560; line-height: 1.4; overflow-wrap: anywhere; }
.sim-number-list { display: flex !important; justify-content: center; }
.sim-number-stack { display: flex; max-width: 100%; flex-direction: column; align-items: flex-start; gap: .05rem; }
.sim-number-stack > span { display: block; white-space: nowrap; }
.rc-detail { margin: 0 1rem .82rem 1.15rem; padding: .68rem .78rem; border-radius: var(--radius-sm); background: var(--bg); color: #555b62; font-size: .84rem; }
.rc-detail summary { cursor: pointer; color: #976106; font-weight: 650; }
.rc-detail > div { margin-top: .45rem; white-space: pre-wrap; }
.rc-actions { display: flex; align-items: center; justify-content: flex-end; gap: .48rem; margin-top: auto; padding: .76rem 1rem .8rem 1.15rem; border-top: 1px solid var(--border); }
.rc-actions .btn-sm { font-size: .83rem; }
.project-tags { display: flex !important; justify-content: center; gap: .3rem; flex-wrap: wrap; }
.project-chip,.plat-chip { display: inline-flex; align-items: center; border-radius: 999px; padding: 3px 9px; background: rgba(0,113,227,.08); color: #0066cc; font-size: .77rem; font-weight: 600; }
.number-chip { display: inline-flex; margin-left: .35rem; border-radius: 999px; padding: 2px 8px; background: rgba(48,209,88,.13); color: #1d8a4a; font-family: inherit; font-size: .72rem; font-weight: 650; vertical-align: middle; }
.number-chip.sub { background: rgba(123,76,201,.12); color: #6d43b5; }
.number-chip.virtual { background: rgba(10,132,255,.12); color: #086fca; }
.sim-slot-list { display: flex !important; justify-content: center; flex-wrap: wrap; gap: .4rem; }
.sim-slot-chip { display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .58rem; border: 1px solid rgba(200,138,26,.2); border-radius: 9px; background: rgba(200,138,26,.07); color: #25282c; }
.sim-slot-chip span { color: #94610b; font-size: .7rem; font-weight: 700; }
.sim-slot-chip b { font-size: .82rem; }
.sim-slot-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .7rem; }
.sim-slot-card { position: relative; display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: auto auto; align-items: center; column-gap: .75rem; padding: .85rem 2.5rem .85rem .9rem; border: 1px solid var(--border); border-radius: 11px; background: #f7f7f8; color: #25282c; }
.sim-slot-card > span { grid-row: 1/3; display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 10px; background: rgba(200,138,26,.12); color: #8f5d07; font-size: .78rem; font-weight: 700; }
.sim-slot-card strong { font-size: .96rem; }
.sim-slot-card small { color: var(--text-secondary); }
.sim-slot-card > i { position: absolute; right: .9rem; color: #a1a5ab; }
.sim-slot-card:hover { border-color: rgba(200,138,26,.35); background: rgba(200,138,26,.06); }
.form-section-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .9rem; }
.form-section-head h5 { margin-bottom: 0; }
.sim-slot-editor-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .8rem; }
.sim-slot-editor { padding: .9rem; border: 1px solid var(--border); border-radius: 12px; background: #f8f8f9; }
.sim-slot-editor .form-label { display: flex; align-items: center; gap: .5rem; margin-bottom: .5rem; }
.sim-slot-editor .form-label span { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 25px; padding: 0 .45rem; border-radius: 8px; background: rgba(200,138,26,.12); color: #8f5d07; font-size: .75rem; font-weight: 700; }
.sim-slot-control { display: flex; gap: .5rem; }
.sim-slot-control .form-select { min-width: 0; }
.sim-slot-control .sim-edit-link { flex: 0 0 42px; display: grid; place-items: center; }
.sim-slot-editor > small { display: block; margin-top: .45rem; color: var(--text-secondary); font-size: .69rem; }
.slot-help { display: flex; align-items: flex-start; gap: .45rem; margin-top: .75rem; color: var(--text-secondary); font-size: .72rem; }
.slot-help i { color: #a66e0b; }
.sim-balance-bar { display: flex; align-items: center; justify-content: space-between; gap: .8rem; margin: 0 1rem .9rem 1.15rem; padding: .78rem .85rem; border: 1px solid rgba(48,209,88,.2); border-radius: 11px; background: rgba(48,209,88,.07); }
.sim-balance-bar > span { min-width: 0; display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: .15rem .55rem; }
.sim-balance-bar small { color: #47715a; font-size: .72rem; font-style: normal; }
.sim-balance-bar b { color: #167642; font-size: 1.08rem; }
.sim-balance-bar em { grid-column: 1/-1; color: var(--text-secondary); font-size: .68rem; font-style: normal; }
.sim-balance-bar.is-negative { border-color: rgba(255,59,48,.2); background: rgba(255,59,48,.06); }
.sim-balance-bar.is-negative b { color: #c7352d; }
.sim-balance-bar.is-shared { border-color: rgba(123,76,201,.2); background: rgba(123,76,201,.06); }
.sim-balance-bar.is-shared small,.sim-balance-bar.is-shared b { color: #6940a8; }
.sim-balance-bar.is-shared.is-negative b { color: #c7352d; }
.sim-balance-bar.is-virtual { border-color: rgba(10,132,255,.2); background: rgba(10,132,255,.06); }
.sim-balance-bar.is-virtual small,.sim-balance-bar.is-virtual b { color: #086fca; }
.shared-fee-note.virtual-note { border-color: rgba(10,132,255,.2); background: rgba(10,132,255,.06); color: #386786; }
.shared-fee-note { margin: 0 0 .85rem; padding: .72rem .85rem; border-radius: 10px; background: rgba(200,138,26,.08); color: #79520d; font-size: .8rem; }
.shared-fee-note i { margin-right: .3rem; }
.balance-layout { max-width: 900px; margin: 0 auto; display: grid; gap: 1rem; }
.balance-recharge-card { padding: 1.25rem; }
.balance-current { padding: 1.25rem; margin-bottom: 1rem; border-radius: 13px; background: linear-gradient(135deg,#101315,#252a2d); color: #fff; text-align: center; }
.balance-current span,.balance-current small { display: block; color: rgba(255,255,255,.62); }
.balance-current span { font-size: .76rem; }
.balance-current b { display: block; margin: .2rem 0; color: #f5c45b; font-size: 2rem; letter-spacing: -.02em; }
.balance-current small { font-size: .72rem; }
.balance-current.is-negative b { color: #ff8b83; }
.recharge-input-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: .65rem; }
.balance-history-card { overflow: hidden; }
.balance-history-list { padding: .25rem 1rem; }
.balance-history-row { display: grid; grid-template-columns: 38px minmax(0,1fr) auto; align-items: center; gap: .75rem; padding: .85rem .1rem; border-bottom: 1px solid var(--border); }
.balance-history-row:last-child { border-bottom: 0; }
.balance-history-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; }
.balance-history-icon.positive { color: #168448; background: rgba(48,209,88,.12); }
.balance-history-icon.negative { color: #b56d00; background: rgba(255,159,10,.13); }
.balance-history-copy b,.balance-history-copy small,.balance-history-amount b,.balance-history-amount small { display: block; }
.balance-history-copy b { font-size: .86rem; }
.balance-history-copy small,.balance-history-amount small { margin-top: .15rem; color: var(--text-secondary); font-size: .68rem; }
.balance-history-amount { text-align: right; }
.balance-history-amount b { font-size: .9rem; }
.balance-history-amount.positive b { color: #168448; }
.balance-history-amount.negative b { color: #b56d00; }
.deposit-badge { display: inline-flex; margin-left: .35rem; border-radius: 999px; padding: 2px 8px; background: rgba(255,159,10,.14); color: #9b5b00; font-size: .68rem; vertical-align: middle; }
.deposit-badge.zero { background: rgba(0,0,0,.05); color: var(--text-secondary); }
.empty-card { grid-column: 1/-1; padding: 3rem 1rem; border: 1px dashed var(--border-strong); border-radius: var(--radius); color: var(--text-tertiary); text-align: center; }

.platform-section { margin-bottom: 1.7rem; }
.platform-head { display: flex; align-items: center; gap: .7rem; margin-bottom: .7rem; }
.platform-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; background: var(--surface); border: 1px solid var(--border); }
.platform-head b { display: block; font-size: .98rem; }.platform-head small { display: block; color: #62676e; font-size: .78rem; margin-top: .08rem; }

.form-card { padding: 1.25rem; }
.wide-form { max-width: 900px; margin: 0 auto; }
.form-section { border-bottom: 1px solid var(--border); padding-bottom: .35rem; margin-bottom: 1.2rem; }
.form-section h5 { font-size: .95rem; margin-bottom: .9rem; }
.form-section h5 small,.form-label small { color: var(--text-secondary); font-size: .72rem; font-weight: 400; }
.form-actions { display: flex; gap: .6rem; margin-top: 1rem; }
.conflict-card { max-width: 620px; margin: 4rem auto; padding: 2.25rem; }
.conflict-card h3 { margin: .35rem 0 .75rem; }
.conflict-card p { max-width: 500px; margin: 0 auto .65rem; color: var(--text-secondary); line-height: 1.75; }
.conflict-icon {
  width: 64px; height: 64px; display: grid; place-items: center; margin: 0 auto 1rem;
  border-radius: 20px; background: rgba(200,138,26,.12); color: var(--accent); font-size: 1.8rem;
}
.project-checks { display: flex; flex-wrap: wrap; gap: .55rem; margin-bottom: .85rem; }
.project-checks label { display: flex; align-items: center; gap: .4rem; padding: .48rem .7rem; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); font-size: .82rem; cursor: pointer; }
.project-checks label:has(input:checked) { border-color: rgba(0,113,227,.45); background: rgba(0,113,227,.06); color: #0066cc; }
[hidden] { display: none !important; }

/* ---------- DeepSeek AI 资源助理 ---------- */
.ai-nav-link i { color: #e8ad2d; margin-right: .16rem; }
.ai-page-head { margin-bottom: 1rem; }
.ai-assistant-layout { display: grid; grid-template-columns: minmax(0,1fr) 290px; gap: 1rem; align-items: start; }
.ai-chat-card { min-height: 650px; overflow: hidden; display: flex; flex-direction: column; }
.ai-messages { min-height: 480px; max-height: calc(100vh - 320px); overflow-y: auto; padding: 1.15rem; background: #f7f7f8; }
.ai-message { display: flex; align-items: flex-start; gap: .55rem; margin-bottom: .9rem; }
.ai-message.user { justify-content: flex-end; }
.ai-message-icon { flex: 0 0 auto; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; background: #111416; color: #f2b52d; box-shadow: 0 4px 12px rgba(0,0,0,.12); }
.ai-bubble { max-width: min(78%,720px); padding: .72rem .85rem; border: 1px solid var(--border); border-radius: 4px 14px 14px 14px; background: #fff; color: #272a2e; box-shadow: 0 4px 14px rgba(16,18,20,.035); }
.ai-message.user .ai-bubble { border: 0; border-radius: 14px 4px 14px 14px; background: #171a1d; color: #fff; }
.ai-bubble b { display: block; margin-bottom: .25rem; font-size: .9rem; }
.ai-bubble p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .86rem; line-height: 1.68; }
.ai-message.loading .ai-bubble { color: var(--text-secondary); animation: aiPulse 1.25s ease-in-out infinite; }
@keyframes aiPulse { 50% { opacity: .55; } }
.ai-draft-actions { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .7rem; padding-top: .65rem; border-top: 1px solid var(--border); }
.ai-config-warning { display: flex; align-items: center; gap: .65rem; margin: .8rem 1rem 0; padding: .72rem .85rem; border: 1px solid rgba(255,159,10,.28); border-radius: 11px; background: rgba(255,159,10,.08); color: #875600; }
.ai-config-warning > i { font-size: 1.2rem; }.ai-config-warning span,.ai-config-warning small { display: block; }.ai-config-warning b { font-size: .85rem; }.ai-config-warning small { margin-top: .1rem; color: #836a3f; font-size: .7rem; }
.ai-composer { margin-top: auto; padding: .9rem 1rem 1rem; border-top: 1px solid var(--border); background: #fff; }
.ai-composer textarea { width: 100%; min-height: 62px; max-height: 170px; resize: vertical; padding: .72rem .8rem; border: 1px solid var(--border-strong); border-radius: 11px; outline: 0; font: inherit; font-size: .86rem; line-height: 1.55; }
.ai-composer textarea:focus { border-color: rgba(200,138,26,.7); box-shadow: 0 0 0 3px rgba(200,138,26,.1); }
.ai-composer-bottom { display: flex; align-items: center; justify-content: space-between; gap: .7rem; margin-top: .55rem; }
.ai-composer-bottom small { color: var(--text-tertiary); font-size: .67rem; }
.ai-sidebar { display: grid; gap: .8rem; }
.ai-side-card { padding: 1rem; }
.ai-side-card h6 { display: flex; align-items: center; gap: .42rem; margin: 0 0 .75rem; font-size: .85rem; }
.ai-side-card h6 i { color: #a66e0b; }
.ai-prompt-list { display: grid; gap: .42rem; }
.ai-prompt { padding: .58rem .65rem; border: 1px solid var(--border); border-radius: 9px; background: #f8f8f9; color: #4d5258; text-align: left; font-size: .72rem; line-height: 1.45; }
.ai-prompt:hover:not(:disabled) { border-color: rgba(200,138,26,.45); background: rgba(200,138,26,.06); color: #805407; }
.ai-safety-card ul { margin: 0; padding-left: 1.1rem; color: var(--text-secondary); font-size: .72rem; line-height: 1.85; }
.ai-usage-card > div { display: flex; align-items: baseline; gap: .4rem; }.ai-usage-card > div b { color: #986205; font-size: 1.8rem; }.ai-usage-card > div span { color: var(--text-secondary); font-size: .72rem; }.ai-usage-card > small { display: block; color: var(--text-tertiary); font-size: .66rem; }
.ai-draft-notice { display: flex; align-items: flex-start; gap: .55rem; margin-bottom: 1rem; }
.ai-draft-notice i { margin-top: .08rem; }.ai-draft-notice b,.ai-draft-notice small { display: block; }.ai-draft-notice small { margin-top: .15rem; }

.table-card { overflow: hidden; }
.project-table thead th:not(:first-child),
.project-table tbody td:not(:first-child) { text-align: center; }
.project-table tbody td { height: 58px; }
.project-table .actions-col { text-align: right !important; }
.project-list-table { min-width: 980px; }
.dashboard-project-table { min-width: 820px; }
.dashboard-project-table th:first-child,.dashboard-project-table td:first-child { width: 27%; }
.dashboard-project-table th:nth-child(2),.dashboard-project-table td:nth-child(2) { width: 12%; }
.dashboard-project-table th:nth-child(3),.dashboard-project-table td:nth-child(3) { width: 24%; }
.table-sub { display: block; color: var(--text-secondary); margin-top: .2rem; max-width: 320px; }
.strong-link { font-weight: 600; color: var(--text); }
.mini-progress { width: 110px; max-width: 100%; height: 6px; background: rgba(0,0,0,.06); border-radius: 999px; overflow: hidden; display: inline-block; vertical-align: middle; margin: 0; }
.mini-progress span { display: block; height: 100%; background: linear-gradient(90deg,#0071e3,#5ac8fa); border-radius: inherit; }
.progress-cell { display: flex; align-items: center; justify-content: center; gap: .48rem; min-width: 150px; }
.progress-cell small { min-width: 36px; text-align: right; color: var(--text-secondary); }

.project-progress-card { padding: 1rem 1.15rem; margin-bottom: 1rem; }
.progress-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: .65rem; font-size: .85rem; }
.progress-top b { color: var(--accent); }.progress-top strong { font-size: 1.15rem; color: var(--accent); }
.project-progress { height: 9px; border-radius: 999px; background: rgba(0,0,0,.06); overflow: hidden; }
.project-progress span { display: block; height: 100%; background: linear-gradient(90deg,#0071e3,#5ac8fa); border-radius: inherit; }
.phase-track { display: flex; justify-content: space-between; margin-top: .65rem; }
.phase-track span { flex: 1; text-align: center; color: var(--text-tertiary); font-size: .68rem; position: relative; padding-top: .8rem; }
.phase-track i { width: 7px; height: 7px; position: absolute; top: .15rem; left: 50%; transform: translateX(-50%); border-radius: 50%; background: var(--border-strong); }
.phase-track .done i,.phase-track .current i { background: var(--accent); }.phase-track .current { color: var(--accent); font-weight: 600; }.phase-track .current i { box-shadow: 0 0 0 3px rgba(0,113,227,.16); }
.project-meta-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: .8rem; margin-bottom: .8rem; }
.meta-block { padding: .85rem 1rem; }.meta-block span { display: block; color: var(--text-tertiary); font-size: .68rem; }.meta-block b { display: block; margin-top: .2rem; font-size: .9rem; }
.project-note-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .8rem; margin-bottom: 1rem; }
.note-block { padding: 1rem; }.note-block h6 { margin: 0 0 .45rem; font-size: .85rem; }.note-block p { margin: 0; white-space: pre-wrap; color: var(--text-secondary); font-size: .82rem; }
.project-resource-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; }
.resource-panel { overflow: hidden; }
.resource-panel .card-head b { min-width: 25px; text-align: center; padding: 2px 7px; border-radius: 999px; background: rgba(0,113,227,.08); color: #0066cc; font-size: .72rem; }
.resource-list { max-height: 430px; overflow: auto; }
.resource-row { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .65rem .85rem; border-bottom: 1px solid var(--border); }
.resource-row > span { min-width: 0; }.resource-row a { font-size: .82rem; font-weight: 550; }.resource-row small { display: block; color: var(--text-secondary); font-size: .68rem; margin-top: .15rem; }
.platform-resource-planner,.platform-pool-card { border: 1px solid var(--border); border-radius: 12px; background: #f8f8f9; overflow: hidden; }
.planner-empty { min-height: 88px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .25rem; padding: 1.15rem; color: var(--text-secondary); text-align: center; font-size: .78rem; }
.planner-empty b { color: var(--text-primary); font-size: .9rem; }
.planner-summary { display: flex; align-items: center; gap: .7rem; padding: .7rem .85rem; border-bottom: 1px solid var(--border); background: #fff; color: var(--text-secondary); font-size: .73rem; }
.planner-summary span:first-child { padding: .3rem .55rem; border-radius: 8px; background: rgba(48,209,88,.1); color: #197a43; }
.planner-summary b { font-size: .9rem; }
.planner-account-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .65rem; padding: .8rem; }
.planner-account { display: flex; flex-direction: column; gap: .25rem; min-width: 0; padding: .75rem; border: 1px solid var(--border); border-radius: 10px; background: #fff; color: #2c3035; }
.planner-account:hover { border-color: rgba(200,138,26,.4); box-shadow: 0 5px 14px rgba(16,18,20,.05); }
.planner-account.is-available { border-color: rgba(48,209,88,.25); background: rgba(48,209,88,.035); }
.planner-account-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.planner-account-top b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .86rem; }
.planner-account-top em { flex: 0 0 auto; padding: 2px 7px; border-radius: 999px; background: #f0f1f2; color: #6d7279; font-size: .65rem; font-style: normal; }
.planner-account.is-available .planner-account-top em { background: rgba(48,209,88,.13); color: #197a43; }
.planner-account > small { color: #8a8f96; font-size: .68rem; }
.planner-account > span:not(.planner-account-top) { overflow: hidden; color: var(--text-secondary); font-size: .69rem; text-overflow: ellipsis; white-space: nowrap; }
.planner-account > span i { width: 15px; color: #a66e0b; }
.platform-pool-card { margin-bottom: 1rem; background: #fff; }
.platform-pool-summary { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); border-bottom: 1px solid var(--border); }
.platform-pool-summary span { display: flex; flex-direction: column; align-items: center; padding: .75rem; border-right: 1px solid var(--border); }
.platform-pool-summary span:last-child { border-right: 0; }
.platform-pool-summary b { font-size: 1.1rem; }
.platform-pool-summary small { color: var(--text-secondary); font-size: .68rem; }
.icon-button { border: 0; width: 25px; height: 25px; border-radius: 50%; background: rgba(255,59,48,.08); color: #d23535; font-size: 1rem; line-height: 1; }
.resource-add { display: flex; gap: .45rem; padding: .75rem; border-top: 1px solid var(--border); }
.derived-projects { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: .85rem; }
.derived-link-icon { color: #9a680f; font-size: 1.1rem; }
.derived-edit-link { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; background: rgba(0,113,227,.08); color: #0066cc; }

.withdraw-summary { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1rem; margin-bottom: 1rem; }
.withdraw-summary .card { min-height: 112px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 1rem; text-align: center; }.withdraw-summary span { color: var(--text-secondary); font-size: .76rem; }.withdraw-summary b { display: block; font-size: 1.5rem; margin: .15rem 0; }.withdraw-summary small { color: var(--text-tertiary); }
.withdraw-summary .success b { color: #1d8a4a; }.withdraw-summary .warning b { color: #b76b00; }
.log-time { min-width: 168px; white-space: nowrap; }
.status-form { margin-right: auto; }.status-form select { width: auto; }

@media (max-width: 980px) {
  .stat-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .res-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .project-resource-grid,.project-note-grid { grid-template-columns: 1fr; }
  .ai-assistant-layout { grid-template-columns: 1fr; }
  .ai-sidebar { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 768px) {
  .user-menu { margin-left: 0; padding-left: 0; border-left: 0; }
  .page-head { align-items: flex-start; }.page-head h3 { font-size: 1.35rem; }
  .availability-grid,.res-grid,.project-meta-grid,.withdraw-summary { grid-template-columns: 1fr; }
  .filter-bar .form-control,.filter-bar .form-select { width: 100%; }
  .filter-bar.filter-bar-compact { width: 100%; }
  .rc-info { grid-template-columns: 1fr; }.rc-field.full { grid-column: auto; }
  .section-title > div { display: block; }.section-title small { display: block; margin-top: .2rem; }
}
@media (max-width: 520px) {
  .stat-grid { grid-template-columns: 1fr; }
  .page-head { flex-direction: column; }.page-actions { justify-content: flex-start; }
  .form-card { padding: 1rem; }
  .sim-slot-grid { grid-template-columns: 1fr; }
  .sim-slot-editor-grid,.planner-account-grid { grid-template-columns: 1fr; }
  .form-section-head { align-items: flex-start; flex-direction: column; }
  .sim-balance-bar { align-items: stretch; flex-direction: column; }
  .sim-balance-bar .btn { width: 100%; }
  .recharge-input-row { grid-template-columns: 1fr; }
  .balance-history-row { grid-template-columns: 34px minmax(0,1fr); }
  .balance-history-amount { grid-column: 2; text-align: left; }
}

/* ============================================
   融泰品牌视觉系统 · 黑 / 白 / 金
   ============================================ */
:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --text: #16181b;
  --text-secondary: #656a72;
  --text-tertiary: #8f949c;
  --border: rgba(20, 22, 25, .09);
  --border-strong: #d7d9dd;
  --accent: #c88a1a;
  --accent-hover: #a86c0b;
  --brand-dark: #0b0d0f;
  --brand-gold: #e1a72f;
  --brand-gold-light: #f6d98e;
  --radius: 16px;
  --radius-md: 12px;
  --radius-sm: 9px;
  --shadow: 0 8px 24px rgba(16, 18, 20, .055);
  --shadow-hover: 0 14px 34px rgba(16, 18, 20, .1);
}

body { background: var(--bg); }
a { color: #a86c0b; }
a:hover { color: #7d4d04; }

.navbar-app {
  background: rgba(11, 13, 15, .96);
  border-bottom: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 8px 26px rgba(0,0,0,.14);
  padding: .58rem 0;
}
.navbar-app .navbar-brand {
  display: inline-flex; align-items: center; gap: .62rem;
  color: #fff; min-width: 198px;
}
.navbar-app .navbar-brand:hover { color: #fff; }
.navbar-app .navbar-brand > span:last-child { display: flex; flex-direction: column; line-height: 1.05; }
.navbar-app .navbar-brand b { font-size: .98rem; letter-spacing: .08em; }
.navbar-app .navbar-brand small { margin-top: .28rem; color: rgba(255,255,255,.48); font-size: .58rem; font-weight: 500; letter-spacing: .09em; }
.brand-logo {
  width: 78px; height: 36px; position: relative; flex: 0 0 auto; overflow: hidden;
  border: 0; border-radius: 0; background: transparent;
}
.brand-logo img {
  width: 100%; height: 100%; object-fit: cover; object-position: center; display: block;
}
.brand-wordmark { padding-left: .76rem; border-left: 1px solid rgba(255,255,255,.14); }
.navbar-app .nav-link {
  color: rgba(255,255,255,.68); font-size: .86rem; font-weight: 500;
  padding: .48rem .76rem !important;
}
.navbar-app .nav-link:hover { color: #fff; background: rgba(255,255,255,.07); }
.navbar-app .nav-link.active { color: var(--brand-gold-light); background: rgba(225,167,47,.13); }
.navbar-app .navbar-toggler { color: #fff; border: 1px solid rgba(255,255,255,.16); }
.navbar-app .navbar-toggler-icon { filter: invert(1); }
.user-menu { border-left-color: rgba(255,255,255,.12); }
.user-menu > .nav-link { display: flex; align-items: center; gap: .48rem; }
.nav-avatar { width: 29px; height: 29px; object-fit: cover; border-radius: 50%; border: 1px solid rgba(225,167,47,.52); }
.dropdown-menu { padding: .45rem; border: 1px solid var(--border); border-radius: 13px; box-shadow: 0 14px 44px rgba(0,0,0,.16); }
.dropdown-item { border-radius: 8px; font-size: .87rem; padding: .5rem .65rem; }
.dropdown-item i { width: 1.3rem; display: inline-block; color: var(--text-secondary); }
.dropdown-user-summary { display: flex; align-items: center; gap: .65rem; padding: .5rem .58rem; min-width: 210px; }
.dropdown-user-summary img { width: 42px; height: 42px; object-fit: cover; border-radius: 50%; }
.dropdown-user-summary span { min-width: 0; }
.dropdown-user-summary b,.dropdown-user-summary small { display: block; }
.dropdown-user-summary b { font-size: .9rem; }
.dropdown-user-summary small { color: var(--text-secondary); font-size: .72rem; }

main.container { max-width: 1400px; padding-top: 2rem; }
.page-head { margin-bottom: 1.2rem; }
.page-head h3 { font-size: 1.55rem; color: var(--brand-dark); }
.page-title-icon { color: var(--accent); font-size: .94em; margin-right: .15rem; }
.eyebrow { color: #9e690c; letter-spacing: .15em; }

.card { border-color: var(--border); box-shadow: var(--shadow); }
.btn { font-weight: 550; }
.btn-primary {
  color: #fff; background: var(--brand-dark); border-color: var(--brand-dark);
  box-shadow: 0 5px 12px rgba(11,13,15,.12);
}
.btn-primary:hover,.btn-primary:focus {
  color: var(--brand-dark); background: var(--brand-gold); border-color: var(--brand-gold);
}
.form-control:focus,.form-select:focus { border-color: #c88a1a; box-shadow: 0 0 0 4px rgba(200,138,26,.13); }

.stat-grid { gap: .85rem; }
.stat-card { min-height: 116px; padding: 1rem; border-top: 3px solid transparent; }
.stat-card::after { width: 80px; height: 80px; }
.stat-card .stat-icon {
  width: 44px; height: 44px; border-radius: 12px; color: #fff;
  background: var(--brand-dark); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}
.stat-card .stat-icon i { font-size: 1.1rem; }
.stat-num { color: var(--brand-dark); font-size: 1.55rem; }
.tone-blue,.tone-green,.tone-orange,.tone-purple { color: var(--brand-gold); }
.tone-blue { border-top-color: #556b82; }
.tone-green { border-top-color: #5d856c; }
.tone-orange { border-top-color: #c88a1a; }
.tone-purple { border-top-color: #756a86; }
.tone-license { border-top-color: #a87925; }
.section-title span i,.card-head span i { color: var(--accent); margin-right: .28rem; }

.filter-bar { background: #fff; box-shadow: 0 4px 14px rgba(16,18,20,.025); }
.res-card2 { box-shadow: 0 5px 18px rgba(16,18,20,.045); }
.res-card2:hover { box-shadow: var(--shadow-hover); }
.platform-icon { background: var(--brand-dark); border-color: var(--brand-dark); color: var(--brand-gold-light); }
.platform-icon i { font-size: 1rem; }
.project-chip,.plat-chip { background: rgba(200,138,26,.1); color: #8d5a04; }
.mini-progress span,.project-progress span { background: linear-gradient(90deg,#986209,#e3ad3c); }
.phase-track .done i,.phase-track .current i { background: var(--accent); }
.phase-track .current { color: #9e690c; }
.phase-track .current i { box-shadow: 0 0 0 3px rgba(200,138,26,.17); }
.note-block h6 i { color: var(--accent); margin-right: .25rem; }
.project-checks label:has(input:checked) { border-color: rgba(200,138,26,.58); background: rgba(200,138,26,.08); color: #8d5a04; }

.user-cell { display: inline-flex; align-items: center; gap: .65rem; vertical-align: middle; }
.user-cell img { width: 40px; height: 40px; object-fit: cover; border-radius: 50%; border: 1px solid var(--border); }
.user-cell b,.user-cell small { display: block; }
.user-cell b { font-size: .9rem; }
.user-cell small { color: var(--text-secondary); font-size: .7rem; margin-top: .08rem; }

.profile-layout { display: grid; grid-template-columns: 270px minmax(0,1fr); gap: 1rem; align-items: start; max-width: 1000px; margin: 0 auto; }
.profile-preview-card { position: sticky; top: 92px; padding: 1.5rem; text-align: center; background: var(--brand-dark); color: #fff; overflow: hidden; }
.profile-preview-card::before { content: ''; position: absolute; width: 180px; height: 180px; right: -90px; top: -90px; border-radius: 50%; background: rgba(225,167,47,.14); }
.profile-preview-label { color: rgba(255,255,255,.48); font-size: .68rem; letter-spacing: .12em; }
.profile-preview-card img { width: 118px; height: 118px; object-fit: cover; border-radius: 50%; border: 4px solid rgba(225,167,47,.68); margin: 1.2rem auto .9rem; box-shadow: 0 10px 30px rgba(0,0,0,.26); }
.profile-preview-card h4 { margin: 0; color: #fff; font-size: 1.2rem; }
.profile-username { display: block; color: rgba(255,255,255,.48); margin-top: .25rem; font-size: .78rem; }
.role-pill { display: inline-flex; align-items: center; gap: .35rem; margin-top: 1rem; padding: .35rem .7rem; border: 1px solid rgba(225,167,47,.32); border-radius: 999px; color: var(--brand-gold-light); background: rgba(225,167,47,.1); font-size: .72rem; }
.profile-form-card { max-width: none; }
.avatar-picker { display: grid; grid-template-columns: repeat(8,minmax(0,1fr)); gap: .75rem; }
.avatar-option { position: relative; display: block; cursor: pointer; margin: 0; }
.avatar-option input { position: absolute; opacity: 0; pointer-events: none; }
.avatar-option img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 50%; border: 3px solid transparent; transition: transform .16s,border-color .16s,box-shadow .16s; }
.avatar-option:hover img { transform: translateY(-2px); box-shadow: 0 8px 16px rgba(0,0,0,.12); }
.avatar-option > span { position: absolute; right: -1px; bottom: -1px; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; color: transparent; background: transparent; font-size: .7rem; }
.avatar-option input:checked + img { border-color: var(--brand-gold); box-shadow: 0 0 0 3px rgba(225,167,47,.2); }
.avatar-option input:checked ~ span { color: var(--brand-dark); background: var(--brand-gold); }

/* 登录页 */
.login-page { margin: 0; min-height: 100vh; background: #fff; }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0,1fr) minmax(440px,1fr); }
.login-visual {
  position: relative; overflow: hidden; display: flex; align-items: flex-start; min-height: 100vh;
  padding: clamp(4.5rem,12vh,7.5rem) clamp(3rem,6vw,7rem) clamp(3rem,6vw,7rem);
  background: #080a0c; color: #fff;
}
.login-visual::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 72% 54%,rgba(225,167,47,.11),transparent 34%),linear-gradient(120deg,rgba(255,255,255,.035),transparent 45%); }
.login-visual::after { content: ''; position: absolute; left: clamp(3rem,6vw,7rem); bottom: 12%; width: 58px; height: 3px; background: var(--brand-gold); }
.login-visual-copy { position: relative; z-index: 2; width: min(590px,72%); }
.login-kicker { color: var(--brand-gold-light); font-size: .72rem; font-weight: 650; letter-spacing: .3em; }
.login-visual h1 { margin: 1.05rem 0 1.25rem; font-size: clamp(2.5rem,4.3vw,4.7rem); line-height: 1.1; font-weight: 650; letter-spacing: -.055em; }
.login-visual h1 em { color: var(--brand-gold); font-style: normal; }
.login-visual-copy > p { width: min(520px,100%); color: rgba(255,255,255,.57); line-height: 1.85; font-size: .95rem; }
.login-points { display: flex; gap: 1.35rem; flex-wrap: wrap; margin-top: 2rem; color: rgba(255,255,255,.75); font-size: .75rem; }
.login-points span { display: inline-flex; align-items: center; gap: .4rem; }
.login-points i { color: var(--brand-gold); }
.login-hero-logo { position: absolute; right: -8%; bottom: -21%; z-index: 1; width: min(49vw,720px); opacity: .43; mix-blend-mode: screen; filter: contrast(1.1); }
.login-panel { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 3rem clamp(2rem,5vw,5.5rem); background: #fff; }
.login-card { width: min(410px,100%); }
.login-brand {
  display: flex; align-items: center; justify-content: center; width: fit-content; max-width: 100%;
  gap: .78rem; margin: 0 auto clamp(3rem,8vh,5.5rem); padding: .58rem .78rem .58rem .58rem;
  border: 1px solid #e7e7e9; border-radius: 14px; background: #fafafb;
  box-shadow: 0 8px 24px rgba(16,18,20,.055);
}
.login-brand-mark { width: 88px; height: 42px; position: relative; flex: 0 0 auto; border: 0; border-radius: 9px; overflow: hidden; background: #080a0c; }
.login-brand-mark img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.login-brand > span:last-child { display: flex; flex-direction: column; line-height: 1.05; }
.login-brand b { font-size: 1rem; letter-spacing: .12em; }
.login-brand small { margin-top: .32rem; color: var(--text-tertiary); font-size: .57rem; letter-spacing: .13em; }
.login-heading > span { color: #a76d0b; font-size: .68rem; font-weight: 700; letter-spacing: .2em; }
.login-heading h2 { margin: .65rem 0 .45rem; font-size: 2rem; font-weight: 680; letter-spacing: -.04em; }
.login-heading p { color: var(--text-secondary); margin-bottom: 2rem; font-size: .88rem; }
.input-with-icon { position: relative; }
.input-with-icon > i { position: absolute; z-index: 1; left: .95rem; top: 50%; transform: translateY(-50%); color: #8a8f96; }
.input-with-icon .form-control { height: 49px; padding-left: 2.65rem; padding-right: 2.7rem; background: #f8f8f9; border-color: #e1e2e5; }
.password-toggle { position: absolute; z-index: 2; right: .65rem; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border: 0; border-radius: 50%; background: transparent; color: #72777f; }
.password-toggle:hover { background: #eeeef0; color: #17191c; }
.login-submit {
  height: 50px; display: flex; align-items: center; justify-content: center; gap: .65rem; border-radius: 10px;
  color: #16181b; background: linear-gradient(90deg,#f1b413,#f39a11); border-color: #e8a416;
}
.login-submit:hover,.login-submit:focus { color: #fff; background: var(--brand-dark); border-color: var(--brand-dark); }
.login-footnote { margin: 1.5rem 0 0; color: var(--text-tertiary); text-align: center; font-size: .7rem; }
.login-footnote i { color: #b47a12; }

.app-footer { color: #8a8f96; border-top-color: var(--border); }

/* 营业执照资源库 */
.license-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1rem; }
.license-card { position: relative; overflow: hidden; padding: 1rem; border-left: 4px solid #5d856c; }
.license-card.license-state-expiring,.license-card.license-state-suspended { border-left-color: var(--brand-gold); }
.license-card.license-state-expired { border-left-color: #c95d5d; }
.license-card.license-state-cancelled { border-left-color: #8d9299; }
.license-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: .8rem; }
.license-card-top > div { min-width: 0; }
.license-card-top small { color: var(--text-tertiary); font-size: .68rem; }
.license-card-top h5 { margin: .2rem 0 .08rem; font-size: 1rem; line-height: 1.38; }
.license-card-top h5 a { color: var(--text); text-decoration: none; }
.license-card-top .mono { display: block; color: var(--text-secondary); font-size: .72rem; overflow-wrap: anywhere; }
.license-badges { display: flex; flex-wrap: wrap; gap: .3rem; justify-content: flex-end; }
.license-annual-alert { display: flex; align-items: flex-start; gap: .55rem; margin: .85rem 0 0; padding: .7rem .8rem; border-radius: 10px; font-size: .78rem; }
.license-annual-alert i { flex: none; margin-top: .1rem; font-size: .95rem; }
.license-annual-alert b { display: block; font-size: .81rem; }
.license-annual-alert em { display: block; margin-top: .12rem; font-style: normal; opacity: .82; font-size: .73rem; }
.license-annual-alert.due,.license-annual-alert.unknown { border: 1px solid rgba(255,159,10,.28); background: rgba(255,159,10,.1); color: #8a5300; }
.license-annual-alert.overdue { border: 1px solid rgba(255,69,58,.3); background: rgba(255,69,58,.1); color: #a3231a; }
.license-card-metrics { display: grid; grid-template-columns: .72fr 1.1fr .9fr .9fr; margin: .95rem 0; padding: .75rem .2rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: #f8f8f9; }
.license-card-metrics span { min-width: 0; padding: 0 .58rem; text-align: center; border-right: 1px solid var(--border); }
.license-card-metrics span:last-child { border-right: 0; }
.license-card-metrics b,.license-card-metrics small { display: block; }
.license-card-metrics b { color: var(--text); font-size: .78rem; overflow-wrap: anywhere; }
.license-card-metrics small { margin-top: .15rem; color: var(--text-tertiary); font-size: .62rem; }
.license-card-info { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .7rem .9rem; margin-bottom: .85rem; }
.license-card-info > span { display: grid; grid-template-columns: 17px minmax(0,1fr); align-items: start; }
.license-card-info > span.full { grid-column: 1/-1; }
.license-card-info i { grid-row: 1/3; color: var(--accent); margin-top: .1rem; }
.license-card-info small,.license-card-info b { display: block; min-width: 0; }
.license-card-info small { color: var(--text-tertiary); font-size: .64rem; }
.license-card-info b { color: var(--text-secondary); font-size: .76rem; font-weight: 550; overflow-wrap: anywhere; }
.form-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.form-inline-link { flex: 0 0 auto; font-size: .75rem; text-decoration: none; }
.current-document { display: flex; align-items: center; gap: .8rem; padding: .75rem .85rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: #f8f8f9; }
.current-document > span { min-width: 0; flex: 1; display: grid; grid-template-columns: 22px minmax(0,1fr); }
.current-document i { grid-row: 1/3; color: var(--accent); }
.current-document b,.current-document small { overflow-wrap: anywhere; }
.current-document small { color: var(--text-tertiary); font-size: .66rem; }
.current-document label { display: inline-flex; align-items: center; gap: .35rem; color: #a43f3f; font-size: .72rem; }
.license-detail-layout { display: grid; grid-template-columns: minmax(0,1.65fr) minmax(280px,.72fr); gap: 1rem; align-items: start; }
.license-detail-card,.license-document-card { padding: 1rem; }
.license-detail-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; }
.license-detail-grid > span { min-width: 0; padding: .72rem; border-radius: var(--radius-sm); background: #f8f8f9; }
.license-detail-grid > span.full { grid-column: 1/-1; }
.license-detail-grid small,.license-detail-grid b { display: block; }
.license-detail-grid small { margin-bottom: .22rem; color: var(--text-tertiary); font-size: .66rem; }
.license-detail-grid b { color: var(--text); font-size: .84rem; overflow-wrap: anywhere; }
.license-detail-grid .normal-weight { font-weight: 450; line-height: 1.7; }
.license-document-card { display: flex; flex-direction: column; gap: .75rem; }
.license-document-preview { display: block; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-sm); background: #f3f3f4; }
.license-document-preview img { display: block; width: 100%; max-height: 370px; object-fit: contain; }
.license-pdf-preview { min-height: 190px; display: grid; place-content: center; justify-items: center; gap: .7rem; padding: 1rem; border-radius: var(--radius-sm); background: #f5f5f6; text-align: center; }
.license-pdf-preview i { color: #b44747; font-size: 2.2rem; }
.license-pdf-preview b { max-width: 100%; overflow-wrap: anywhere; font-size: .8rem; }
.license-file-preview { min-height: 190px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .65rem; padding: 1.25rem; border: 1px dashed var(--border); border-radius: var(--radius-sm); background: #f5f5f6; color: var(--muted); text-align: center; }
.license-file-preview i { color: var(--accent); font-size: 2.2rem; }
.license-file-preview b { max-width: 100%; overflow-wrap: anywhere; color: var(--text); font-size: .82rem; }
.license-file-preview span { font-size: .72rem; line-height: 1.6; }
.license-member-note { display: flex; align-items: center; gap: .45rem; margin-top: .85rem; padding: .65rem .75rem; border-radius: var(--radius-sm); background: var(--bg); color: var(--muted); font-size: .72rem; }
.license-member-note i { color: var(--accent); }
.license-document-card > small { color: var(--text-tertiary); font-size: .65rem; }
.license-account-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1rem; }
.license-account-card { display: flex; flex-direction: column; gap: .8rem; padding: 1rem; }
.license-account-card h6 { margin: .3rem 0 .1rem; }
.platform-mini { display: inline-flex; padding: .18rem .48rem; border-radius: 999px; background: rgba(200,138,26,.1); color: #8d5a04; font-size: .64rem; }
.license-account-meta { display: grid; gap: .32rem; color: var(--text-secondary); font-size: .72rem; }
.license-account-meta i { width: 1rem; color: var(--accent); }
.license-account-card .btn { align-self: flex-start; }
.license-account-field .v { display: flex; flex-wrap: wrap; align-items: center; gap: .24rem; }
.license-account-field .v small { color: var(--text-tertiary); }
.license-inline-state { display: inline-flex; padding: .12rem .4rem; border-radius: 999px; background: #e9f5ed; color: #34704a; font-size: .62rem; font-style: normal; }
.license-inline-state.state-expiring,.license-inline-state.state-suspended { background: #fff4da; color: #91620a; }
.license-inline-state.state-expired { background: #fde9e9; color: #a84242; }
.license-inline-state.state-cancelled { background: #eceeef; color: #696d73; }
.license-missing,.planner-license.is-missing { color: #b14b3f !important; font-weight: 600; }
.planner-license { color: #76500d !important; }

@media (max-width: 1199px) {
  .navbar-collapse { padding-top: .8rem; }
  .navbar-app .nav-link { padding: .58rem .7rem !important; }
  .user-menu { margin-top: .35rem; padding-top: .4rem; border-left: 0; border-top: 1px solid rgba(255,255,255,.1); }
  .license-grid,.license-account-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .stat-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .license-card-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); row-gap: .55rem; }
  .license-card-metrics span:nth-child(2n) { border-right: 0; }
}

@media (max-width: 1100px) {
  .res-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .login-shell { grid-template-columns: minmax(0,1fr) minmax(420px,.92fr); }
  .login-visual { padding: 3rem; }
  .login-visual-copy { width: 82%; }
  .login-visual::after { left: 3rem; }
  .navbar-app .nav-link { padding-inline: .55rem !important; }
}

@media (max-width: 991px) {
  .navbar-collapse { padding-top: .8rem; }
  .navbar-app .nav-link { padding: .58rem .7rem !important; }
  .user-menu { margin-top: .35rem; padding-top: .4rem; border-left: 0; border-top: 1px solid rgba(255,255,255,.1); }
  .profile-layout { grid-template-columns: 230px minmax(0,1fr); }
  .avatar-picker { grid-template-columns: repeat(6,minmax(0,1fr)); }
  .login-shell { grid-template-columns: 1fr; }
  .login-visual { min-height: 260px; padding: 3rem; align-items: flex-start; }
  .login-visual-copy { width: 72%; }
  .login-visual h1 { font-size: 2.6rem; margin-block: .7rem; }
  .login-visual-copy > p { display: none; }
  .login-points { margin-top: 1.2rem; }
  .login-hero-logo { width: 430px; right: -85px; bottom: -160px; }
  .login-panel { min-height: auto; padding: 3.5rem 2rem 4rem; }
  .login-brand { margin-bottom: 2.6rem; }
}

@media (max-width: 768px) {
  main.container { padding: 1.35rem 1rem 3rem; }
  .page-head { margin-bottom: 1rem; }
  .stat-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: .7rem; }
  .stat-card { min-height: 136px; padding: .85rem; gap: .52rem; }
  .stat-card .stat-icon { width: 38px; height: 38px; }
  .stat-num { font-size: 1.35rem; }
  .res-grid { grid-template-columns: 1fr; }
  .rc-info { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .rc-field.full { grid-column: 1/-1; }
  .profile-layout { grid-template-columns: 1fr; }
  .profile-preview-card { position: relative; top: auto; display: grid; grid-template-columns: 80px 1fr; grid-template-rows: auto auto auto; text-align: left; column-gap: 1rem; align-items: center; }
  .profile-preview-label { grid-column: 2; }
  .profile-preview-card img { grid-row: 1/4; width: 80px; height: 80px; margin: 0; }
  .profile-preview-card h4 { grid-column: 2; }
  .profile-username { grid-column: 2; }
  .role-pill { grid-column: 1/-1; justify-self: start; }
  .avatar-picker { grid-template-columns: repeat(6,minmax(0,1fr)); gap: .6rem; }
  .license-grid,.license-account-grid,.license-detail-layout { grid-template-columns: 1fr; }
  .license-detail-grid { grid-template-columns: 1fr; }
  .license-detail-grid > span.full { grid-column: auto; }
  .form-label-row,.current-document { align-items: flex-start; flex-direction: column; }
  .ai-chat-card { min-height: 600px; }.ai-messages { min-height: 420px; max-height: none; }.ai-sidebar { grid-template-columns: 1fr; }
  .ai-bubble { max-width: 88%; }
}

@media (max-width: 520px) {
  .navbar-app .navbar-brand small { display: none; }
  .navbar-app .navbar-brand { min-width: 0; }
  .brand-logo { width: 72px; }
  .page-head h3 { font-size: 1.28rem; }
  .page-head p { font-size: .8rem; }
  .stat-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .stat-card { align-items: center; min-height: 132px; }
  .stat-card .small { font-size: .68rem; }
  .avatar-picker { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .login-visual { min-height: 205px; padding: 2rem 1.5rem; }
  .login-kicker { font-size: .58rem; }
  .login-visual h1 { font-size: 2rem; }
  .login-points { gap: .75rem; font-size: .67rem; }
  .login-visual::after { display: none; }
  .login-hero-logo { width: 320px; right: -100px; bottom: -130px; }
  .login-panel { padding: 2.25rem 1.35rem 3rem; }
  .login-brand { margin-bottom: 2rem; }
  .login-heading h2 { font-size: 1.7rem; }
}
