/* ===== 华教教育 · 直播运营管理系统 · 设计系统 =====
   与华教 CRM 同源：沉稳深蓝 + 浅青蓝辅助 + 暖橙点缀，纯白底，卡片式。
   在此基础上扩展：KPI 对比卡、图表容器、排班矩阵、时间轴、漏斗。
*/

:root {
  --c-primary: #1b3a6b;
  --c-primary-2: #24509e;
  --c-primary-3: #2f5fb8;
  --c-primary-soft: #e8f0fb;
  --c-primary-border: #c9d9f0;

  --c-cyan: #2f9bb5;
  --c-cyan-soft: #e3f4f8;
  --c-warn: #ed8936;
  --c-warn-soft: #fdeeda;
  --c-success: #2f9e6e;
  --c-success-soft: #e2f5ec;
  --c-danger: #e05353;
  --c-danger-soft: #fde8e8;
  --c-live: #e23b3b;
  --c-gold: #d99b20;
  --c-gold-soft: #fdf3e0;
  --c-purple: #6b5ce0;
  --c-purple-soft: #eeecfb;
  --c-info: #2b5bb5;
  --c-gray: #718096;
  --c-gray-soft: #eef1f5;

  --bg: #f4f6fa;
  --surface: #ffffff;
  --line: #e6eaf1;
  --line-2: #dfe4ec;
  --text: #1f2a3a;
  --text-2: #4a5568;
  --text-3: #8a94a6;

  --sidebar-w: 232px;
  --topbar-h: 60px;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(16,24,40,.04), 0 2px 8px rgba(16,24,40,.06);
  --shadow-md: 0 6px 20px rgba(16,24,40,.10);
  --shadow-lg: 0 18px 44px rgba(16,24,40,.16);

  --up: #e05353;      /* 涨（中国习惯：红涨绿跌） */
  --down: #2f9e6e;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
[hidden] { display: none !important; }
body {
  font-family: var(--font); font-size: 14px; color: var(--text);
  background: var(--bg); -webkit-font-smoothing: antialiased;
}
code { font-family: "SFMono-Regular", Consolas, monospace; font-size: 12px; background: var(--c-gray-soft); padding: 1px 5px; border-radius: 4px; }

/* ===== 登录页 ===== */
.login-wrap {
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column; align-items: center; justify-content: center; justify-content: safe center;
  background-color: #1b3a6b;
  background-image: radial-gradient(1200px 600px at 15% 10%, rgba(47,155,181,.35), transparent 60%),
                    linear-gradient(135deg, #14294e 0%, #1b3a6b 55%, #24509e 100%);
  padding: 24px; overflow-y: auto;
}
.login-brand { display: flex; align-items: center; justify-content: center; gap: 16px; margin-bottom: 26px; color: #fff; flex: none; }
.login-logo {
  width: 68px; height: 68px; flex: 0 0 68px; border-radius: 17px;
  background: #fff; color: var(--c-primary); font-size: 27px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
}
.login-logo img, .sidebar-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.login-brand-text { text-align: left; line-height: 1.18; }
.login-brand-name { font-size: 27px; font-weight: 800; color: #fff; letter-spacing: 1px; }
.login-brand-sub { font-size: 14px; color: rgba(219,228,242,.72); letter-spacing: 2.5px; margin-top: 2px; }
.login-card { width: 380px; max-width: 100%; background: #fff; border-radius: 16px; padding: 28px; box-shadow: 0 20px 50px rgba(0,0,0,.28); }
.login-card-title { font-size: 17px; font-weight: 700; margin-bottom: 20px; color: var(--text); }
.login-err { background: var(--c-danger-soft); color: var(--c-danger); padding: 9px 12px; border-radius: 8px; font-size: 13px; margin-bottom: 12px; }
.login-hint { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; font-size: 12px; color: var(--text-3); }
.login-hint-row { display: flex; justify-content: space-between; margin-top: 6px; padding: 6px 8px; border-radius: 6px; cursor: pointer; transition: background .15s, transform .15s; }
.login-hint-row:hover { background: var(--c-primary-soft); }
.login-hint-row:active { transform: scale(.98); }
.login-hint-row span { color: var(--text-2); }
.login-hint-row:hover span { color: var(--c-primary-2); font-weight: 600; }

/* ===== 布局 ===== */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); flex: 0 0 var(--sidebar-w);
  background: linear-gradient(180deg, #14294e 0%, #1b3a6b 100%);
  color: #dbe4f2; display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  transition: width .2s ease, flex-basis .2s ease;
}
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 3px; }
.sidebar.collapsed { width: 64px; flex-basis: 64px; }
.sidebar-brand { display: flex; align-items: center; gap: 11px; padding: 18px 18px 16px; }
.sidebar-logo {
  width: 38px; height: 38px; flex: 0 0 38px; border-radius: 10px;
  background: #fff; color: var(--c-primary); font-weight: 800; font-size: 17px;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.sidebar-brand-text { line-height: 1.15; overflow: hidden; white-space: nowrap; }
.sidebar-brand-name { font-size: 15px; font-weight: 700; color: #fff; }
.sidebar-brand-sub { font-size: 11px; color: rgba(219,228,242,.7); }

.nav { flex: 1; padding: 8px 12px; }
.nav-group-label { font-size: 11px; color: rgba(219,228,242,.45); padding: 14px 10px 6px; letter-spacing: 1px; white-space: nowrap; overflow: hidden; }
.nav-item {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px;
  border-radius: 9px; cursor: pointer; color: #c6d2e6; margin-bottom: 2px;
  font-size: 14px; transition: background .15s, color .15s; white-space: nowrap;
}
.nav-item:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav-item.active { background: #fff; color: var(--c-primary); font-weight: 600; }
.nav-item .ico { width: 18px; text-align: center; font-size: 15px; flex: 0 0 18px; }
.nav-item .txt { overflow: hidden; }
.nav-item .cnt { margin-left: auto; background: rgba(255,255,255,.16); border-radius: 9px; font-size: 11px; padding: 1px 7px; }
.nav-item.active .cnt { background: var(--c-danger); color: #fff; }
.sidebar.collapsed .nav-item { justify-content: center; padding: 10px; }
.sidebar.collapsed .nav-item .txt,
.sidebar.collapsed .nav-item .cnt,
.sidebar.collapsed .nav-group-label,
.sidebar.collapsed .sidebar-brand-text,
.sidebar.collapsed .sidebar-user-info { display: none; }

.sidebar-foot { padding: 14px 14px 18px; border-top: 1px solid rgba(255,255,255,.08); }
.sidebar-user { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 36px; height: 36px; flex: 0 0 36px; border-radius: 50%;
  background: var(--c-primary-3); color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px;
}
.sidebar-user-name { color: #fff; font-size: 13px; font-weight: 600; }
.sidebar-user-role { font-size: 11px; color: rgba(219,228,242,.6); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: var(--topbar-h); background: #fff; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; padding: 0 20px;
  position: sticky; top: 0; z-index: 20;
}
.topbar-left { display: flex; align-items: center; gap: 12px; }
.topbar-title { font-size: 17px; font-weight: 700; }
.topbar-crumb { font-size: 12px; color: var(--text-3); margin-left: 6px; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  background: none; border: none; cursor: pointer; font-size: 17px; color: var(--text-2);
  width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
  position: relative; transition: background .15s;
}
.icon-btn:hover { background: var(--c-gray-soft); }
.bell-wrap { position: relative; }
.badge-dot {
  position: absolute; top: 5px; right: 5px; min-width: 16px; height: 16px; border-radius: 8px;
  background: var(--c-danger); color: #fff; font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; padding: 0 4px;
}
.bell-panel {
  position: absolute; top: 44px; right: 0; width: 360px; max-width: 90vw; background: #fff;
  border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-md); z-index: 40;
  max-height: 460px; overflow-y: auto;
}
.bell-item { padding: 12px 14px; border-bottom: 1px solid var(--line); cursor: pointer; }
.bell-item:hover { background: var(--c-primary-soft); }
.bell-item-t { font-weight: 600; font-size: 13px; }
.bell-item-b { font-size: 12px; color: var(--text-2); margin-top: 3px; }

.content { padding: 20px 22px 40px; flex: 1; min-width: 0; }
.sidebar-mask { position: fixed; inset: 0; background: rgba(16,24,40,.45); z-index: 30; }

/* ===== 通用组件 ===== */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; margin-bottom: 16px; }
.card-title { font-size: 15px; font-weight: 700; margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.card-sub { font-size: 12px; color: var(--text-3); font-weight: 400; }
.card-head-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 1400px) { .grid-5 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 980px) { .grid-2,.grid-3,.grid-4,.grid-5 { grid-template-columns: 1fr; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line-2);
  background: #fff; color: var(--text-2); font-size: 13px; cursor: pointer;
  transition: all .15s; font-family: inherit; white-space: nowrap;
}
.btn:hover { border-color: var(--c-primary-3); color: var(--c-primary-2); background: var(--c-primary-soft); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.btn-primary:hover { background: var(--c-primary-2); border-color: var(--c-primary-2); color: #fff; }
.btn-danger { background: var(--c-danger); border-color: var(--c-danger); color: #fff; }
.btn-danger:hover { background: #c94343; border-color: #c94343; color: #fff; }
.btn-success { background: var(--c-success); border-color: var(--c-success); color: #fff; }
.btn-success:hover { color: #fff; opacity: .92; }
.btn-warn { background: var(--c-warn); border-color: var(--c-warn); color: #fff; }
.btn-warn:hover { color: #fff; opacity: .92; }
.btn-ghost { background: transparent; }
.btn-block { width: 100%; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.field { display: block; margin-bottom: 12px; }
.field-label { display: block; font-size: 12px; color: var(--text-2); margin-bottom: 5px; font-weight: 600; }
.field-label .req { color: var(--c-danger); }
input, select, textarea {
  width: 100%; padding: 8px 11px; border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  font-size: 13px; font-family: inherit; color: var(--text); background: #fff; outline: none;
  transition: border .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--c-primary-3); box-shadow: 0 0 0 3px rgba(47,95,184,.12); }
textarea { min-height: 78px; resize: vertical; }
input[type=checkbox] { width: auto; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 14px; }
@media (max-width: 700px) { .form-row, .form-row-3 { grid-template-columns: 1fr; } }

table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tbl th {
  text-align: left; padding: 10px 12px; background: #f7f9fc; color: var(--text-2);
  font-weight: 600; font-size: 12px; border-bottom: 1px solid var(--line); white-space: nowrap;
  position: sticky; top: 0; z-index: 2;
}
table.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.tbl tbody tr:hover { background: #fafbfe; }
table.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.tbl-empty { padding: 34px; text-align: center; color: var(--text-3); }
.row-actions { display: flex; gap: 6px; }
.link { color: var(--c-primary-2); cursor: pointer; text-decoration: none; }
.link:hover { text-decoration: underline; }

.tag {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 20px;
  font-size: 11px; font-weight: 600; background: var(--c-gray-soft); color: var(--text-2); white-space: nowrap;
}
.tag-primary { background: var(--c-primary-soft); color: var(--c-primary-2); }
.tag-cyan { background: var(--c-cyan-soft); color: #20778c; }
.tag-success { background: var(--c-success-soft); color: #237a54; }
.tag-warn { background: var(--c-warn-soft); color: #b96b1c; }
.tag-danger { background: var(--c-danger-soft); color: #c04343; }
.tag-purple { background: var(--c-purple-soft); color: #5546c9; }
.tag-gold { background: var(--c-gold-soft); color: #a9740f; }
.tag-live { background: var(--c-live); color: #fff; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap: 14px; }
.stat {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.stat-label { font-size: 12px; color: var(--text-3); }
.stat-value { font-size: 22px; font-weight: 800; margin-top: 4px; letter-spacing: -.3px; }
.stat-unit { font-size: 12px; color: var(--text-3); font-weight: 500; margin-left: 3px; }
.stat-foot { font-size: 11px; color: var(--text-3); margin-top: 6px; display: flex; align-items: center; gap: 5px; }
.stat-bar { position: absolute; left: 0; top: 0; bottom: 0; width: 3px; }
.up { color: var(--up); }
.down { color: var(--down); }
.delta { font-weight: 700; font-size: 11px; }

/* KPI 对比卡 */
.kpi-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 13px 15px; box-shadow: var(--shadow); position: relative; transition: box-shadow .18s, transform .18s;
}
.kpi-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.kpi-label { font-size: 12px; color: var(--text-3); display: flex; align-items: center; gap: 5px; }
.kpi-value { font-size: 20px; font-weight: 800; margin: 5px 0 3px; font-variant-numeric: tabular-nums; }
.kpi-cmp { font-size: 11px; color: var(--text-3); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.kpi-spark { margin-top: 8px; height: 26px; }

.filters { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 14px; }
.filters .f { display: flex; flex-direction: column; gap: 4px; }
.filters .f label { font-size: 11px; color: var(--text-3); }
.filters input, .filters select { min-width: 120px; padding: 6px 10px; }
.seg { display: inline-flex; background: var(--c-gray-soft); border-radius: 8px; padding: 2px; }
.seg button {
  border: none; background: transparent; padding: 6px 12px; border-radius: 6px; cursor: pointer;
  font-size: 12px; color: var(--text-2); font-family: inherit;
}
.seg button.on { background: #fff; color: var(--c-primary); font-weight: 700; box-shadow: var(--shadow); }

.modal-mask { position: fixed; inset: 0; background: rgba(16,24,40,.5); display: flex; align-items: flex-start; justify-content: center; z-index: 60; overflow-y: auto; padding: 40px 16px; }
.modal {
  background: #fff; border-radius: 14px; box-shadow: var(--shadow-lg); width: 560px; max-width: 100%;
  animation: pop .16s ease-out;
}
.modal-lg { width: 880px; }
.modal-xl { width: 1100px; }
@keyframes pop { from { opacity: 0; transform: translateY(-8px) scale(.99); } to { opacity: 1; transform: none; } }
.modal-head { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.modal-title { font-size: 16px; font-weight: 700; }
.modal-body { padding: 18px 20px; max-height: calc(100vh - 220px); overflow-y: auto; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; }

.toast-root { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 16px;
  box-shadow: var(--shadow-md); font-size: 13px; display: flex; align-items: center; gap: 8px;
  animation: slideDown .18s ease-out; max-width: 80vw;
}
.toast.ok { border-left: 3px solid var(--c-success); }
.toast.err { border-left: 3px solid var(--c-danger); }
.toast.info { border-left: 3px solid var(--c-primary-3); }
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }

.empty { text-align: center; padding: 46px 20px; color: var(--text-3); }
.empty .ico { font-size: 34px; opacity: .5; }
.empty .t { margin-top: 10px; font-size: 14px; }
.empty .s { font-size: 12px; margin-top: 4px; }

/* ===== 排班矩阵 ===== */
.sched-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.sched-grid { min-width: 1000px; }
.sched-head { display: grid; background: #f7f9fc; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 3; }
.sched-head > div { padding: 10px 8px; font-size: 12px; font-weight: 700; color: var(--text-2); text-align: center; border-right: 1px solid var(--line); }
.sched-head > div.today { background: var(--c-primary-soft); color: var(--c-primary); }
.sched-row { display: grid; border-bottom: 1px solid var(--line); }
.sched-row > div { padding: 6px; border-right: 1px solid var(--line); min-height: 74px; position: relative; }
.sched-room { display: flex; flex-direction: column; justify-content: center; padding: 8px 10px !important; background: #fcfdff; position: sticky; left: 0; z-index: 2; border-right: 1px solid var(--line-2); }
.sched-room .n { font-weight: 700; font-size: 13px; }
.sched-room .m { font-size: 11px; color: var(--text-3); }
.shift-cell {
  border-radius: 8px; padding: 6px 8px; margin-bottom: 4px; cursor: pointer; font-size: 11px;
  border-left: 3px solid var(--c-primary-3); background: var(--c-primary-soft); color: var(--c-primary);
  transition: transform .12s, box-shadow .12s;
}
.shift-cell:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.shift-cell.live { border-left-color: var(--c-live); background: #fdecec; color: #b32828; }
.shift-cell.done { border-left-color: var(--c-success); background: var(--c-success-soft); color: #237a54; }
.shift-cell.missed { border-left-color: var(--c-danger); background: var(--c-danger-soft); color: #b03a3a; }
.shift-cell.cancelled { opacity: .55; text-decoration: line-through; }
.shift-cell .t { font-weight: 700; font-size: 12px; }
.shift-cell .m { color: var(--text-2); margin-top: 2px; }
.shift-cell .g { font-weight: 700; margin-top: 3px; }

/* ===== 图表 ===== */
.chart-box { width: 100%; overflow: hidden; }
.chart-box svg { display: block; width: 100%; height: auto; }
.chart-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--text-2); margin-top: 8px; }
.chart-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; }
.chart-tip {
  position: fixed; z-index: 90; background: rgba(24,34,52,.95); color: #fff; border-radius: 8px;
  padding: 8px 11px; font-size: 12px; pointer-events: none; box-shadow: var(--shadow-md); white-space: nowrap;
}
.chart-tip .k { color: rgba(255,255,255,.7); margin-right: 6px; }
.chart-tip .row { display: flex; align-items: center; gap: 6px; margin-top: 3px; }
.chart-tip .dot { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }

.funnel-row { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.funnel-name { width: 74px; font-size: 12px; color: var(--text-2); text-align: right; }
.funnel-bar { flex: 1; height: 26px; border-radius: 6px; position: relative; overflow: hidden; background: #f2f5fa; }
.funnel-fill { height: 100%; border-radius: 6px; display: flex; align-items: center; padding-left: 10px; color: #fff; font-size: 12px; font-weight: 700; min-width: 60px; }
.funnel-val { width: 92px; font-size: 12px; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.funnel-rate { width: 56px; font-size: 11px; color: var(--text-3); text-align: right; }

.rank-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.rank-no { width: 22px; height: 22px; border-radius: 6px; background: var(--c-gray-soft); color: var(--text-2); font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: 0 0 22px; }
.rank-no.top1 { background: var(--c-gold); color: #fff; }
.rank-no.top2 { background: #9aa5b5; color: #fff; }
.rank-no.top3 { background: #c08a5a; color: #fff; }
.rank-name { width: 92px; font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-bar { flex: 1; height: 18px; background: #f2f5fa; border-radius: 5px; overflow: hidden; }
.rank-fill { height: 100%; border-radius: 5px; background: linear-gradient(90deg, var(--c-primary-3), var(--c-cyan)); }
.rank-val { width: 96px; text-align: right; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }

.timeline { position: relative; padding-left: 18px; }
.timeline::before { content: ''; position: absolute; left: 5px; top: 4px; bottom: 4px; width: 2px; background: var(--line-2); }
.tl-item { position: relative; padding-bottom: 14px; }
.tl-item::before { content: ''; position: absolute; left: -17px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--c-primary-3); border: 2px solid #fff; }
.tl-item.on::before { background: var(--c-success); }
.tl-t { font-size: 13px; font-weight: 600; }
.tl-d { font-size: 12px; color: var(--text-3); margin-top: 2px; }

.shot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px,1fr)); gap: 10px; }
.shot {
  border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; position: relative;
}
.shot img { width: 100%; height: 88px; object-fit: cover; display: block; background: #f2f5fa; }
.shot .cap { font-size: 11px; padding: 5px 7px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shot .del { position: absolute; right: 4px; top: 4px; background: rgba(0,0,0,.55); color: #fff; border: none; border-radius: 4px; cursor: pointer; font-size: 11px; padding: 1px 6px; }

.steps { display: flex; gap: 6px; flex-wrap: wrap; }
.step { padding: 4px 10px; border-radius: 20px; font-size: 11px; background: var(--c-gray-soft); color: var(--text-3); cursor: pointer; }
.step.on { background: var(--c-primary); color: #fff; font-weight: 700; }
.step.done { background: var(--c-success-soft); color: #237a54; }

.alert { padding: 10px 14px; border-radius: 8px; font-size: 13px; display: flex; gap: 8px; align-items: flex-start; }
.alert-warn { background: var(--c-warn-soft); color: #9c5a12; }
.alert-danger { background: var(--c-danger-soft); color: #b03a3a; }
.alert-info { background: var(--c-primary-soft); color: var(--c-primary-2); }
.alert-success { background: var(--c-success-soft); color: #237a54; }

.kv { display: grid; grid-template-columns: 96px 1fr; gap: 6px 10px; font-size: 13px; }
.kv .k { color: var(--text-3); }
.kv .v { color: var(--text); font-weight: 500; }

.mono { font-variant-numeric: tabular-nums; }
.text-r { text-align: right; }
.muted { color: var(--text-3); }
.small { font-size: 12px; }
.b { font-weight: 700; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; }
.flex { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.pill-tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 14px; flex-wrap: wrap; }
.pill-tab { padding: 8px 14px; cursor: pointer; font-size: 13px; color: var(--text-2); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.pill-tab.on { color: var(--c-primary); font-weight: 700; border-bottom-color: var(--c-primary); }

@media (max-width: 860px) {
  .sidebar { position: fixed; z-index: 50; transform: translateX(-100%); }
  .sidebar.open { transform: none; }
  .content { padding: 14px; }
}
