/* Wildfool brand theme — Quiet Luxury / Rebellious Old Money
 * Palette source: 03_Wildfool/01_品牌核心/Wildfool_品牌色板.md
 *   暖米白 #F7F5F1 (page)  深暖棕 #33302E (text)
 *   赤陶砖红 #9D5248 (accent)  赤陶悬停 #9E433C  亚麻米 #E6E2DC (divider)
 */

:root {
  /* surfaces — warm light palette */
  --bg-0: #f7f5f1;          /* page background — 暖米白 */
  --bg-1: #f2efea;          /* subtle warm tier */
  --bg-2: #ffffff;          /* card surface */
  --bg-3: #e6e2dc;          /* muted / divider — 亚麻米 */
  --bg-hover: #f2efea;

  /* type — warm browns */
  --text-1: #33302e;        /* primary — 深暖棕 */
  --text-2: #5a5754;
  --text-3: #8e8b86;
  --text-4: #b8b5b0;

  /* accent — terracotta */
  --accent:    #9d5248;     /* 赤陶砖红 */
  --accent-bg: #9d5248;
  --accent-fg: #ffffff;
  --accent-hover: #9e433c;
  --accent-soft: rgba(157, 82, 72, 0.10);

  /* signal — muted to fit warm palette */
  --success: #5c8a3f;       /* olive green */
  --warning: #c9853f;       /* warm amber */
  --danger:  #b23a2e;       /* saturated red (distinct from brand red) */

  --border-1: rgba(51, 48, 46, 0.06);
  --border-2: #e6e2dc;
  --border-3: rgba(51, 48, 46, 0.14);

  --shadow-card: 0 1px 3px rgba(51, 48, 46, 0.05), 0 1px 2px rgba(51, 48, 46, 0.03);
}

html, body {
  background: var(--bg-0);
  color: var(--text-1);
  font-family: "Inter Variable", Inter, system-ui, -apple-system, "Helvetica Neue", sans-serif;
  font-feature-settings: "cv01", "cv11", "ss03";
  font-weight: 470;
  letter-spacing: -0.003em;
  min-height: 100vh;
}

h1, h2, h3 { letter-spacing: -0.012em; font-weight: 540; }

.card {
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  border-radius: 10px;
  padding: 18px;
  box-shadow: var(--shadow-card);
}

.card h3 {
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 540;
  margin: 0;
}

.kpi-num {
  font-size: 30px;
  letter-spacing: -0.022em;
  font-weight: 540;
  color: var(--text-1);
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  vertical-align: middle;
  margin-left: 6px;
}
.dot-green  { background: var(--success); }
.dot-yellow { background: var(--warning); }
.dot-red    { background: var(--danger); }
.dot-grey   { background: var(--text-4); }

.refresh-btn {
  background: var(--bg-1);
  border: 1px solid var(--border-2);
  color: var(--text-2);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  font-family: inherit;
}
.refresh-btn:hover:not(:disabled) {
  background: var(--accent);
  color: var(--accent-fg);
  border-color: var(--accent);
}
.refresh-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.refresh-btn.spinning {
  animation: spin 1.2s linear infinite;
  pointer-events: none;
}
.refresh-btn.active {
  background: var(--accent);
  color: var(--accent-fg);
  border-color: var(--accent);
}
@keyframes spin { to { transform: rotate(360deg); } }

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

.text-text-1 { color: var(--text-1); }
.text-text-2 { color: var(--text-2); }
.text-text-3 { color: var(--text-3); }
.text-text-4 { color: var(--text-4); }
.text-accent  { color: var(--accent); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger  { color: var(--danger); }

.border-soft { border: 1px solid var(--border-1); }

.alert-card {
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  border-left: 3px solid var(--warning);
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text-1);
  box-shadow: var(--shadow-card);
}
.alert-card.alert-red { border-left-color: var(--danger); }

/* Tippy.js tooltip — dark on light for contrast */
.tippy-box[data-theme~='ops'] {
  background: var(--text-1);
  color: #f7f5f1;
  border: 1px solid var(--text-1);
  font-size: 12px;
  line-height: 1.55;
  padding: 8px 12px;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(51,48,46,0.18);
}
.tippy-box[data-theme~='ops'] .tippy-arrow { color: var(--text-1); }

.tippy-box[data-theme~='ops'] .tt-table {
  border-collapse: collapse;
  font-size: 11.5px;
  line-height: 1.5;
  margin: 0;
  width: 100%;
}
.tippy-box[data-theme~='ops'] .tt-table .tt-label {
  color: #c5c1ba;
  padding: 1px 16px 1px 0;
  white-space: nowrap;
  font-weight: 470;
}
.tippy-box[data-theme~='ops'] .tt-table .tt-value {
  color: #f7f5f1;
  font-variant-numeric: tabular-nums;
  text-align: right;
  padding: 1px 0;
  white-space: nowrap;
  font-weight: 540;
}
.tippy-box[data-theme~='ops'] .tt-table .tt-section td {
  padding: 8px 0 4px;
  color: #d9907f;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  font-weight: 540;
}
.tippy-box[data-theme~='ops'] .tt-table .tt-section:first-child td {
  padding-top: 0;
}
.tippy-box[data-theme~='ops'] .tt-warn {
  color: #e8a85a;
  font-weight: 540;
}
.tippy-box[data-theme~='ops'] .tt-footer {
  margin-top: 10px;
  padding-top: 6px;
  border-top: 1px solid rgba(255,255,255,0.10);
  font-size: 10.5px;
  color: #a3a09b;
  line-height: 1.4;
}

::selection { background: var(--accent-soft); color: var(--text-1); }

/* Subtle scrollbar in task lists */
ul::-webkit-scrollbar { width: 6px; }
ul::-webkit-scrollbar-track { background: transparent; }
ul::-webkit-scrollbar-thumb { background: var(--border-3); border-radius: 3px; }
