/* =============================================================
   NUCLEI — Product UI (Vercel-grade dashboard)
   gray canvas · white card surfaces · top bar + tabs · 14px dense
   ============================================================= */

/* ---- Fuentes self-hosted (variables, subsets latin + latin-ext) ---- */
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../fonts/geist-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../fonts/geist-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('../fonts/geist-mono-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('../fonts/geist-mono-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../fonts/bricolage-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../fonts/bricolage-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---- Tokens ------------------------------------------------- */

:root {
  /* App canvas (gray) vs surfaces (white) — the core Vercel separation */
  --canvas:       #FAFAFA;
  --bg:           #FFFFFF;
  --bg-elev:      #F6F6F6;   /* table headers, hovers, inset fills */
  --bg-paper:     #F1F1F1;
  --bg-invert:    #0A0A0A;

  --ink:          #0A0A0A;
  --ink-muted:    #666666;
  --ink-soft:     #909090;

  --primary:      #0A0A0A;
  --primary-soft: #1A1A1A;
  --primary-tone: #008550;

  /* ░░░ ACENTO DE MARCA — cámbialo aquí para repintar toda la app ░░░ */
  --accent:       #00D982;
  --accent-ink:   #007F4D;
  --accent-dark:  #00C074;
  --accent-on:    #06281B;
  --accent-glow:  rgba(0, 217, 130, 0.16);
  --accent-wash:  rgba(0, 217, 130, 0.08);

  --rule:         #EAEAEA;
  --rule-strong:  #E2E2E2;
  --rule-soft:    #F1F1F1;

  --danger:       #E5484D;
  --danger-wash:  rgba(229, 72, 77, 0.08);
  --ok:           #007F4D;
  --warn:         #C2820E;

  --display: 'Bricolage Grotesque', 'Geist', system-ui, sans-serif;
  --sans:    'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono:    'Geist Mono', 'JetBrains Mono', ui-monospace, 'Menlo', monospace;

  --ease:     cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-emp: cubic-bezier(0.16, 1, 0.3, 1);

  --radius-sm: 6px;
  --radius:    8px;
  --radius-lg: 12px;

  --shadow-sm: 0 1px 2px rgba(10, 14, 12, 0.04);
  --shadow:    0 2px 8px rgba(10, 14, 12, 0.05);
  --shadow-lg: 0 12px 36px -10px rgba(10, 14, 12, 0.14);

  --container: 1160px;
  --gutter: 28px;

  --appbar-h: 56px;
  --tabs-h:   46px;
}

/* ---- Reset -------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'cv01' 1, 'ss01' 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration: none; transition: color .15s var(--ease); }
button { font: inherit; cursor: pointer; }
ul, ol { list-style: none; }
img, svg { display: block; max-width: 100%; }
input, select, textarea { font: inherit; color: inherit; }

::selection { background: var(--accent); color: var(--accent-on); }

/* ---- Layout helpers ---------------------------------------- */

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.container--narrow { max-width: 760px; }
.container--tight  { max-width: 460px; }

.stack-1 { display: flex; flex-direction: column; gap: 4px; }
.stack-2 { display: flex; flex-direction: column; gap: 8px; }
.stack-3 { display: flex; flex-direction: column; gap: 16px; }
.stack-4 { display: flex; flex-direction: column; gap: 24px; }
.stack-5 { display: flex; flex-direction: column; gap: 40px; }
.stack-6 { display: flex; flex-direction: column; gap: 64px; }

.row { display: flex; align-items: center; gap: 16px; }
.row--spread { justify-content: space-between; }
.row--baseline { align-items: baseline; }
.row--top { align-items: flex-start; }

.rule       { height: 1px; background: var(--rule); }
.rule--soft { background: var(--rule-soft); }

/* =============================================================
   APP BAR — top bar (brand + breadcrumb + user) over a tab strip
   ============================================================= */

.appbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
          backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--rule);
}

.appbar__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: var(--appbar-h);
}

.appbar__lead { display: flex; align-items: center; gap: 14px; min-width: 0; }
.appbar__actions { display: flex; align-items: center; gap: 10px; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-family: var(--display);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1;
}

.brand__dot {
  width: 9px; height: 9px;
  background: var(--accent);
  border-radius: 50%;
  display: inline-block;
  transition: transform .25s var(--ease-emp), box-shadow .25s var(--ease);
}
.brand:hover .brand__dot { transform: scale(1.2); box-shadow: 0 0 0 4px var(--accent-glow); }

/* Breadcrumb */
.crumbs { display: flex; align-items: center; gap: 12px; font-size: 14px; min-width: 0; }
.crumbs__sep { color: var(--rule-strong); font-size: 16px; user-select: none; }
.crumbs a { color: var(--ink-muted); font-weight: 500; }
.crumbs a:hover { color: var(--ink); }
.crumbs__current {
  color: var(--ink);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* User chip */
.userchip { display: inline-flex; align-items: center; gap: 9px; padding-right: 4px; }
.userchip__avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--accent-wash);
  color: var(--accent-ink);
  border: 1px solid var(--accent-glow);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}
.userchip__name { font-size: 13.5px; font-weight: 500; color: var(--ink); }

.nav__link {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-muted);
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  transition: color .15s var(--ease), background .15s var(--ease);
}
.nav__link:hover { color: var(--ink); background: var(--bg-elev); }

/* ---- Main + footer ----------------------------------------- */

.site-main {
  flex: 1 0 auto;
  padding: 32px 0 72px;
}
.site-main--flush { padding: 0; }

.site-footer {
  border-top: 1px solid var(--rule);
  padding: 22px 0;
  font-size: 13px;
  color: var(--ink-soft);
  background: var(--bg);
}
.site-footer__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.site-footer__brand { font-family: var(--display); font-weight: 700; font-size: 14px; letter-spacing: -0.03em; color: var(--ink); }

/* =============================================================
   VIEW HEADER — page title + description + actions (sober)
   ============================================================= */

.view-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}
.view-head__title {
  font-family: var(--sans);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--ink);
  line-height: 1.2;
}
.view-head__desc { color: var(--ink-muted); font-size: 14px; margin-top: 5px; max-width: 64ch; }
.view-head__actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

@media (max-width: 640px) {
  .view-head { flex-direction: column; }
}

/* ---- Stat cards ------------------------------------------- */

.stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.stat-card__label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.stat-card__value {
  font-family: var(--sans);
  font-size: 23px;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--ink);
  line-height: 1;
  font-feature-settings: 'tnum' 1, 'lnum' 1;
}
.stat-card__value--out { color: var(--danger); }
.stat-card__value--ok  { color: var(--accent-ink); }
.stat-card__sub { font-size: 12px; color: var(--ink-soft); }

/* =============================================================
   PANEL — white card with header, holds tables / content
   ============================================================= */

.panel {
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.panel + .panel { margin-top: 16px; }

.panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--rule);
}
.panel__title { font-size: 14px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); }
.panel__meta  { font-family: var(--mono); font-size: 12px; color: var(--ink-muted); }
.panel__body  { padding: 18px; }

/* ---- Generic table (head + rows inside a panel) ----------- */

.t-head {
  padding: 9px 18px;
  background: var(--bg-elev);
  border-bottom: 1px solid var(--rule);
}
.t-head > span {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ---- Orders list ------------------------------------------ */

.orders-row,
.orders-head {
  display: grid;
  grid-template-columns: 96px 1.6fr 1fr 1fr 110px;
  gap: 18px;
  align-items: center;
}

.orders-row {
  padding: 14px 18px;
  border-bottom: 1px solid var(--rule);
  transition: background .15s var(--ease);
}
.orders-row:last-child { border-bottom: none; }
.orders-row:hover { background: var(--bg-elev); }

.orders-row__num { font-family: var(--mono); font-size: 12px; color: var(--ink-muted); }

.orders-row__title { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.orders-row__title-text { font-size: 14px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); line-height: 1.3; }
.orders-row__title-text em { font-style: normal; color: var(--ink-soft); font-weight: 400; }
.orders-row__meta { font-size: 12.5px; color: var(--ink-muted); }

.orders-row__date { font-size: 13px; color: var(--ink); }
.orders-row__date small {
  display: block;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-top: 2px;
}

@media (max-width: 820px) {
  .orders-head { display: none; }
  .orders-row { grid-template-columns: 1fr; gap: 6px; }
}

/* ---- Biomarker table (order detail) ----------------------- */

.bio-row,
.bio-head {
  display: grid;
  grid-template-columns: 76px 1.5fr 1.7fr 0.7fr;
  gap: 20px;
  align-items: center;
}

.bio-row {
  padding: 16px 18px;
  border-bottom: 1px solid var(--rule);
  transition: background .15s var(--ease);
}
.bio-row:last-child { border-bottom: none; }
.bio-row:hover { background: var(--bg-elev); }

.bio-row__code { font-family: var(--mono); font-size: 12px; color: var(--ink-muted); }

.bio-row__title { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.bio-row__name { font-size: 14px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); line-height: 1.3; }
.bio-row__name em { font-style: normal; color: var(--ink-soft); font-weight: 400; }
.bio-row__desc { font-size: 12.5px; color: var(--ink-muted); line-height: 1.5; max-width: 54ch; }

.bio-row__value {
  justify-self: end;
  display: flex;
  align-items: baseline;
  gap: 5px;
  text-align: right;
}
.bio-row__num {
  font-family: var(--sans);
  font-weight: 600;
  font-feature-settings: 'tnum' 1, 'lnum' 1;
  letter-spacing: -0.02em;
  font-size: 20px;
  color: var(--ink);
  line-height: 1;
}
.bio-row--out .bio-row__num { color: var(--danger); }
.bio-row__unit { font-family: var(--mono); font-size: 11px; color: var(--ink-soft); text-transform: uppercase; }

/* Range bar */
.bio-row__range { display: flex; flex-direction: column; gap: 10px; }
.range-bar {
  position: relative;
  height: 4px;
  background: var(--bg-paper);
  border-radius: 4px;
  margin: 14px 10px 26px;
}
.range-bar__zone {
  position: absolute;
  top: 0;
  height: 4px;
  border-radius: 4px;
  background: var(--accent);
}
.range-bar__marker {
  position: absolute;
  top: -5px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 1px var(--accent), 0 1px 3px rgba(0,0,0,0.15);
  transform: translateX(-50%);
  z-index: 2;
}
.bio-row--out .range-bar__marker { background: var(--danger); box-shadow: 0 0 0 1px var(--danger), 0 1px 3px rgba(0,0,0,0.15); }

.range-bar__label {
  position: absolute;
  top: 12px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-soft);
  white-space: nowrap;
}
.range-bar__label--min { left: 0; }
.range-bar__label--max { right: 0; }
.range-bar__label--marker { transform: translateX(-50%); color: var(--accent-ink); font-weight: 500; }
.bio-row--out .range-bar__label--marker { color: var(--danger); }

@media (max-width: 820px) {
  .bio-head { display: none; }
  .bio-row { grid-template-columns: 1fr; gap: 14px; }
  .bio-row__value { justify-self: start; text-align: left; }
}

/* ---- Feature cards (admin) -------------------------------- */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.feature-card {
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.feature-card:hover { border-color: var(--rule-strong); box-shadow: var(--shadow); }

.feature-card__status { position: absolute; top: 18px; right: 18px; }
.feature-card__eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent-ink); }
.feature-card__title { font-size: 16px; font-weight: 600; letter-spacing: -0.015em; color: var(--ink); line-height: 1.25; }
.feature-card__title em { font-style: normal; color: var(--ink-soft); font-weight: 400; }
.feature-card__desc { color: var(--ink-muted); font-size: 13px; line-height: 1.55; }
.feature-card__action { margin-top: 6px; }

@media (max-width: 720px) { .cards-grid { grid-template-columns: 1fr; } }

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  border-radius: var(--radius);
  border: 1px solid var(--rule-strong);
  background: var(--bg);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  transition: background .15s var(--ease), color .15s var(--ease),
              border-color .15s var(--ease), box-shadow .2s var(--ease);
  text-decoration: none !important;
  white-space: nowrap;
}
.btn:hover { background: var(--bg-elev); border-color: var(--ink-soft); }

.btn--primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn--primary:hover { background: var(--primary-soft); border-color: var(--primary-soft); }

.btn--accent { background: var(--accent); color: var(--accent-on); border-color: var(--accent); font-weight: 600; }
.btn--accent:hover { background: var(--accent-dark); border-color: var(--accent-dark); box-shadow: 0 4px 16px -4px var(--accent-glow), var(--shadow-sm); }

.btn--ghost { background: transparent; box-shadow: none; border-color: transparent; }
.btn--ghost:hover { background: var(--bg-elev); border-color: var(--rule-strong); }

.btn--lg { height: 42px; padding: 0 20px; font-size: 14.5px; }
.btn--sm { height: 30px; padding: 0 11px; font-size: 13px; border-radius: var(--radius-sm); }

.btn__arrow {
  display: inline-block;
  width: 13px; height: 1.5px;
  background: currentColor;
  position: relative;
  transition: width .2s var(--ease), transform .2s var(--ease);
}
.btn__arrow::after {
  content: '';
  position: absolute;
  right: -1px; top: -3px;
  width: 7px; height: 7px;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  transform: rotate(45deg);
}
.btn:hover .btn__arrow { width: 19px; transform: translateX(2px); }

/* ---- Pills ------------------------------------------------- */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px 3px 8px;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  background: var(--bg);
  color: var(--ink-muted);
  white-space: nowrap;
}
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--ink-soft); display: inline-block; }

.pill--ok            { color: var(--accent-ink); border-color: var(--accent); background: var(--accent-wash); }
.pill--ok::before    { background: var(--accent); }
.pill--accent        { background: var(--accent); color: var(--accent-on); border-color: var(--accent); }
.pill--accent::before { background: var(--accent-on); }
.pill--danger        { color: var(--danger); border-color: rgba(229,72,77,0.3); background: var(--danger-wash); }
.pill--danger::before { background: var(--danger); }
.pill--warn          { color: var(--warn); border-color: rgba(194,130,14,0.3); }
.pill--warn::before  { background: var(--warn); }
.pill--solid         { background: var(--primary); color: #fff; border-color: var(--primary); }
.pill--solid::before { background: var(--accent); }
.pill--ghost         { background: var(--bg-elev); color: var(--ink-muted); }

/* ---- Kicker / labels / type bits --------------------------- */

.kicker {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-muted);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.kicker::before { content: ''; width: 18px; height: 1.5px; background: var(--ink-soft); }
.kicker--accent { color: var(--accent-ink); }
.kicker--accent::before { background: var(--accent); }

.label { font-family: var(--mono); font-size: 11px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-muted); }
.mono { font-family: var(--mono); font-size: 0.9em; }

.muted { color: var(--ink-muted); }
.soft  { color: var(--ink-soft); }

/* ---- Display type (landing / marketing only) -------------- */

.display {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.0;
  color: var(--ink);
}
.display--xl { font-size: clamp(48px, 7.5vw, 104px); letter-spacing: -0.045em; }
.display--lg { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.08; letter-spacing: -0.035em; }
.display--md { font-size: clamp(22px, 2.4vw, 28px); line-height: 1.15; letter-spacing: -0.03em; }
.display--sm { font-size: 19px; line-height: 1.25; letter-spacing: -0.025em; }
.display--xs { font-size: 16px; line-height: 1.3; letter-spacing: -0.02em; }
.display em { font-style: normal; color: var(--accent-ink); }

.lead { font-size: clamp(15px, 1.2vw, 18px); line-height: 1.6; color: var(--ink-muted); max-width: 56ch; }

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

.form { display: flex; flex-direction: column; gap: 18px; }
.form-field { display: flex; flex-direction: column; gap: 7px; }
.form-field__label { font-size: 13px; font-weight: 500; color: var(--ink); }

.form-field__input {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  background: var(--bg);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--ink);
  outline: none;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.form-field__input::placeholder { color: var(--ink-soft); }
.form-field__input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.form-field__hint { font-size: 12px; color: var(--ink-muted); }

.form-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 6px; }

.check { display: inline-flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--ink-muted); cursor: pointer; user-select: none; }
.check input[type="checkbox"] {
  appearance: none;
  width: 17px; height: 17px;
  border: 1px solid var(--rule-strong);
  border-radius: 5px;
  background: var(--bg);
  position: relative;
  transition: background .15s var(--ease), border-color .15s var(--ease);
}
.check input:checked { background: var(--accent); border-color: var(--accent); }
.check input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  inset: 3px;
  background: var(--accent-on);
  clip-path: polygon(14% 47%, 0% 60%, 40% 100%, 100% 16%, 86% 4%, 38% 70%);
}

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

.empty-state {
  padding: 64px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

/* =============================================================
   AUTH — full-screen split (unchanged structure, retuned)
   ============================================================= */

.auth { display: grid; grid-template-columns: 1fr 1fr; min-height: calc(100vh - var(--appbar-h)); }
@media (max-width: 880px) { .auth { grid-template-columns: 1fr; min-height: auto; } }

.auth__panel { padding: 72px 56px; display: flex; flex-direction: column; justify-content: center; gap: 24px; background: var(--bg); }
@media (max-width: 880px) { .auth__panel { padding: 48px 28px; } }

.auth__panel--brand { background: var(--bg-invert); color: #fff; position: relative; overflow: hidden; }
.auth__panel--brand .display { color: #fff; }
.auth__panel--brand .display em { color: var(--accent); }
.auth__panel--brand .muted { color: rgba(255,255,255,0.6); }
.auth__panel--brand .label { color: rgba(255,255,255,0.5); }
.auth__panel--brand .kicker { color: rgba(255,255,255,0.65); }
.auth__panel--brand .kicker::before { background: var(--accent); }
.auth__panel--brand::after {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 22px 22px;
  pointer-events: none;
}
.auth__panel--brand::before {
  content: '';
  position: absolute; bottom: -140px; right: -100px;
  width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, rgba(0,217,130,0.28), transparent 60%);
  pointer-events: none;
}
.auth__dots { position: absolute; bottom: 32px; right: 40px; font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; color: rgba(255,255,255,0.45); text-transform: uppercase; z-index: 2; }
.auth__demo {
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: var(--radius);
  padding: 14px 16px;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.8;
  color: rgba(255,255,255,0.85);
  background: rgba(255,255,255,0.03);
  position: relative; z-index: 2;
}
.auth__demo b { color: var(--accent); font-weight: 500; }
.auth__form { max-width: 360px; width: 100%; }
.auth__switch { font-size: 13.5px; color: var(--ink-muted); margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--rule); }
.auth__switch a { color: var(--ink); font-weight: 500; border-bottom: 1px solid var(--accent); }
.auth__switch a:hover { color: var(--accent-ink); }

/* =============================================================
   LANDING — hero (kept; marketing scale)
   ============================================================= */

.hero { padding: 64px 0 72px; position: relative; overflow: hidden; }
.hero::before {
  content: '';
  position: absolute; top: -80px; left: -8%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 62%);
  pointer-events: none; z-index: 0;
}
.hero__grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.4fr 1fr; gap: 60px; align-items: end; }
@media (max-width: 980px) { .hero__grid { grid-template-columns: 1fr; gap: 44px; } }
.hero__headline { margin-top: 22px; font-size: clamp(36px, 5vw, 64px); }
.hero__cta { display: flex; gap: 12px; margin-top: 34px; flex-wrap: wrap; }
.hero__meta { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 28px; margin-top: 60px; padding-top: 30px; border-top: 1px solid var(--rule); }
.hero__meta-item { display: flex; flex-direction: column; gap: 8px; }
@media (max-width: 720px) { .hero__meta { grid-template-columns: 1fr; gap: 20px; } }

.stat { display: flex; flex-direction: column; gap: 8px; }
.stat__value { font-family: var(--display); font-size: clamp(30px, 4vw, 44px); font-weight: 600; letter-spacing: -0.04em; color: var(--ink); line-height: 1; font-feature-settings: 'tnum' 1; }
.stat__value em { font-style: normal; color: var(--accent-ink); }
.stat__label { font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-muted); }

/* Hero meta como triada "cómo funciona" — paso + verbo + descripción */
.hero__meta-item { gap: 0; }
.hero__meta .stat__step {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--accent-ink);
  margin-bottom: 12px;
}
.hero__meta .stat__step em { font-style: normal; }
.hero__meta .stat__value {
  font-size: clamp(22px, 2.4vw, 29px);
  letter-spacing: -0.03em;
  margin-bottom: 10px;
}
.hero__meta .stat__desc {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-muted);
  max-width: 32ch;
}

.preview-card {
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: 28px 26px 22px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: var(--shadow);
}
.preview-card::after {
  content: 'INFORME · 0001';
  position: absolute; top: -10px; left: 20px;
  background: var(--bg);
  padding: 2px 10px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-muted);
}
.preview-card__header { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 12px; border-bottom: 1px solid var(--rule); margin-bottom: 6px; }
.preview-card__title { font-family: var(--display); font-size: 18px; font-weight: 600; letter-spacing: -0.03em; color: var(--ink); }
.preview-card__title em { font-style: normal; color: var(--accent-ink); }
.preview-card__row { display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; align-items: baseline; padding: 12px 0; border-bottom: 1px dashed var(--rule); }
.preview-card__row:last-of-type { border-bottom: none; }
.preview-card__code { font-family: var(--mono); font-size: 11px; color: var(--ink-soft); }
.preview-card__name { font-size: 14px; font-weight: 500; color: var(--ink); }
.preview-card__name em { font-style: normal; color: var(--ink-muted); font-weight: 400; }
.preview-card__num { font-family: var(--sans); font-weight: 600; font-feature-settings: 'tnum' 1; letter-spacing: -0.02em; font-size: 22px; color: var(--ink); line-height: 1; }
.preview-card__num--out { color: var(--danger); }
.preview-card__unit { font-family: var(--mono); font-size: 10px; color: var(--ink-soft); margin-left: 4px; }
.preview-card__foot { display: flex; justify-content: space-between; padding-top: 12px; margin-top: 6px; border-top: 1px solid var(--rule); font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }

/* ---- Animation -------------------------------------------- */

@keyframes rise { 0% { opacity: 0; transform: translateY(10px); } 100% { opacity: 1; transform: translateY(0); } }
.rise > * { opacity: 0; animation: rise .55s var(--ease-emp) forwards; }
.rise > *:nth-child(1) { animation-delay: 0.03s; }
.rise > *:nth-child(2) { animation-delay: 0.09s; }
.rise > *:nth-child(3) { animation-delay: 0.15s; }
.rise > *:nth-child(4) { animation-delay: 0.21s; }
.rise > *:nth-child(5) { animation-delay: 0.27s; }
.rise > *:nth-child(6) { animation-delay: 0.33s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---- Focus ------------------------------------------------ */

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }

/* ---- ASP.NET validation ----------------------------------- */

.text-danger,
.field-validation-error,
.validation-summary-errors li {
  color: var(--danger);
  font-size: 12.5px;
  letter-spacing: 0;
  text-transform: none;
}
.validation-summary-errors {
  border: 1px solid rgba(229,72,77,0.3);
  border-left: 3px solid var(--danger);
  border-radius: var(--radius);
  padding: 11px 14px;
  background: var(--danger-wash);
  color: var(--danger);
  font-size: 13px;
  margin-bottom: 6px;
}
.validation-summary-errors ul { padding-left: 16px; list-style: disc; }
.input-validation-error { border-color: var(--danger) !important; box-shadow: 0 0 0 3px var(--danger-wash) !important; }
.validation-summary-valid { display: none; }

/* =============================================================
   ORDERS — Apple light theme
   iOS/macOS: F5F5F7 canvas · white cards · hairline separators
   SF Pro display stack · semantic color · dark dock contrast
   ============================================================= */

body.section--orders {
  background: #F5F5F7;
  font-family: 'Geist', system-ui, sans-serif;
}

/* Appbar en tema claro — el shell de orders no usa el appbar global,
   pero por si acaso se renderiza en otra ruta con este tema */
.section--orders .appbar {
  background: rgba(248, 248, 250, 0.9);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
          backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.14);
}
.section--orders .brand                  { color: #fff; }
.section--orders .crumbs a               { color: var(--ink-muted); }
.section--orders .crumbs a:hover         { color: var(--ink); }
.section--orders .crumbs__sep            { color: var(--rule-strong); }
.section--orders .crumbs__current        { color: var(--ink); }
.section--orders .userchip__name         { color: var(--ink); }
.section--orders .userchip__avatar       { border-color: var(--accent-glow); background: var(--accent-wash); color: var(--accent-ink); }
.section--orders .btn--ghost             { color: var(--ink-muted); border-color: transparent; background: transparent; }
.section--orders .btn--ghost:hover       { background: var(--bg-elev); color: var(--ink); border-color: var(--rule); }

/* =============================================================
   DOCK — menú flotante estilo Figma (cristal oscuro, centrado)
   sólo en el dashboard / vista Orders
   ============================================================= */

.dock {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 7px;
  border-radius: 20px;
  background: rgba(13, 22, 18, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: saturate(170%) blur(22px);
          backdrop-filter: saturate(170%) blur(22px);
  box-shadow:
    0 18px 48px -12px rgba(0, 0, 0, 0.55),
    0 2px 8px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
  animation: dock-in .5s var(--ease-emp) both;
}

@keyframes dock-in {
  from { opacity: 0; transform: translate(-50%, 14px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

.dock__sep {
  width: 1px;
  height: 30px;
  margin: 0 3px;
  background: rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.dock__item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  width: 70px;
  padding: 9px 6px 7px;
  border: none;
  border-radius: 13px;
  background: transparent;
  color: rgba(255, 255, 255, 0.52);
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: -0.005em;
  line-height: 1;
  transition: color .18s var(--ease), background .18s var(--ease), transform .18s var(--ease-emp);
}
.dock__item svg {
  width: 21px; height: 21px;
  opacity: 0.85;
  transition: opacity .18s var(--ease), transform .22s var(--ease-emp);
}

.dock__item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
}
.dock__item:hover svg { opacity: 1; transform: translateY(-1px); }
.dock__item:active { transform: scale(0.95); }

.dock__item.is-active {
  color: var(--accent);
  background: var(--accent-wash);
}
.dock__item.is-active svg { opacity: 1; }
/* puntito acento bajo el activo */
.dock__item.is-active::after {
  content: '';
  position: absolute;
  bottom: 2px;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

@media (max-width: 560px) {
  .dock { gap: 0; padding: 6px; border-radius: 18px; }
  .dock__item { width: 58px; font-size: 10.5px; }
  .dock__item svg { width: 19px; height: 19px; }
  .dock__sep { display: none; }
}

/* ---- Hero — imagen de fondo con overlay oscuro -------------- */
.dash-hero {
  background: url('/images/bg-black-01.png') bottom left / cover no-repeat;
  padding: 26px 0 56px;
  color: #fff;
}

.dash-hero__greeting { margin-bottom: 30px; }
.dash-hero__greeting h1 {
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.035em;
  color: #fff;
}

/* Grid 3 columnas */
.dash-hero__cards {
  display: grid;
  grid-template-columns: 1fr 1.6fr 1fr;
  gap: 14px;
}
@media (max-width: 860px) { .dash-hero__cards { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .dash-hero__cards { grid-template-columns: 1fr; } }

/* Card — fondo con noisy-gradient propio por card, marco estilo Vercel */
.dash-card {
  background: rgba(255, 255, 255, 0.055) center / cover no-repeat;
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: 12px;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  -webkit-backdrop-filter: blur(16px);
          backdrop-filter: blur(16px);
  /* hairline interior + sombra ligera en capas, sin drop shadow oscuro */
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 1px 2px rgba(0, 0, 0, 0.04),
    0 6px 16px -10px rgba(0, 0, 0, 0.18);
  transition: box-shadow .2s var(--ease), transform .2s var(--ease-emp), border-color .2s var(--ease);
  overflow: hidden;
  position: relative;
}
.dash-hero__cards .dash-card:nth-child(1) {
  background-image: url('/images/noisy-gradients-2.webp');
  background-size: cover;
  background-position: center;
}
.dash-hero__cards .dash-card:nth-child(2) {
  background-image: url('/images/noisy-gradients-2.webp');
  background-size: cover;
  background-position: bottom right;
  --chart: #15201B;
}
.dash-hero__cards .dash-card:nth-child(3) {
  background-image: url('/images/noisy-gradients-2.webp');
  background-size: cover;
  background-position: top left;
  --chart: #15201B;
}
.dash-card:hover {
  border-color: rgba(0, 0, 0, 0.12);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    0 2px 4px rgba(0, 0, 0, 0.05),
    0 14px 28px -12px rgba(0, 0, 0, 0.22);
  transform: translateY(-3px);
}

.dash-card__head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Chip de ícono (acento) — eco de los items del dock */
.dash-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--accent-ink);
  flex-shrink: 0;
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.05),
    0 1px 2px rgba(0, 0, 0, 0.06);
}
.dash-card__icon svg { width: 17px; height: 17px; }
.dash-card__icon--sm { width: 26px; height: 26px; border-radius: 8px; }
.dash-card__icon--sm svg { width: 15px; height: 15px; }
.dash-card__label {
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: rgba(0,0,0,0.82);
}
.dash-card__value {
  font-size: 54px;
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1;
  color: var(--ink);
  font-feature-settings: 'tnum' 1;
}
.dash-card__sub {
  font-size: 13px;
  font-weight: 450;
  color: rgba(0,0,0,0.72);
  line-height: 1.5;
}
.dash-card__sub--accent {
  color: var(--accent-ink);
  font-weight: 500;
}

/* ---- Card Biomarcadores: número focal + barra + leyenda ----- */
.bio-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.bio-head__unit {
  font-size: 13px;
  font-weight: 500;
  color: rgba(0,0,0,0.55);
}

.bio-stack-bar {
  display: flex;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(0,0,0,0.08);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.04);
  gap: 2px;
}
.bio-stack-bar__seg              { height: 100%; border-radius: 999px; transition: width .5s var(--ease-emp); }
.bio-stack-bar__seg--ok          { background: var(--chart, var(--accent)); }
.bio-stack-bar__seg--out         { background: var(--danger); }

.bio-stack-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}
.bio-stack-count {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: rgba(0,0,0,0.66);
}
.bio-stack-count b               { color: var(--ink); font-weight: 600; }
.bio-stack-count__dot            { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.bio-stack-count--ok  .bio-stack-count__dot { background: var(--chart, var(--accent)); }
.bio-stack-count--out .bio-stack-count__dot { background: var(--danger); }
.bio-stack-count__pct {
  font-family: var(--mono);
  font-size: 11.5px;
  color: rgba(0,0,0,0.42);
  margin-left: 2px;
}

/* ---- Gauge circular (conic-gradient) ------------------------ */
.dash-score { display: flex; align-items: center; gap: 16px; }
.dash-score__gauge {
  position: relative;
  width: 86px; height: 86px;
  border-radius: 50%;
  background: conic-gradient(
    var(--chart, var(--accent)) 0deg calc(var(--score-pct, 0) * 3.6deg),
    rgba(0,0,0,0.1) calc(var(--score-pct, 0) * 3.6deg) 360deg
  );
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.dash-score__gauge::before {
  content: '';
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.82);
  z-index: 0;
}
.dash-score__inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: baseline;
  gap: 1px;
}
.dash-score__num   { font-size: 24px; font-weight: 700; letter-spacing: -0.03em; color: var(--ink); line-height: 1; }
.dash-score__denom { font-size: 11px; color: rgba(0,0,0,0.38); font-family: var(--mono); }

/* ---- Lista de órdenes — Apple light -------------------------------- */
.dash-list { padding: 32px 0 56px; }

/* Holgura para el dock flotante */
.has-dock .site-main { padding-bottom: 108px; }

/* ---- App header — tema claro Apple --------------------------------- */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
}
.app-header__account { display: inline-flex; align-items: center; gap: 12px; }

/* View-head: Large Title estilo iOS — peso 700, 32px */
.section--orders .view-head { margin-bottom: 20px; }
.section--orders .view-head__title {
  font-family: 'Geist', system-ui, sans-serif;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.022em;
  color: #1C1C1E;
  line-height: 1.1;
}
.section--orders .view-head__desc {
  color: rgba(60, 60, 67, 0.6);
  font-size: 14px;
  margin-top: 6px;
}

/* La lista de Órdenes (sin hero) necesita aire arriba */
.dash-list--top { padding-top: 32px; }

/* Panel → tarjeta blanca Apple con sombra suave */
.section--orders .panel {
  background: #FFFFFF;
  border: 0.5px solid rgba(0, 0, 0, 0.1);
  border-radius: 16px;
  -webkit-backdrop-filter: none;
          backdrop-filter: none;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8) inset,
    0 2px 8px rgba(0, 0, 0, 0.05),
    0 8px 28px rgba(0, 0, 0, 0.04);
}
.section--orders .panel__head {
  border-bottom: 0.5px solid rgba(60, 60, 67, 0.12);
  padding: 15px 20px;
}
.section--orders .panel__title {
  color: #1C1C1E;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.012em;
}
.section--orders .panel__title--lead { display: inline-flex; align-items: center; gap: 10px; }
.section--orders .panel__meta {
  font-family: 'Geist', system-ui, sans-serif;
  font-size: 13px;
  color: rgba(60, 60, 67, 0.55);
  letter-spacing: 0;
}

/* Encabezado de tabla */
.section--orders .t-head {
  background: rgba(118, 118, 128, 0.06);
  border-bottom: 0.5px solid rgba(60, 60, 67, 0.1);
  padding: 9px 20px;
}
.section--orders .t-head > span { color: rgba(60, 60, 67, 0.55); }

/* Filas — separador hairline estilo iOS */
.section--orders .orders-row {
  border-bottom: 0.5px solid rgba(60, 60, 67, 0.1);
  padding: 15px 20px;
}
.section--orders .orders-row:last-child { border-bottom: none; }
.section--orders .orders-row:hover { background: rgba(0, 0, 0, 0.025); }
.section--orders .orders-row__num         { color: rgba(60, 60, 67, 0.45); }
.section--orders .orders-row__title-text  { color: #1C1C1E; }
.section--orders .orders-row__title-text em { color: rgba(60, 60, 67, 0.45); }
.section--orders .orders-row__meta        { color: rgba(60, 60, 67, 0.6); }
.section--orders .orders-row__date        { color: #1C1C1E; }
.section--orders .orders-row__date small  { color: rgba(60, 60, 67, 0.45); }

/* Estado vacío */
.section--orders .empty-state .muted { color: rgba(60, 60, 67, 0.6); }

/* ---- Agendar consulta — encabezado claro + grid de cards Apple ---- */
.consult-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.consult-head__title {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #1C1C1E;
  line-height: 1.2;
}
.consult-head__sub {
  margin-top: 4px;
  font-size: 13.5px;
  color: rgba(60, 60, 67, 0.6);
  line-height: 1.4;
}
.consult-head__link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 500;
  color: rgba(60, 60, 67, 0.6);
  padding: 6px 10px;
  margin-right: -10px;
  border-radius: var(--radius-sm);
  transition: color .15s var(--ease), background .15s var(--ease);
}
.consult-head__link:hover { color: #1C1C1E; background: rgba(0, 0, 0, 0.04); }
.consult-head__link svg { transition: transform .18s var(--ease-emp); }
.consult-head__link:hover svg { transform: translateX(3px); }

.consult-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}
@media (max-width: 860px) { .consult-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .consult-grid { grid-template-columns: 1fr; } }

/* Tarjeta blanca Apple flotando sobre el lienzo oscuro */
.consult-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  background: #FFFFFF;
  border: 0.5px solid rgba(0, 0, 0, 0.1);
  border-radius: 16px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8) inset,
    0 2px 8px rgba(0, 0, 0, 0.05),
    0 8px 28px rgba(0, 0, 0, 0.04);
  transition: transform .2s var(--ease-emp), box-shadow .2s var(--ease);
}
.consult-card:hover {
  transform: translateY(-3px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8) inset,
    0 4px 12px rgba(0, 0, 0, 0.07),
    0 16px 36px rgba(0, 0, 0, 0.08);
}

.consult-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
.consult-card__avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(118, 118, 128, 0.12);
  box-shadow:
    0 0 0 2px #fff,
    0 0 0 3.5px color-mix(in srgb, var(--av, #0A84FF) 55%, transparent);
}
.consult-card__online {
  width: 8px; height: 8px;
  margin-top: 4px;
  border-radius: 50%;
  background: #34C759;
  box-shadow: 0 0 0 3px rgba(52, 199, 89, 0.18);
}

.consult-card__id { display: flex; flex-direction: column; gap: 3px; }
.consult-card__name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.012em;
  color: #1C1C1E;
  line-height: 1.25;
}
.consult-card__spec {
  font-size: 12.5px;
  color: rgba(60, 60, 67, 0.6);
  line-height: 1.4;
}

.consult-card__slot {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(118, 118, 128, 0.06);
}
.consult-card__slot-label {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(60, 60, 67, 0.5);
}
.consult-card__slot-value {
  font-size: 13.5px;
  font-weight: 600;
  color: #1C1C1E;
  font-feature-settings: 'tnum' 1;
}

.consult-card__cta {
  margin-top: 2px;
  width: 100%;
  justify-content: center;
}

/* Pills — colores semánticos iOS */
.section--orders .pill {
  background: rgba(118, 118, 128, 0.1);
  border-color: rgba(118, 118, 128, 0.22);
  color: rgba(60, 60, 67, 0.75);
}
.section--orders .pill::before { background: rgba(60, 60, 67, 0.5); }

.section--orders .pill--ok {
  background: rgba(52, 199, 89, 0.12);
  border-color: rgba(52, 199, 89, 0.3);
  color: #1A7A36;
}
.section--orders .pill--ok::before { background: #34C759; }

.section--orders .pill--warn {
  background: rgba(255, 149, 0, 0.1);
  border-color: rgba(255, 149, 0, 0.3);
  color: #9C5A00;
}
.section--orders .pill--warn::before { background: #FF9500; }

.section--orders .pill--danger {
  background: rgba(255, 59, 48, 0.1);
  border-color: rgba(255, 59, 48, 0.25);
  color: #C01A13;
}
.section--orders .pill--danger::before { background: #FF3B30; }

.section--orders .pill--accent {
  background: rgba(0, 217, 130, 0.12);
  border-color: rgba(0, 217, 130, 0.35);
  color: #007A45;
}
.section--orders .pill--accent::before { background: #00D982; }

.section--orders .pill--solid {
  background: #1C1C1E;
  border-color: #1C1C1E;
  color: #FFFFFF;
}
.section--orders .pill--solid::before { background: var(--accent); }

/* Inline "fuera de rango" en tema claro */
.section--orders .orders-row__meta span[style*="--danger"] { color: var(--danger) !important; }

/* Footer en tema claro */
.section--orders .site-footer {
  background: transparent;
  border-top: 0.5px solid rgba(0, 0, 0, 0.1);
}
.section--orders .site-footer__brand { color: #1C1C1E; }
.section--orders .site-footer .muted,
.section--orders .site-footer .soft  { color: rgba(60, 60, 67, 0.5); }

/* Link "Ver todas" del panel — estilo Vercel: texto limpio sin caja */
.panel__link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink-muted);
  white-space: nowrap;
  padding: 4px 8px;
  margin-right: -8px;          /* alinea el texto con el borde óptico del panel */
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  transition: color .15s var(--ease), background .15s var(--ease);
}
.panel__link:hover {
  color: var(--ink);
  background: var(--bg-elev);
}
.panel__link:focus-visible {
  outline: none;
  color: var(--ink);
  border-color: var(--rule-strong);
}
.panel__link svg {
  color: var(--ink-soft);
  transition: transform .18s var(--ease-emp), color .15s var(--ease);
}
.panel__link:hover svg {
  color: var(--ink);
  transform: translateX(3px);
}

/* Filas compactas (vista previa de Inicio) */
.orders-row--compact { grid-template-columns: 90px 1fr auto 110px; }
@media (max-width: 820px) {
  .orders-row--compact { grid-template-columns: 1fr; }
}
