/* Clearpath design language (build plan 12): warm, flat, monospace data,
   sentence case, colour only for meaning. */
:root {
  --bg: #f4f2ee;
  --surface: #fbfaf8;
  --surface-2: #f0ede8;
  --ink: #2a2723;
  --ink-soft: #6b6560;
  --ink-faint: #9a938c;
  --line: #e2ddd5;
  --line-strong: #d3ccc2;
  --accent: #3f6f5f;          /* deep teal - the one accent */
  --accent-bg: #e4ede9;
  --accent-ink: #2e5347;
  --green: #2f7d4f; --green-bg: #e6f1e9;
  --amber: #b07d1a; --amber-bg: #f6eed9;
  --red: #b3452f;   --red-bg: #f6e5e0;
  --mono: 'SF Mono', ui-monospace, 'Cascadia Code', Menlo, Consolas, monospace;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --radius: 9px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--sans); background: var(--bg); color: var(--ink);
  font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
input, button, select { font-family: inherit; font-size: inherit; }
.mono { font-family: var(--mono); }

.brand { display: flex; align-items: center; gap: 12px; }
.logo { width: 34px; height: 34px; border-radius: 9px; background: var(--accent);
  color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 19px; flex: none; }
.brand h1 { font-size: 18px; font-weight: 600; margin: 0; letter-spacing: -0.01em; }
.brand.small .logo { width: 28px; height: 28px; font-size: 16px; }
.brand.small h1 { font-size: 16px; }
.tagline { margin: 2px 0 0; color: var(--ink-soft); font-size: 13px; }

/* login */
.login-screen { min-height: 100%; display: grid; place-items: center; padding: 24px; }
.login-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  padding: 32px; width: 360px; box-shadow: 0 1px 2px rgba(0,0,0,.03); }
.login-card .brand { margin-bottom: 24px; }
.login-card label { display: block; font-size: 12.5px; color: var(--ink-soft); margin-bottom: 14px; }
.login-card input { width: 100%; margin-top: 5px; padding: 10px 12px; border: 1px solid var(--line-strong);
  border-radius: var(--radius); background: #fff; color: var(--ink); }
.login-card input:focus { outline: none; border-color: var(--accent); }
.btn-primary { width: 100%; padding: 11px; background: var(--accent); color: #fff; border: none;
  border-radius: var(--radius); font-weight: 550; cursor: pointer; margin-top: 4px; }
.btn-primary:hover { filter: brightness(1.06); }
.err { color: var(--red); font-size: 12.5px; margin-top: 12px; min-height: 16px; }

/* app shell */
.app { display: grid; grid-template-columns: 232px 1fr; height: 100%; }
.rail { background: var(--surface); border-right: 1px solid var(--line); display: flex;
  flex-direction: column; padding: 18px 14px; }
.rail .brand { margin-bottom: 18px; padding: 0 4px; }
.ctx { font-size: 12px; color: var(--ink-soft); font-weight: 600; padding: 0 6px 14px;
  border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav button { text-align: left; background: none; border: none; color: var(--ink-soft);
  padding: 8px 10px; border-radius: 7px; cursor: pointer; font-size: 13.5px; display: flex;
  justify-content: space-between; align-items: center; }
.nav button:hover { background: var(--surface-2); color: var(--ink); }
.nav button.active { background: var(--accent-bg); color: var(--accent-ink); font-weight: 550; }
.nav .pill { font-family: var(--mono); font-size: 11px; background: var(--surface-2);
  padding: 1px 7px; border-radius: 20px; color: var(--ink-soft); }
.nav button.active .pill { background: #fff; }
.rail-foot { margin-top: auto; padding: 12px 6px 0; border-top: 1px solid var(--line);
  font-size: 12.5px; color: var(--ink-soft); display: flex; justify-content: space-between; align-items: center; }
.rail-foot a { color: var(--accent); cursor: pointer; }

.main { overflow-y: auto; padding: 28px 32px; }
.page-head { margin-bottom: 22px; }
.page-head h2 { margin: 0 0 3px; font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.page-head p { margin: 0; color: var(--ink-soft); font-size: 13px; }

/* cards + tables */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.empty { padding: 40px; text-align: center; color: var(--ink-soft); }
.empty b { color: var(--ink); }

/* three-state */
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.s-ready .dot, .dot.ready { background: var(--green); }
.s-look .dot, .dot.look { background: var(--amber); }
.s-needs_you .dot, .dot.needs_you { background: var(--red); }
.chip { font-size: 11.5px; padding: 3px 10px; border-radius: 20px; font-weight: 550; display: inline-flex; align-items: center; gap: 6px; }
.chip.ready { background: var(--green-bg); color: var(--green); }
.chip.look { background: var(--amber-bg); color: var(--amber); }
.chip.needs_you { background: var(--red-bg); color: var(--red); }

/* queue list */
.qlist { display: flex; flex-direction: column; gap: 8px; }
.qitem { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 13px 15px; cursor: pointer; display: grid; grid-template-columns: 10px 1fr auto; gap: 12px; align-items: center; }
.qitem:hover { border-color: var(--line-strong); }
.qitem.sel { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.qitem .v { font-weight: 550; }
.qitem .sub { font-size: 12px; color: var(--ink-soft); }
.qitem .amt { font-family: var(--mono); font-weight: 550; }

/* review split */
.review { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; height: calc(100vh - 130px); }
.doc-pane { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius);
  display: grid; place-items: center; overflow: auto; }
.doc-pane img { max-width: 100%; }
.doc-pane .placeholder { color: var(--ink-faint); text-align: center; padding: 20px; }
.fields-pane { display: flex; flex-direction: column; gap: 14px; overflow-y: auto; padding-right: 4px; }

.inv-head { display: flex; justify-content: space-between; align-items: flex-start; }
.inv-head .amt { font-family: var(--mono); font-size: 24px; font-weight: 600; }
.inv-head .meta { font-size: 12.5px; color: var(--ink-soft); }
.flagbox { background: var(--amber-bg); color: var(--amber); border-radius: var(--radius); padding: 9px 12px; font-size: 12.5px; }

.hdr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.field { position: relative; }
.field label { font-size: 11px; color: var(--ink-soft); display: block; margin-bottom: 3px; }
.field input, .field select { width: 100%; padding: 8px 10px; border: 1px solid var(--line-strong);
  border-radius: 7px; background: #fff; font-family: var(--mono); font-size: 13px; }
.field .cp { position: absolute; right: 5px; top: 23px; font-size: 10px; color: var(--ink-soft);
  border: 1px solid var(--line-strong); background: var(--surface); border-radius: 5px; padding: 3px 7px; cursor: pointer; }
.field .cp:hover { color: var(--ink); }

.lines-tbl { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.lrow { display: grid; grid-template-columns: 10px 84px 1fr 96px; gap: 10px; align-items: center;
  padding: 9px 12px; border-bottom: 1px solid var(--line); }
.lrow:last-child { border-bottom: none; }
.lrow .amt { font-family: var(--mono); text-align: right; font-size: 13px; }
.lrow select { font-family: var(--mono); font-size: 12.5px; padding: 5px 6px; border: 1px solid var(--line-strong); border-radius: 6px; width: 100%; }
.lrow .why { font-size: 11.5px; color: var(--ink-soft); grid-column: 2 / -1; margin-top: -2px; }
.lrow .why.look { color: var(--amber); }
.lrow .why.needs_you { color: var(--red); }

.actions { display: flex; gap: 10px; align-items: center; padding-top: 6px; }
.btn-approve { background: var(--green); color: #fff; border: none; border-radius: var(--radius);
  padding: 11px 18px; font-weight: 550; cursor: pointer; }
.btn-approve:hover { filter: brightness(1.06); }
.btn-ghost { background: none; border: 1px solid var(--line-strong); border-radius: var(--radius);
  padding: 11px 16px; cursor: pointer; color: var(--ink); }
.hint { font-size: 12px; color: var(--ink-soft); }

/* tracker */
.tracker { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 10px; }
.tracker .top { display: flex; justify-content: space-between; margin-bottom: 14px; }
.tracker .pct { font-family: var(--mono); font-size: 22px; font-weight: 600; }
.bar { height: 6px; background: var(--surface-2); border-radius: 20px; overflow: hidden; }
.bar > div { height: 100%; background: var(--accent); border-radius: 20px; transition: width .5s ease; }
.stages { display: grid; grid-template-columns: repeat(6,1fr); gap: 4px; margin: 16px 0 10px; }
.stg { text-align: center; font-size: 11px; color: var(--ink-faint); }
.stg .sd { width: 26px; height: 26px; border-radius: 50%; margin: 0 auto 5px; background: var(--surface-2);
  border: 1px solid var(--line); display: grid; place-items: center; font-size: 11px; color: var(--ink-faint); }
.stg.done .sd { background: var(--accent); border-color: var(--accent); color: #fff; }
.stg.now .sd { border-color: var(--accent); color: var(--accent); }
.stg.now { color: var(--ink); font-weight: 550; }
.tracker .detail { font-size: 13px; color: var(--ink-soft); }

/* generic table for admin */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; color: var(--ink-soft); font-weight: 550; font-size: 11.5px; padding: 8px 12px; border-bottom: 1px solid var(--line-strong); }
td { padding: 9px 12px; border-bottom: 1px solid var(--line); }
tr:hover td { background: var(--surface); }
.k { font-family: var(--mono); font-size: 12px; }
.muted { color: var(--ink-soft); }
.stat-row { display: flex; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; min-width: 130px; }
.stat .n { font-family: var(--mono); font-size: 24px; font-weight: 600; }
.stat .l { font-size: 12px; color: var(--ink-soft); }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 20px; font-size: 13px;
  opacity: 0; pointer-events: none; transition: all .25s; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
.hide{display:none !important}

/* registration */
.login-alt { margin-top: 16px; font-size: 12.5px; color: var(--ink-soft); text-align: center; }
.login-alt a { color: var(--accent); cursor: pointer; font-weight: 550; }
.reg-sent { font-size: 13px; color: var(--ink-soft); margin: 0 0 16px; line-height: 1.5; }
.code-input { font-family: var(--mono) !important; font-size: 22px !important; letter-spacing: 8px; text-align: center; }
.note-line { font-size: 12px; color: var(--amber); margin-top: 10px; min-height: 14px; }

/* admin forms */
.admin-form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px; }
.admin-form h3 { margin: 0 0 4px; font-size: 15px; font-weight: 600; }
.admin-form .sub { font-size: 12.5px; color: var(--ink-soft); margin: 0 0 14px; }
.admin-form .row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.admin-form label { font-size: 11.5px; color: var(--ink-soft); display: block; }
.admin-form input, .admin-form select, .admin-form textarea {
  padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 7px; background: #fff;
  font-family: var(--sans); font-size: 13px; margin-top: 4px; }
.admin-form textarea { font-family: var(--mono); font-size: 12px; width: 100%; min-height: 60px; resize: vertical; }
.admin-form .grow { flex: 1; min-width: 160px; }
.btn-sm { padding: 8px 14px; background: var(--accent); color: #fff; border: none; border-radius: 7px; cursor: pointer; font-weight: 550; font-size: 13px; }
.btn-sm:hover { filter: brightness(1.06); }
.btn-sm.ghost { background: none; border: 1px solid var(--line-strong); color: var(--ink); }
.btn-sm.danger { background: none; border: 1px solid var(--red); color: var(--red); }
.btn-sm.danger:hover { background: var(--red-bg); }
.toggle { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; }
.toggle input { width: 16px; height: 16px; }
.pill-tag { font-family: var(--mono); font-size: 11px; background: var(--surface-2); padding: 2px 8px; border-radius: 20px; color: var(--ink-soft); }
.pill-tag.used { background: var(--green-bg); color: var(--green); }
.outcome { font-family: var(--mono); font-size: 11px; padding: 2px 8px; border-radius: 20px; }
.outcome.created, .outcome.verified { background: var(--green-bg); color: var(--green); }
.outcome.code_sent, .outcome.requested { background: var(--accent-bg); color: var(--accent-ink); }
.outcome.blocked, .outcome.failed_not_allowed, .outcome.bad_code, .outcome.expired, .outcome.failed { background: var(--red-bg); color: var(--red); }
.token-reveal { font-family: var(--mono); font-size: 15px; background: var(--accent-bg); color: var(--accent-ink); padding: 10px 14px; border-radius: 8px; margin-top: 8px; display: inline-block; }
[hidden]{display:none !important}

/* ===========================================================================
 * Clearpath — queue selection + Yardi assistant
 * Append to app/public/style.css. Uses the existing tokens only.
 * ======================================================================== */

/* ---- queue rows: tick to select, × to remove ---------------------------- */
.qitem { position: relative; }
.qitem .pick {
  width: 17px; height: 17px; border-radius: 5px; flex: none;
  border: 1.5px solid var(--line-strong); background: var(--surface);
  cursor: pointer; align-self: center; transition: background .12s, border-color .12s;
}
.qitem .pick:hover { border-color: var(--accent); }
.qitem.picked .pick { background: var(--accent); border-color: var(--accent); }
.qitem.picked .pick::after {
  content: ''; display: block; height: 100%;
  background: no-repeat center/9px 7px
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 8'%3E%3Cpath d='M1 4l2.5 2.5L9 1' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.qitem.picked { border-color: var(--accent); background: var(--accent-bg); }

.qitem .drop {
  border: none; background: none; color: var(--ink-faint); cursor: pointer;
  font-size: 17px; line-height: 1; padding: 2px 5px; border-radius: 5px;
  opacity: 0; transition: opacity .12s, color .12s;
}
.qitem:hover .drop, .qitem .drop:focus-visible { opacity: 1; }
.qitem .drop:hover { color: var(--red); background: var(--red-bg); }

/* ---- selection bar ------------------------------------------------------ */
.pickbar {
  display: flex; align-items: center; gap: 10px; margin-top: 12px;
  padding: 11px 13px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); position: sticky; bottom: 0;
}
.pickcount { font-size: 12.5px; color: var(--ink-soft); flex: 1; }

/* ---- assistant overlay -------------------------------------------------- */
.assist-overlay {
  position: fixed; inset: 0; background: rgba(20,18,16,.55);
  display: grid; place-items: center; z-index: 60; padding: 20px;
}
.assist-card { width: 540px; max-width: 94vw; max-height: 88vh; overflow: auto; padding: 22px; }
.assist-head { display: flex; justify-content: space-between; align-items: flex-start;
  gap: 16px; margin-bottom: 18px; }
.assist-head b { font-size: 16px; }

/* steps */
.asteps { list-style: none; margin: 0 0 16px; padding: 0; }
.astep { display: grid; grid-template-columns: 20px 1fr; gap: 11px;
  padding-bottom: 16px; position: relative; }
.astep:not(:last-child)::after { content: ''; position: absolute; left: 9px; top: 22px;
  bottom: 2px; width: 1px; background: var(--line); }
.astep b { font-size: 13.5px; }
.astep p { margin: 3px 0 0; color: var(--ink-soft); font-size: 12.5px; }
.astep .tick { width: 18px; height: 18px; border-radius: 50%; margin-top: 2px;
  border: 1.5px solid var(--line-strong); background: var(--surface);
  position: relative; z-index: 1; }
.astep.done .tick { background: var(--accent); border-color: var(--accent); }
.astep.done .tick::after { content: ''; position: absolute; inset: 0;
  background: no-repeat center/9px 7px
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 8'%3E%3Cpath d='M1 4l2.5 2.5L9 1' fill='none' stroke='white' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }

.abatch { width: 108px; margin-top: 7px; padding: 6px 9px;
  border: 1px solid var(--line-strong); border-radius: var(--radius); background: #fff; }
.abatch:focus { outline: none; border-color: var(--accent); }
kbd { font-family: var(--mono); font-size: 11px; padding: 1px 5px; border-radius: 4px;
  background: var(--surface-2); border: 1px solid var(--line-strong); }
.copied { font-size: 12px; color: var(--green); margin-left: 8px; }

.aready { display: flex; align-items: center; gap: 9px; font-size: 12.5px;
  color: var(--ink-soft); padding: 10px 12px; background: var(--surface-2);
  border-radius: var(--radius); }
.rdot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-faint); flex: none; }
.aready:not(.ok) .rdot { animation: apulse 1.6s ease-in-out infinite; }
.aready.ok { background: var(--green-bg); color: var(--green); }
.aready.ok .rdot { background: var(--green); }
@keyframes apulse { 0%,100% { opacity:.35 } 50% { opacity:1 } }

.askipped { margin-top: 12px; padding: 11px 13px; background: var(--amber-bg);
  border-radius: var(--radius); font-size: 12.5px; color: var(--ink); }
.askipped div { margin-top: 4px; color: var(--ink-soft); }

/* progress */
.abar { height: 6px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.abar span { display: block; height: 100%; width: 0; background: var(--accent);
  border-radius: 999px; transition: width .35s ease; }
.ameta { display: flex; justify-content: space-between; margin: 7px 0 14px;
  font-size: 12px; color: var(--ink-soft); }

.anotice { padding: 12px 14px; border-radius: var(--radius); margin-bottom: 14px;
  background: var(--amber-bg); border-left: 3px solid var(--amber); }
.anotice b { display: block; font-size: 13px; color: var(--amber); }
.anotice p { margin: 5px 0 0; font-size: 12.5px; }
.anotice.good { background: var(--green-bg); border-left-color: var(--green); }
.anotice.good b { color: var(--green); }
.alink { display: inline-block; margin-top: 8px; font-size: 12.5px;
  color: var(--accent-ink); font-weight: 500; cursor: pointer; }

.aqueue { list-style: none; margin: 0; padding: 0; }
.aq { display: grid; grid-template-columns: 16px 1fr auto; gap: 10px;
  align-items: baseline; padding: 8px 0; border-top: 1px solid var(--line); font-size: 13px; }
.aq:first-child { border-top: none; }
.aq .am { font-size: 11px; color: var(--ink-faint); text-align: center; }
.aq .aw { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aq .aw small { display: block; color: var(--ink-faint); font-size: 11.5px;
  font-family: var(--mono); }
.aq .aa { font-size: 12.5px; color: var(--ink-soft); }
.aq.active { background: var(--accent-bg); margin: 0 -10px; padding: 8px 10px;
  border-radius: var(--radius); border-top-color: transparent; }
.aq.active .am { color: var(--accent); }
.aq.entered .am { color: var(--green); }
.aq.entered .aw { color: var(--ink-soft); }
.aq.failed .am, .aq.failed .aw { color: var(--red); }

@media (prefers-reduced-motion: reduce) {
  .abar span { transition: none; }
  .aready:not(.ok) .rdot { animation: none; }
}

/* ---- amazon expense report ---------------------------------------------- */
.expbar { display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 12px; padding: 10px 13px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); font-size: 13px; }
.expacts { display: flex; gap: 6px; }
.expacts .btn-ghost { padding: 3px 9px; font-size: 12px; }
.aq .expacts { align-self: center; }

/* ---- yardi-style review -------------------------------------------------- */
.qitem .dot.rv { background: #1e7e34 !important; }
.yview { border: 1px solid var(--line); background: var(--surface); border-radius: 4px;
  font: 600 11px/1 Tahoma, sans-serif; padding: 4px 7px; cursor: pointer; color: #555; }
.yview:hover { background: #e8e4da; }
.yw-overlay { position: fixed; inset: 0; background: rgba(20,20,20,.55); z-index: 300;
  display: flex; align-items: flex-start; justify-content: center; overflow: auto; padding: 30px 12px; }
.yw-win { width: min(1120px, 96vw); background: #ece9d8; border: 1px solid #003c74;
  box-shadow: 0 10px 50px rgba(0,0,0,.5); font: 13px Tahoma, "Segoe UI", Arial, sans-serif; color: #000; }
.yw-title { background: linear-gradient(90deg,#0a246a,#a6caf0); color: #fff; font-weight: bold;
  padding: 5px 10px; display: flex; justify-content: space-between; align-items: center; }
.yw-close { cursor: pointer; font-weight: normal; }
.yw-body { background: #fff; border: 2px inset #ece9d8; padding: 12px 14px; }
.yw-cols { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 0 26px; }
.yw-frow { display: grid; grid-template-columns: 100px 1fr; align-items: center; margin: 3px 0; min-height: 22px; }
.yw-frow label { font-size: 12.5px; }
.yw-f { border: 1px solid #7f9db9; height: 20px; font: 12.5px Tahoma; padding: 1px 4px; width: 175px; box-sizing: border-box; background: #fff; }
textarea.yw-f { height: 56px; }
.yw-f.req { background: #cfe4f7; }
.yw-f.dis, .yw-cell.dis { background: #ebebe4 !important; color: #6d6d6d; border-color: #c8c8c8 !important; }
.yw-f.bad, .yw-gl.bad { background: #fdecea !important; border: 1.5px solid #c0392b !important; }
.yw-lnk { color: #0645ad; text-decoration: underline; font-size: 12.5px; }
.yw-sub { font-size: 11px; color: #666; margin-left: 6px; }
.yw-btnrow { display: flex; gap: 6px; margin: 14px 0 4px; align-items: center; }
.yw-btn { background: #ece9d8; border: 1px outset #fff; padding: 4px 16px; font: 13px Tahoma; cursor: pointer; color: #000; }
.yw-btn:active { border-style: inset; }
.yw-btn[disabled] { color: #999; cursor: default; }
.yw-btn.strong { font-weight: bold; }
.yw-btn.danger { color: #a02020; font-weight: bold; }
.yw-tabs { display: flex; margin-top: 14px; }
.yw-tabs span { padding: 5px 20px; font-weight: bold; font-size: 13px; border: 1px solid #555; border-bottom: none; background: #1c1c1c; color: #fff; }
.yw-tabs span.on { background: #fff; color: #000; position: relative; top: 1px; }
.yw-detail { border: 1px solid #555; background: #fff; padding: 10px; }
table.yw-grid { border-collapse: collapse; width: 100%; }
table.yw-grid th { background: #d4d0c8; border: 1px solid #999; font-size: 12.5px; padding: 3px 6px; }
table.yw-grid td { border: 1px solid #b5b5b5; padding: 0; height: 23px; }
.yw-cell { border: none; width: 100%; height: 22px; font: 12.5px Tahoma; padding: 1px 5px; box-sizing: border-box; background: transparent; }
select.yw-cell { height: 23px; }
td.yw-desc { background: #ebebe4; color: #444; font-size: 12px; padding: 1px 6px; }
tr.yw-look td { background: #fffbe8; }
.yw-flag { margin: 0 0 10px; padding: 7px 10px; font-size: 12.5px; border: 1px solid; }
.yw-flag.warn { background: #fff8e1; border-color: #e0c36b; color: #6b4e00; }
.yw-flag.good { background: #e8f5e9; border-color: #9ccc9c; color: #205e2a; }
.yw-legend { display: flex; gap: 16px; font-size: 11px; color: #666; margin-top: 8px; }
.yw-legend span::before { content: ''; display: inline-block; width: 9px; height: 9px; margin-right: 5px; border-radius: 2px; vertical-align: -1px; border: 1px solid; }
.yw-legend .r::before { background: #fdecea; border-color: #c0392b; }
.yw-legend .y::before { background: #fff8e1; border-color: #9a6700; }
.yw-legend .d::before { background: #ebebe4; border-color: #bbb; }
.yw-warnbox { width: min(560px, 94vw); background: #fff; border-radius: 8px; padding: 20px 24px;
  box-shadow: 0 10px 50px rgba(0,0,0,.5); font-size: 13.5px; }
.yw-warnbox h3 { margin: 0 0 8px; font-size: 15px; }
.yw-warnbox ul { margin: 8px 0 12px 18px; padding: 0; }
.yw-warnbox li { margin: 3px 0; }
.yw-quiet { color: #555; font-size: 12.5px; }

/* ---- review v2: full-width queue, popup does the reviewing --------------- */
#detail { display: none !important; }
.review { grid-template-columns: 1fr !important; }
.yview { display: none !important; }

/* ---- review v3: readable full-width rows, corner remove ------------------ */
.qitem { display: grid !important; grid-template-columns: 30px 16px 1fr auto !important;
  align-items: center !important; position: relative !important;
  padding: 14px 44px 14px 14px !important; gap: 0 10px !important; }
.qitem > .pick { grid-column: 1; }
.qitem > .dot { grid-column: 2; }
.qitem > div { grid-column: 3; text-align: left !important; min-width: 0; }
.qitem > div .v { font-weight: 600; }
.qitem > .amt { grid-column: 4; font-weight: 600; white-space: nowrap; }
.qitem .drop { position: absolute !important; top: 7px; right: 8px;
  width: 22px; height: 22px; line-height: 19px; padding: 0 !important;
  border: 1px solid #d8d0c2; border-radius: 5px; background: #fff;
  color: #c0392b; font-size: 14px; text-align: center; opacity: .8; }
.qitem .drop:hover { background: #fdecea; border-color: #c0392b; opacity: 1; }

/* ---- clearpath notifications --------------------------------------------- */
#cpToasts { position: fixed; top: 18px; right: 18px; z-index: 500;
  display: flex; flex-direction: column; gap: 10px; }
.cp-toast { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 12px;
  align-items: center; min-width: 260px; max-width: 380px;
  background: var(--surface, #fffdf8); border: 1px solid var(--line, #e4ddd0);
  border-left: 4px solid #8a8a8a; border-radius: 10px; padding: 11px 13px;
  box-shadow: 0 8px 30px rgba(30,25,15,.16);
  transform: translateX(18px); opacity: 0; transition: all .22s ease; }
.cp-toast.in { transform: none; opacity: 1; }
.cp-toast.good { border-left-color: #1e7e34; }
.cp-toast.bad { border-left-color: #c0392b; }
.cp-toast .cp-brand { grid-column: 1 / -1; }
.cp-toast .cp-msg { font-size: 13.5px; color: #2c2a24; }
.cp-toast .cp-x { cursor: pointer; color: #999; font-size: 12px; padding: 2px 4px; }
.cp-brand { font: 700 9.5px/1 Inter, Tahoma, sans-serif; letter-spacing: .18em;
  color: #a89f8d; }
.cp-modal-wrap { position: fixed; inset: 0; z-index: 520; background: rgba(25,22,16,.45);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .18s ease; }
.cp-modal-wrap.in { opacity: 1; }
.cp-modal { width: min(420px, 92vw); background: var(--surface, #fffdf8);
  border: 1px solid var(--line, #e4ddd0); border-radius: 12px; padding: 18px 22px 16px;
  box-shadow: 0 18px 60px rgba(20,15,5,.3); transform: translateY(6px); transition: transform .18s; }
.cp-modal-wrap.in .cp-modal { transform: none; }
.cp-modal h3 { margin: 10px 0 6px; font-size: 15.5px; }
.cp-modal p { margin: 0 0 16px; font-size: 13.5px; color: #5a544a; line-height: 1.45; }
.cp-modal-btns { display: flex; justify-content: flex-end; gap: 8px; }
.cp-btn { border-radius: 8px; padding: 8px 16px; font-size: 13px; cursor: pointer; border: 1px solid; }
.cp-btn.ghost { background: transparent; border-color: var(--line, #ddd); color: #555; }
.cp-btn.go { background: #1e7e34; border-color: #1e7e34; color: #fff; }
.cp-btn.danger { background: #c0392b; border-color: #c0392b; color: #fff; }

/* safe path reads green, override reads red */
.yw-btn.safe { color: #1e7e34; font-weight: bold; }

/* ---- clearpath brand: the platinum front door ---------------------------- */
.lg-screen { min-height: 100vh; display: grid; place-items: center;
  background: #f6f2e9;
  background-image: radial-gradient(900px 420px at 50% -8%, rgba(200,185,150,.20), transparent);
  padding: 30px 16px; font-family: Inter, system-ui, sans-serif; }
.lg-card { width: min(420px, 94vw); background: #fbf8f1; border: 1px solid #e2d9c5;
  border-radius: 3px; padding: 42px 44px 26px; position: relative; color: #231f18;
  box-shadow: 0 1px 0 #fff inset, 0 30px 70px rgba(60,45,20,.14), 0 4px 14px rgba(60,45,20,.08); }
.lg-card::before { content: ''; position: absolute; inset: 0; border-radius: 3px; padding: 1px;
  pointer-events: none;
  background: linear-gradient(160deg,#f4f4f2,#9c9c96 30%,#e6e6e2 55%,#c9c9c4 80%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; opacity: .9; }
.lg-mark { display: grid; place-items: center; margin-bottom: 16px; }
.lg-mark-sm svg { width: 84px; height: 57px; }
.lg-word { font-family: Fraunces, Georgia, serif; font-weight: 550; font-size: 30px;
  text-align: center; letter-spacing: .01em; }
.lg-word em { font-style: italic; font-weight: 380; }
.lg-word-sm { font-size: 24px; }
.lg-descriptor { text-align: center; font: 500 9.5px Inter, sans-serif; letter-spacing: .32em;
  color: #8a8172; text-transform: uppercase; margin-top: 8px; }
.lg-hairline { width: 56px; height: 1px; background: #cbbfa4; margin: 20px auto 24px; }
.lg-label { display: block; font: 600 10.5px Inter, sans-serif; letter-spacing: .14em;
  text-transform: uppercase; color: #7a715f; margin: 0 0 20px; }
.lg-f { display: block; width: 100%; margin-top: 7px; border: none;
  border-bottom: 1.5px solid #cbbfa4; background: transparent; font: 15px Inter, sans-serif;
  padding: 8px 2px 10px; color: #231f18; outline: none; transition: border-color .2s;
  box-sizing: border-box; border-radius: 0; }
.lg-f:focus { border-bottom-color: #1c5e34; }
.lg-f::placeholder { color: #b9b0a0; }
.lg-go { width: 100%; margin-top: 6px; background: #1c5e34; color: #f6f2e9; border: none;
  border-radius: 2px; padding: 13px; font: 600 13.5px Inter, sans-serif; letter-spacing: .05em;
  cursor: pointer; box-shadow: 0 6px 18px rgba(28,94,52,.25);
  transition: transform .12s, box-shadow .2s, filter .15s; }
.lg-go:hover { filter: brightness(1.07); box-shadow: 0 10px 26px rgba(28,94,52,.3); }
.lg-go:active { transform: scale(.985); }
.lg-err { margin-top: 12px; text-align: center; color: #8e2f22; font-size: 12.5px; min-height: 16px; }
.lg-aux { display: flex; justify-content: center; margin-top: 14px; font-size: 12.5px; color: #7a715f; }
.lg-aux a { color: #7a715f; cursor: pointer; text-decoration: none;
  border-bottom: 1px solid #cbbfa4; }
.lg-aux a:hover { color: #1c5e34; border-color: #1c5e34; }
.lg-plate { margin-top: 26px; padding-top: 14px; border-top: 1px solid #e2d9c5;
  display: flex; justify-content: space-between; align-items: center; }
.lg-nx { font: 600 8.5px Inter, sans-serif; letter-spacing: .28em; color: #a89f8d; }
.lg-sec { font: 500 9px Inter, sans-serif; letter-spacing: .1em; color: #b3aa98;
  display: flex; align-items: center; gap: 5px; }
.lg-sec::before { content: '\25CF'; font-size: 6px; color: #1c5e34; }
.lg-fine { margin-top: 14px; font-size: 9.5px; line-height: 1.55; color: #a89f8d;
  text-align: center; }
.lg-fine a { color: #a89f8d; text-decoration: none; border-bottom: 1px solid #ddd2ba; }
.lg-fine a:hover { color: #1c5e34; }
/* register screen inherits everything; its old inner blocks restyle lightly */
.lg-card label { font: 600 10.5px Inter, sans-serif; letter-spacing: .14em;
  text-transform: uppercase; color: #7a715f; display: block; margin-bottom: 20px; }
.lg-card label input { display: block; width: 100%; margin-top: 7px; border: none;
  border-bottom: 1.5px solid #cbbfa4; background: transparent; font: 15px Inter, sans-serif;
  padding: 8px 2px 10px; color: #231f18; outline: none; box-sizing: border-box; border-radius: 0; }
.lg-card label input:focus { border-bottom-color: #1c5e34; }
.lg-card .btn-primary { width: 100%; margin-top: 6px; background: #1c5e34; color: #f6f2e9;
  border: none; border-radius: 2px; padding: 13px; font: 600 13.5px Inter, sans-serif;
  letter-spacing: .05em; cursor: pointer; box-shadow: 0 6px 18px rgba(28,94,52,.25); }
.lg-card .btn-primary:hover { filter: brightness(1.07); }
.lg-card .err { text-align: center; color: #8e2f22; font-size: 12.5px; margin-top: 10px; }
.lg-card .login-alt { display: flex; justify-content: center; margin-top: 12px;
  font-size: 12.5px; color: #7a715f; }
.lg-card .login-alt a { color: #7a715f; cursor: pointer; border-bottom: 1px solid #cbbfa4; }
.lg-card .login-alt a:hover { color: #1c5e34; }
.lg-card .reg-sent { font-size: 13px; color: #5a5140; margin-bottom: 16px; line-height: 1.5; }
.lg-card .code-input { letter-spacing: .4em; font-variant-numeric: tabular-nums; text-align: center; }

/* ===========================================================================
   Clearpath v4 "Console" — light dashboard shell, icon nav, metric cards,
   tables. Appended after the original rules; everything below overrides.
   =========================================================================== */
:root {
  --bg: #F5F6FA; --surface: #FFFFFF; --surface-2: #F1F3F8;
  --ink: #111827; --ink-soft: #5B6475; --ink-faint: #94A0B5;
  --line: #E6E8EF; --line-strong: #D5D9E3;
  --accent: #4F46E5; --accent-bg: #EEF0FF; --accent-ink: #3730A3;
  --green: #15803D; --green-bg: #E5F5EA;
  --amber: #B45309; --amber-bg: #FEF3DC;
  --red: #B91C1C;   --red-bg: #FDE8E8;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --radius: 12px; --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(17,24,39,.04), 0 1px 3px rgba(17,24,39,.06);
}
body { background: var(--bg); color: var(--ink); font-size: 14px; letter-spacing: -.005em; }
.mono, .k, .num { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* ---- shell ------------------------------------------------------------- */
.app { grid-template-columns: 236px 1fr; }
.rail { background: var(--surface); border-right: 1px solid var(--line); padding: 18px 14px 16px; }
.rail .brand { margin-bottom: 20px; padding: 2px 6px; }
.rail .brand .logo { width: 32px; height: 32px; border-radius: 9px; background: var(--accent); font-size: 0; position: relative; }
.rail .brand .logo::after { content: ''; position: absolute; inset: 8px; border-left: 2.5px solid #fff; border-bottom: 2.5px solid #fff; transform: skewX(-20deg) translateX(2px); opacity: .95; }
.rail .brand h1 { font-size: 17px; font-weight: 700; letter-spacing: -.02em; }
.ctx { font-size: 12px; font-weight: 500; color: var(--ink-soft); padding: 10px 12px; background: var(--surface-2); border-radius: var(--radius-sm); border: none; margin-bottom: 14px; }
.nav { gap: 1px; }
.nav .grp { font-size: 10.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint); padding: 14px 12px 6px; }
.nav button { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--radius-sm); font-size: 13.5px; font-weight: 500; color: var(--ink-soft); width: 100%; cursor: pointer; }
.nav button svg { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nav button:hover { background: var(--surface-2); color: var(--ink); }
.nav button.active { background: var(--accent-bg); color: var(--accent-ink); }
.nav button.active svg { stroke: var(--accent); }
.nav .pill { margin-left: auto; background: transparent; color: var(--ink-faint); font-size: 11.5px; padding: 0; }
.nav button.active .pill { background: transparent; color: var(--accent-ink); }
.nav .pill:empty { display: none; }
.rail-foot { font-size: 12px; color: var(--ink-soft); padding: 14px 6px 0; display: flex; flex-direction: column; gap: 4px; }
.rail-foot a { color: var(--accent); font-weight: 500; }

/* top bar sits above #main inside the right column */
.col { display: flex; flex-direction: column; min-width: 0; height: 100%; }
.topbar { height: 60px; background: var(--surface); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 14px; padding: 0 28px; flex: none; }
.topbar .search { flex: 0 1 360px; display: flex; align-items: center; gap: 8px; background: var(--surface-2); border-radius: var(--radius-sm); padding: 8px 12px; color: var(--ink-faint); font-size: 13px; }
.topbar .search svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.topbar .search input { border: none; background: transparent; outline: none; flex: 1; font-size: 13px; color: var(--ink); }
.topbar .spacer { flex: 1; }
.topbar .tb-btn { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); font-size: 13px; font-weight: 500; color: var(--ink); cursor: pointer; }
.topbar .tb-btn.dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.topbar .tb-btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.topbar .avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--accent-bg); color: var(--accent-ink); display: grid; place-items: center; font-weight: 600; font-size: 12.5px; }
.main { padding: 26px 28px 40px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 20px; }
.page-head h2 { font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.page-head p { font-size: 13.5px; }

/* ---- cards & buttons --------------------------------------------------- */
.card { border-radius: var(--radius); box-shadow: var(--shadow); }
.card.empty { padding: 48px; }
.btn-approve, .btn-primary, .btn-sm { background: var(--accent); border-radius: var(--radius-sm); font-weight: 600; }
.btn-approve:hover, .btn-primary:hover, .btn-sm:hover { filter: none; background: #4338CA; }
.btn-ghost { border-radius: var(--radius-sm); background: var(--surface); font-weight: 500; }
.btn-ghost:hover { background: var(--surface-2); }
.chip { border-radius: 6px; font-weight: 600; font-size: 11.5px; padding: 3px 8px; }
.chip.neutral { background: var(--surface-2); color: var(--ink-soft); }
.stat { border-radius: var(--radius); box-shadow: var(--shadow); }

/* ---- dashboard --------------------------------------------------------- */
.dash { display: grid; gap: 16px; }
.dash-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.metric { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; display: grid; grid-template-columns: 1fr auto; gap: 8px 14px; align-items: start; }
.metric .l { grid-column: 1; font-size: 13px; color: var(--ink-soft); font-weight: 500; }
.metric .n { grid-column: 1; font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 28px; font-weight: 600; letter-spacing: -.02em; line-height: 1.1; }
.metric .sub { grid-column: 1; display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.metric .spark { grid-column: 2; grid-row: 1 / span 3; width: 96px; height: 56px; align-self: end; }
.metric .spark rect { fill: var(--accent-bg); }
.metric .spark rect.hi { fill: var(--accent); }
.metric .spark polyline { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; }
.metric .delta { grid-column: 1; font-size: 12px; font-weight: 600; border-radius: 6px; padding: 3px 8px; display: inline-flex; gap: 5px; align-items: center; justify-self: start; }
.metric .delta.up { background: var(--green-bg); color: var(--green); }
.metric .delta.down { background: var(--red-bg); color: var(--red); }
.metric .delta.flat { background: var(--surface-2); color: var(--ink-soft); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel .ph { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.panel .ph b { font-size: 14px; font-weight: 600; }
.panel .ph .more { font-size: 12.5px; color: var(--accent); font-weight: 500; cursor: pointer; }
.panel .pb { padding: 6px 18px 12px; }
.dash-2 { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
.dash-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
@media (max-width: 1180px) { .dash-2, .dash-3 { grid-template-columns: 1fr; } }

/* bars (vendor / GL breakdown) */
.hbar { display: grid; grid-template-columns: 150px 1fr 90px; gap: 12px; align-items: center; padding: 7px 0; font-size: 13px; }
.hbar .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar .b { height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.hbar .b > i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.hbar .v { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* monthly bars */
.mbars { display: grid; grid-auto-flow: column; align-items: end; gap: 10px; height: 150px; padding: 8px 0 0; }
.mbar { display: grid; grid-template-rows: 1fr auto; height: 100%; justify-items: center; gap: 6px; }
.mbar .col2 { width: 100%; max-width: 44px; background: var(--accent-bg); border-radius: 6px 6px 0 0; align-self: end; position: relative; }
.mbar.cur .col2 { background: var(--accent); }
.mbar .col2 span { position: absolute; top: -20px; left: 50%; transform: translateX(-50%); font-family: var(--mono); font-size: 11px; color: var(--ink-soft); white-space: nowrap; }
.mbar .m { font-size: 11.5px; color: var(--ink-faint); }

/* progress list on dashboard */
.prog { padding: 10px 0; border-bottom: 1px solid var(--line); }
.prog:last-child { border-bottom: none; }
.prog .pt { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 6px; }
.prog .pt small { color: var(--ink-soft); }
.prog .bar { height: 8px; }
.prog .bar > div { background: var(--accent); }
.prog .stage { font-size: 11.5px; color: var(--ink-soft); margin-top: 5px; }

/* needs-you list */
.need { display: grid; grid-template-columns: 8px 1fr auto; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; cursor: pointer; }
.need:last-child { border-bottom: none; }
.need .amt { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.need small { color: var(--ink-soft); }

/* recent batches table */
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.tbl td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tr:hover td { background: #FAFBFE; }
.tbl td.num, .tbl th.num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.tbl .st { font-size: 11.5px; font-weight: 600; padding: 3px 8px; border-radius: 6px; }
.tbl .st.done { background: var(--green-bg); color: var(--green); }
.tbl .st.paused, .tbl .st.stalled { background: var(--amber-bg); color: var(--amber); }
.tbl .st.running, .tbl .st.connected, .tbl .st.waiting { background: var(--accent-bg); color: var(--accent-ink); }

/* ---- queue / review tune-ups ------------------------------------------- */
.stat-row .stat { min-width: 150px; }
.qitem { border-radius: var(--radius-sm); }
.qitem.picked, .qitem.sel { background: var(--accent-bg); }
.tracker { border-radius: var(--radius); box-shadow: var(--shadow); }
.bar > div { background: var(--accent); }

/* ---- login (light) ----------------------------------------------------- */
.lg-screen { background: var(--bg); background-image: none; font-family: var(--sans); }
.lg-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 20px 50px rgba(17,24,39,.08); padding: 40px 42px 26px; color: var(--ink); }
.lg-card::before { display: none; }
.lg-word { font-family: var(--sans); font-weight: 700; font-size: 26px; letter-spacing: -.02em; }
.lg-word em { font-style: normal; font-weight: 500; color: var(--accent); }
.lg-descriptor { color: var(--ink-faint); letter-spacing: .24em; }
.lg-hairline { background: var(--line); }
.lg-label, .lg-card label { color: var(--ink-soft); letter-spacing: .02em; text-transform: none; font: 500 12.5px var(--sans); margin-bottom: 14px; }
.lg-f, .lg-card label input { border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: #FAFBFD; padding: 10px 12px; font: 14px var(--sans); color: var(--ink); }
.lg-f:focus, .lg-card label input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-bg); }
.lg-f::placeholder { color: var(--ink-faint); }
.lg-go, .lg-card .btn-primary { background: var(--accent); color: #fff; border-radius: var(--radius-sm); box-shadow: none; letter-spacing: 0; font: 600 14px var(--sans); }
.lg-go:hover, .lg-card .btn-primary:hover { background: #4338CA; box-shadow: none; filter: none; }
.lg-err, .lg-card .err { color: var(--red); }
.lg-aux, .lg-aux a, .lg-card .login-alt, .lg-card .login-alt a { color: var(--ink-soft); border-color: var(--line-strong); }
.lg-aux a:hover, .lg-card .login-alt a:hover { color: var(--accent); border-color: var(--accent); }
.lg-plate { border-top-color: var(--line); }
.lg-nx, .lg-sec, .lg-fine, .lg-fine a { color: var(--ink-faint); }
.lg-sec::before { color: var(--green); }
.lg-mark svg path, .lg-mark svg circle { stroke: var(--accent); fill: var(--accent); }
.lg-mark svg path { fill: none; }

/* modal + toast */
.cp-modal-wrap { background: rgba(17,24,39,.5); }
.cp-modal { background: var(--surface); border-radius: 14px; }

/* ===== v4 phase 2: data tables ========================================== */
.ftabs { display: flex; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px; }
.ftabs button { border: none; background: transparent; border-radius: 999px; padding: 7px 14px; font-size: 13px; font-weight: 500; color: var(--ink-soft); cursor: pointer; display: inline-flex; gap: 8px; align-items: center; }
.ftabs button .num { font-size: 12px; color: var(--ink-faint); }
.ftabs button.on { background: var(--ink); color: #fff; }
.ftabs button.on .num { color: #fff !important; }
.panel > .empty { padding: 56px 20px; }
.tbl.data th { cursor: pointer; user-select: none; white-space: nowrap; }
.tbl.data th.sorted { color: var(--ink); }
.tbl.data th .arr { display: inline-block; width: 12px; margin-left: 4px; color: var(--accent); }
.tbl.data th.ck, .tbl.data td.ck { width: 40px; padding-right: 0; }
.tbl.data th.act, .tbl.data td.act { width: 110px; text-align: right; }
.tbl.data td.ell { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tbl.data tr.qrow, .tbl.data tbody tr[data-id] { cursor: pointer; background: transparent; border: none; border-radius: 0; box-shadow: none; padding: 0; position: static; }
.tbl.data tr.qrow.picked td, .tbl.data tr.picked td { background: var(--accent-bg); }
.tbl.data tr.qrow:hover td { background: #FAFBFE; }
.tbl.data tr.qrow.picked:hover td { background: #E4E7FF; }
.tbl.data .pick { position: static; display: inline-block; width: 18px; height: 18px; border: 1.5px solid var(--line-strong); border-radius: 5px; vertical-align: middle; cursor: pointer; background: #fff; }
.tbl.data .pick:hover { border-color: var(--accent); }
.tbl.data tr.picked .pick { background: var(--accent); border-color: var(--accent); position: relative; }
.tbl.data tr.picked .pick::after { content: ''; position: absolute; left: 5px; top: 1px; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.tbl.data input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }
.tbl.data .v { font-weight: 500; }
.tbl.data .rvd { margin-left: 6px; color: var(--green); font-size: 12px; font-weight: 700; }
.tbl.data .ra { display: inline-flex; gap: 4px; opacity: 0; transition: opacity .12s; }
.tbl.data tr:hover .ra { opacity: 1; }
.tbl.data .ra button { width: 30px; height: 30px; border: 1px solid var(--line); background: #fff; border-radius: 7px; display: inline-grid; place-items: center; cursor: pointer; color: var(--ink-soft); }
.tbl.data .ra button:hover { border-color: var(--accent); color: var(--accent); }
.tbl.data .ra button svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tbl.data tr.grp td { background: var(--surface-2); font-size: 12.5px; color: var(--ink-soft); padding: 8px 12px; }
.tbl.data tr.grp .grpall { float: right; font-size: 12px; display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.pickbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--accent-bg); border-bottom: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; }
.pickbar .pickcount { flex: 1; font-size: 13px; color: var(--accent-ink); font-weight: 500; }
.pickbar .btn-approve, .pickbar .btn-ghost { padding: 8px 14px; }
.pager { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-top: 1px solid var(--line); font-size: 12.5px; }
.pager button { min-width: 32px; height: 30px; padding: 0 9px; border: 1px solid var(--line); background: #fff; border-radius: 7px; margin-right: 4px; cursor: pointer; font-size: 12.5px; color: var(--ink); }
.pager button.on { background: var(--surface-2); border-color: var(--line-strong); font-weight: 600; }
.pager button:disabled { opacity: .45; cursor: default; }
.pager .gap { margin: 0 6px 0 2px; color: var(--ink-faint); }
.pager select { border: 1px solid var(--line); border-radius: 6px; padding: 3px 6px; font-size: 12.5px; }
.tbl.data tr.qrow { display: table-row; grid-template-columns: none; gap: 0; }
.tbl.data tr.qrow td { display: table-cell; }

/* ===== v4 phase 3: assistant panel, activity, admin ====================== */
.assist-overlay { background: rgba(17,24,39,.55); backdrop-filter: blur(2px); }
.assist-card { width: 600px; border-radius: 16px; padding: 24px 26px; box-shadow: 0 30px 80px rgba(17,24,39,.25); }
.assist-head { margin-bottom: 18px; }
.assist-head b { font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.arail { position: relative; height: 24px; margin: 2px 8px 6px; display: flex; justify-content: space-between; align-items: center; }
.arail::before { content: ''; position: absolute; left: 12px; right: 12px; top: 11px; height: 2px; background: var(--line); }
.arail-fill { position: absolute; left: 12px; top: 11px; height: 2px; background: var(--accent); width: 0; max-width: calc(100% - 24px); transition: width .3s; }
.arail-dot { position: relative; z-index: 1; width: 24px; height: 24px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line-strong); display: grid; place-items: center; font-size: 11px; font-weight: 600; color: var(--ink-faint); transition: all .2s; }
.arail-dot.now { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 0 4px var(--accent-bg); }
.arail-dot.done { background: var(--accent); border-color: var(--accent); color: #fff; }
.arail-label { font-size: 12px; margin: 0 0 14px 8px; }
.asteps { margin: 0 0 14px; }
.astep { padding: 10px 0 14px; }
.astep .tick { width: 20px; height: 20px; border: 2px solid var(--line-strong); }
.astep.done .tick { background: var(--accent); border-color: var(--accent); }
.astep:not(:last-child)::after { left: 10px; background: var(--line); }
.astep.done:not(:last-child)::after { background: var(--accent); }
.astep b { font-size: 14px; }
.astep p { font-size: 12.5px; line-height: 1.5; }
.astep .btn-ghost, .astep .btn-approve { margin-top: 8px; padding: 8px 14px; font-size: 13px; }
.astep.done .astep-done { display: none; }
.abatch { margin-top: 8px; font-size: 15px; padding: 9px 12px; border-radius: var(--radius-sm); }
.copied { display: block; margin-top: 8px; font-size: 12.5px; color: var(--green); font-weight: 500; }
.aready { border-radius: var(--radius-sm); padding: 11px 14px; background: var(--surface-2); }
.aready.waiting { background: var(--amber-bg); color: var(--amber); }
.aready.waiting .rdot { background: var(--amber); }
.aready.ok { background: var(--green-bg); color: var(--green); }
.ahint { font-size: 12px; margin-top: 10px; line-height: 1.5; padding: 0 4px; }
.arun-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; font-size: 13px; }
.arun-head #aCount { font-weight: 600; }
.abar { height: 8px; }
.aqueue { margin-top: 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 4px 10px; max-height: 260px; overflow: auto; }
.aq.entered .am { color: var(--green); font-weight: 700; }
.aq.failed .am { color: var(--red); font-weight: 700; }
.anotice { border-radius: var(--radius-sm); }
.anotice.good { background: var(--green-bg); }

/* activity */
.tracker { border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 22px; margin-bottom: 12px; }
.tracker .pct { font-size: 24px; letter-spacing: -.02em; }
.tracker .bar { height: 8px; }
.tracker .stg.done .sd { background: var(--accent); color: #fff; border-color: var(--accent); }
.tracker .stg.now .sd { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 0 4px var(--accent-bg); }

/* admin tables + forms */
.card > table { border-radius: var(--radius); overflow: hidden; }
.card > table th { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); background: var(--surface); padding: 12px; }
.card > table td { padding: 11px 12px; }
.card > table tr:hover td { background: #FAFBFE; }
.card > table tr:last-child td { border-bottom: none; }
.admin-form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.field label { font-size: 12px; font-weight: 500; color: var(--ink-soft); margin-bottom: 5px; }
.field input, .field select, .admin-form input, .admin-form select, .admin-form textarea, .main input:not([type=checkbox]):not(.abatch), .main select, .main textarea {
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 8px 10px; background: #FAFBFD; font-size: 13.5px; color: var(--ink); }
.main input:focus, .main select:focus, .main textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-bg); }
.btn-sm { padding: 6px 11px; font-size: 12.5px; }
.stat { padding: 16px 18px; }
.stat .n { font-family: var(--mono); font-size: 26px; font-weight: 600; letter-spacing: -.02em; }
.pill-tag { border-radius: 6px; font-weight: 600; }
