:root {
  --bg: #F7F8F4;
  --panel: #ffffff;
  --panel-soft: #f8faf7;
  --text: #20241f;
  --muted: #697067;
  --line: #dde4d7;
  --brand: #245447;
  --brand-strong: #173d33;
  --danger: #B53B36;
  --warn: #B66A22;
  --info: #2563eb;
  --shadow: 0 10px 30px rgba(39, 49, 33, 0.08);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.login-box {
  width: min(390px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px;
  box-shadow: var(--shadow);
}
.login-title { margin: 0 0 22px; color: var(--brand-strong); text-align: center; }

.layout {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  background: #232820;
  color: white;
  height: 100vh;
  position: sticky;
  top: 0;
  overflow-y: auto;
  padding: 18px 12px;
}
.brand { padding: 0 10px 16px; border-bottom: 1px solid rgba(255,255,255,.12); margin-bottom: 12px; }
.brand h1 { margin: 0; font-size: 18px; }
.brand-kicker, .eyebrow { display:block; color: var(--brand); font-size: 11px; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }
.brand-kicker { color: #aacd9b; margin-bottom: 5px; }
.brand p { margin: 4px 0 0; color: rgba(255,255,255,.56); font-size: 12px; }
.nav-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  margin: 2px 0;
  color: rgba(255,255,255,.72);
  background: transparent;
  border: 0;
  border-left: 3px solid transparent;
  border-radius: 6px;
  text-align: left;
}
.nav-btn:hover, .nav-btn.active {
  color: white;
  background: rgba(255,255,255,.07);
  border-left-color: #82a865;
}
.nav-icon { width: 20px; text-align: center; }
.logout { margin-top: 18px; color: #ffb4b4; }

.content {
  min-width: 0;
  padding: 22px 24px 36px;
}
.topbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
}
.title h2 { margin: 0; font-size: 22px; }
.title p { margin: 3px 0 0; color: var(--muted); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.workspace-tabs { display:flex; gap:6px; margin: -4px 0 16px; overflow-x:auto; padding-bottom:2px; }
.workspace-tab { border:0; border-bottom:2px solid transparent; padding:7px 4px; margin-right:14px; color:var(--muted); background:transparent; white-space:nowrap; }
.workspace-tab.active { color:var(--brand-strong); border-color:var(--brand); font-weight:700; }

.today-hero { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; padding:24px; margin-bottom:14px; background:linear-gradient(120deg,#e7efe5 0%,#f8faf6 66%); border:1px solid #cadbc7; border-radius:12px; }
.today-hero h3, .panel h3 { margin:5px 0 6px; font-family: Georgia, "Noto Serif SC", serif; font-size:22px; color:var(--brand-strong); }
.today-hero p { max-width:620px; margin:0; color:var(--muted); }
.task-queue { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin-bottom:16px; }
.task-card { position:relative; min-height:178px; padding:18px; background:var(--panel); border:1px solid var(--line); border-top:3px solid #9eb49c; border-radius:10px; box-shadow:0 1px 2px rgba(0,0,0,.03); }
.task-card.urgent { border-top-color:var(--warn); }
.task-step { color:var(--muted); font:700 11px ui-monospace,monospace; letter-spacing:.08em; }
.task-card h4 { margin:13px 0 5px; font-size:16px; }.task-card p { min-height:42px; margin:0 0 15px; color:var(--muted); font-size:13px; }
.task-link { padding:0; border:0; color:var(--brand-strong); background:transparent; font-weight:700; }.task-link span { margin-left:5px; }
.operations-grid { display:grid; grid-template-columns:minmax(0,1.6fr) minmax(260px,.8fr); gap:14px; }.panel-heading{padding:18px 18px 6px}.pulse-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); padding:8px; }.pulse-list button { display:grid; grid-template-columns:1fr auto; gap:2px; padding:14px 10px; border:0; background:transparent; text-align:left; border-top:1px solid var(--line); }.pulse-list button:hover{background:var(--panel-soft)}.pulse-list span{color:var(--muted)}.pulse-list strong{font-size:22px;color:var(--brand-strong)}.pulse-list em{grid-column:1/-1;color:var(--brand);font-size:12px;font-style:normal}.recent-panel{padding:20px}.recent-panel ol{margin:14px 0 0;padding-left:20px;color:var(--muted)}.recent-panel li{margin:10px 0;}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}
.stat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 1px 2px rgba(0,0,0,.03);
}
.stat-value { font-size: 30px; font-weight: 700; color: var(--brand); }
.stat-label { color: var(--muted); font-size: 12px; }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-soft);
}
.toolbar-left, .toolbar-right { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.field { display: grid; gap: 5px; margin-bottom: 12px; }
.field label { color: var(--muted); font-size: 12px; }
.input, .select, .textarea {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  color: var(--text);
  padding: 8px 10px;
  outline: none;
}
.textarea { min-height: 92px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(79,125,58,.12); }
.search { width: min(320px, 100%); }

.filter-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.user-filter-bar { padding: 10px 14px; border-bottom: 1px solid var(--line); background: #fff; }

.filter-pill {
  min-height: 32px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: white;
}
.filter-pill.active {
  color: white;
  border-color: var(--brand);
  background: var(--brand);
}

.btn {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  color: var(--text);
  padding: 7px 12px;
  white-space: nowrap;
}
.btn:hover { border-color: #b7c4ae; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: white; }
.btn.primary:hover { background: var(--brand-strong); }
.btn.danger { background: var(--danger); border-color: var(--danger); color: white; }
.btn.warn { background: var(--warn); border-color: var(--warn); color: white; }
.btn.info { background: var(--info); border-color: var(--info); color: white; }
.btn.small { min-height: 28px; padding: 4px 8px; font-size: 12px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 850px; }
th {
  text-align: left;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfa;
}
td { padding: 10px 12px; border-bottom: 1px solid #edf1ea; vertical-align: middle; }
tr:hover td { background: #fbfcf9; }
.muted { color: var(--muted); }
.clip { max-width: 260px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.thumb { width: 42px; height: 42px; object-fit: cover; border-radius: 6px; background: #eef1eb; }
.tag { display: inline-flex; align-items: center; min-height: 22px; padding: 2px 8px; border-radius: 999px; background: #eef4ea; color: var(--brand-strong); font-size: 12px; }
.tag.danger { background: #fff0f0; color: var(--danger); }
.tag.warn { background: #fff7e6; color: var(--warn); }
.tag.info { background: #eef4ff; color: var(--info); }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.more-actions { position:relative; }.more-actions summary { list-style:none; min-height:28px; padding:4px 8px; border:1px solid var(--line); border-radius:6px; color:var(--muted); font-size:12px; cursor:pointer; }.more-actions summary::-webkit-details-marker{display:none}.more-menu { position:absolute; z-index:5; right:0; top:34px; display:grid; gap:5px; min-width:120px; padding:7px; background:#fff; border:1px solid var(--line); border-radius:8px; box-shadow:var(--shadow); }.more-menu .btn { text-align:left; }

.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--panel-soft);
}

.empty, .loading { padding: 36px; color: var(--muted); text-align: center; }
.error-box { padding: 12px 14px; color: var(--danger); background: #fff5f5; border-bottom: 1px solid #ffd3d3; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0,0,0,.45);
  z-index: 20;
}
.modal {
  width: min(680px, 100%);
  max-height: 86vh;
  overflow-y: auto;
  background: white;
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(0,0,0,.22);
}
.drawer { width:min(720px,100%); height:100vh; max-height:100vh; margin-left:auto; border-radius:0; }
.modal-head, .modal-foot { padding: 16px 18px; border-bottom: 1px solid var(--line); }
.modal-foot { border-top: 1px solid var(--line); border-bottom: 0; display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.modal-head h3 { margin: 0; font-size: 18px; }
.modal-body { padding: 18px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.full { grid-column: 1 / -1; }

.thread { display: grid; gap: 10px; }
.bubble { padding: 10px 12px; border-radius: 8px; background: #f4f7f2; }
.bubble.alt { background: #eef4ff; }
.bubble-meta { color: var(--muted); font-size: 12px; margin-bottom: 4px; }

.order-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}
.info-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}
.info-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}
.info-card strong {
  display: block;
  color: var(--brand-strong);
  font-size: 16px;
}
.info-card p {
  margin: 6px 0 0;
  color: var(--muted);
}
.order-ship-summary {
  padding: 12px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}
.order-ship-summary p { margin: 4px 0; }

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  display: none;
  max-width: min(420px, calc(100vw - 36px));
  padding: 10px 14px;
  border-radius: 6px;
  color: white;
  background: #1f2937;
  box-shadow: var(--shadow);
  z-index: 40;
}
.toast.show { display: block; }
.toast.error { background: var(--danger); }
.toast.ok { background: var(--brand); }

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; max-height: 42vh; }
  .content { padding: 16px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topbar, .toolbar { flex-direction: column; }
  .actions { justify-content: flex-start; }
}

@media (max-width: 560px) {
  .stats, .form-grid { grid-template-columns: 1fr; }
  .order-detail-grid { grid-template-columns: 1fr; }
  .login-box { padding: 22px; }
}

/* ─── VIP 额度矩阵 ─── */
.vq-cell { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.vq-input { width: 64px; padding: 4px 6px; }
.vq-select { width: auto; padding: 4px 6px; }

/* Light operations workspace */
.sidebar { background:#fff; color:var(--text); border-right:1px solid var(--line); }
.brand { border-bottom-color:var(--line); }.brand p { color:var(--muted); }.brand-kicker{color:var(--brand)}
.nav-btn { color:#536158; }.nav-btn:hover,.nav-btn.active{color:var(--brand-strong);background:#edf4ec;border-left-color:var(--brand)}.logout{color:var(--danger)}
.workbench-head{display:flex;justify-content:space-between;align-items:center;margin:2px 0 14px}.workbench-head h3{margin:0;font-size:24px;color:var(--brand-strong)}.workbench-head p{margin:3px 0 0;color:var(--muted)}
.workbench-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:14px}.workbench-summary button{display:flex;align-items:baseline;gap:9px;padding:16px;border:1px solid var(--line);border-radius:8px;background:#fff;text-align:left}.workbench-summary button:hover{border-color:var(--brand);background:#f5faf4}.workbench-summary strong{font-size:24px;color:var(--brand-strong)}.workbench-summary span{color:var(--muted)}
.dispatch-panel{margin-bottom:14px}.dispatch-panel .panel-heading{display:flex;justify-content:space-between;align-items:center;padding:16px 18px;border-bottom:1px solid var(--line)}.dispatch-panel .panel-heading h3{margin:0;font-size:18px}.dispatch-panel .panel-heading p{margin:4px 0 0;color:var(--muted);font-size:13px}.dispatch-list{display:grid}.dispatch-row{display:grid;grid-template-columns:minmax(180px,1.1fr) minmax(280px,1.5fr) 130px auto;gap:16px;align-items:center;padding:15px 18px;border-bottom:1px solid var(--line)}.dispatch-row:last-child{border-bottom:0}.dispatch-row b,.dispatch-row span{display:block}.dispatch-row span{margin-top:3px;color:var(--muted);font-size:13px}.dispatch-address{min-width:0}.dispatch-address span{white-space:normal}.dispatch-row .btn{justify-self:end}
@media(max-width:900px){.workbench-summary{grid-template-columns:repeat(2,1fr)}.dispatch-row{grid-template-columns:1fr;gap:7px}.dispatch-row .btn{justify-self:start}}

.profile-hero { display:flex; align-items:center; gap:14px; padding-bottom:16px; border-bottom:1px solid var(--line); }.profile-hero h3{margin:3px 0;font-size:22px}.profile-hero p{margin:0;color:var(--muted)}.profile-avatar{width:54px;height:54px;border-radius:50%;object-fit:cover;background:var(--panel-soft)}.profile-hero .tag{margin-left:auto}.profile-metrics{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:18px 0}.profile-metrics div{padding:10px;background:var(--panel-soft);border-radius:7px}.profile-metrics span{display:block;color:var(--muted);font-size:12px}.profile-metrics strong{display:block;margin-top:4px;color:var(--brand-strong);font-size:17px}.profile-history{margin-top:12px}.history-line{display:flex;justify-content:space-between;gap:12px;padding:10px 0;border-bottom:1px solid var(--line)}.history-line span{color:var(--muted);text-align:right}.drawer-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-top:20px}.form-hint{margin:0 0 14px;color:var(--muted)}
.evidence-case{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(200px,.9fr);gap:18px}.evidence-media{min-height:240px;background:var(--panel-soft);display:grid;place-items:center;border-radius:8px;overflow:hidden}.evidence-media img{display:block;width:100%;height:100%;max-height:440px;object-fit:contain}.evidence-facts h3{margin:4px 0}.evidence-facts>p{color:var(--muted)}.evidence-copy{padding:10px 0;border-top:1px solid var(--line)}.evidence-copy p{margin:3px 0;color:var(--muted)}

@media (max-width: 1100px) { .task-queue { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width: 700px) { .today-hero,.operations-grid,.evidence-case { grid-template-columns:1fr; display:grid; }.task-queue,.pulse-list,.profile-metrics { grid-template-columns:1fr; }.drawer{width:100%}.today-hero{padding:18px}.history-line{display:grid}.history-line span{text-align:left} }

/* Membership activation codes */
.code-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-bottom:14px}.code-summary div{padding:15px 17px;border:1px solid var(--line);border-radius:8px;background:#fff}.code-summary span{display:block;color:var(--muted);font-size:12px}.code-summary strong{display:block;margin-top:4px;color:var(--brand-strong);font-size:24px}.code-panel-heading{display:flex;justify-content:space-between;align-items:center;padding:16px 18px;border-bottom:1px solid var(--line)}.code-panel-heading h3{margin:0;font-size:18px}.code-panel-heading p{margin:4px 0 0;color:var(--muted);font-size:13px}.code-table{min-width:980px}.code-hint,.code-ticket-value{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;letter-spacing:.08em}.cell-note{display:block;margin-top:3px;color:var(--muted);font-size:12px}.code-empty{padding:54px 20px;text-align:center}.code-empty-mark{display:block;color:var(--brand);font-size:34px}.code-empty h3{margin:8px 0 4px}.code-empty p{margin:0 0 18px;color:var(--muted)}.code-ticket{position:relative;overflow:hidden;padding:24px;border:1px solid #b8c8b2;border-radius:10px;background:#f4f8f1}.code-ticket:before,.code-ticket:after{content:"";position:absolute;top:50%;width:18px;height:18px;border:1px solid #b8c8b2;border-radius:50%;background:#fff;transform:translateY(-50%)}.code-ticket:before{left:-10px}.code-ticket:after{right:-10px}.code-ticket-kicker{display:block;color:var(--brand);font-size:11px;font-weight:700;letter-spacing:.12em}.code-ticket-value{display:block;margin:18px 0;font-size:clamp(22px,5vw,34px);color:var(--brand-strong);word-break:break-all}.code-ticket-meta{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:18px;padding-top:14px;border-top:1px dashed #b8c8b2}.code-ticket-meta span{color:var(--muted);font-size:12px}.code-ticket-meta span+span:before{content:"·";margin-right:8px}.one-time-note{margin:14px 0 0;padding:12px 14px;border-left:3px solid var(--warn);background:#fff8eb;color:#7a5420;font-size:13px}
@media(max-width:700px){.code-summary{grid-template-columns:1fr}.code-panel-heading{align-items:flex-start;gap:12px;flex-direction:column}.code-ticket{padding:20px}.code-ticket-meta{display:grid}.code-ticket-meta span+span:before{content:""}}

/* Onboarding guide media manager */
.guide-manager{overflow:hidden}.guide-manager-head{display:flex;justify-content:space-between;align-items:center;padding:18px;border-bottom:1px solid var(--line)}.guide-manager-head h3{margin:0;font-size:18px}.guide-manager-head p{margin:4px 0 0;color:var(--muted);font-size:13px}.guide-create{display:grid;grid-template-columns:minmax(220px,1fr) minmax(240px,1fr) auto;gap:12px;align-items:end;padding:18px;border-bottom:1px solid var(--line);background:var(--panel-soft)}.guide-list{display:grid;gap:12px;padding:18px}.guide-card{display:grid;grid-template-columns:28px 120px minmax(240px,1fr) minmax(190px,auto);gap:14px;align-items:center;padding:14px;border:1px solid var(--line);border-radius:10px;background:#fff}.guide-card[draggable="true"]{cursor:grab}.guide-card[draggable="true"]:active{cursor:grabbing;border-color:var(--brand)}.guide-drag-handle{color:var(--muted);font-size:20px;text-align:center;user-select:none}.guide-preview{display:block;width:120px;height:150px;border-radius:8px;background:var(--panel-soft);object-fit:contain}.guide-fields{display:grid;gap:10px}.guide-enabled{display:flex;align-items:center;gap:7px;color:var(--text)}.guide-actions{display:flex;justify-content:flex-end;gap:7px;flex-wrap:wrap}.guide-actions .btn{min-height:32px}
@media(max-width:900px){.guide-create{grid-template-columns:1fr}.guide-create .btn{justify-self:start}.guide-card{grid-template-columns:28px 96px 1fr}.guide-preview{width:96px;height:124px}.guide-actions{grid-column:2/-1;justify-content:flex-start}}
@media(max-width:600px){.guide-card{grid-template-columns:24px 1fr}.guide-preview{grid-column:2;width:100%;height:220px}.guide-fields,.guide-actions{grid-column:1/-1}.guide-drag-handle{grid-row:1/3}.guide-actions{justify-content:flex-start}}

/* User observability workspace */
.analytics-page{display:grid;gap:14px}.analytics-toolbar{display:flex;justify-content:space-between;gap:20px;align-items:flex-end;padding:17px 18px;border:1px solid var(--line);border-radius:10px;background:linear-gradient(120deg,#f6faf4,#fff)}.analytics-toolbar h3{margin:0;font-size:21px;color:var(--brand-strong)}.analytics-toolbar p{margin:5px 0 0;color:var(--muted);font-size:13px}.analytics-period{display:flex;align-items:center;gap:8px;white-space:nowrap;color:var(--muted);font-size:12px}.analytics-period .select{min-width:108px}.insight-kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.insight-kpi-grid.compact{grid-template-columns:repeat(3,minmax(0,1fr));margin:14px 0}.insight-kpi{min-width:0;padding:15px 16px;border:1px solid var(--line);border-radius:9px;background:#fff}.insight-kpi span,.insight-kpi small{display:block;color:var(--muted);font-size:12px}.insight-kpi strong{display:block;margin:6px 0 3px;color:var(--brand-strong);font-size:24px;line-height:1.1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.analytics-two-col{display:grid;grid-template-columns:1.2fr .8fr;gap:14px}.analytics-chart-panel{min-width:0}.analytics-chart{display:flex;align-items:flex-end;gap:7px;min-height:190px;padding:18px 18px 8px;overflow-x:auto;border-top:1px solid var(--line)}.analytics-day{display:flex;flex:1;min-width:24px;min-height:164px;flex-direction:column;align-items:center;justify-content:flex-end;gap:7px}.analytics-day small{color:var(--muted);font-size:10px;white-space:nowrap;transform:rotate(-38deg);transform-origin:top center;margin-top:2px}.analytics-bars{display:flex;align-items:flex-end;gap:2px;height:143px}.analytics-bars i{display:block;width:5px;min-height:3px;border-radius:4px 4px 0 0}.bar-users{background:#4b8f61}.bar-recognitions{background:#d99845}.bar-chat{background:#6f91c2}.bar-agent{background:#aa7bc4}.analytics-legend{display:flex;gap:14px;flex-wrap:wrap;padding:0 18px 16px;color:var(--muted);font-size:11px}.analytics-legend span{display:flex;align-items:center;gap:5px}.analytics-legend i{display:inline-block;width:9px;height:9px;border-radius:3px}.insight-list{display:grid}.insight-list-row{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:11px 0;border-bottom:1px solid var(--line)}.insight-list-row:last-child{border-bottom:0}.insight-list-row>div{min-width:0}.insight-list-row strong{margin-left:5px}.insight-list-row small{display:block;margin-top:4px;color:var(--muted);font-size:12px}.health-list{display:grid;gap:9px}.health-note{display:flex;justify-content:space-between;align-items:center;padding:11px 12px;border-radius:7px;background:var(--panel-soft)}.health-note span{color:var(--muted);font-size:13px}.health-note strong{color:var(--brand-strong)}.coverage-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.coverage-link{display:flex;flex-direction:column;align-items:flex-start;gap:4px;padding:14px;border:1px solid var(--line);border-radius:8px;background:#fff;text-align:left}.coverage-link:hover{border-color:var(--brand);background:#f5faf4}.coverage-link strong{font-size:23px;color:var(--brand-strong)}.coverage-link span{color:var(--muted);font-size:12px}.trace-detail{display:grid;gap:16px}.trace-head{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;padding-bottom:14px;border-bottom:1px solid var(--line)}.trace-head h3{margin:4px 0;font-size:22px;color:var(--brand-strong)}.trace-head p{margin:0;color:var(--muted);font-size:13px}.trace-head-actions{display:flex;gap:7px;flex-wrap:wrap;justify-content:flex-end}.trace-section{min-width:0}.trace-section h4{margin:0 0 9px;font-size:15px;color:var(--brand-strong)}.section-heading{display:flex;justify-content:space-between;align-items:center;gap:10px}.section-heading h4{margin-bottom:9px}.detail-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.detail-grid>div{padding:10px 11px;border-radius:7px;background:var(--panel-soft)}.detail-grid span{display:block;color:var(--muted);font-size:11px}.detail-grid strong{display:block;margin-top:4px;font-size:13px;word-break:break-word}.media-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.media-tile{display:block;aspect-ratio:1;overflow:hidden;border:1px solid var(--line);border-radius:8px;background:var(--panel-soft)}.media-tile img{display:block;width:100%;height:100%;object-fit:cover}.trace-text{margin-top:7px;padding:10px;border-radius:7px;background:var(--panel-soft);white-space:pre-wrap;word-break:break-word;font-size:12px}.trace-text b{display:block;margin-bottom:5px;color:var(--brand-strong)}.danger-text{margin-top:7px;padding:9px 10px;border-left:3px solid var(--danger);background:#fff4f3;color:var(--danger);white-space:pre-wrap;word-break:break-word;font-size:12px}.json-preview{max-height:260px;margin:0;padding:11px;overflow:auto;border:1px solid var(--line);border-radius:7px;background:#f7f9f6;color:#405047;font:11px/1.55 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;white-space:pre-wrap;word-break:break-word}.trace-summary{display:flex;gap:8px;flex-wrap:wrap}.trace-summary span{padding:6px 9px;border-radius:999px;background:var(--panel-soft);color:var(--muted);font-size:12px}.trace-messages{display:grid;gap:8px;max-height:520px;overflow:auto;padding:2px}.trace-message{max-width:92%;padding:10px 12px;border:1px solid var(--line);border-radius:9px;background:#f7f9f6}.trace-message.user{margin-left:auto;border-color:#c9dfc6;background:#f0f8ee}.trace-message-meta{margin-bottom:5px;color:var(--muted);font-size:11px}.trace-message-content{white-space:pre-wrap;word-break:break-word;font-size:13px;line-height:1.6}.trace-media{display:flex;gap:7px;margin-top:8px;flex-wrap:wrap}.trace-image{display:block;width:72px;height:72px;overflow:hidden;border-radius:6px;background:#fff}.trace-image img{width:100%;height:100%;object-fit:cover}.trace-runs{display:grid;gap:8px}.trace-run{padding:11px 12px;border:1px solid var(--line);border-radius:8px;background:#fff}.trace-run-head{display:flex;justify-content:space-between;align-items:center;gap:8px}.trace-run-head small{color:var(--muted);font-size:11px}.trace-run-meta{margin-top:6px;color:var(--muted);font-size:12px;word-break:break-word}.panel-soft{display:grid;gap:5px;padding:12px;border-radius:8px;background:var(--panel-soft)}.panel-soft strong{color:var(--brand-strong)}.panel-soft span,.panel-soft small{color:var(--muted);font-size:12px}.garden-plant-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin-top:10px}.garden-plant-card{display:flex;gap:9px;min-width:0;padding:9px;border:1px solid var(--line);border-radius:8px;background:#fff}.garden-plant-card img,.plant-placeholder{flex:0 0 48px;width:48px;height:48px;border-radius:7px;object-fit:cover;background:var(--panel-soft)}.plant-placeholder{display:grid;place-items:center;font-size:23px}.garden-plant-card strong{display:block;margin-bottom:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.garden-plant-card p{margin:5px 0 0;color:var(--muted);font-size:11px}.garden-plant-card small{display:block;margin-top:4px;color:var(--muted);font-size:11px;word-break:break-word}.care-columns{display:grid;grid-template-columns:1fr 1fr;gap:14px}.care-columns h5{margin:0 0 7px;color:var(--brand-strong);font-size:13px}.care-line{display:grid;grid-template-columns:82px minmax(80px,1fr);gap:4px;padding:8px 0;border-bottom:1px solid var(--line);font-size:12px}.care-line span,.care-line small{color:var(--muted)}.care-line strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.care-line small{grid-column:2;word-break:break-word}.care-line.done{opacity:.7}.garden-compact-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.garden-compact{padding:11px;border:1px solid var(--line);border-radius:8px;background:var(--panel-soft)}.garden-compact>div:first-child,.garden-compact-foot{display:flex;justify-content:space-between;align-items:center;gap:8px}.garden-compact>p{margin:8px 0;color:var(--muted);font-size:12px}.garden-compact-foot{font-size:12px;color:var(--muted)}.garden-compact-foot .btn{flex:none}.modal.drawer{width:min(980px,calc(100vw - 32px))}.modal.drawer .modal-body{max-height:calc(100vh - 145px);overflow:auto}@media(max-width:1000px){.insight-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.analytics-two-col{grid-template-columns:1fr}.detail-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.garden-plant-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:650px){.analytics-toolbar,.trace-head{flex-direction:column;align-items:stretch}.insight-kpi-grid.compact,.garden-compact-grid,.garden-plant-grid,.care-columns{grid-template-columns:1fr}.coverage-grid{grid-template-columns:1fr 1fr}.detail-grid{grid-template-columns:1fr}.trace-head-actions{justify-content:flex-start}.analytics-chart{gap:5px;padding-left:10px;padding-right:10px}.analytics-day{min-width:20px}.analytics-bars i{width:4px}.modal.drawer{width:100%;height:100%;max-height:100vh}.modal.drawer .modal-body{max-height:calc(100vh - 115px)}}
