/* ==========================================================================
   高池公司 · 会员权益管理系统
   界面样式表（浅色企业后台）
   ========================================================================== */

:root {
  --brand:        #C0671C;
  --brand-600:    #A85814;
  --brand-700:    #8E4A11;
  --brand-050:    #FBF3EA;
  --brand-100:    #F4E3D2;

  --bg:           #F2F3F5;
  --panel:        #FFFFFF;
  --panel-2:      #FAFBFC;
  --border:       #E2E6EB;
  --border-2:     #EDEFF2;

  --text:         #1D2129;
  --text-2:       #56606E;
  --text-3:       #8A929E;
  --text-4:       #ABB2BD;

  --ok:           #1E8E4E;
  --ok-bg:        #EAF6EE;
  --warn:         #B87A0B;
  --warn-bg:      #FDF5E4;
  --danger:       #B93A2B;
  --danger-bg:    #FBEDEA;
  --info:         #2A62C4;
  --info-bg:      #EBF1FC;
  --muted-bg:     #F0F2F5;

  --radius:       4px;
  --radius-lg:    6px;
  --shadow-1:     0 1px 2px rgba(29, 33, 41, .06);
  --shadow-2:     0 4px 14px rgba(29, 33, 41, .10);
  --shadow-3:     0 12px 36px rgba(29, 33, 41, .16);

  --sidebar-w:    218px;
  --header-h:     52px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--info); text-decoration: none; }
a:hover { text-decoration: underline; }

button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #CFD4DC; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: #B7BEC8; }
::-webkit-scrollbar-track { background: transparent; }

/* ========================================================== 登录页 ======= */

.login-page {
  min-height: 100%;
  display: flex;
  background: var(--panel);
}

.login-brand {
  flex: 1 1 56%;
  position: relative;
  background: #2A2018;
  color: #F6EFE7;
  padding: 52px 64px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

.login-brand::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(1100px 620px at 78% 8%, rgba(192, 103, 28, .34), transparent 62%),
    radial-gradient(760px 520px at 8% 96%, rgba(120, 66, 16, .30), transparent 66%);
  pointer-events: none;
}

.login-brand > * { position: relative; z-index: 1; }

.login-brand .lb-top { display: flex; align-items: center; gap: 12px; }

.login-brand .lb-logo {
  width: 38px; height: 38px;
  border: 1px solid rgba(246, 239, 231, .5);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 600; letter-spacing: .5px;
  background: rgba(246, 239, 231, .08);
}

.login-brand .lb-org { font-size: 15px; letter-spacing: 2px; font-weight: 500; }
.login-brand .lb-org small { display: block; font-size: 11px; letter-spacing: 1.4px; opacity: .62; margin-top: 2px; }

.login-brand .lb-main { max-width: 520px; }
.login-brand h1 {
  font-size: 30px; font-weight: 600; line-height: 1.34;
  letter-spacing: 1px; margin: 0 0 16px;
}
.login-brand .lb-sub {
  font-size: 13px; line-height: 1.9; opacity: .74; margin: 0 0 34px;
}
.login-brand .lb-points { display: flex; gap: 40px; }
.login-brand .lb-points div { border-left: 2px solid rgba(192, 103, 28, .85); padding-left: 12px; }
.login-brand .lb-points b { display: block; font-size: 20px; font-weight: 600; letter-spacing: .5px; }
.login-brand .lb-points span { font-size: 11px; opacity: .6; letter-spacing: .6px; }

.login-brand .lb-foot { font-size: 11px; opacity: .5; letter-spacing: .4px; }

.login-form-wrap {
  flex: 1 1 44%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: var(--panel);
}

.login-card { width: 100%; max-width: 348px; }
.login-card h2 { font-size: 20px; font-weight: 600; margin: 0 0 6px; letter-spacing: .4px; }
.login-card .lc-hint { font-size: 12px; color: var(--text-3); margin: 0 0 28px; }

.field { margin-bottom: 16px; }
.field label {
  display: block; font-size: 12px; color: var(--text-2);
  margin-bottom: 6px; letter-spacing: .3px;
}
.field .input, .field select, .field textarea { width: 100%; }

.input, select.input, textarea.input {
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  outline: none;
  transition: border-color .14s, box-shadow .14s;
}
textarea.input { height: auto; padding: 8px 10px; resize: vertical; line-height: 1.6; }
.input:hover { border-color: #CBD2DA; }
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(192, 103, 28, .13); }
.input::placeholder { color: var(--text-4); }
.input[readonly], .input[disabled] { background: var(--muted-bg); color: var(--text-3); cursor: not-allowed; }

.login-row {
  display: flex; align-items: center; justify-content: space-between;
  margin: -4px 0 20px; font-size: 12px; color: var(--text-2);
}
.checkbox { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; user-select: none; }
.checkbox input { width: 13px; height: 13px; accent-color: var(--brand); margin: 0; }

.login-alert {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  margin-bottom: 14px;
  font-size: 12px;
  color: var(--danger);
  background: var(--danger-bg);
  border: 1px solid #F0D3CE;
  border-radius: var(--radius);
}
.login-alert.show { display: flex; }

.login-tip {
  margin-top: 26px; padding: 10px 12px;
  background: var(--panel-2);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  font-size: 12px; color: var(--text-3); line-height: 1.8;
}
.login-tip b { color: var(--text-2); font-weight: 500; }

/* ========================================================== 主体框架 ===== */

.app { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  background: #221B15;
  color: #CFC6BC;
  display: flex;
  flex-direction: column;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
}

.sidebar .sb-brand {
  height: var(--header-h);
  display: flex; align-items: center; gap: 10px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  flex: 0 0 var(--header-h);
}
.sidebar .sb-mark {
  width: 26px; height: 26px; flex: 0 0 26px;
  border-radius: 3px;
  background: var(--brand);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600;
}
.sidebar .sb-title { line-height: 1.25; overflow: hidden; }
.sidebar .sb-title b { display: block; font-size: 13px; color: #F2EDE7; font-weight: 500; letter-spacing: .6px; white-space: nowrap; }
.sidebar .sb-title span { font-size: 10px; color: #8C8177; letter-spacing: .5px; white-space: nowrap; }

.sb-nav { flex: 1; overflow-y: auto; padding: 10px 0 20px; }
.sb-group {
  padding: 14px 16px 6px;
  font-size: 10px; letter-spacing: 1.2px;
  color: #7A7069; text-transform: uppercase;
}
.sb-item {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 16px;
  font-size: 13px;
  color: #BFB6AC;
  cursor: pointer;
  border-left: 2px solid transparent;
  user-select: none;
}
.sb-item:hover { background: rgba(255, 255, 255, .05); color: #F0EAE3; }
.sb-item.active {
  background: rgba(192, 103, 28, .16);
  border-left-color: var(--brand);
  color: #FFFFFF;
  font-weight: 500;
}
.sb-item .sb-ico { width: 14px; text-align: center; opacity: .85; font-size: 12px; }
.sb-item .sb-badge {
  margin-left: auto;
  min-width: 18px; height: 17px; padding: 0 5px;
  border-radius: 9px;
  background: #8C3B2C; color: #fff;
  font-size: 10px; line-height: 17px; text-align: center;
}

.sb-foot {
  padding: 10px 16px 14px;
  border-top: 1px solid rgba(255, 255, 255, .07);
  font-size: 10.5px; color: #756B62; line-height: 1.7;
}
.sb-foot .dot {
  display: inline-block; width: 6px; height: 6px; border-radius: 3px;
  background: #3E9E62; margin-right: 5px; vertical-align: 1px;
}

.main {
  flex: 1;
  margin-left: var(--sidebar-w);
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: var(--header-h);
  flex: 0 0 var(--header-h);
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 20px;
  gap: 16px;
  position: sticky; top: 0; z-index: 20;
}
.crumb { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-3); }
.crumb .cur { color: var(--text); font-weight: 500; font-size: 14px; letter-spacing: .3px; }
.crumb .sep { color: var(--text-4); }

.topbar .spacer { flex: 1; }

.tb-search { position: relative; width: 200px; }
.tb-search .input { padding-left: 28px; height: 30px; background: var(--panel-2); }
.tb-search .ico {
  position: absolute; left: 9px; top: 50%; transform: translateY(-50%);
  color: var(--text-4); font-size: 12px; pointer-events: none;
}

.tb-btn {
  position: relative;
  height: 30px; padding: 0 10px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  color: var(--text-2);
  display: inline-flex; align-items: center; gap: 6px;
}
.tb-btn:hover { border-color: #CBD2DA; color: var(--text); }
.tb-btn .badge {
  min-width: 16px; height: 16px; padding: 0 4px;
  background: #B93A2B; color: #fff;
  border-radius: 8px; font-size: 10px; line-height: 16px; text-align: center;
}

.tb-user {
  display: flex; align-items: center; gap: 8px;
  padding-left: 14px; margin-left: 2px;
  border-left: 1px solid var(--border);
  cursor: pointer; position: relative;
}
.tb-user .avatar {
  width: 27px; height: 27px; border-radius: 50%;
  background: var(--brand-100); color: var(--brand-700);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600;
}
.tb-user .u-name { line-height: 1.3; }
.tb-user .u-name b { display: block; font-size: 12.5px; font-weight: 500; }
.tb-user .u-name span { font-size: 10.5px; color: var(--text-3); }

.menu {
  position: absolute; right: 0; top: 40px;
  min-width: 182px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-3);
  padding: 5px 0;
  display: none;
  z-index: 40;
}
.menu.show { display: block; }
.menu .mi {
  padding: 8px 14px; font-size: 12.5px; color: var(--text-2);
  cursor: pointer; display: flex; justify-content: space-between; gap: 12px;
}
.menu .mi:hover { background: var(--panel-2); color: var(--text); }
.menu .mi span { color: var(--text-4); font-size: 11px; }
.menu .mdiv { height: 1px; background: var(--border-2); margin: 5px 0; }

.content { padding: 18px 20px 32px; flex: 1; min-width: 0; }

/* ========================================================== 通用组件 ===== */

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
}
.card + .card { margin-top: 14px; }

.card-head {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-2);
}
.card-head h3 {
  margin: 0; font-size: 13.5px; font-weight: 600; letter-spacing: .3px;
  display: flex; align-items: center; gap: 8px;
}
.card-head h3::before {
  content: ""; width: 3px; height: 13px; background: var(--brand); border-radius: 1px;
}
.card-head .sub { font-size: 11.5px; color: var(--text-3); }
.card-head .spacer { flex: 1; }
.card-body { padding: 14px 16px; }
.card-body.tight { padding: 0; }

.btn {
  height: 30px; padding: 0 13px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #fff; color: var(--text-2);
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  transition: all .14s;
  white-space: nowrap;
}
.btn:hover { border-color: #C6CDD6; color: var(--text); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }
.btn-danger { color: var(--danger); border-color: #E9C9C4; }
.btn-danger:hover { background: var(--danger-bg); border-color: #DDAEA6; color: var(--danger); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--muted-bg); }
.btn-sm { height: 25px; padding: 0 9px; font-size: 12px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-lg { height: 38px; padding: 0 16px; font-size: 14px; }

.btn-block { width: 100%; justify-content: center; }

.tag {
  display: inline-flex; align-items: center; gap: 4px;
  height: 20px; padding: 0 7px;
  border-radius: 3px;
  font-size: 11.5px; line-height: 1;
  background: var(--muted-bg); color: var(--text-2);
  white-space: nowrap;
}
.tag-ok      { background: var(--ok-bg);     color: var(--ok); }
.tag-warn    { background: var(--warn-bg);   color: var(--warn); }
.tag-danger  { background: var(--danger-bg); color: var(--danger); }
.tag-info    { background: var(--info-bg);   color: var(--info); }
.tag-brand   { background: var(--brand-050); color: var(--brand-700); }
.tag-line    { background: #fff; border: 1px solid var(--border); color: var(--text-2); }

.tag-lv { font-weight: 500; letter-spacing: .3px; }
.tag-lv-PU   { background: #F0F2F5; color: #56606E; }
.tag-lv-YIN  { background: #EEF1F6; color: #4B5A70; }
.tag-lv-JIN  { background: var(--brand-050); color: var(--brand-700); }
.tag-lv-ZUAN { background: #F0EBFA; color: #5B3D9B; }

/* 表格 */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.tbl th {
  text-align: left;
  padding: 9px 12px;
  background: var(--panel-2);
  border-bottom: 1px solid var(--border);
  color: var(--text-2);
  font-weight: 500;
  white-space: nowrap;
  font-size: 12px;
  letter-spacing: .2px;
}
table.tbl td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--border-2);
  color: var(--text);
  vertical-align: middle;
}
table.tbl tbody tr:hover { background: #FCFAF7; }
table.tbl tbody tr:last-child td { border-bottom: none; }
table.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
table.tbl .mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11.5px; color: var(--text-2);
}
table.tbl .lk { color: var(--info); cursor: pointer; }
table.tbl .lk:hover { text-decoration: underline; }
table.tbl .nowrap { white-space: nowrap; }
table.tbl .muted { color: var(--text-3); }
table.tbl tr.row-warn td { background: #FFFBF3; }

.empty {
  padding: 46px 20px;
  text-align: center;
  color: var(--text-3);
  font-size: 12.5px;
}
.empty .em-t {
  display: block; font-size: 13px; color: var(--text-2); margin-bottom: 4px;
}

/* 分页 */
.pager {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 16px;
  border-top: 1px solid var(--border-2);
  font-size: 12px; color: var(--text-3);
}
.pager .spacer { flex: 1; }
.pager .pg {
  min-width: 27px; height: 27px; padding: 0 7px;
  border: 1px solid var(--border); background: #fff;
  border-radius: var(--radius); cursor: pointer;
  color: var(--text-2); font-size: 12px;
}
.pager .pg:hover:not([disabled]) { border-color: #C6CDD6; }
.pager .pg.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.pager .pg[disabled] { opacity: .45; cursor: not-allowed; }

/* KPI */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(212px, 1fr));
  gap: 14px;
}
.kpi {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  box-shadow: var(--shadow-1);
  position: relative;
}
.kpi .k-label { font-size: 12px; color: var(--text-3); display: flex; align-items: center; gap: 6px; }
.kpi .k-value {
  font-size: 25px; font-weight: 600; letter-spacing: -.4px;
  margin: 8px 0 6px; font-variant-numeric: tabular-nums;
}
.kpi .k-value small { font-size: 12px; font-weight: 400; color: var(--text-3); margin-left: 4px; }
.kpi .k-foot {
  font-size: 11.5px; color: var(--text-3);
  border-top: 1px dashed var(--border-2);
  padding-top: 7px; display: flex; justify-content: space-between; gap: 8px;
}
.kpi .k-foot em { font-style: normal; color: var(--brand-700); font-weight: 500; }

/* 工具条 / 筛选 */
.toolbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-2);
}
.toolbar .spacer { flex: 1; }
.filter-item { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); }
.filter-item .input { height: 30px; }
.filter-item select.input { min-width: 116px; }

.seg { display: inline-flex; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.seg button {
  height: 28px; padding: 0 12px; border: 0; background: #fff;
  color: var(--text-2); cursor: pointer; font-size: 12px;
  border-right: 1px solid var(--border-2);
}
.seg button:last-child { border-right: 0; }
.seg button.on { background: var(--brand-050); color: var(--brand-700); font-weight: 500; }

/* 抽屉 */
.drawer-mask {
  position: fixed; inset: 0; background: rgba(29, 33, 41, .34);
  z-index: 60; opacity: 0; transition: opacity .18s;
}
.drawer-mask.show { opacity: 1; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 760px; max-width: 94vw;
  background: var(--panel);
  border-left: 1px solid var(--border);
  box-shadow: var(--shadow-3);
  z-index: 61;
  display: flex; flex-direction: column;
  transform: translateX(24px);
  opacity: 0;
  transition: transform .2s, opacity .2s;
}
.drawer.show { transform: none; opacity: 1; }
.drawer-head {
  flex: 0 0 auto;
  padding: 13px 18px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px;
}
.drawer-head h3 { margin: 0; font-size: 14.5px; font-weight: 600; }
.drawer-head .sub { font-size: 12px; color: var(--text-3); }
.drawer-head .spacer { flex: 1; }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 18px 26px; }
.drawer-foot {
  flex: 0 0 auto; padding: 11px 18px;
  border-top: 1px solid var(--border);
  display: flex; gap: 10px; justify-content: flex-end;
  background: var(--panel-2);
}

/* 弹窗 */
.modal-mask {
  position: fixed; inset: 0; background: rgba(29, 33, 41, .34);
  z-index: 70; display: flex; align-items: flex-start; justify-content: center;
  padding: 76px 20px 20px;
}
.modal {
  width: 560px; max-width: 100%;
  background: #fff; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-3);
  display: flex; flex-direction: column;
  max-height: calc(100vh - 110px);
}
.modal.wide { width: 720px; }
.modal-head {
  padding: 13px 18px; border-bottom: 1px solid var(--border-2);
  display: flex; align-items: center;
}
.modal-head h3 { margin: 0; font-size: 14px; font-weight: 600; }
.modal-head .spacer { flex: 1; }
.modal-head .x {
  width: 24px; height: 24px; border: 0; background: transparent;
  color: var(--text-3); font-size: 17px; line-height: 1; cursor: pointer; border-radius: 3px;
}
.modal-head .x:hover { background: var(--muted-bg); color: var(--text); }
.modal-body { padding: 16px 18px; overflow-y: auto; }
.modal-foot {
  padding: 11px 18px; border-top: 1px solid var(--border-2);
  display: flex; justify-content: flex-end; gap: 10px;
}

/* 提示条 */
.toast-wrap {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%);
  z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center;
  pointer-events: none;
}
.toast {
  min-width: 190px; max-width: 460px;
  padding: 9px 14px;
  background: #2C333D; color: #F4F6F8;
  border-radius: var(--radius);
  box-shadow: var(--shadow-2);
  font-size: 12.5px;
  display: flex; align-items: center; gap: 8px;
  animation: toastIn .18s ease-out;
}
.toast.ok    { background: #1E6B41; }
.toast.err   { background: #8E2E21; }
.toast.warn  { background: #8A5C0C; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; } }

/* 详情字段 */
.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--border-2);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  overflow: hidden;
}
.detail-grid .dg-i { background: #fff; padding: 9px 13px; }
.detail-grid .dg-i.full { grid-column: 1 / -1; }
.detail-grid .dg-k { font-size: 11.5px; color: var(--text-3); margin-bottom: 2px; }
.detail-grid .dg-v { font-size: 13px; color: var(--text); word-break: break-all; }

.sub-title {
  font-size: 12.5px; font-weight: 600; color: var(--text);
  margin: 20px 0 9px; letter-spacing: .3px;
  display: flex; align-items: center; gap: 8px;
}
.sub-title:first-child { margin-top: 0; }
.sub-title .spacer { flex: 1; }
.sub-title .cnt { font-weight: 400; color: var(--text-3); font-size: 11.5px; }

/* 时间线 */
.timeline { position: relative; padding-left: 17px; }
.timeline::before {
  content: ""; position: absolute; left: 3px; top: 5px; bottom: 5px;
  width: 1px; background: var(--border);
}
.tl-item { position: relative; padding: 0 0 14px 0; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: ""; position: absolute; left: -17px; top: 5px;
  width: 7px; height: 7px; border-radius: 50%;
  background: #fff; border: 2px solid #C8CFD8;
}
.tl-item.hi::before { border-color: var(--brand); }
.tl-t { font-size: 12.5px; color: var(--text); }
.tl-m { font-size: 11.5px; color: var(--text-3); margin-top: 1px; }
.tl-d { font-size: 11px; color: var(--text-4); margin-top: 1px; font-variant-numeric: tabular-nums; }

/* 进度条 */
.bar { height: 6px; background: var(--muted-bg); border-radius: 3px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--brand); border-radius: 3px; }
.bar.thin { height: 4px; }

/* 统计小卡 */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(146px, 1fr));
  gap: 1px;
  background: var(--border-2);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  overflow: hidden;
}
.stat-strip .ss-i { background: #fff; padding: 11px 14px; }
.stat-strip .ss-k { font-size: 11.5px; color: var(--text-3); }
.stat-strip .ss-v {
  font-size: 18px; font-weight: 600; margin-top: 4px;
  font-variant-numeric: tabular-nums; letter-spacing: -.2px;
}
.stat-strip .ss-v small { font-size: 11.5px; font-weight: 400; color: var(--text-3); margin-left: 3px; }

/* 图表容器 */
.chart { width: 100%; height: 268px; }
.chart.sm { height: 216px; }
.chart.lg { height: 320px; }

.chart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 14px;
}
.chart-grid > .card + .card { margin-top: 0; }

/* 表单栅格 */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.form-grid .full { grid-column: 1 / -1; }

.readonly-note {
  font-size: 11.5px; color: var(--text-3);
  background: var(--panel-2);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 8px 11px; line-height: 1.7;
}

/* 设置项 */
.set-group + .set-group { margin-top: 20px; }
.set-item {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 18px;
  padding: 13px 0;
  border-bottom: 1px solid var(--border-2);
}
.set-item:last-child { border-bottom: 0; }
.set-item .si-label { font-size: 12.5px; color: var(--text); font-weight: 500; }
.set-item .si-label .unit { font-size: 11px; color: var(--text-3); font-weight: 400; }
.set-item .si-help { font-size: 11.5px; color: var(--text-3); margin-top: 3px; line-height: 1.65; }
.set-item .si-ctrl { max-width: 320px; }
.switch { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; }
.switch .sw {
  width: 34px; height: 19px; border-radius: 10px; background: #CDD3DB;
  position: relative; transition: background .15s;
}
.switch .sw::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 15px; height: 15px; border-radius: 50%; background: #fff;
  transition: left .15s; box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
}
.switch.on .sw { background: var(--brand); }
.switch.on .sw::after { left: 17px; }
.switch span { font-size: 12.5px; color: var(--text-2); }

/* 提示条 */
.alert {
  display: flex; gap: 9px; align-items: flex-start;
  padding: 10px 13px;
  border-radius: var(--radius);
  font-size: 12.5px;
  line-height: 1.7;
  border: 1px solid;
}
.alert-info { background: var(--info-bg); border-color: #D3E0F7; color: #23509E; }
.alert-warn { background: var(--warn-bg); border-color: #F0E0BA; color: #8A5C0C; }
.alert-brand { background: var(--brand-050); border-color: var(--brand-100); color: var(--brand-700); }

/* 标签页 */
.tabs {
  display: flex; gap: 2px;
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
  background: var(--panel);
}
.tabs .tab {
  padding: 10px 13px;
  font-size: 12.5px; color: var(--text-2);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tabs .tab:hover { color: var(--text); }
.tabs .tab.on { color: var(--brand-700); border-bottom-color: var(--brand); font-weight: 500; }

/* 抽屉内的迷你表 */
table.mini { width: 100%; border-collapse: collapse; font-size: 12px; }
table.mini th {
  text-align: left; padding: 7px 10px; background: var(--panel-2);
  border-bottom: 1px solid var(--border); color: var(--text-2); font-weight: 500; font-size: 11.5px;
}
table.mini td { padding: 7px 10px; border-bottom: 1px solid var(--border-2); }
table.mini tr:last-child td { border-bottom: 0; }

/* 加载 */
.loading { padding: 40px; text-align: center; color: var(--text-3); font-size: 12.5px; }

.skeleton {
  background: linear-gradient(90deg, #F1F3F5 25%, #E7EAEE 37%, #F1F3F5 63%);
  background-size: 400% 100%;
  animation: sk 1.3s ease infinite;
  border-radius: 3px;
}
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* 两列布局 */
.cols { display: grid; gap: 14px; }
.cols-2 { grid-template-columns: minmax(0, 1.62fr) minmax(0, 1fr); }
.cols-2r { grid-template-columns: minmax(0, 1fr) minmax(0, 1.62fr); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1180px) {
  .cols-2, .cols-2r, .cols-3 { grid-template-columns: minmax(0, 1fr); }
  .chart-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 900px) {
  .login-brand { display: none; }
  .sidebar { transform: translateX(-100%); }
  .main { margin-left: 0; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .set-item { grid-template-columns: minmax(0, 1fr); gap: 8px; }
}
