/* ==========================================================================
   QR Studio — design system
   Layered over Bootstrap 5.3 (CDN). Bootstrap supplies grid, utilities and
   component behaviour; everything visual below is ours. Bootstrap's own
   --bs-* custom properties are re-pointed at our tokens so built-in
   components (dropdown, pagination, modal) inherit the palette instead of
   fighting it.
   ========================================================================== */

:root {
  /* Surfaces */
  --plane:        #0a0b10;
  --surface:      #12141c;
  --surface-2:    #191c27;
  --surface-3:    #212533;
  --sunken:       #0f1119;

  /* Ink */
  --ink:          #eef0f6;
  --ink-2:        #a2a8bd;
  --ink-3:        #7b8199;

  /* Lines */
  --hairline:     rgba(255, 255, 255, .09);
  --hairline-2:   rgba(255, 255, 255, .14);
  --gridline:     #232633;
  --baseline:     #2e3242;

  /* Brand */
  --accent:       #8b6cff;
  --accent-soft:  #9a80ff;
  --accent-deep:  #6b48f5;
  --accent-wash:  rgba(139, 108, 255, .14);
  --cyan:         #35d6f0;

  /* Data marks — single-series charts use one hue (see chart section) */
  --series-1:     #8b6cff;
  --series-track: rgba(139, 108, 255, .16);

  /* Status */
  --good:         #2ecc8f;
  --danger:       #ff6b6b;
  --warning:      #f5b942;

  /* Shape */
  --r-sm: 9px;
  --r-md: 13px;
  --r-lg: 18px;
  --r-xl: 26px;

  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow-md: 0 8px 24px -12px rgba(0,0,0,.7);
  --shadow-lg: 0 24px 60px -24px rgba(0,0,0,.85);
  --glow:      0 0 0 1px rgba(139,108,255,.35), 0 12px 40px -12px rgba(139,108,255,.45);

  --ease: cubic-bezier(.22, .86, .36, 1);
}

/* Re-point Bootstrap's tokens at ours */
[data-bs-theme="dark"] {
  --bs-body-bg: var(--plane);
  --bs-body-color: var(--ink);
  --bs-emphasis-color: var(--ink);
  --bs-secondary-color: var(--ink-2);
  --bs-tertiary-color: var(--ink-3);
  --bs-border-color: var(--hairline);
  --bs-border-radius: var(--r-md);
  --bs-primary: var(--accent);
  --bs-link-color: var(--accent-soft);
  --bs-link-hover-color: #b7a4ff;
  --bs-font-sans-serif: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --bs-focus-ring-color: var(--accent-wash);
}

/* ---------- Base ---------------------------------------------------------- */

html { scroll-behavior: smooth; }

body {
  background: var(--plane);
  color: var(--ink);
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: .945rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -.011em;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Ambient light behind the page — pinned, so it never scrolls into a seam */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(720px 420px at 12% -8%, rgba(139,108,255,.16), transparent 62%),
    radial-gradient(620px 380px at 92% 4%, rgba(53,214,240,.10), transparent 60%);
}

body > * { position: relative; z-index: 1; }

h1, h2, h3, h4, h5 {
  font-weight: 700;
  letter-spacing: -.028em;
  color: var(--ink);
}

h1 { font-size: clamp(2rem, 4.4vw, 3.15rem); line-height: 1.08; }
h2 { font-size: clamp(1.4rem, 2.4vw, 1.85rem); line-height: 1.18; }
h3 { font-size: 1.16rem; }

a { text-decoration: none; transition: color .16s var(--ease); }

::selection { background: rgba(139,108,255,.32); color: #fff; }

.mono {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .84em;
  letter-spacing: -.02em;
}

.text-dim   { color: var(--ink-2) !important; }
.text-faint { color: var(--ink-3) !important; }

.eyebrow {
  font-size: .715rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.accent-text {
  background: linear-gradient(96deg, var(--accent-soft), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Thin, unobtrusive scrollbar so the dark canvas stays calm */
* { scrollbar-width: thin; scrollbar-color: var(--surface-3) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb {
  background: var(--surface-3);
  border-radius: 99px;
  border: 3px solid transparent;
  background-clip: content-box;
}

/* ---------- Navigation ---------------------------------------------------- */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: rgba(10, 11, 16, .72);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--hairline);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .62rem;
  font-weight: 800;
  font-size: 1.06rem;
  letter-spacing: -.03em;
  color: var(--ink);
}

.brand:hover { color: var(--ink); }

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: linear-gradient(140deg, var(--accent), var(--accent-deep) 62%, #3a1fb8);
  box-shadow: 0 4px 14px -4px rgba(139,108,255,.8), inset 0 1px 0 rgba(255,255,255,.28);
  display: grid;
  place-items: center;
  flex: none;
}

.brand-mark svg { width: 17px; height: 17px; }

.nav-link-x {
  color: var(--ink-2);
  font-weight: 550;
  font-size: .89rem;
  padding: .44rem .8rem;
  border-radius: var(--r-sm);
  transition: color .16s var(--ease), background-color .16s var(--ease);
}

.nav-link-x:hover { color: var(--ink); background: rgba(255,255,255,.05); }

.nav-link-x.is-active {
  color: var(--ink);
  background: var(--accent-wash);
  box-shadow: inset 0 0 0 1px rgba(139,108,255,.26);
}

.avatar {
  width: 31px;
  height: 31px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .01em;
  color: #fff;
  background: linear-gradient(140deg, var(--accent), var(--accent-deep));
  flex: none;
}

/* ---------- Surfaces ------------------------------------------------------ */

.panel {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
}

.panel-pad { padding: clamp(1.15rem, 2.6vw, 1.85rem); }

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.05rem 1.35rem;
  border-bottom: 1px solid var(--hairline);
}

.panel-head h3, .panel-head h2 { margin: 0; font-size: 1.02rem; font-weight: 700; }

.panel-body { padding: 1.35rem; }

.panel-hover { transition: transform .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease); }
.panel-hover:hover {
  transform: translateY(-2px);
  border-color: var(--hairline-2);
  box-shadow: var(--shadow-lg);
}

.divider { height: 1px; background: var(--hairline); border: 0; margin: 0; }

/* ---------- Buttons ------------------------------------------------------- */

.btn {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  --btn-bd: transparent;
  font-family: inherit;
  font-weight: 620;
  font-size: .875rem;
  letter-spacing: -.012em;
  padding: .6rem 1.05rem;
  border-radius: var(--r-md);
  border: 1px solid var(--btn-bd);
  background: var(--btn-bg);
  color: var(--btn-fg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .48rem;
  transition: transform .14s var(--ease), background-color .16s var(--ease),
              border-color .16s var(--ease), box-shadow .16s var(--ease), color .16s var(--ease);
  white-space: nowrap;
}

.btn:active { transform: translateY(1px) scale(.995); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-wash), 0 0 0 1px var(--accent); }
.btn svg { flex: none; }

.btn-x-primary {
  --btn-fg: #fff;
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-deep) 100%);
  box-shadow: 0 1px 0 rgba(255,255,255,.22) inset, 0 8px 22px -10px rgba(107,72,245,.95);
}
.btn-x-primary:hover {
  color: #fff;
  filter: brightness(1.08);
  box-shadow: 0 1px 0 rgba(255,255,255,.28) inset, 0 12px 30px -10px rgba(107,72,245,1);
}

.btn-x-ghost {
  --btn-fg: var(--ink);
  --btn-bd: var(--hairline-2);
  background: rgba(255,255,255,.035);
}
.btn-x-ghost:hover { color: var(--ink); background: rgba(255,255,255,.075); border-color: rgba(255,255,255,.2); }

.btn-x-quiet {
  --btn-fg: var(--ink-2);
  padding: .45rem .7rem;
}
.btn-x-quiet:hover { color: var(--ink); background: rgba(255,255,255,.06); }

.btn-x-danger {
  --btn-fg: var(--danger);
  --btn-bd: rgba(255,107,107,.28);
  background: rgba(255,107,107,.09);
}
.btn-x-danger:hover { color: #fff; background: var(--danger); border-color: var(--danger); }

.btn-x-lg { padding: .82rem 1.5rem; font-size: .95rem; border-radius: var(--r-md); }
.btn-x-sm { padding: .38rem .72rem; font-size: .795rem; border-radius: var(--r-sm); }

.btn-icon {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: var(--r-sm);
}

/* ---------- Forms --------------------------------------------------------- */

.field { margin-bottom: 1.05rem; }

.field-label {
  display: block;
  font-size: .78rem;
  font-weight: 650;
  color: var(--ink-2);
  margin-bottom: .42rem;
  letter-spacing: -.005em;
}

.field-hint { font-size: .765rem; color: var(--ink-3); margin-top: .38rem; }

.input,
.form-control,
.form-select,
textarea.form-control {
  width: 100%;
  background: var(--sunken);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  color: var(--ink);
  padding: .66rem .85rem;
  font-family: inherit;
  font-size: .9rem;
  line-height: 1.5;
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease), background-color .16s var(--ease);
  appearance: none;
}

.input::placeholder, .form-control::placeholder { color: #5d6379; }

.input:hover, .form-control:hover, .form-select:hover { border-color: var(--hairline-2); }

.input:focus,
.form-control:focus,
.form-select:focus {
  outline: none;
  background: #101320;
  border-color: var(--accent);
  box-shadow: 0 0 0 3.5px var(--accent-wash);
  color: var(--ink);
}

textarea.input, textarea.form-control { resize: vertical; min-height: 104px; }

.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%237b8199' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6.5 8 10.5 12 6.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .8rem center;
  background-size: 15px;
  padding-right: 2.3rem;
}

.input.is-invalid, .form-control.is-invalid, .form-select.is-invalid {
  border-color: rgba(255,107,107,.65);
  background-image: none;
}
.input.is-invalid:focus, .form-control.is-invalid:focus { box-shadow: 0 0 0 3.5px rgba(255,107,107,.16); }

.field-error {
  display: block;
  color: #ff9a9a;
  font-size: .775rem;
  margin-top: .38rem;
}

/* Segmented control — replaces a plain <select> for QR type */
.segmented {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 6px;
  padding: 5px;
  background: var(--sunken);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
}

.segmented input { position: absolute; opacity: 0; pointer-events: none; }

.segmented label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .28rem;
  padding: .58rem .3rem;
  border-radius: var(--r-sm);
  font-size: .765rem;
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
  text-align: center;
  border: 1px solid transparent;
  transition: all .16s var(--ease);
}

.segmented label svg { width: 17px; height: 17px; opacity: .82; }
.segmented label:hover { color: var(--ink); background: rgba(255,255,255,.045); }

.segmented input:checked + label {
  color: #fff;
  background: linear-gradient(180deg, rgba(139,108,255,.34), rgba(107,72,245,.22));
  border-color: rgba(139,108,255,.5);
  box-shadow: 0 4px 14px -8px rgba(107,72,245,.9);
}
.segmented input:checked + label svg { opacity: 1; }
.segmented input:focus-visible + label { box-shadow: 0 0 0 3px var(--accent-wash); }

/* Colour picker */
.swatch-field {
  display: flex;
  align-items: center;
  gap: .6rem;
  background: var(--sunken);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  padding: .34rem .34rem .34rem .55rem;
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease);
}
.swatch-field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3.5px var(--accent-wash); }
.swatch-field .mono { color: var(--ink-2); flex: 1; font-size: .8rem; }

input[type="color"].swatch {
  width: 34px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--hairline-2);
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  flex: none;
}
input[type="color"].swatch::-webkit-color-swatch-wrapper { padding: 2px; }
input[type="color"].swatch::-webkit-color-swatch { border: none; border-radius: 6px; }
input[type="color"].swatch::-moz-color-swatch { border: none; border-radius: 6px; }

/* Range slider */
input[type="range"].slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 22px;
  background: transparent;
  cursor: pointer;
}
input[type="range"].slider::-webkit-slider-runnable-track {
  height: 5px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--accent) var(--fill, 50%), var(--surface-3) var(--fill, 50%));
}
input[type="range"].slider::-moz-range-track {
  height: 5px;
  border-radius: 99px;
  background: var(--surface-3);
}
input[type="range"].slider::-moz-range-progress { height: 5px; border-radius: 99px; background: var(--accent); }
input[type="range"].slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 17px;
  height: 17px;
  margin-top: -6px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--accent);
  box-shadow: 0 2px 6px rgba(0,0,0,.5);
  transition: transform .14s var(--ease);
}
input[type="range"].slider::-moz-range-thumb {
  width: 17px; height: 17px; border-radius: 50%;
  background: #fff; border: 3px solid var(--accent);
  box-shadow: 0 2px 6px rgba(0,0,0,.5);
}
input[type="range"].slider:hover::-webkit-slider-thumb { transform: scale(1.14); }
input[type="range"].slider:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 5px var(--accent-wash); }

/* Checkbox */
.check {
  display: inline-flex;
  align-items: center;
  gap: .58rem;
  cursor: pointer;
  font-size: .855rem;
  color: var(--ink-2);
  user-select: none;
}
.check input { position: absolute; opacity: 0; pointer-events: none; }
.check .box {
  width: 18px; height: 18px;
  border-radius: 6px;
  border: 1px solid var(--hairline-2);
  background: var(--sunken);
  display: grid;
  place-items: center;
  flex: none;
  transition: all .16s var(--ease);
}
.check .box svg { width: 11px; height: 11px; opacity: 0; transform: scale(.6); transition: all .16s var(--ease); }
.check input:checked + .box {
  background: linear-gradient(180deg, var(--accent), var(--accent-deep));
  border-color: var(--accent);
}
.check input:checked + .box svg { opacity: 1; transform: scale(1); }
.check input:focus-visible + .box { box-shadow: 0 0 0 3px var(--accent-wash); }
.check:hover .box { border-color: var(--accent); }

/* ---------- Badges, pills, alerts ---------------------------------------- */

.pill {
  display: inline-flex;
  align-items: center;
  gap: .34rem;
  padding: .21rem .58rem;
  border-radius: 99px;
  font-size: .715rem;
  font-weight: 650;
  letter-spacing: .004em;
  background: rgba(255,255,255,.06);
  color: var(--ink-2);
  border: 1px solid var(--hairline);
  white-space: nowrap;
}

.pill-dot { width: 6px; height: 6px; border-radius: 50%; flex: none; }

.pill-accent { background: var(--accent-wash); color: #c3b3ff; border-color: rgba(139,108,255,.3); }
.pill-good   { background: rgba(46,204,143,.12); color: #7ee2bb; border-color: rgba(46,204,143,.28); }
.pill-danger { background: rgba(255,107,107,.12); color: #ffa8a8; border-color: rgba(255,107,107,.28); }
.pill-warn   { background: rgba(245,185,66,.12); color: #f8d38a; border-color: rgba(245,185,66,.28); }

.notice {
  display: flex;
  align-items: flex-start;
  gap: .7rem;
  padding: .82rem 1rem;
  border-radius: var(--r-md);
  border: 1px solid var(--hairline);
  background: var(--surface-2);
  font-size: .875rem;
  color: var(--ink-2);
}
.notice svg { flex: none; margin-top: .12rem; }
.notice strong { color: var(--ink); font-weight: 650; }
.notice-good   { background: rgba(46,204,143,.09);  border-color: rgba(46,204,143,.26);  color: #a9ecd0; }
.notice-danger { background: rgba(255,107,107,.09); border-color: rgba(255,107,107,.26); color: #ffbcbc; }

/* ---------- Tables -------------------------------------------------------- */

.table-x { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .865rem; }

.table-x thead th {
  text-align: left;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: .72rem 1rem;
  border-bottom: 1px solid var(--hairline);
  white-space: nowrap;
  background: transparent;
}

.table-x tbody td {
  padding: .82rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,.055);
  color: var(--ink-2);
  vertical-align: middle;
}

.table-x tbody tr { transition: background-color .14s var(--ease); }
.table-x tbody tr:hover { background: rgba(255,255,255,.028); }
.table-x tbody tr:last-child td { border-bottom: 0; }
.table-x td strong, .table-x td .t-primary { color: var(--ink); font-weight: 600; }
.table-x .num { font-variant-numeric: tabular-nums; }

.table-wrap { overflow-x: auto; }

/* ---------- Empty state --------------------------------------------------- */

.empty {
  text-align: center;
  padding: 3.4rem 1.5rem;
}
.empty-icon {
  width: 54px; height: 54px;
  margin: 0 auto 1rem;
  border-radius: var(--r-md);
  display: grid;
  place-items: center;
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  color: var(--ink-3);
}
.empty h3 { font-size: 1.02rem; margin-bottom: .35rem; }
.empty p { color: var(--ink-3); font-size: .875rem; max-width: 34ch; margin: 0 auto 1.15rem; }

/* ---------- Stat tiles ---------------------------------------------------- */
/* Figure, not chart: label · value · optional delta. Value uses proportional
   figures (tabular-nums is reserved for columns that align vertically).      */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(178px, 1fr));
  gap: .9rem;
}

.stat {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: 1.15rem 1.25rem;
  position: relative;
  overflow: hidden;
  transition: border-color .2s var(--ease), transform .2s var(--ease);
}
.stat:hover { border-color: var(--hairline-2); transform: translateY(-2px); }

.stat::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(139,108,255,.5), transparent);
  opacity: .8;
}

.stat-label {
  font-size: .755rem;
  font-weight: 600;
  color: var(--ink-3);
  margin-bottom: .5rem;
}

.stat-value {
  font-size: 1.92rem;
  font-weight: 750;
  line-height: 1;
  letter-spacing: -.04em;
  color: var(--ink);
}

.stat-meta { font-size: .765rem; color: var(--ink-3); margin-top: .45rem; }
.stat-meta .up   { color: var(--good); font-weight: 650; }
.stat-meta .down { color: var(--danger); font-weight: 650; }

/* ---------- Charts -------------------------------------------------------- */
/* Both charts here are SINGLE-SERIES magnitude, so they use one hue
   (--series-1) rather than a categorical palette. Contrast of that hue on
   --surface is 4.98:1; gridline sits at 1.22:1 so it stays recessive.
   Bars: <=24px, 4px rounded data-end, square at the baseline, 2px surface
   gap between neighbours. Text wears ink tokens, never the series colour.  */

.chart {
  display: flex;
  align-items: flex-end;
  gap: 2px;                    /* the 2px surface gap between adjacent bars */
  height: 168px;
  padding-top: .5rem;
  position: relative;
}

.chart-grid {
  position: absolute;
  inset: .5rem 0 0 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.chart-grid span { height: 1px; background: var(--gridline); display: block; }

.chart-col {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: .5rem;
  min-width: 0;
  position: relative;
  cursor: default;
}

.chart-bar {
  width: 100%;
  max-width: 24px;             /* cap the mark; the band's leftover stays air */
  background: var(--series-1);
  border-radius: 4px 4px 0 0;  /* rounded data-end, square at the baseline */
  min-height: 3px;
  transition: filter .16s var(--ease), transform .16s var(--ease);
}
.chart-col:hover .chart-bar { filter: brightness(1.22); }

.chart-bar.is-zero { background: var(--surface-3); }

.chart-x {
  font-size: .655rem;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.chart-baseline { height: 1px; background: var(--baseline); }

/* Hover tooltip — an HTML chart is interactive by default */
.chart-tip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(3px);
  background: var(--surface-3);
  border: 1px solid var(--hairline-2);
  border-radius: var(--r-sm);
  padding: .4rem .6rem;
  font-size: .74rem;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .14s var(--ease), transform .14s var(--ease);
  box-shadow: var(--shadow-md);
  z-index: 5;
}
.chart-tip span { color: var(--ink-3); font-weight: 500; }
.chart-col:hover .chart-tip { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Horizontal breakdown bars (also single-series) */
.bar-row { display: grid; grid-template-columns: 1fr auto; gap: .3rem .8rem; margin-bottom: .95rem; }
.bar-row:last-child { margin-bottom: 0; }
.bar-row .bar-label { font-size: .82rem; color: var(--ink-2); }
.bar-row .bar-value { font-size: .82rem; color: var(--ink); font-weight: 650; font-variant-numeric: tabular-nums; }
.bar-track {
  grid-column: 1 / -1;
  height: 7px;
  background: var(--series-track);
  border-radius: 99px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  background: var(--series-1);
  border-radius: 99px;
  transition: width .5s var(--ease);
}

/* ---------- QR preview ---------------------------------------------------- */

.qr-stage {
  display: grid;
  place-items: center;
  padding: 1.5rem;
  border-radius: var(--r-lg);
  background:
    linear-gradient(var(--surface-2), var(--surface-2)) padding-box,
    linear-gradient(140deg, rgba(139,108,255,.5), rgba(53,214,240,.28)) border-box;
  border: 1px solid transparent;
  position: relative;
}

.qr-frame {
  border-radius: var(--r-md);
  overflow: hidden;
  background: #fff;
  padding: 10px;
  box-shadow: 0 18px 46px -18px rgba(0,0,0,.9);
  line-height: 0;
}
.qr-frame img, .qr-frame svg { display: block; width: 100%; height: auto; max-width: 260px; }

.qr-thumb {
  aspect-ratio: 1;
  border-radius: var(--r-md);
  background: #fff;
  padding: 8px;
  display: grid;
  place-items: center;
  line-height: 0;
  border: 1px solid var(--hairline);
}
.qr-thumb img { width: 100%; height: 100%; object-fit: contain; }

.qr-thumb-empty {
  background: var(--surface-2);
  color: var(--ink-3);
  border-style: dashed;
  border-color: var(--hairline-2);
}

/* ---------- Auth layout --------------------------------------------------- */

.auth-shell {
  display: grid;
  grid-template-columns: 1fr;
  min-height: calc(100vh - 61px);
  align-items: center;
}

@media (min-width: 992px) {
  .auth-shell { grid-template-columns: 1.05fr .95fr; }
}

.auth-aside {
  display: none;
  padding: 3rem;
  border-right: 1px solid var(--hairline);
  height: 100%;
  align-content: center;
}
@media (min-width: 992px) { .auth-aside { display: grid; } }

.auth-card { width: 100%; max-width: 424px; margin: 0 auto; padding: 2.4rem 1.5rem; }

.auth-quote {
  border-left: 2px solid var(--accent);
  padding-left: 1.05rem;
  color: var(--ink-2);
  font-size: .93rem;
}

.feature-line { display: flex; gap: .72rem; align-items: flex-start; margin-bottom: 1.05rem; }
.feature-line .tick {
  width: 21px; height: 21px;
  border-radius: 7px;
  background: var(--accent-wash);
  color: var(--accent-soft);
  display: grid; place-items: center;
  flex: none; margin-top: .12rem;
}
.feature-line h4 { font-size: .89rem; margin: 0 0 .1rem; font-weight: 650; }
.feature-line p  { font-size: .82rem; color: var(--ink-3); margin: 0; }

/* ---------- Pagination ---------------------------------------------------- */

.pagination { gap: .3rem; }
.page-link {
  background: var(--surface);
  border: 1px solid var(--hairline);
  color: var(--ink-2);
  border-radius: var(--r-sm) !important;
  padding: .38rem .72rem;
  font-size: .83rem;
  font-weight: 600;
  transition: all .16s var(--ease);
}
.page-link:hover { background: var(--surface-2); color: var(--ink); border-color: var(--hairline-2); }
.page-item.active .page-link {
  background: linear-gradient(180deg, var(--accent), var(--accent-deep));
  border-color: var(--accent);
  color: #fff;
}
.page-item.disabled .page-link { background: var(--surface); color: #4b5064; opacity: .55; }

/* ---------- Footer -------------------------------------------------------- */

.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--hairline);
  padding: 1.5rem 0;
  color: var(--ink-3);
  font-size: .82rem;
}

/* ---------- Utilities ----------------------------------------------------- */

.stack-sm > * + * { margin-top: .55rem; }
.stack    > * + * { margin-top: 1rem; }
.stack-lg > * + * { margin-top: 1.7rem; }

.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.hero-glow { position: relative; }
.hero-glow::before {
  content: "";
  position: absolute;
  width: 340px; height: 340px;
  top: -110px; right: -60px;
  background: radial-gradient(circle, rgba(139,108,255,.24), transparent 68%);
  filter: blur(26px);
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}
