/* =========================================================================
   LynkedUp Pro — Dashboard (matches Figma "Linkedup-Web")
   Dark + light themes via [data-theme] on .dash-root.
   ========================================================================= */

.dash-root {
  /* accents (shared) */
  --orange: #fda913;
  --orange-2: #fd6d13;
  --yellow: #ffd60a;
  --cyan: #09b9c6;
  --green: #14bc83;
  --blue: #285ef0;
  --purple: #9036e9;
  --red: #f0563f;

  --radius: 16px;
  --radius-sm: 12px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  min-height: 100vh;
  display: flex;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

/* ---- dark (default) ---- */
.dash-root,
.dash-root[data-theme="dark"] {
  --bg: #060608;
  --panel: #0e0e13;
  --panel-2: #15151b;
  --panel-3: #1b1b22;
  --border: rgba(255, 255, 255, 0.07);
  --border-2: rgba(255, 255, 255, 0.12);
  --text: #ffffff;
  --text-2: #eaeaea;
  --muted: #8c8c8c;
  --faint: #686868;
  --track: rgba(255, 255, 255, 0.08);
  --sidebar: #08080b;
  --shadow: 0 18px 40px -24px rgba(0, 0, 0, 0.8);
}

/* ---- light ---- */
.dash-root[data-theme="light"] {
  --bg: #eef1f7;
  --panel: #ffffff;
  --panel-2: #f5f7fb;
  --panel-3: #eef1f7;
  --border: rgba(15, 23, 42, 0.08);
  --border-2: rgba(15, 23, 42, 0.14);
  --text: #0c0e14;
  --text-2: #1f2430;
  --muted: #5b6472;
  --faint: #97a0b0;
  --track: rgba(15, 23, 42, 0.07);
  --sidebar: #ffffff;
  --shadow: 0 18px 40px -26px rgba(15, 23, 42, 0.25);
}

.dash-root * { box-sizing: border-box; }
.dash-root h1, .dash-root h2, .dash-root h3, .dash-root h4 { margin: 0; }

/* ---- sidebar ---- */
.dash-sidebar {
  width: 214px;
  flex: 0 0 214px;
  background: var(--sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: sticky;
  top: 0;
}
.dash-brand { display: flex; align-items: center; gap: 9px; padding: 18px 18px 14px; }
.dash-brand img { height: 26px; width: auto; }
.dash-brand .bk { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }
.dash-nav { flex: 1; overflow-y: auto; padding: 6px 12px 12px; }
.dash-nav::-webkit-scrollbar { width: 6px; }
.dash-nav::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 99px; }
.nav-group { font-size: 10px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); padding: 14px 10px 6px; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  width: 100%; padding: 8.5px 10px; border-radius: 9px;
  border: 0; background: none; cursor: pointer;
  color: var(--muted); font-family: inherit; font-size: 13px; font-weight: 500;
  text-align: left; transition: background 0.14s, color 0.14s;
}
.nav-item:hover { background: var(--panel-2); color: var(--text-2); }
.nav-item.active { background: var(--orange); color: #1a1206; font-weight: 600; }
.nav-item.active svg { color: #1a1206; }
.nav-item svg { color: var(--faint); flex: 0 0 auto; }
.nav-item:hover svg { color: var(--text-2); }
.fig-ic { display: inline-flex; flex: 0 0 auto; color: inherit; }
.fig-ic svg { width: 100%; height: 100%; display: block; }
.dash-sidebar .sb-foot { border-top: 1px solid var(--border); padding: 10px 12px; }
.sb-user { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; }
.sb-user:hover { background: var(--panel-2); }
.sb-user .av { width: 30px; height: 30px; border-radius: 8px; object-fit: cover; flex: 0 0 30px; }
.sb-user .nm { font-size: 12.5px; font-weight: 600; }
.sb-user .rl { font-size: 11px; color: var(--faint); }

/* ---- main ---- */
.dash-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dash-topbar {
  height: 64px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: blur(10px);
}
.dash-title h1 { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.dash-title p { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.ic-btn { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border); background: var(--panel); color: var(--muted); display: grid; place-items: center; cursor: pointer; transition: 0.14s; }
.ic-btn:hover { color: var(--text); border-color: var(--border-2); }
.top-user { display: flex; align-items: center; gap: 9px; padding: 5px 8px 5px 5px; border: 1px solid var(--border); border-radius: 99px; background: var(--panel); cursor: pointer; }
.top-user .av { width: 30px; height: 30px; border-radius: 99px; object-fit: cover; }
.top-user .nm { font-size: 12.5px; font-weight: 600; }
.top-user .rl { font-size: 10.5px; color: var(--faint); }

.dash-content { padding: 22px 28px 40px; width: 100%; }
.sec-title { font-size: 15px; font-weight: 700; margin: 6px 0 14px; }

/* ---- grid helpers ---- */
.grid { display: grid; gap: 16px; }
.row { display: flex; align-items: center; }
.between { justify-content: space-between; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; }
.muted { color: var(--muted); } .faint { color: var(--faint); }

/* ---- card ---- */
.dcard { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.dcard-pad-0 { padding: 0; }
.card-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.card-h h3 { font-size: 14px; font-weight: 600; }
.card-sub { font-size: 11.5px; color: var(--faint); }

/* ---- stat bits ---- */
.stat-ic { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; }
.big-val { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
.mid-val { font-size: 21px; font-weight: 800; letter-spacing: -0.02em; }
.lbl { font-size: 12px; color: var(--muted); }
.pill { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 99px; font-size: 11px; font-weight: 600; }
.pill-orange { background: color-mix(in srgb, var(--orange) 18%, transparent); color: var(--orange); }
.pill-green { background: color-mix(in srgb, var(--green) 18%, transparent); color: var(--green); }
.pill-blue { background: color-mix(in srgb, var(--blue) 20%, transparent); color: #6f9bff; }
.pill-cyan { background: color-mix(in srgb, var(--cyan) 18%, transparent); color: var(--cyan); }
.pill-red { background: color-mix(in srgb, var(--red) 18%, transparent); color: var(--red); }

/* small stat card (right 2x2) */
.mini-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 15px; }
.mini-card .top { display: flex; justify-content: space-between; align-items: flex-start; }

/* progress */
.bar { height: 8px; border-radius: 99px; background: var(--track); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 99px; }

/* legend dot */
.ldot { width: 8px; height: 8px; border-radius: 99px; display: inline-block; }

/* pipeline rows */
.pl-row { display: grid; grid-template-columns: 92px 1fr 22px; align-items: center; gap: 10px; margin-bottom: 10px; }
.pl-row .lab { font-size: 12px; color: var(--muted); }
.pl-row .n { font-size: 12px; font-weight: 700; text-align: right; }

/* weather */
.wx-hours { display: flex; justify-content: space-between; gap: 6px; margin-top: 14px; }
.wx-hr { text-align: center; flex: 1; }
.wx-hr .t { font-size: 11px; color: var(--faint); }
.wx-hr .te { font-size: 13px; font-weight: 700; margin-top: 6px; }

/* reps */
.rep-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.rep-row:last-child { border-bottom: 0; }
.rep-row .rk { width: 22px; font-size: 12px; font-weight: 700; color: var(--faint); }
.rep-row .av { width: 34px; height: 34px; border-radius: 99px; object-fit: cover; }
.rep-row .nm { font-size: 13px; font-weight: 600; }
.rep-row .em { font-size: 11px; color: var(--faint); }
.rep-row .amt { font-size: 13px; font-weight: 700; color: var(--green); }

.link-btn { font-size: 12px; font-weight: 600; color: var(--orange); background: none; border: 0; cursor: pointer; }

/* ---- charts ---- */
.chart { display: flex; gap: 8px; width: 100%; }
.chart-y { display: flex; flex-direction: column; justify-content: space-between; font-size: 9px; color: var(--faint); padding-bottom: 16px; text-align: right; min-width: 18px; }
.chart-plot { flex: 1; display: flex; align-items: flex-end; gap: 2px; }
.bar-group { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; }
.bar-group .bars { height: calc(100% - 20px); width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 3px; }
.vbar { border-radius: 3px; align-self: flex-end; transition: height 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }
.bar-x { font-size: 10px; color: var(--faint); margin-top: 7px; }

.spark { display: flex; align-items: flex-end; gap: 4px; }
.spark > span { border-radius: 3px; transition: height 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }

.donut { position: relative; display: grid; place-items: center; }
.donut-c { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.donut-c .dv { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; }
.donut-c .dl { font-size: 11px; color: var(--faint); }

.gauge { position: relative; }
.gauge-c { position: absolute; bottom: 0; left: 0; right: 0; text-align: center; }
.gauge-c .gv { font-size: 18px; font-weight: 800; }
.gauge-c .gl { font-size: 10px; color: var(--faint); }

/* responsive */
@media (max-width: 1100px) { .dash-sidebar { display: none; } }
@media (max-width: 760px) { .dash-content { padding: 16px; } }
