/**
 * Wiserlytics Desktop BI Workspace.
 * A dedicated desktop layout — NOT a stretched mobile page.
 * Aesthetic reference: Linear + Stripe Dashboard + Notion + Power BI.
 */

:root {
  --wd-bg: #f7f8fb;
  --wd-panel: #ffffff;
  --wd-panel-2: #fbfcfe;
  --wd-border: #e5e7eb;
  --wd-border-strong: #d1d5db;
  --wd-text: #0f172a;
  --wd-text-2: #334155;
  --wd-muted: #64748b;
  --wd-teal: #0d9488;
  --wd-teal-2: #0f766e;
  --wd-teal-soft: rgba(13, 148, 136, 0.08);
  --wd-good: #15803d;
  --wd-good-soft: rgba(21, 128, 61, 0.1);
  --wd-warn: #c2410c;
  --wd-warn-soft: rgba(194, 65, 12, 0.1);
  --wd-bad: #b91c1c;
  --wd-bad-soft: rgba(185, 28, 28, 0.1);
  --wd-blue: #2563eb;
  --wd-blue-soft: rgba(37, 99, 235, 0.08);
  --wd-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --wd-shadow: 0 6px 20px rgba(15, 23, 42, 0.06);
  --wd-radius: 14px;
  --wd-radius-sm: 10px;
  --wd-side-w: 236px;
  --wd-top-h: 60px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body.wd-app {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--wd-bg);
  color: var(--wd-text);
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--wd-side-w) 1fr;
  min-width: 1100px;
}

/* Use dashboard-shell sidebar only — hide duplicate Wiserlytics nav */
@media (min-width: 1024px) {
  body.wd-app.dashboard-locked {
    display: block;
    min-width: 0;
  }
  body.wd-app.dashboard-locked .wd-side {
    display: none !important;
  }
  body.wd-app.dashboard-locked:has(#dashDrawer) .wd-main {
    margin-left: 272px;
    min-height: 100vh;
    width: auto;
  }
}

button, input, select, textarea { font-family: inherit; }

/* -------- Narrow / mobile fallback -------- */
.wd-narrow-notice {
  display: none;
  position: fixed; inset: 0;
  z-index: 1000;
  background: linear-gradient(135deg, #ecfeff, #f7f8fb);
  padding: 32px;
  align-items: center; justify-content: center;
}
.wd-narrow-card {
  max-width: 460px;
  background: var(--wd-panel);
  border: 1px solid var(--wd-border);
  border-radius: 16px;
  box-shadow: var(--wd-shadow);
  padding: 28px;
  text-align: center;
}
.wd-narrow-card h2 { margin: 0 0 10px; font-size: 22px; font-weight: 900; }
.wd-narrow-card p { margin: 0 0 20px; color: var(--wd-muted); line-height: 1.55; }
.wd-narrow-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

@media (max-width: 1099px) {
  body.wd-app { display: block; min-width: 0; }
  .wd-side, .wd-main { display: none !important; }
  .wd-narrow-notice { display: flex; }
}
body.wd-app.wd-force-desktop {
  min-width: 0;
  overflow-x: auto;
}
body.wd-app.wd-force-desktop .wd-narrow-notice { display: none !important; }
body.wd-app.wd-force-desktop .wd-side,
body.wd-app.wd-force-desktop .wd-main { display: block !important; }
body.wd-app.wd-force-desktop { display: grid !important; }

/* -------- Sidebar -------- */
.wd-side {
  background: var(--wd-panel);
  border-right: 1px solid var(--wd-border);
  position: sticky; top: 0;
  height: 100vh;
  padding: 18px 14px 16px;
  display: flex; flex-direction: column;
}
.wd-brand-link {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--wd-text);
  padding: 6px 8px 12px;
}
.wd-brand-link img {
  height: 28px;
  width: auto;
  max-width: 108px;
  object-fit: contain;
}
.wd-brand-title { font-size: 15px; font-weight: 900; letter-spacing: -0.2px; }
.wd-brand-sub { font-size: 10.5px; letter-spacing: 0.4px; text-transform: uppercase;
  font-weight: 700; color: var(--wd-muted); margin-top: 2px; }

.wd-nav {
  display: flex; flex-direction: column; gap: 2px;
  margin-top: 6px;
  flex: 1;
}
.wd-nav-btn {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  border: none; background: transparent;
  padding: 9px 10px;
  border-radius: 8px;
  color: var(--wd-text-2);
  font-size: 13px; font-weight: 600;
  text-align: left; cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.wd-nav-btn:hover { background: var(--wd-panel-2); color: var(--wd-text); }
.wd-nav-btn.is-active {
  background: var(--wd-teal-soft);
  color: var(--wd-teal-2);
  font-weight: 800;
}
.wd-nav-ic {
  width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 6px;
  background: #eef2f7;
  color: var(--wd-muted);
  font-size: 12px; font-weight: 800;
}
.wd-nav-btn.is-active .wd-nav-ic {
  background: var(--wd-teal);
  color: #fff;
}

.wd-side-foot {
  margin-top: 12px;
  padding: 12px;
  background: linear-gradient(135deg, #ecfeff, #fff);
  border: 1px solid rgba(13, 148, 136, 0.18);
  border-radius: 12px;
}
.wd-plan-title { font-size: 12.5px; font-weight: 900; color: var(--wd-teal-2); }
.wd-plan-sub { font-size: 11px; color: var(--wd-muted); margin-top: 2px; }
.wd-side-link { display: inline-block; margin-top: 10px; font-size: 12px; font-weight: 700;
  color: var(--wd-teal); text-decoration: none; }
.wd-side-link:hover { text-decoration: underline; }

/* -------- Top bar -------- */
.wd-main {
  min-width: 0;
  display: flex; flex-direction: column;
}
.wd-top {
  height: var(--wd-top-h);
  min-height: var(--wd-top-h);
  flex-shrink: 0;
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--wd-border);
  padding: 0 24px;
  display: flex; align-items: center; gap: 14px;
  position: sticky; top: 0; z-index: 30;
}
.wd-top-search {
  flex: 1; max-width: 560px;
  display: flex; align-items: center; gap: 8px;
  background: var(--wd-panel-2);
  border: 1px solid var(--wd-border);
  border-radius: 10px;
  padding: 8px 10px;
  color: var(--wd-muted);
}
.wd-top-search svg { width: 15px; height: 15px; flex-shrink: 0; }
.wd-top-search input {
  flex: 1; border: none; background: transparent; outline: none;
  font-size: 13px; color: var(--wd-text);
}
.wd-top-search kbd {
  font-family: inherit; font-size: 10.5px; font-weight: 800;
  color: var(--wd-muted);
  border: 1px solid var(--wd-border); border-bottom-width: 2px;
  border-radius: 4px; padding: 1px 6px; background: #fff;
}
.wd-top-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.wd-timeline-select {
  display: flex; align-items: center; gap: 6px;
  background: var(--wd-panel-2);
  border: 1px solid var(--wd-border);
  border-radius: 10px;
  padding: 6px 10px;
}
.wd-timeline-select label {
  font-size: 10.5px; letter-spacing: 0.4px;
  font-weight: 800; color: var(--wd-muted); text-transform: uppercase;
}
.wd-timeline-select select {
  border: none; background: transparent; outline: none;
  font-size: 12.5px; font-weight: 700; color: var(--wd-text);
  padding-right: 4px; max-width: 200px;
}

.wd-btn {
  height: 34px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 12.5px; font-weight: 700;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  text-decoration: none;
  transition: transform 0.05s, box-shadow 0.15s, background 0.15s;
}
.wd-btn-primary {
  background: linear-gradient(135deg, var(--wd-teal), #14b8a6);
  color: #fff; box-shadow: 0 4px 10px rgba(13, 148, 136, 0.25);
}
.wd-btn-primary:hover { box-shadow: 0 6px 14px rgba(13, 148, 136, 0.32); }
.wd-btn-primary:active { transform: translateY(1px); }
.wd-btn-ghost {
  background: var(--wd-panel);
  color: var(--wd-text-2);
  border-color: var(--wd-border);
}
.wd-btn-ghost:hover { background: var(--wd-panel-2); }

.wd-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--wd-teal), #14b8a6);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 13px;
  text-decoration: none;
  box-shadow: var(--wd-shadow-sm);
}

.wd-error {
  margin: 12px 24px 0;
  padding: 10px 14px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  border-radius: 10px;
  font-size: 12.5px;
}

/* -------- Workspace grid -------- */
.wd-workspace {
  padding: 28px 28px 48px;
  display: flex; flex-direction: column; gap: 20px;
  flex: 1;
  min-width: 0;
}

.wd-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 4px 0 8px;
}
.wd-page-head-block {
  min-width: 0;
  flex: 1;
}
.wd-page-eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--wd-teal-2);
  margin-bottom: 6px;
}
.wd-page-title {
  font-size: clamp(1.5rem, 2.2vw, 1.85rem);
  font-weight: 900;
  letter-spacing: -0.5px;
  line-height: 1.15;
  margin: 0;
}
.wd-page-sub {
  color: var(--wd-muted);
  font-size: 14px;
  font-weight: 600;
  margin-top: 6px;
}
.wd-page-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.wd-chip {
  font-size: 11px; font-weight: 700;
  padding: 3px 9px; border-radius: 999px;
  background: var(--wd-panel);
  border: 1px solid var(--wd-border);
  color: var(--wd-text-2);
}
.wd-chip-teal {
  background: var(--wd-teal-soft);
  border-color: rgba(13, 148, 136, 0.25);
  color: var(--wd-teal-2);
}

.wd-panel {
  background: var(--wd-panel);
  border: 1px solid var(--wd-border);
  border-radius: var(--wd-radius);
  box-shadow: var(--wd-shadow-sm);
  padding: 18px;
}
.wd-panel-h {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 12px;
}
.wd-panel-h h3 {
  margin: 0;
  font-size: 13.5px; font-weight: 900; letter-spacing: -0.1px;
}
.wd-panel-h .wd-panel-sub {
  font-size: 11.5px; color: var(--wd-muted);
}
.wd-panel-tag {
  font-size: 10px; font-weight: 800; letter-spacing: 0.4px; text-transform: uppercase;
  color: var(--wd-teal-2);
  background: var(--wd-teal-soft);
  border-radius: 999px;
  padding: 3px 8px;
}

/* KPI band */
.wd-kpi-band {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.wd-kpi-card {
  background: var(--wd-panel);
  border: 1px solid var(--wd-border);
  border-radius: var(--wd-radius);
  padding: 16px 18px;
  box-shadow: var(--wd-shadow-sm);
  min-height: 108px;
  display: flex; flex-direction: column; gap: 6px;
  position: relative; overflow: hidden;
}
.wd-kpi-card::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--wd-teal);
}
.wd-kpi-card.is-warn::before { background: var(--wd-warn); }
.wd-kpi-card.is-good::before { background: var(--wd-good); }
.wd-kpi-card.is-blue::before { background: var(--wd-blue); }
.wd-kpi-label {
  font-size: 11px; letter-spacing: 0.35px; text-transform: uppercase;
  font-weight: 800; color: var(--wd-muted);
}
.wd-kpi-value {
  font-size: 24px; font-weight: 900; color: var(--wd-text);
  letter-spacing: -0.4px;
  line-height: 1.1;
}
.wd-kpi-delta {
  font-size: 11.5px; font-weight: 700;
}
.wd-kpi-delta.is-up { color: var(--wd-good); }
.wd-kpi-delta.is-down { color: var(--wd-warn); }
.wd-kpi-delta.is-flat { color: var(--wd-muted); }

/* Two column split */
.wd-split-2 {
  display: grid; grid-template-columns: 1.35fr 1fr;
  gap: 18px;
}
.wd-split-3 {
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  gap: 18px;
}
@media (max-width: 1400px) {
  .wd-split-3 { grid-template-columns: 1fr 1fr; }
  .wd-kpi-band { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Summary / AI narrative */
.wd-summary p {
  margin: 0; font-size: 13.5px; line-height: 1.65; color: var(--wd-text-2);
}
.wd-summary .wd-panel-h h3 { font-size: 14px; }

/* Bars for revenue-vs-cost */
.wd-bars { display: flex; flex-direction: column; gap: 10px; }
.wd-bar-row {
  display: grid; grid-template-columns: 1fr auto;
  row-gap: 4px; column-gap: 10px;
}
.wd-bar-label { font-size: 12px; font-weight: 700; color: var(--wd-text-2); }
.wd-bar-value { font-size: 12px; font-weight: 800; color: var(--wd-text); }
.wd-bar-track {
  grid-column: 1 / -1;
  height: 6px; background: #eef2f7;
  border-radius: 4px; overflow: hidden;
}
.wd-bar-fill {
  height: 100%; background: var(--wd-teal);
  border-radius: 4px;
  transition: width 0.4s ease;
}

/* Peer tiles */
.wd-peer-list { display: flex; flex-direction: column; gap: 10px; }
.wd-peer-tile {
  display: grid; grid-template-columns: 32px 1fr;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fafbfc;
  border: 1px solid var(--wd-border);
}
.wd-peer-icon {
  width: 32px; height: 32px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px;
}
.wd-peer-tile.good  .wd-peer-icon { background: var(--wd-good-soft); color: var(--wd-good); }
.wd-peer-tile.warn  .wd-peer-icon { background: var(--wd-warn-soft); color: var(--wd-warn); }
.wd-peer-tile.mid   .wd-peer-icon { background: #eef2f7; color: var(--wd-muted); }
.wd-peer-body { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; }
.wd-peer-name { font-size: 12.5px; font-weight: 700; color: var(--wd-text); }
.wd-peer-yours { font-size: 12.5px; font-weight: 800; }
.wd-peer-tile.good  .wd-peer-yours { color: var(--wd-good); }
.wd-peer-tile.warn  .wd-peer-yours { color: var(--wd-warn); }
.wd-peer-tile.mid   .wd-peer-yours { color: var(--wd-text-2); }
.wd-peer-typical { font-size: 11px; color: var(--wd-muted); }

/* Risk & AI recs */
.wd-rec-list, .wd-risk-list { display: flex; flex-direction: column; gap: 12px; }
.wd-rec-item {
  display: grid; grid-template-columns: 26px 1fr;
  gap: 12px; align-items: flex-start;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--wd-border);
  background: linear-gradient(135deg, #f8faff, #fff);
}
.wd-rec-num {
  width: 26px; height: 26px; border-radius: 8px;
  background: var(--wd-teal-soft); color: var(--wd-teal-2);
  font-weight: 800; font-size: 12.5px;
  display: inline-flex; align-items: center; justify-content: center;
}
.wd-rec-text { font-size: 13px; color: var(--wd-text-2); line-height: 1.55; }

.wd-risk-item {
  display: grid; grid-template-columns: 8px 1fr auto;
  gap: 12px; align-items: center;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--wd-border);
}
.wd-risk-dot { width: 8px; height: 40px; border-radius: 4px; }
.wd-risk-dot.high { background: var(--wd-bad); }
.wd-risk-dot.med { background: var(--wd-warn); }
.wd-risk-dot.low { background: var(--wd-good); }
.wd-risk-name { font-weight: 700; font-size: 12.5px; }
.wd-risk-sub  { font-size: 11.5px; color: var(--wd-muted); margin-top: 3px; }
.wd-risk-pill {
  font-size: 10.5px; font-weight: 800; letter-spacing: 0.3px;
  text-transform: uppercase;
  padding: 4px 8px; border-radius: 999px;
}
.wd-risk-pill.high { color: var(--wd-bad); background: var(--wd-bad-soft); }
.wd-risk-pill.med  { color: var(--wd-warn); background: var(--wd-warn-soft); }
.wd-risk-pill.low  { color: var(--wd-good); background: var(--wd-good-soft); }

/* Recent uploads */
.wd-uploads-table {
  width: 100%; border-collapse: collapse;
  font-size: 12.5px;
}
.wd-uploads-table thead th {
  text-align: left; font-weight: 800;
  font-size: 10.5px; letter-spacing: 0.4px; text-transform: uppercase;
  color: var(--wd-muted);
  padding: 8px 10px;
  border-bottom: 1px solid var(--wd-border);
}
.wd-uploads-table tbody td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--wd-border);
  color: var(--wd-text-2);
  vertical-align: top;
}
.wd-uploads-table tbody tr:last-child td { border-bottom: none; }
.wd-uploads-table .wd-file-name { font-weight: 800; color: var(--wd-text); }
.wd-uploads-table .wd-active-pill {
  font-size: 10px; font-weight: 800; color: var(--wd-teal-2);
  background: var(--wd-teal-soft);
  padding: 2px 7px; border-radius: 999px;
  margin-left: 6px;
}
.wd-uploads-table .wd-load-btn {
  background: transparent; border: 1px solid var(--wd-border);
  border-radius: 8px; padding: 5px 10px;
  font-size: 11.5px; font-weight: 700; cursor: pointer;
  color: var(--wd-text-2);
}
.wd-uploads-table .wd-load-btn:hover { background: var(--wd-panel-2); }

/* Peer / benchmark chart */
.wd-chart {
  height: 180px;
  width: 100%;
}
.wd-chart svg { width: 100%; height: 100%; display: block; }

/* Trend spark */
.wd-spark { display: block; width: 100%; height: 46px; }

/* Empty state */
.wd-empty-hero {
  position: relative;
  overflow: hidden;
  padding: 48px 36px 40px;
  text-align: center;
  border: 1px solid rgba(13, 148, 136, 0.18);
  border-radius: calc(var(--wd-radius) + 4px);
  background:
    radial-gradient(circle at 12% 18%, rgba(13, 148, 136, 0.14), transparent 42%),
    radial-gradient(circle at 88% 0%, rgba(37, 99, 235, 0.1), transparent 36%),
    linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: var(--wd-shadow);
}
.wd-empty-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(15, 23, 42, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.025) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}
.wd-empty-icon {
  position: relative;
  z-index: 1;
  width: 72px;
  height: 72px;
  margin: 0 auto 18px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.16), rgba(20, 184, 166, 0.08));
  border: 1px solid rgba(13, 148, 136, 0.22);
  box-shadow: 0 10px 30px rgba(13, 148, 136, 0.12);
}
.wd-empty-hero h3 {
  position: relative;
  z-index: 1;
  color: var(--wd-text);
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  font-weight: 900;
  letter-spacing: -0.3px;
  margin: 0 0 10px;
}
.wd-empty-hero p {
  position: relative;
  z-index: 1;
  margin: 0 auto 22px;
  max-width: 520px;
  line-height: 1.65;
  font-size: 14.5px;
  color: var(--wd-text-2);
}
.wd-empty-hero .wd-btn-primary {
  position: relative;
  z-index: 1;
  height: 44px;
  padding: 0 22px;
  font-size: 14px;
  border-radius: 12px;
}
.wd-empty-features {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
}
.wd-empty-feature {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--wd-border);
  font-size: 12px;
  font-weight: 700;
  color: var(--wd-text-2);
}
.wd-empty {
  padding: 40px 32px;
  text-align: center;
  border: 1.4px dashed var(--wd-border-strong);
  border-radius: var(--wd-radius);
  color: var(--wd-muted);
  background: repeating-linear-gradient(
    45deg,
    #fbfcfe,
    #fbfcfe 10px,
    #f7f8fb 10px,
    #f7f8fb 20px
  );
}
.wd-empty h3 { color: var(--wd-text); font-size: 16px; margin: 0 0 6px; }
.wd-empty p { margin: 0 auto 14px; max-width: 460px; line-height: 1.5; font-size: 13px; }
.wd-empty .wd-btn { margin-top: 4px; }

.wd-empty-note {
  padding: 20px 22px;
  background: var(--wd-panel);
  border: 1px solid var(--wd-border);
  border-radius: var(--wd-radius);
  color: var(--wd-text-2);
  font-size: 13px;
  line-height: 1.6;
  text-align: left;
  box-shadow: var(--wd-shadow-sm);
}
.wd-empty-note strong { color: var(--wd-text); }

/* Loading overlay */
.wd-loading[hidden] { display: none !important; }
.wd-loading {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: flex; align-items: center; justify-content: center;
  z-index: 999;
}
.wd-loading-box {
  background: #fff;
  padding: 22px 30px;
  border-radius: 14px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.25);
}
.wd-loading-box p { margin: 0; font-size: 13px; font-weight: 700; color: var(--wd-text-2); }
.wd-loading-cancel {
  margin-top: 4px;
  border: 0;
  background: transparent;
  color: var(--wd-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}
.wd-loading-cancel:hover { color: var(--wd-text-2); }
.wd-welcome-banner {
  padding: 14px 18px;
  border-radius: 12px;
  background: linear-gradient(135deg, #ecfdf5, #f0fdfa);
  border: 1px solid #99f6e4;
  color: #065f46;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.5;
  box-shadow: 0 4px 14px rgba(13, 148, 136, 0.08);
}
.wd-spinner {
  width: 30px; height: 30px; border-radius: 50%;
  border: 3px solid #e5e7eb;
  border-top-color: var(--wd-teal);
  animation: wd-spin 0.9s linear infinite;
}
@keyframes wd-spin { to { transform: rotate(360deg); } }

/* Footer */
.wd-foot {
  margin-top: auto;
  border-top: 1px solid var(--wd-border);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 11.5px;
  background: #fff;
  flex-shrink: 0;
}
.wd-foot-brand {
  color: var(--wd-muted);
  font-weight: 600;
  flex-shrink: 0;
}
.wd-foot-ai-note {
  flex: 1;
  min-width: 0;
  font-size: 10px;
  line-height: 1.45;
  color: #ca8a04;
  text-align: center;
}
.wd-foot-links { display: flex; gap: 14px; flex-shrink: 0; }
.wd-foot-links a {
  color: var(--wd-muted); text-decoration: none; font-weight: 600;
}
.wd-foot-links a:hover { color: var(--wd-teal-2); }

/* Section transitions */
.wd-section { display: none; }
.wd-section.is-active { display: flex; flex-direction: column; gap: 18px; animation: wd-in 0.25s ease; }
@keyframes wd-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Utility */
.wd-hidden { display: none !important; }
.wd-mono { font-variant-numeric: tabular-nums; }
.wd-scroll-x { overflow-x: auto; }
