:root {
  --bg: #1b1c17;
  --bg-2: #222319;
  --card: #2a2b23;
  --card-2: #34352c;
  --card-3: #3e3f35;
  --line: rgba(240, 244, 225, .09);
  --line-2: rgba(240, 244, 225, .16);
  --text: #f3f5ec;
  --text-2: #b9bcac;
  --text-3: #8d907f;
  --lime: #d8ff00;
  --lime-2: #c4e800;
  --lime-ink: #1b1d06;
  --lime-ink-2: #3d4410;
  --grad: linear-gradient(140deg, #5a86e6 0%, #6f92b4 42%, #7a90b8 58%, #7d74d4 100%);
  --grad-ink: #f7f9ff;
  --grad-ink-2: rgba(247, 249, 255, .80);
  --warn: #ffb547;
  --bad: #ff6b5e;
  --r-xl: 40px;
  --r-lg: 32px;
  --r-md: 22px;
  --r-sm: 14px;
  --shadow: 0 18px 40px -18px rgba(0, 0, 0, .55);
  --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Urbanist", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}
::selection { background: var(--lime); color: var(--lime-ink); }
* { scrollbar-width: thin; scrollbar-color: var(--card-3) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--card-3); border-radius: 99px; border: 3px solid var(--bg); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; border-radius: 12px; }
[hidden] { display: none !important; }
svg.lucide { width: 20px; height: 20px; stroke-width: 1.6; flex: none; }

/* ------------------------------------------------------------- shell */
.shell { display: grid; grid-template-columns: 92px 1fr; min-height: 100vh; }
.rail {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 22px 0; border-right: 1px solid var(--line); background: var(--bg-2);
}
.mark {
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 14px;
  background: var(--lime); color: var(--lime-ink); font-weight: 700; letter-spacing: -.02em;
}
.rail-btn {
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  background: transparent; border: 1px solid var(--line); color: var(--text-2); cursor: pointer;
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.rail-btn:hover { background: var(--card); color: var(--text); }
.rail-btn[aria-current="page"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.rail-spacer { flex: 1; }
.who span { font-weight: 600; font-size: 15px; }
main { min-width: 0; padding: 34px clamp(20px, 3.4vw, 52px) 80px; outline: none; }

/* ------------------------------------------------------------- type */
.hello { font-size: clamp(2.2rem, 3.6vw, 3.35rem); line-height: 1.05; font-weight: 600; letter-spacing: -.025em; margin: 0; max-width: 15ch; text-wrap: balance; }
.hello em { font-weight: 400; }
.page-title { font-size: 2.4rem; line-height: 1.05; font-weight: 600; letter-spacing: -.02em; margin: 0; text-wrap: balance; }
.h3 { font-size: 1.3rem; font-weight: 500; margin: 0; letter-spacing: -.01em; }
.muted { color: var(--text-2); }
.dim { color: var(--text-3); }
.num { font-weight: 600; letter-spacing: -.02em; }
.unit { font-weight: 300; color: inherit; opacity: .78; font-size: .52em; margin-left: .18em; vertical-align: .55em; }
.big { font-size: 3.4rem; line-height: 1; font-weight: 300; letter-spacing: -.03em; }

/* ------------------------------------------------------------- controls */
.btn {
  display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 8px 0 24px;
  border-radius: 99px; border: 1px solid var(--line-2); background: transparent; cursor: pointer;
  font-weight: 600; font-size: 16px; white-space: nowrap;
  transition: background .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease), opacity .2s;
}
.btn .dot { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--card-2); }
.btn:hover { border-color: var(--text-3); }
.btn:active { transform: scale(.98); }
.btn.lime { background: var(--lime); color: var(--lime-ink); border-color: var(--lime); }
.btn.lime .dot { background: var(--lime-ink); color: var(--lime); }
.btn.lime:hover { background: var(--lime-2); }
.btn.plain { padding: 0 24px; }
.btn[disabled] { opacity: .38; cursor: not-allowed; transform: none; }
.round {
  width: 52px; height: 52px; border-radius: 50%; display: inline-grid; place-items: center; flex: none;
  border: 1px solid var(--line); background: var(--card); cursor: pointer; color: var(--text);
  transition: background .2s var(--ease);
}
.round:hover { background: var(--card-2); }
.round.sm { width: 40px; height: 40px; }
.round.sm svg.lucide { width: 18px; height: 18px; }

.pills { display: flex; gap: 10px; flex-wrap: wrap; }
.pill {
  height: 46px; padding: 0 22px; border-radius: 99px; border: 1px solid var(--line-2); background: transparent;
  color: var(--text-2); cursor: pointer; font-size: 16px; display: inline-flex; align-items: center; gap: 10px;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.pill:hover { color: var(--text); }
.pill[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); font-weight: 600; }
.pill .count { font-weight: 300; opacity: .7; }
.tag {
  display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 13px; border-radius: 99px;
  border: 1px solid var(--line-2); font-size: 14px; color: var(--text-2); white-space: nowrap;
}
.tag.lime { background: var(--lime); color: var(--lime-ink); border-color: var(--lime); font-weight: 600; }
.tag.dashed { border-style: dashed; }
.tag .led { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

.field { display: grid; gap: 8px; }
.field label { font-size: 14px; color: var(--text-2); padding-left: 6px; }
.input {
  height: 56px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--card);
  padding: 0 20px; font-size: 17px; width: 100%; transition: border-color .2s, background .2s;
}
.input::placeholder { color: var(--text-3); }
.input:hover { border-color: var(--line-2); }
.input:focus { outline: none; border-color: var(--lime); background: var(--card-2); }
textarea.input { height: auto; min-height: 110px; padding: 16px 20px; resize: vertical; line-height: 1.45; }
input[type="date"].input::-webkit-calendar-picker-indicator { filter: invert(.8); cursor: pointer; }
.switch { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; user-select: none; }
.switch input { appearance: none; width: 54px; height: 32px; border-radius: 99px; background: var(--card-3); position: relative; cursor: pointer; transition: background .2s var(--ease); margin: 0; }
.switch input::after { content: ""; position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%; background: var(--text); transition: transform .25s var(--ease); }
.switch input:checked { background: var(--lime); }
.switch input:checked::after { transform: translateX(22px); background: var(--lime-ink); }

/* ------------------------------------------------------------- cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px; position: relative; overflow: hidden; }
.card.grad { background: var(--grad); border-color: transparent; color: var(--grad-ink); }
.card.grad .muted, .card.grad .dim { color: var(--grad-ink-2); }
.card.lime { background: var(--lime); border-color: transparent; color: var(--lime-ink); }
.card.lime .muted, .card.lime .dim { color: var(--lime-ink-2); }
.rings { position: absolute; pointer-events: none; opacity: .32; }
.rings circle { fill: none; stroke: currentColor; stroke-width: 1; }

/* ------------------------------------------------------------- board */
.top { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 30px; flex-wrap: wrap; }
.overview { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr); gap: 18px; margin-bottom: 34px; }
.queue-card { min-height: 290px; display: flex; flex-direction: column; justify-content: space-between; border-radius: var(--r-xl); padding: 32px; }
.bars { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; align-items: end; height: 150px; margin-top: 22px; }
.bar { display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; height: 100%; }
.bar .n { text-align: center; font-weight: 600; font-size: 20px; line-height: 1; }
.bar .fill {
  border-radius: 18px; min-height: 18px; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .26);

}
.bar .fill.striped { background: repeating-linear-gradient(135deg, rgba(255,255,255,.22) 0 7px, rgba(255,255,255,.08) 7px 14px); }
.bar .fill.hot { background: #fff; border-color: #fff; box-shadow: inset 0 16px 0 var(--lime); }
.bar small { text-align: center; font-size: 13px; color: var(--grad-ink-2); }
.queue-foot { display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; margin-top: 20px; }
.queue-foot .big { font-weight: 600; font-size: 2.6rem; }
.approve-card { border-radius: var(--r-xl); padding: 32px; display: flex; flex-direction: column; justify-content: space-between; min-height: 290px; cursor: pointer; transition: transform .25s var(--ease); }
.approve-card:hover { transform: translateY(-2px); }
.approve-card .round { background: var(--lime-ink); color: var(--lime); border: 0; width: 64px; height: 64px; }
.approve-card .big { font-weight: 600; font-size: 4.2rem; }

.filters { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.search { position: relative; }
.search input { padding-left: 50px; width: min(320px, 70vw); height: 46px; border-radius: 99px; }
.search svg { position: absolute; left: 18px; top: 13px; color: var(--text-3); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.job {
  display: flex; flex-direction: column; gap: 18px; min-height: 248px; cursor: pointer; border-radius: var(--r-lg);
  transition: transform .25s var(--ease), border-color .2s, background .2s;
}
.job:hover { transform: translateY(-2px); border-color: var(--line-2); }
.job-head { display: flex; justify-content: space-between; gap: 12px; }
.job-team { font-size: 1.35rem; font-weight: 600; line-height: 1.15; letter-spacing: -.01em; margin: 0; text-wrap: balance; }
.job-sub { font-size: 15px; margin-top: 4px; }
.job .round { width: 44px; height: 44px; background: transparent; border-color: var(--line-2); color: inherit; }
.card.grad .round { border-color: rgba(255,255,255,.35); }
.swatches { display: flex; }
.swatches span { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--card); margin-left: -7px; }
.swatches span:first-child { margin-left: 0; }
.card.grad .swatches span { border-color: rgba(255,255,255,.5); }
.job-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.job-foot .big { font-size: 2.6rem; }
.stage-tag.needs { background: var(--lime); color: var(--lime-ink); border-color: var(--lime); font-weight: 600; }
.card.grad .tag { border-color: rgba(255,255,255,.4); color: var(--grad-ink); }

.empty { border: 1px dashed var(--line-2); border-radius: var(--r-lg); padding: 48px 32px; display: grid; gap: 14px; justify-items: start; }
.empty .h3 { font-size: 1.5rem; }
.skeleton { background: linear-gradient(90deg, var(--card) 0%, var(--card-2) 50%, var(--card) 100%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; border-radius: var(--r-lg); min-height: 248px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ------------------------------------------------------------- new job */
.head { display: flex; align-items: center; gap: 18px; margin-bottom: 30px; flex-wrap: wrap; }
.head .grow { flex: 1 1 360px; min-width: 0; }
.head .actions { flex: 0 1 auto; }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 22px; align-items: start; }
.stack { display: grid; gap: 18px; }
.drop {
  min-height: 300px; border-radius: var(--r-xl); padding: 34px; display: flex; flex-direction: column; justify-content: space-between;
  cursor: pointer; transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.drop.over { transform: scale(1.01); box-shadow: 0 0 0 3px var(--lime); }
.drop .h-drop { font-size: 2rem; line-height: 1.08; font-weight: 600; letter-spacing: -.02em; max-width: 13ch; margin: 0; }
.drop .h-drop em { font-weight: 400; }
.drop .round { background: var(--lime); color: var(--lime-ink); border: 0; width: 64px; height: 64px; }
.files { display: flex; flex-wrap: wrap; gap: 8px; }
.file-chip { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px 0 10px; border-radius: 99px; background: rgba(255,255,255,.16); font-size: 14px; max-width: 100%; }
.file-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-chip svg.lucide { width: 16px; height: 16px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.row3 { display: grid; grid-template-columns: 1.2fr 1fr auto; gap: 14px; align-items: end; }
.reading { display: grid; place-items: center; min-height: 300px; text-align: center; gap: 10px; }
.spinner { width: 46px; height: 46px; border-radius: 50%; border: 3px solid var(--card-3); border-top-color: var(--lime); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.rb-title { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 16px; }
.garment { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-radius: var(--r-md); background: var(--card-2); }
.garment + .garment { margin-top: 10px; }
.garment .gname { font-weight: 600; font-size: 17px; }
.garment .grow { flex: 1; min-width: 0; }
.colors { display: grid; gap: 8px; }
.color-row { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 12px 14px 12px 12px; border-radius: var(--r-md); background: var(--card-2); }
.color-row.flagged { box-shadow: inset 0 0 0 1.5px var(--lime); }
.chip { width: 52px; height: 52px; border-radius: 50%; border: 1px solid rgba(255,255,255,.18); display: grid; place-items: center; }
.chip-pair { display: flex; align-items: center; gap: 0; }
.chip-pair .chip { width: 40px; height: 40px; }
.chip-pair .chip + .chip { margin-left: -10px; box-shadow: 0 0 0 3px var(--card-2); }
.color-name { font-weight: 600; font-size: 17px; }
.color-meta { font-size: 14px; color: var(--text-2); }
.color-row select { height: 40px; border-radius: 99px; background: var(--card); border: 1px solid var(--line-2); padding: 0 14px; cursor: pointer; }
.pieces { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.piece { display: grid; grid-template-columns: 28px 1fr; gap: 2px 12px; align-items: center; padding: 12px 14px; border-radius: 18px; background: var(--card-2); }
.piece i { width: 28px; height: 28px; border-radius: 50%; grid-row: span 2; border: 1px solid rgba(255,255,255,.2); }
.piece span { font-size: 13px; color: var(--text-2); text-transform: capitalize; line-height: 1.2; }
.piece b { font-weight: 600; font-size: 15px; line-height: 1.2; }
.flags { display: grid; gap: 10px; }
.flag { display: grid; grid-template-columns: 28px 1fr; gap: 12px; padding: 14px 16px; border-radius: var(--r-md); background: var(--card-2); font-size: 15px; }
.flag svg { color: var(--lime); margin-top: 1px; }
.flag.calm svg { color: var(--text-3); }
.submit-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 18px 18px 18px 26px; border-radius: 99px; background: var(--card); border: 1px solid var(--line); position: sticky; bottom: 18px; margin-top: 22px; box-shadow: var(--shadow); }

/* ------------------------------------------------------------- job */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 18px; }
.pane { border-radius: var(--r-xl); padding: 18px; display: flex; flex-direction: column; gap: 14px; min-height: 420px; }
.pane-head { display: flex; justify-content: space-between; align-items: center; padding: 6px 10px 0; }
.pane-img { flex: 1; border-radius: 26px; background: #b9bab3; display: grid; place-items: center; overflow: hidden; min-height: 340px; }
.pane-img img { width: 100%; height: 100%; object-fit: contain; display: block; cursor: zoom-in; }
.pane-state { flex: 1; border-radius: 26px; background: var(--card-2); display: grid; place-items: center; text-align: center; padding: 30px; gap: 12px; align-content: center; }
.pane-state .big { font-size: 2.2rem; font-weight: 500; }
.three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.history { display: grid; gap: 0; }
.history li { list-style: none; display: grid; grid-template-columns: 14px 1fr; gap: 14px; padding-bottom: 16px; position: relative; }
.history li::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--text-3); margin-top: 7px; }
.history li:last-child::before { background: var(--lime); }
.history li::after { content: ""; position: absolute; left: 4px; top: 20px; bottom: 0; width: 1px; background: var(--line-2); }
.history li:last-child::after { display: none; }
.history ol { margin: 0; padding: 0; }
.notes-box { display: grid; gap: 12px; margin-top: 14px; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.files-list { display: grid; gap: 8px; }
.files-list a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--card-2); font-size: 15px; word-break: break-all; }
.files-list a:hover { background: var(--card-3); }
.lightbox { position: fixed; inset: 0; background: rgba(12, 13, 10, .92); display: grid; place-items: center; z-index: 40; padding: 30px; cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 18px; }

.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 30px); opacity: 0; background: var(--text); color: var(--bg); padding: 14px 24px; border-radius: 99px; font-weight: 600; transition: all .3s var(--ease); pointer-events: none; z-index: 50; max-width: calc(100vw - 32px); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { background: var(--bad); color: #1d0503; }
.who-pop { position: fixed; left: 104px; bottom: 22px; z-index: 30; width: 300px; display: grid; gap: 12px; box-shadow: var(--shadow); }

@media (max-width: 1100px) {
  .overview, .two, .compare { grid-template-columns: 1fr; }
  .three { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .shell { grid-template-columns: 1fr; }
  .rail { position: fixed; bottom: 0; top: auto; left: 0; right: 0; height: 76px; flex-direction: row; justify-content: space-around; padding: 0 12px; border-right: 0; border-top: 1px solid var(--line); z-index: 20; }
  .mark { margin: 0; width: 46px; height: 46px; }
  .rail-btn { width: 46px; height: 46px; }
  .rail-spacer { display: none; }
  main { padding: 22px 16px 110px; }
  .three, .row, .row3 { grid-template-columns: 1fr; }
  .bars { gap: 6px; }
  .filters .pills { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 0 16px 4px; width: calc(100% + 32px); scrollbar-width: none; }
  .filters .pills .pill { flex: none; }
  .search, .search input { width: 100%; }
  .page-title { font-size: 1.9rem; }
  .submit-bar { border-radius: var(--r-lg); bottom: 88px; }
  .who-pop { left: 16px; right: 16px; width: auto; bottom: 90px; }
  .queue-card, .approve-card, .drop { padding: 24px; border-radius: var(--r-lg); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* preview build only */
.preview-bar { position: sticky; top: 0; z-index: 25; display: flex; justify-content: space-between; gap: 16px; align-items: center;
  padding: 10px 22px; background: var(--lime); color: var(--lime-ink); font-size: 14px; }
.preview-bar a { font-weight: 700; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.shell .rail { top: 0; }
