/* =========================================================================
   SourcePhoenix RFQ desk
   Three neon color modes. Each has the same moving glow in its own hue.
   To change one, edit its block of variables below.
     navy  = electric blue on deep navy
     plum  = ultraviolet and magenta on deep purple
     ember = blood orange and red on black
   ========================================================================= */

:root,
[data-theme="navy"] {
  --bg:          #050D24;
  --paper:       #091634;   /* pop-ups */
  --card:        #10244D;   /* panels inside a pop-up or page */
  --card-2:      #183463;   /* raised bars and nested items */
  --surface:     rgba(70, 140, 255, .06);
  --surface-2:   rgba(70, 140, 255, .11);
  --line:        rgba(110, 170, 255, .22);
  --ink:         #F1F6FF;
  --muted:       #9DB2D6;
  --accent:      #2F86FF;
  --accent-ink:  #FFFFFF;
  --accent-soft: rgba(47, 134, 255, .16);
  --signal:      #6CC4FF;   /* highlights, links, "needs your input" */
  --good:        #6FE3B2;
  --warn:        #FFD27A;
  --bad:         #FF8A7A;
  --scrim:       rgba(1, 5, 16, .68);
  --lift:        0 24px 60px rgba(0, 0, 0, .55);
  --neon:        linear-gradient(180deg, #5EC8FF 0%, #2563FF 100%);
  --glow:        0 0 0 1px rgba(140, 200, 255, .5) inset, 0 8px 30px rgba(40, 120, 255, .5);
  --glow-hover:  0 0 0 1px rgba(170, 220, 255, .65) inset, 0 10px 42px rgba(50, 140, 255, .7);
  --halo:        rgba(80, 160, 255, .5);     /* glowing borders */
  --halo-soft:   rgba(40, 120, 255, .22);    /* soft light around cards */
  --halo-deep:   rgba(30, 100, 255, .55);    /* the light under tables and pop-ups */
  --aura-a:      rgba(60, 150, 255, .40);
  --aura-b:      rgba(40, 110, 255, .34);
  --aura-c:      rgba(0, 210, 255, .16);
  --today:       radial-gradient(120% 90% at 80% 0%, #7FD6FF 0%, #2F6BFF 45%, #071A4A 100%);
  --topbar-bg:   rgba(5, 13, 36, .74);
  color-scheme: dark;
}

[data-theme="plum"] {
  --bg:          #0F0420;
  --paper:       #180830;
  --card:        #241042;
  --card-2:      #311858;
  --surface:     rgba(190, 90, 255, .06);
  --surface-2:   rgba(190, 90, 255, .11);
  --line:        rgba(200, 130, 255, .22);
  --ink:         #FBF2FF;
  --muted:       #C2A9D8;
  --accent:      #A93BFF;
  --accent-ink:  #FFFFFF;
  --accent-soft: rgba(169, 59, 255, .17);
  --signal:      #E59BFF;
  --good:        #6FE3B2;
  --warn:        #FFD27A;
  --bad:         #FF8A9E;
  --scrim:       rgba(6, 1, 14, .7);
  --lift:        0 24px 60px rgba(0, 0, 0, .55);
  --neon:        linear-gradient(180deg, #E07BFF 0%, #8A2BFF 100%);
  --glow:        0 0 0 1px rgba(225, 160, 255, .5) inset, 0 8px 30px rgba(160, 60, 255, .5);
  --glow-hover:  0 0 0 1px rgba(240, 190, 255, .65) inset, 0 10px 42px rgba(180, 70, 255, .7);
  --halo:        rgba(190, 100, 255, .5);
  --halo-soft:   rgba(160, 60, 255, .22);
  --halo-deep:   rgba(150, 50, 255, .55);
  --aura-a:      rgba(180, 80, 255, .40);
  --aura-b:      rgba(130, 50, 255, .34);
  --aura-c:      rgba(255, 70, 200, .17);
  --today:       radial-gradient(120% 90% at 80% 0%, #F29BFF 0%, #9B35FF 45%, #250A4A 100%);
  --topbar-bg:   rgba(15, 4, 32, .74);
  color-scheme: dark;
}

[data-theme="ember"] {
  --bg:          #070505;
  --paper:       #0F0A09;
  --card:        #1B1311;
  --card-2:      #271B17;
  --surface:     rgba(255, 96, 40, .05);
  --surface-2:   rgba(255, 96, 40, .10);
  --line:        rgba(255, 110, 60, .20);
  --ink:         #FFF5EF;
  --muted:       #B8A49B;
  --accent:      #FF4A1C;
  --accent-ink:  #FFFFFF;
  --accent-soft: rgba(255, 74, 28, .14);
  --signal:      #FF7A3D;
  --good:        #7FE3A8;
  --warn:        #FFC861;
  --bad:         #FF6B55;
  --scrim:       rgba(0, 0, 0, .7);
  --lift:        0 24px 60px rgba(0, 0, 0, .6);
  --neon:        linear-gradient(180deg, #FF7B30 0%, #FF3A1A 100%);
  --glow:        0 0 0 1px rgba(255, 150, 100, .45) inset, 0 8px 30px rgba(255, 70, 25, .45);
  --glow-hover:  0 0 0 1px rgba(255, 170, 120, .6) inset, 0 10px 40px rgba(255, 80, 30, .65);
  --halo:        rgba(255, 110, 60, .45);
  --halo-soft:   rgba(255, 74, 28, .2);
  --halo-deep:   rgba(255, 70, 25, .55);
  --aura-a:      rgba(255, 120, 40, .42);
  --aura-b:      rgba(255, 90, 30, .35);
  --aura-c:      rgba(255, 40, 20, .20);
  --today:       radial-gradient(120% 90% at 80% 0%, #FF8A3A 0%, #FF3A1A 45%, #3A0E06 100%);
  --topbar-bg:   rgba(7, 5, 5, .72);
  color-scheme: dark;
}

/* ------------------------------- base ------------------------------- */

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: 'Figtree', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.5;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); text-decoration: none; font-weight: 600; }
a { color: var(--signal); }
a:hover { text-decoration: underline; }
a.brand { color: var(--ink); }
a.btn-solid { color: var(--accent-ink); }
a.btn-line { color: var(--ink); }
a.btn:hover { text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
:focus-visible { outline-color: var(--signal); }

.display, h1, h2, h3 { font-family: 'Bricolage Grotesque', 'Figtree', sans-serif; }

/* ------------------------------- boot ------------------------------- */

.boot {
  min-height: 100vh; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 14px; padding: 24px; text-align: center; color: var(--muted);
}
.boot h2 { color: var(--ink); font-size: 24px; letter-spacing: -0.02em; }
.boot p { max-width: 400px; }
.spinner {
  width: 24px; height: 24px; border-radius: 50%;
  border: 2px solid var(--line); border-top-color: var(--accent);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner, .inline-spin { animation-duration: 2.4s; } }

/* ------------------------------ buttons ----------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 999px; font-weight: 700; font-size: 14px; padding: 10px 18px;
  white-space: normal; text-align: center; line-height: 1.25; transition: background .15s ease, border-color .15s ease;
}
.btn-solid { background: var(--accent); color: var(--accent-ink); }
.btn-solid:hover { filter: brightness(1.12); text-decoration: none; }
.btn-line { border: 1px solid var(--line); background: var(--paper); }
.btn-line:hover { border-color: var(--accent); }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-xs { padding: 5px 11px; font-size: 12px; }
.btn[disabled] { opacity: .55; cursor: default; filter: none; }

.inline-spin {
  width: 12px; height: 12px; border-radius: 50%; display: inline-block;
  border: 2px solid currentColor; border-top-color: transparent;
  animation: spin .8s linear infinite;
}

/* ------------------------------ top bar ----------------------------- */

.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 16px;
  padding: 12px 32px; background: var(--bg); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-mark { height: 40px; width: auto; flex-shrink: 0; display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text b { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: 18px; letter-spacing: -0.02em; }
.brand-text small { font-size: 12px; color: var(--muted); font-weight: 500; }

.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.live {
  display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600;
  color: var(--good); background: color-mix(in srgb, var(--good) 12%, transparent);
  padding: 4px 10px; border-radius: 999px;
}
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--good); }
.pulled { font-size: 13px; color: var(--muted); }
.nav-link { color: var(--ink); font-size: 14px; font-weight: 700; padding: 8px 4px; }
.nav-link:hover { text-decoration: underline; }
.who { font-size: 14px; color: var(--muted); padding-left: 16px; border-left: 1px solid var(--line); }

.theme-pick {
  display: flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 999px;
}
.theme-pick button {
  width: 28px; height: 28px; border-radius: 50%; display: flex;
  align-items: center; justify-content: center; border: 2px solid transparent;
}
.theme-pick button[aria-checked="true"] { border-color: var(--ink); }
.sw { width: 18px; height: 18px; border-radius: 50%; display: block; overflow: hidden; }
.sw-navy  { background: radial-gradient(circle at 70% 30%, #9BE0FF, #2F6BFF 45%, #050D24 75%); }
.sw-plum  { background: radial-gradient(circle at 70% 30%, #F5A8FF, #9B35FF 45%, #0F0420 75%); }
.sw-ember { background: radial-gradient(circle at 70% 30%, #FFB347, #FF3A1A 45%, #070505 75%); }

/* ------------------------------- page ------------------------------- */

.page { position: relative; z-index: 1; max-width: 1240px; margin: 0 auto; padding: 0 32px 64px; }

.hero { padding: 56px 0 36px; }
.eyebrow { font-size: 14px; font-weight: 600; color: var(--accent); margin-bottom: 14px; }
.eyebrow { color: var(--signal); }
.hero h1 {
  font-weight: 800; font-size: clamp(40px, 6.2vw, 72px);
  line-height: .98; letter-spacing: -0.045em; max-width: 11.5em;
}
.lede { margin-top: 26px; max-width: 37em; font-size: 16px; line-height: 1.65; color: var(--ink); opacity: .82; }

.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 24px 0 34px; border-bottom: 1px solid var(--line);
}
.stat { padding: 0 22px; border-left: 1px solid var(--line); }
button.stat { display: block; text-align: left; background: none; border-top: 0; border-right: 0; border-bottom: 0; font: inherit; color: inherit; cursor: pointer; border-radius: 0; position: relative; }
button.stat:hover b, button.stat:focus-visible b { color: var(--neon-green, var(--good)); }
button.stat:hover span { color: var(--ink); }
button.stat.picked b { color: var(--neon-green, var(--good)); }
button.stat.picked span { color: var(--ink); text-decoration: underline; text-decoration-color: var(--neon-green, var(--good)); text-underline-offset: 4px; }
button.stat.zero { cursor: default; }
.stat:first-child { padding-left: 0; border-left: none; }
.stat b {
  display: block; font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800;
  font-size: 36px; line-height: 1.1; letter-spacing: -0.03em;
}
.stat span { font-size: 13px; color: var(--muted); }
.stat.signal b { color: var(--signal); }

.section-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  flex-wrap: wrap; margin-bottom: 18px;
}
.section-head h2 { font-size: 26px; font-weight: 800; letter-spacing: -0.03em; }
.section-note { font-size: 14px; color: var(--muted); }

/* --------------------------- closing this week ---------------------- */

.week { padding: 44px 0 20px; }
.week-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; }
.day {
  display: flex; flex-direction: column; text-align: left; min-height: 150px;
  padding: 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line);
}
.day:hover { border-color: var(--accent); }
.day.today { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.day.picked { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent); }
.day-top { display: flex; align-items: flex-start; gap: 6px; }
.day-name { font-weight: 700; font-size: 14px; }
.day-date { font-size: 13px; opacity: .75; }
.day-count {
  margin-left: auto; font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 800; font-size: 30px; line-height: 1; opacity: .45;
}
.day.has .day-count { opacity: 1; }
.day-list { margin-top: auto; padding-top: 12px; display: flex; flex-direction: column; gap: 5px; }
.day-item {
  font-size: 12px; font-weight: 600; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.day-more { font-size: 11px; opacity: .75; }

/* ---------------------------- opportunity list ---------------------- */

.opps { padding: 40px 0 10px; }
.list-tools { display: flex; align-items: center; gap: 16px; }
#search, #vSearch {
  width: 300px; padding: 11px 18px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--paper);
}
#search::placeholder, #vSearch::placeholder { color: var(--muted); }
#search:focus, #vSearch:focus { outline: none; border-color: var(--accent); }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); }

.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 15px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--paper);
  font-size: 14px; font-weight: 600;
}
.pill:hover { border-color: var(--accent); }
.pill .n { font-weight: 600; opacity: .7; }
.pill.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.pill.on .n { opacity: .85; }
.pill.zero { color: var(--muted); font-weight: 500; }
.pills-sm .pill { padding: 6px 13px; font-size: 13px; }

/* stage glyphs: a small mark that changes with progress */
.g { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; display: inline-block; border: 1.5px solid currentColor; }
.g-half { background: linear-gradient(180deg, transparent 50%, currentColor 50%); }
.g-dot { background: currentColor; }
.g-check { background: currentColor; border-radius: 3px; }
.g-dash { border-style: dotted; }
.g-dashed { border-style: dashed; opacity: .6; }
.g-open { border-style: dashed; }

.day-filter {
  display: inline-flex; align-items: center; gap: 10px; margin: 2px 0 14px;
  font-size: 13px; background: var(--accent-soft); padding: 7px 8px 7px 14px; border-radius: 999px;
}

.table-wrap { border: 1px solid var(--line); border-radius: 18px; overflow: hidden; margin-top: 8px; }
#table { display: block; }

/* the folded Closed section under the open list */
.closed-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 28px 0 12px; }
.closed-toggle {
  display: inline-flex; align-items: center; gap: 10px; padding: 9px 16px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); font-size: 15px; font-weight: 700;
}
.closed-toggle:hover { border-color: var(--accent); }
.closed-toggle .n { font-weight: 600; color: var(--muted); }
.chev {
  width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(-45deg); transition: transform .15s ease;
}
.chev.open { transform: rotate(45deg); margin-top: -4px; }
.table-wrap.is-closed { opacity: .72; }
.table-wrap.is-closed:hover { opacity: 1; }
table.opp { width: 100%; border-collapse: collapse; }
.opp thead th {
  text-align: left; font-size: 13px; font-weight: 600; color: var(--muted);
  background: var(--surface); padding: 16px; border-bottom: 1px solid var(--line);
}
.opp tbody tr { border-top: 1px solid var(--line); cursor: pointer; }
.opp tbody tr:first-child { border-top: none; }
.opp tbody tr:hover { background: var(--surface); }
.opp td { padding: 18px 16px; vertical-align: top; font-size: 14px; white-space: normal; overflow-wrap: break-word; }

.due-when { font-weight: 700; }
.due-when.soon { color: var(--signal); }
.due-when.closed { color: var(--muted); }
.due-date { font-size: 13px; color: var(--muted); margin-top: 2px; }
.sol { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.opp-title { font-weight: 700; line-height: 1.4; margin-top: 2px; max-width: 30em; }
.opp-sub { font-size: 12px; color: var(--muted); margin-top: 6px; max-width: 34em; }
.agency { line-height: 1.4; }
.agency small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }

.type { font-weight: 600; font-size: 13px; }
.type.review, .type.disagree { color: var(--signal); }
.type.not { color: var(--muted); }

.stage-pill {
  display: inline-flex; align-items: center; gap: 7px; white-space: normal; line-height: 1.25;
  padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--paper); font-size: 13px; font-weight: 600;
}

.owner {
  /* a circle for short initials, a wrapping pill for anything longer */
  display: inline-flex; align-items: center; justify-content: center; text-align: center;
  min-width: 30px; min-height: 30px; max-width: 96px; padding: 4px 8px; border-radius: 15px;
  font-size: 11px; font-weight: 700; line-height: 1.25;
  white-space: normal; overflow-wrap: anywhere;
  background: var(--accent-soft); color: var(--accent);
}
.owner { color: var(--signal); }
.none { color: var(--muted); }

.prog { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.prog-dots { display: flex; gap: 4px; }
.prog-dots i { width: 14px; height: 4px; border-radius: 999px; background: var(--line); }
.prog-dots i.on { background: var(--accent); }
.prog-dots i.on { background: var(--signal); }

.empty { padding: 56px 20px; text-align: center; color: var(--muted); line-height: 1.7; }

/* ------------------------- how it works pop-up ----------------------- */

.modal {
  position: fixed; inset: 0; z-index: 35; background: var(--scrim);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.modal-card {
  width: min(880px, 100%); max-height: calc(100vh - 48px); overflow-y: auto;
  background: var(--paper); color: var(--ink); border: 1px solid var(--line);
  border-radius: 22px; padding: 28px 30px 30px; box-shadow: var(--lift);
  animation: pop .2s ease-out;
}
@keyframes pop { from { transform: translateY(10px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .modal-card { animation: none; } }
.modal-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 6px; }
.modal-head h2 { font-size: 34px; font-weight: 800; letter-spacing: -0.035em; line-height: 1.05; }
.modal-sub { color: var(--muted); font-size: 15px; margin-bottom: 26px; max-width: 34em; }
.modal-head .close { margin-left: auto; }
.how-steps { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px 30px; }
.how-steps li { border-top: 2px solid var(--ink); padding-top: 14px; }
.how-n { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: 15px; color: var(--muted); }
.how-steps h3 { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; margin: 2px 0 6px; }
.how-steps p { font-size: 14px; color: var(--muted); line-height: 1.6; }
.modal-foot { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }

.foot {
  margin-top: 64px; padding-top: 22px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 13px; color: var(--muted);
}
.foot span { font-weight: 700; color: var(--ink); }

/* ------------------- contract / vendor details pop-up --------------- */

.scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 30; }
.drawer {
  /* a centered pop-up over the page; it scrolls inside if the contract is long */
  position: fixed; z-index: 31;
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: min(920px, calc(100vw - 48px)); max-height: calc(100vh - 48px); height: auto;
  background: var(--paper); border: 1px solid var(--line); border-radius: 22px; overflow: hidden;
  overflow-wrap: anywhere; word-break: normal;
  box-shadow: var(--lift); display: flex; flex-direction: column;
  animation: popin .2s ease-out;
}
@keyframes popin {
  from { transform: translate(-50%, calc(-50% + 12px)) scale(.98); opacity: 0; }
  to   { transform: translate(-50%, -50%); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { .drawer { animation: none; } }

.d-head { display: flex; gap: 12px; padding: 26px 32px 18px; }
.d-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.d-head h2 { font-size: 28px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.15; margin: 10px 0 6px; }
.d-agency { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.close { font-size: 26px; line-height: 1; color: var(--muted); padding: 2px 8px; border-radius: 8px; align-self: flex-start; }
.close:hover { background: var(--surface); }

/* previous / next contract */
.d-headbtns { display: flex; align-items: center; gap: 4px; align-self: flex-start; flex-shrink: 0; }
.d-pos { font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; padding: 0 2px; }
.d-nav {
  width: 34px; height: 34px; border-radius: 999px; font-size: 22px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink); background: var(--card-2); border: 1px solid var(--line);
}
.d-nav:hover:not(:disabled) { color: var(--accent); border-color: var(--accent); }
.d-nav:disabled { opacity: .3; cursor: default; }
.nav-arrow {
  position: fixed; top: 50%; z-index: 32; transform: translateY(-50%);
  width: 52px; height: 52px; border-radius: 999px; font-size: 34px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center; padding-bottom: 4px;
  color: var(--ink); background: var(--paper); border: 1px solid var(--halo, var(--line));
  box-shadow: 0 0 18px -4px var(--halo-deep, transparent); transition: transform .15s, color .15s;
}
.nav-arrow.prev { left: calc(50% - 460px - 76px); }
.nav-arrow.next { right: calc(50% - 460px - 76px); }
.nav-arrow:hover:not(:disabled) { color: var(--accent); transform: translateY(-50%) scale(1.08); }
.nav-arrow:disabled { opacity: .25; cursor: default; }
/* not enough room beside the pop-up: the arrows in its header do the job */
@media (max-width: 1100px) { .nav-arrow { display: none; } }
@media (min-width: 1101px) { .d-nav { display: none; } }
.tag {
  display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 10px;
  border-radius: 999px; background: var(--surface); color: var(--muted);
}
.tag.accent { background: var(--accent-soft); color: var(--accent); }
.tag.accent { color: var(--signal); }

.d-actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 14px 32px; background: var(--surface);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.btn-start { padding: 9px 22px; font-size: 15px; }
.d-actions select { max-width: 100%; }
.d-actions select {
  -webkit-appearance: none; appearance: none; cursor: pointer;
  border: 1px solid var(--line); border-radius: 999px; color: var(--ink);
  padding: 8px 38px 8px 14px; font-size: 13px; font-weight: 600; line-height: 1.2; min-width: 140px;
  background-color: var(--card);
  background-image:
    linear-gradient(45deg, transparent 50%, var(--ink) 50%),
    linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 20px) 52%, calc(100% - 15px) 52%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
.d-actions select:hover { border-color: var(--halo); }
.d-actions select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.d-actions select option { background: var(--paper); color: var(--ink); }

.d-tabs { display: flex; gap: 4px; padding: 14px 28px 0; flex-wrap: wrap; }
.d-tab { padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--muted); }
.d-tab:hover { background: var(--surface); color: var(--ink); }
.d-tab.on { background: var(--accent); color: var(--accent-ink); }
.d-body { flex: 1; min-height: 0; overflow-y: auto; padding: 22px 32px 40px; font-size: 15px; }

/* long emails, links, and numbers wrap instead of running off the edge */
.d-body p, .d-body span, .d-body a, .d-body b, .d-body li, .d-body td, .d-head h2, .d-agency { overflow-wrap: anywhere; }
.d-body .chip, .d-body .tag { white-space: normal; max-width: 100%; text-align: left; }
.d-body .contact { display: block; }
.spec-table th, .email-render th, .spec-table td.id { white-space: nowrap; overflow-wrap: normal; }
.email-render table { table-layout: auto; }

.field-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px 24px; margin-bottom: 24px; }
.field { min-width: 0; }
.field label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); }
.field p { font-weight: 600; margin-top: 2px; line-height: 1.4; }
.block { margin-bottom: 22px; }
.block > h4 { font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 8px; }
.block p.body { line-height: 1.75; font-size: 15px; }
.contact { background: var(--surface); border-radius: 12px; padding: 10px 14px; margin-bottom: 6px; }
.contact b { font-size: 15px; }
.contact span { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-block; font-size: 12px; font-weight: 600; padding: 5px 11px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
}
.chip { color: var(--signal); }
.chip.muted { background: var(--surface); color: var(--muted); }
.chip.drive { background: color-mix(in srgb, var(--good) 15%, transparent); color: var(--good); }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.label { font-size: 12px; font-weight: 700; color: var(--muted); }
.log-row { display: flex; gap: 10px; font-size: 12px; color: var(--muted); padding: 4px 0; }
.log-row b { color: var(--ink); }
.log-row .t { color: var(--ink); flex: 1; }
.log-row .when { white-space: nowrap; font-variant-numeric: tabular-nums; }
.log-row .log-who { display: flex; flex-direction: column; width: 150px; flex-shrink: 0; line-height: 1.3; }
.log-row .log-who small { font-size: 11px; color: var(--muted); }
@media (max-width: 600px) {
  .log-row { flex-wrap: wrap; gap: 2px 10px; }
  .log-row .log-who { width: 100%; flex-direction: row; gap: 6px; align-items: baseline; }
  .log-row .log-who small::before { content: '· '; }
}

/* steps */
.step { border: 1px solid var(--line); border-radius: 16px; margin-bottom: 12px; overflow: hidden; }
.step-head { display: flex; align-items: center; gap: 12px; padding: 14px; }
.step-n {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0; display: flex;
  align-items: center; justify-content: center; font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 800; background: var(--surface); color: var(--muted);
}
.step-n.done { background: var(--accent); color: var(--accent-ink); }
.step-role { font-size: 12px; font-weight: 700; color: var(--muted); }
.step-title { font-weight: 700; line-height: 1.3; }
.step-note { font-size: 12px; color: var(--muted); line-height: 1.5; margin-top: 2px; }
.step-head .btn { margin-left: auto; flex-shrink: 0; }
.step-body { padding: 0 14px 14px; }
.result { background: var(--surface); border-radius: 12px; padding: 14px; }
.result-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.badge {
  font-size: 12px; font-weight: 700; padding: 4px 11px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink);
}
.ai { font-size: 11px; font-weight: 600; color: var(--muted); }
.bullets { list-style: none; margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.bullets li { font-size: 13px; line-height: 1.55; padding-left: 16px; position: relative; }
.bullets li::before { content: ''; position: absolute; left: 2px; top: 8px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.bullets li::before { background: var(--signal); }
.note { background: var(--accent-soft); font-size: 13px; line-height: 1.6; padding: 12px 14px; border-radius: 12px; }
.error {
  background: color-mix(in srgb, var(--bad) 12%, transparent); color: var(--bad);
  font-size: 13px; line-height: 1.6; padding: 12px 14px; border-radius: 12px; margin-bottom: 12px;
}
.product-name { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: 20px; letter-spacing: -0.02em; }
.spec-row { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 10px; font-size: 13px; }
.sub-h { font-size: 12px; font-weight: 700; color: var(--muted); margin: 14px 0 6px; }

.spec-table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 6px 0; }
.spec-table th { text-align: left; font-size: 11px; font-weight: 700; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--line); }
.spec-table td { padding: 8px; vertical-align: top; border-top: 1px solid var(--line); line-height: 1.45; }
.spec-table .id { color: var(--muted); font-variant-numeric: tabular-nums; }
.spec-table th:last-child, .spec-table td:last-child { white-space: nowrap; overflow-wrap: normal; }

.vendor { border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin-bottom: 10px; }
.vendor.top { border-color: var(--accent); }
.vendor-head { display: flex; align-items: center; gap: 10px; }
.vendor-rank {
  width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; background: var(--surface); flex-shrink: 0;
}
.vendor.top .vendor-rank { background: var(--accent); color: var(--accent-ink); }
.vendor p { font-size: 14px; margin-top: 8px; line-height: 1.55; }
.vendor-mail { margin-top: 10px; padding: 8px 12px; border-radius: 10px; background: var(--accent-soft); font-size: 13px; display: flex; gap: 8px; flex-wrap: wrap; }
.vendor-mail.none { background: var(--surface); color: var(--muted); }

.email { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; margin-bottom: 14px; }
.email-head { display: flex; align-items: center; padding: 12px 14px; background: var(--surface); font-weight: 700; }
.email-head .ai { margin-left: auto; }
.email-body { padding: 14px; }
.email-to { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.to-input {
  flex: 1; min-width: 160px; padding: 7px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--paper); font-size: 13px;
}
.to-input:focus { outline: none; border-color: var(--accent); }
.email-subject { font-weight: 700; margin-bottom: 10px; }
.email-render { font-size: 13px; line-height: 1.6; }
.email-render p { margin: 0 0 10px; }
.email-render table { width: 100%; border-collapse: collapse; margin: 4px 0 12px; }
.email-render th, .email-render td { padding: 6px 8px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.email-render td:first-child, .email-render td:last-child, .email-render th:last-child { white-space: nowrap; }
.email-render,
.email-render * { color: var(--ink) !important; border-color: var(--line) !important; }
.email-foot { display: flex; gap: 8px; padding: 0 14px 14px; }

.run-steps { list-style: none; margin-bottom: 14px; }
.run-steps li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; font-size: 14px; color: var(--muted); }
.run-steps li.active { background: var(--accent-soft); color: var(--ink); font-weight: 600; }
.run-steps li.done { color: var(--ink); }
.run-steps li.failed { color: var(--bad); }
.run-mark {
  width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center;
  justify-content: center; font-size: 11px; font-weight: 700; background: var(--surface);
}
.run-steps li.done .run-mark { background: var(--accent); color: var(--accent-ink); }
.run-steps li.failed .run-mark { background: var(--bad); color: #fff; }
.run-steps .why { margin-left: auto; font-size: 12px; text-align: right; }
.draft-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; font-size: 14px; }
.draft-row.bad { border-color: var(--bad); }
.draft-row .addr { font-size: 12px; color: var(--muted); }
.working { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); margin: 6px 0 14px; }
.working .spinner { width: 14px; height: 14px; }

/* -------------------------------- toast ------------------------------ */

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 40;
  background: var(--ink); color: var(--bg); font-size: 14px; font-weight: 600;
  padding: 10px 18px; border-radius: 999px; box-shadow: var(--lift);
  opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
.toast.show { opacity: 1; }
.toast.err { background: var(--bad); color: #fff; }

/* ----------------------------- responsive ---------------------------- */

@media (max-width: 1100px) {
  .week-grid { grid-template-columns: repeat(4, 1fr); }
  .pulled, .who { display: none; }
}

@media (max-width: 820px) {
  .topbar { padding: 10px 16px; gap: 10px; }
  .topbar-right { gap: 10px; }
  .live { display: none; }
  .nav-link { font-size: 13px; }
  .page { padding: 0 16px 48px; }
  .hero { padding-top: 36px; }
  .stats { grid-template-columns: repeat(2, 1fr); row-gap: 20px; }
  .stat:nth-child(3) { padding-left: 0; border-left: none; }
  .week-grid { grid-template-columns: repeat(2, 1fr); }
  .day { min-height: 110px; }
  .list-tools { width: 100%; }
  #search, #vSearch { flex: 1; width: auto; }
  .how-steps { grid-template-columns: 1fr; }
  .modal-card { padding: 22px 20px; }
  .modal-head h2 { font-size: 28px; }
  .field-grid { grid-template-columns: 1fr; }
  .drawer { top: 0; left: 0; transform: none; width: 100%; max-height: none; height: 100%; border-radius: 0; border: none; animation: none; }
  .d-head { padding: 20px 18px 14px; }
  .d-head h2 { font-size: 23px; }
  .d-actions { padding: 12px 18px; }
  .d-tabs { padding: 12px 14px 0; }
  .d-body { padding: 18px 18px 32px; }

  /* table rows become cards */
  .opp thead { display: none; }
  .opp, .opp tbody, .opp tr, .opp td { display: block; width: 100%; }
  .opp tr { padding: 14px 16px; }
  .opp td { padding: 4px 0; }
  .opp td.c-owner { display: none; }
  .opp td.c-type, .opp td.c-stage { display: inline-block; width: auto; margin-right: 10px; }
  .prog { flex-direction: row; align-items: center; margin-top: 6px; }
}

@media (max-width: 480px) {
  .brand-text small { display: none; }
  #syncBtn { padding: 8px 12px; font-size: 13px; }
}

/* ------------------------------ neon glow ----------------------------- */
/* Every mode glows in its own hue. The light drifts slowly and shifts shade,
   the way light moves across the reference image. */

.aura {
  display: block; position: fixed; inset: -10%; z-index: 0; pointer-events: none;
  background:
    radial-gradient(38% 30% at 72% 8%,  var(--aura-a), transparent 70%),
    radial-gradient(8% 60% at 74% 30%,  var(--aura-b), transparent 72%),
    radial-gradient(45% 35% at 18% 95%, var(--aura-c), transparent 70%);
  animation: aura 16s ease-in-out infinite alternate;
}
@keyframes aura {
  0%   { transform: translate3d(0, 0, 0) scale(1);       filter: hue-rotate(-8deg) saturate(1.1); }
  50%  { transform: translate3d(-3%, 2%, 0) scale(1.06);  filter: hue-rotate(12deg) saturate(1.3); }
  100% { transform: translate3d(2%, -1%, 0) scale(1.02);  filter: hue-rotate(-2deg) saturate(1.15); }
}
@media (prefers-reduced-motion: reduce) { .aura { animation: none; } }

.topbar { background: var(--topbar-bg); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.btn-solid,
.pill.on,
.d-tab.on,
.badge,
.step-n.done,
.vendor.top .vendor-rank,
.run-steps li.done .run-mark,
.view-switch button[aria-selected="true"] {
  background: var(--neon); border-color: transparent; color: #fff; box-shadow: var(--glow);
}
.btn-solid:hover { filter: brightness(1.12) saturate(1.1); box-shadow: var(--glow-hover); }
.day.today {
  background: var(--today); color: #fff;
  border-color: var(--halo); box-shadow: 0 0 40px var(--halo-deep);
}
.day:hover,
.pill:hover { border-color: var(--halo); box-shadow: 0 0 18px var(--halo-soft); }
.stat.signal b { text-shadow: 0 0 24px var(--halo); }
.table-wrap,
.modal-card {
  box-shadow: 0 0 0 1px var(--halo-soft), 0 30px 80px -30px var(--halo-deep);
}
.drawer { border-color: var(--halo); box-shadow: 0 0 0 1px var(--halo-soft), 0 30px 90px -20px var(--halo-deep); }
.how-steps li { border-top-color: var(--accent); }
.vendor.top { border-color: var(--halo); }

/* ------------------------- section switch + vendors -------------------- */

.view-switch { display: flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; }
.view-switch button { padding: 7px 14px; border-radius: 999px; font-size: 14px; font-weight: 700; color: var(--muted); }
.view-switch button:hover { color: var(--ink); }
.view-switch button[aria-selected="true"] { background: var(--accent); color: var(--accent-ink); }

.v-name { font-weight: 700; line-height: 1.35; }
.v-site { font-size: 12px; margin-top: 2px; display: inline-block; }
.v-fed { font-size: 12px; color: var(--muted); margin-top: 4px; }
.v-mail { font-weight: 600; overflow-wrap: anywhere; }
.v-none { color: var(--muted); font-size: 13px; }
.src { display: inline-block; margin-top: 5px; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px;
  background: var(--surface); color: var(--muted); }
.src.team { background: color-mix(in srgb, var(--good) 18%, transparent); color: var(--good); }
.src.replied { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }
.v-sells .chips { margin-bottom: 6px; }
/* long category names: a wrapping rectangle that fits the text, not a pill */
.chip { max-width: 100%; white-space: normal; overflow-wrap: anywhere; line-height: 1.35; }
.v-sells .chip, .q-profile .chip, .block .chip { border-radius: 6px; }
.v-sells .chip { display: block; width: fit-content; padding: 6px 10px; }
.v-small { font-size: 12px; color: var(--muted); line-height: 1.45; }
.v-count { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: 20px; line-height: 1; }
.v-notes { font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.v-notes.has { color: var(--ink); }

.notes-box {
  width: 100%; min-height: 120px; padding: 12px 14px; border-radius: 12px; resize: vertical;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); line-height: 1.5;
}
.notes-box:focus, .v-email-input:focus { outline: none; border-color: var(--accent); }
.v-email-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.v-email-input {
  flex: 1; min-width: 200px; padding: 9px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
}
.sol-link { cursor: pointer; }

.auto-note { margin-bottom: 14px; border: 1px solid var(--line); }
.auto-note { border-color: var(--halo); box-shadow: 0 0 24px var(--halo-soft); }

.save-state { font-size: 12px; font-weight: 600; color: var(--muted); min-width: 52px; }
.save-state.ok { color: var(--good); }
.save-state.err { color: var(--bad); }

/* --------------------------------- quotes ------------------------------ */
.q-field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; font-size: 12px; font-weight: 600; color: var(--muted); }
.q-in {
  width: 100%; padding: 8px 11px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font-size: 13px; font-weight: 500; line-height: 1.4;
}
textarea.q-in { resize: vertical; }
.q-in:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.q-in[readonly] { opacity: .7; }
.q-parties { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 6px 0 4px; }
.q-party { border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.q-party h5 { font-size: 12px; font-weight: 800; margin-bottom: 8px; letter-spacing: .02em; }
.q-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 14px; margin-top: 8px; }
.q-lines-wrap { overflow-x: auto; }
.q-lines { min-width: 640px; }
.q-lines td { vertical-align: top; }
.q-lines .q-num { width: 90px; text-align: right; }
.q-lines td:nth-child(3) { min-width: 200px; }
.q-ext { white-space: nowrap; font-weight: 700; padding-top: 14px !important; }
.q-markup { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; margin-left: auto; }
.q-markup .q-in { width: 70px; }
.q-totals { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: var(--surface); }
.q-totals div { display: flex; flex-direction: column; }
.q-totals span { font-size: 12px; color: var(--muted); }
.q-totals b { font-family: 'Bricolage Grotesque', sans-serif; font-size: 20px; font-weight: 800; }
/* upload a vendor quote */
.vq-upload { margin-top: 14px; padding-top: 4px; border-top: 1px solid var(--line); }
.vq-up-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.vq-up-row .q-in { flex: 1 1 260px; width: auto; }
.vq-pick { position: relative; cursor: pointer; }
.vq-pick input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
#vqFileName { flex: 1 1 160px; min-width: 0; overflow-wrap: anywhere; }
.vq-use { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; margin-bottom: 10px; cursor: pointer; }
.vq-use input { margin-top: 2px; accent-color: var(--accent); }
.q-profile summary { cursor: pointer; font-size: 13px; font-weight: 700; color: var(--muted); padding: 6px 0; }
.q-profile[open] summary { color: var(--ink); margin-bottom: 8px; }
@media (max-width: 820px) {
  .q-parties, .q-facts { grid-template-columns: 1fr; }
}

/* ------------------------- submission checklist ------------------------ */
.cl-head { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.cl-count { font-size: 14px; white-space: nowrap; }
.cl-count b { font-family: 'Bricolage Grotesque', sans-serif; font-size: 20px; font-weight: 800; }
.cl-bar { flex: 1; height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.cl-bar span { display: block; height: 100%; border-radius: 999px; background: var(--neon); box-shadow: 0 0 12px var(--halo); }
.cl-item { border: 1px solid var(--line); border-left-width: 3px; border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; }
.cl-item.ok { border-left-color: var(--good); }
.cl-item.miss { border-left-color: var(--warn); }
.cl-item.todo { border-left-color: var(--line); }
.cl-check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.cl-check input { width: 17px; height: 17px; margin-top: 2px; accent-color: var(--accent); flex-shrink: 0; }
.cl-text { font-size: 14px; font-weight: 600; line-height: 1.45; }
.cl-item.ok .cl-text { color: var(--muted); }
.cl-ev { font-size: 12px; color: var(--muted); margin: 4px 0 0 27px; }
.cl-item.ok .cl-ev { color: var(--good); }
.cl-item.miss .cl-ev { color: var(--warn); }
.cl-input { margin: 8px 0 0 27px; display: flex; flex-direction: column; gap: 6px; }
.cl-remember { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.cl-remember input { accent-color: var(--accent); }
.cl-src { font-size: 11px; color: var(--muted); margin: 6px 0 0 27px; font-style: italic; }
.cl-src span { font-style: normal; opacity: .8; }

/* ------------------------- download the vendor list ---------------------- */
/* a compact bar at the top of the Vendors page, between the intro and the numbers */
.dl {
  display: flex; gap: 16px 24px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  margin: -8px 0 8px; padding: 14px 18px; border: 1px solid var(--line); border-radius: 16px;
  background: var(--surface); box-shadow: 0 0 22px var(--halo-soft);
}
.dl-text { display: flex; align-items: center; gap: 8px 22px; flex-wrap: wrap; min-width: 0; }
.dl-text h2 { font-size: 16px; font-weight: 800; letter-spacing: -0.01em; }
.dl-scope { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.dl-scope label { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; }
.dl-scope input { width: 15px; height: 15px; accent-color: var(--accent); }
.dl-scope label:has(input:checked) { color: var(--ink); font-weight: 600; }
.dl-actions { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 820px) { .dl { padding: 14px; } .dl-actions { width: 100%; } .dl-actions .btn { flex: 1; } }

/* phones: the top bar wraps onto two rows instead of running off the screen */
@media (max-width: 620px) {
  .topbar { flex-wrap: wrap; row-gap: 10px; }
  .topbar-right { flex-wrap: wrap; justify-content: flex-start; row-gap: 10px; width: 100%; margin-left: 0; }
  .view-switch { order: -1; }
  #syncBtn { white-space: nowrap; }
  .list-tools { flex-wrap: wrap; }
  .list-tools input[type="search"] { flex: 1 1 100%; }
}

/* ---------------------- category dropdown on the Vendors page ------------- */
#vCats { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.cat-pick { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; color: var(--muted); flex: 0 1 auto; min-width: 0; }
.cat-wrap { position: relative; display: inline-flex; width: 420px; min-width: 0; }
.cat-wrap::after {
  content: ''; position: absolute; right: 15px; top: 50%; width: 7px; height: 7px; margin-top: -6px;
  border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(45deg); pointer-events: none;
}
#vCatSel {
  appearance: none; -webkit-appearance: none; width: 100%; min-width: 0;
  padding: 9px 40px 9px 16px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font-size: 14px; font-weight: 600; cursor: pointer;
  text-overflow: ellipsis;
}
#vCatSel:hover { border-color: var(--halo); }
#vCatSel:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
#vCatSel option { background: var(--paper); color: var(--ink); }
@media (max-width: 620px) { .cat-pick { width: 100%; } .cat-wrap { flex: 1; width: auto; } #vCatSel { width: 100%; min-width: 0; max-width: 100%; } }

/* opportunity list: stage, owner, and progress stay on one line, in smaller type */
.opp .stage-pill { white-space: nowrap; font-size: 12px; padding: 4px 10px; gap: 6px; }
.opp .owner { white-space: nowrap; font-size: 10px; padding: 3px 7px; min-height: 26px; max-width: none; }
.opp .prog .btn { white-space: nowrap; font-size: 12px; padding: 6px 12px; }

/* ---------------------------- layered surfaces ----------------------------- */
/* page < pop-up < panels < raised bars, so sections read as separate areas */
.d-head { background: var(--paper); }
.d-actions { background: var(--card-2); }
.d-tabs { background: var(--paper); padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.d-body { background: var(--paper); }

/* each section of a contract or vendor becomes its own panel */
.d-body .field-grid,
.d-body .block {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px;
}
.d-body .field-grid { margin-bottom: 14px; }
.d-body .block { margin-bottom: 14px; }
.d-body .block > h4 { color: var(--signal); letter-spacing: .01em; }
.d-body .contact { background: var(--card-2); }
/* light cards: white paper with dark text; every color inside follows the theme.
   Used for the synopsis, the reader and analyst results, and the vendor shortlist. */
.light-card {
  --ink: #0F1B36; --muted: #55698F; --paper: #FFFFFF; --card: #FFFFFF; --card-2: #EEF4FF;
  --surface: rgba(47, 134, 255, .07); --surface-2: rgba(47, 134, 255, .12);
  --line: rgba(40, 95, 200, .18); --signal: #1E6FE0; --accent-soft: rgba(47, 134, 255, .10);
  --good: #13865A; --warn: #A86A00; --bad: #C2341F;
  color: var(--ink); color-scheme: light;
}
[data-theme="plum"] .light-card {
  --ink: #26113A; --muted: #74598A; --card-2: #F6EEFF;
  --surface: rgba(169, 59, 255, .07); --surface-2: rgba(169, 59, 255, .12);
  --line: rgba(130, 50, 200, .18); --signal: #8A2BE2; --accent-soft: rgba(169, 59, 255, .10);
}
[data-theme="ember"] .light-card {
  --ink: #2B140B; --muted: #8A6455; --card-2: #FFF1EA;
  --surface: rgba(255, 74, 28, .07); --surface-2: rgba(255, 74, 28, .12);
  --line: rgba(200, 70, 30, .2); --signal: #D9380F; --accent-soft: rgba(255, 74, 28, .10);
}
.d-body .block.light-card { border-color: transparent; }
.d-body .block.synopsis > h4, .q-profile.light-card summary { color: var(--accent); }
.d-body .log-row { padding: 6px 0; border-top: 1px solid var(--line); }
.d-body .log-row:first-of-type { border-top: none; }

/* cards on the work tabs */
.step, .vendor, .email, .cl-item, .q-party, .result { background: var(--card); }
.step .result, .vendor .vendor-mail, .email .email-head { background: var(--card-2); }
.q-totals, .note { background: var(--card-2); }

/* the main pages: lists and panels sit on a lighter layer than the page */
.table-wrap { background: var(--card); }
.opp thead th { background: var(--card-2); }
.opp tbody tr:hover { background: var(--card-2); }
.day:not(.today) { background: var(--card); }
.dl { background: var(--card); }

/* =============================== phones ==================================== */
@media (max-width: 620px) {
  /* type sized for thumbs; 16px inputs stop iPhones zooming in on tap */
  input, select, textarea, .q-in, #search, #vSearch, .to-input, .v-email-input, .notes-box { font-size: 16px !important; }
  .btn, .pill, .d-tab, .view-switch button, .d-actions select { min-height: 40px; }
  .btn-xs { min-height: 34px; }
  .hero { padding-top: 24px; }
  .hero h1 { font-size: 34px; letter-spacing: -0.035em; }
  .lede { font-size: 15px; margin-top: 16px; }

  /* filter rows and tabs: one swipeable row instead of a wall of buttons */
  .pills, .d-tabs {
    flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
    margin-left: -16px; margin-right: -16px; padding-left: 16px; padding-right: 16px;
  }
  .pills::-webkit-scrollbar, .d-tabs::-webkit-scrollbar { display: none; }
  .pill, .d-tab { flex-shrink: 0; white-space: nowrap; }
  .d-tabs { margin: 0; padding: 12px 16px; }

  /* closing this week: a swipeable strip of compact days */
  .week-grid {
    display: flex; overflow-x: auto; gap: 8px; scroll-snap-type: x mandatory; scrollbar-width: none;
    margin: 0 -16px; padding: 0 16px 4px; scroll-padding-left: 16px;
  }
  .week-grid::-webkit-scrollbar { display: none; }
  .day { flex: 0 0 132px; min-height: 104px; scroll-snap-align: start; }
  .day-count { font-size: 26px; }

  /* the contract and vendor pop-up fills the screen; the bars stay tidy */
  .d-head { padding: 18px 16px 12px; }
  .d-head h2 { font-size: 22px; }
  .d-actions { padding: 12px 16px; }
  .d-actions .btn-start { flex: 1 1 100%; }
  .d-actions select { flex: 1 1 calc(50% - 4px); min-width: 0; }
  .d-actions #claimBtn, .d-actions #releaseBtn { flex: 1 1 100%; }
  .d-body { padding: 14px 12px 32px; }
  .d-body .field-grid, .d-body .block { padding: 14px; }

  /* step cards: the Run button drops under the text instead of squeezing it */
  .step-head { flex-wrap: wrap; align-items: flex-start; }
  .step-head > div { flex: 1 1 0; min-width: 0; }
  .step-head .btn { margin-left: 46px; flex: 0 0 auto; }

  /* tables become a stack of labelled cards, one per row */
  .spec-table, .spec-table tbody, .spec-table tr, .spec-table td { display: block; width: 100%; }
  .spec-table thead { display: none; }
  .spec-table tr { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; margin-bottom: 8px; background: var(--card-2); }
  .spec-table td { border: none; padding: 4px 0; display: grid; grid-template-columns: 96px 1fr; gap: 10px; align-items: start; }
  .spec-table td::before { content: attr(data-label); font-size: 11px; font-weight: 700; color: var(--muted); padding-top: 2px; }
  .spec-table td.id { font-weight: 700; color: var(--signal); }
  .q-lines-wrap { overflow: visible; }
  .q-lines { min-width: 0; }
  .q-lines .q-num { width: 100%; text-align: left; }
  .q-lines td.q-del { display: flex; justify-content: flex-end; padding-top: 0; }
  .q-lines td.q-del::before { content: none; }
  .q-ext { padding-top: 4px !important; }

  /* the email preview keeps its table readable by sliding sideways */
  .email-render table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .email-render th, .email-render td { min-width: 64px; }
  .email-render td:nth-child(2) { min-width: 170px; }
  .email-render td:nth-child(3) { min-width: 220px; }
  .email-to { flex-wrap: wrap; }
  .email-foot { flex-wrap: wrap; }
  .email-foot .btn { flex: 1; }

  /* send controls and quote buttons share the width */
  .auto-note .row .btn, #qBuild, #qEmail { flex: 1 1 auto; }
  .q-markup { margin-left: 0; width: 100%; }
  .q-totals { gap: 14px; }
  .q-totals b { font-size: 18px; }
  .cl-input, .cl-ev, .cl-src { margin-left: 0; }

  /* how it works pop-up and toast */
  .modal { padding: 12px; }
  .toast { left: 12px; right: 12px; transform: none; text-align: center; border-radius: 14px; bottom: 16px; }
}

/* footer and logo link out to www.eyessinstudio.com */
a.foot { color: var(--muted); font-weight: 400; text-decoration: none; }
a.foot:hover { color: var(--ink); text-decoration: none; }
a.foot:hover span { color: var(--signal); }
.foot-arrow { font-style: normal; margin-left: 4px; display: inline-block; transition: transform .15s ease; }
a.foot:hover .foot-arrow { transform: translate(2px, -2px); }
a.brand:hover .brand-text b { color: var(--signal); }
@media (prefers-reduced-motion: reduce) { .foot-arrow { transition: none; } }

/* ---------------- several contracts at once: pick, bulk bar, tray ---------------- */
.opp th.c-pick, .opp td.c-pick { width: 44px; padding-right: 0; }
.c-pick input, .vq-use input { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; }
.opp tbody tr.picked { background: var(--accent-soft); }
.run-chip {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-size: 12px; font-weight: 700;
  padding: 6px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--signal); border: 1px solid var(--halo, var(--line));
}
.run-chip.queued { color: var(--muted); background: var(--surface); border-color: var(--line); }
.bulk-bar {
  position: sticky; top: 70px; z-index: 20; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 0 0 12px; padding: 10px 14px; border-radius: 14px; background: var(--card-2); border: 1px solid var(--halo, var(--line));
  box-shadow: 0 10px 30px -14px var(--halo-deep, rgba(0,0,0,.5));
}
.bulk-n { font-size: 14px; }
.run-tray {
  position: fixed; right: 18px; bottom: 18px; z-index: 40; width: min(360px, calc(100vw - 32px));
  background: var(--paper); border: 1px solid var(--halo, var(--line)); border-radius: 16px;
  box-shadow: 0 18px 50px -12px var(--halo-deep, rgba(0,0,0,.6)); overflow: hidden;
}
.tray-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: var(--card-2); }
.tray-toggle { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; text-align: left; color: var(--ink); font-size: 14px; }
.tray-toggle .chev { margin-left: auto; }
.tray-n { font-size: 12px; color: var(--muted); white-space: nowrap; }
.tray-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--signal); flex-shrink: 0; }
.tray-list { list-style: none; max-height: min(50vh, 380px); overflow-y: auto; margin: 0; padding: 4px 0; }
.tray-item { display: flex; gap: 10px; padding: 10px 12px; cursor: pointer; border-top: 1px solid var(--line); }
.tray-item:first-child { border-top: none; }
.tray-item:hover { background: var(--surface); }
.tray-mark {
  width: 24px; height: 24px; flex-shrink: 0; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; background: var(--surface); color: var(--muted);
}
.tray-item.done .tray-mark { background: var(--accent); color: var(--accent-ink); }
.tray-item.failed .tray-mark { background: color-mix(in srgb, var(--bad) 20%, transparent); color: var(--bad); }
.tray-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.tray-title { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tray-line { font-size: 12px; color: var(--muted); line-height: 1.35; overflow-wrap: anywhere; }
.tray-item.failed .tray-line { color: var(--bad); }
.tray-bar { height: 4px; border-radius: 999px; background: var(--line); overflow: hidden; margin-top: 2px; }
.tray-bar span { display: block; height: 100%; background: var(--signal); border-radius: 999px; transition: width .3s; }
@media (max-width: 620px) {
  .opp tr { position: relative; }
  .opp td.c-pick { position: absolute; top: 14px; right: 14px; width: auto; padding: 0; }
  .opp td.c-pick input { width: 22px; height: 22px; }
  .bulk-bar { top: auto; bottom: 8px; position: sticky; }
  .bulk-bar .v-small { flex-basis: 100%; }
  .run-tray { right: 8px; left: 8px; bottom: 8px; width: auto; }
  .tray-list { max-height: 38vh; }
}
.qty-flag { display: inline-block; margin-left: 4px; padding: 1px 7px; border-radius: 999px; font-size: 10.5px; font-weight: 700;
  background: #FDECC8; color: #8A5300; vertical-align: middle; cursor: help; white-space: nowrap; }
.qty-warn { margin: 8px 0 0; font-size: 12px; color: #8A5300; background: #FFF6E0; border-radius: 8px; padding: 8px 10px; }
.btn-send { background: #1E8E3E; color: #fff; border: 1px solid #1E8E3E; }
.btn-send:hover { background: #17753A; }
.btn-send.confirm { background: #C5221F; border-color: #C5221F; }
.btn-send:disabled { opacity: .7; cursor: default; }
.sent-note { font-size: 12px; font-weight: 600; color: #1E8E3E; align-self: center; margin-right: 6px; }
.email-foot { flex-wrap: wrap; }
@media (max-width: 600px) { .email-foot .btn { flex: 1 1 auto; } }
.drafts-card { margin-top: 18px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.drafts-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: 14px; }
.drafts-n { font-size: 12px; color: var(--muted); }
.drafts-card .draft-row { border: none; border-radius: 0; margin: 0; padding: 9px 14px; border-bottom: 1px solid var(--line); flex-wrap: nowrap; }
.drafts-card .draft-row.bad .draft-name { color: var(--bad); }
.draft-name { flex: 1; min-width: 0; font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.draft-link { font-size: 12.5px; font-weight: 600; color: var(--accent, #3B82F6); text-decoration: none; white-space: nowrap; }
.draft-link:hover { text-decoration: underline; }
.drafts-card .error { margin: 10px 14px; }
.drafts-all { display: block; margin: 12px 14px 14px; text-align: center; }
.who-pick { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.who-pick select { background: transparent; color: var(--ink); border: 1px solid var(--line); border-radius: 8px;
  padding: 4px 8px; font: inherit; font-size: 13px; cursor: pointer; }
.who-pick select option { color: #111; }
