/* Miska — the console's shared look.
 *
 * Ivory & champagne gold. One file so every console screen agrees; `console/intake.html` is
 * the deliberate exception and carries its own copy, because it is the tool a staff member
 * opens in a godown and every file it does not need is one less thing that can fail to load.
 *
 * Colour rule, taken from the Makkal UI system and worth repeating: EVERY COLOUR MEANS
 * SOMETHING. Gold is the brand and the primary action. Green is settled — paid, live,
 * delivered. Red is "you must do something". Amber is a warning that is not an error.
 * Nothing is coloured for decoration.
 */

:root{
  --bg:#FBF8F4; --bg2:#F5F0E9; --card:#FFFFFF;
  --ink:#2A2420; --ink2:#5A5048; --muted:#857A6F;
  --line:#EAE2D6; --line2:#DCD1C0;

  --gold:#B8903E; --gold-d:#9A7730; --gold-t:#8A6B28; --gold-s:#F8F1E2;
  --green:#2E7D5B; --green-t:#246349; --green-s:#E7F3EC;
  --red:#B3402F;   --red-t:#953426;  --red-s:#FBEBE7;
  --amber-t:#8A5A14; --amber-s:#FBF0D8;
  --blush:#E8D5CE;

  --r:16px;
  --sh:0 1px 2px rgba(42,36,32,.05), 0 6px 20px rgba(42,36,32,.06);
}

*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{margin:0;background:var(--bg);color:var(--ink);
  font:500 15px/1.5 'Plus Jakarta Sans',system-ui,-apple-system,'Segoe UI',Roboto,sans-serif;
  overflow-x:hidden;-webkit-tap-highlight-color:transparent}
button,input,textarea,select{font:inherit;color:inherit}
a{color:inherit}

h1{font-size:25px;line-height:1.2;letter-spacing:-.022em;font-weight:800;margin:0 0 6px}
h2{font-size:16px;font-weight:800;margin:0 0 10px}
.lead{color:var(--ink2);font-size:14px;line-height:1.6;margin:0 0 16px;max-width:58ch}
.cap{font-size:11px;font-weight:800;letter-spacing:.07em;text-transform:uppercase;
  color:var(--muted);margin:0 0 8px}
.note{font-size:12.5px;line-height:1.55;color:var(--muted);margin:10px 0 0}

.i{width:20px;height:20px;flex:none;stroke:currentColor;fill:none;stroke-width:1.7;
  stroke-linecap:round;stroke-linejoin:round}

/* ── surfaces ──────────────────────────────────────────────────────── */
.card{background:var(--card);border:1px solid var(--line);border-radius:var(--r);
  box-shadow:var(--sh);padding:16px;margin:0 0 14px}
.card.pad0{padding:0;overflow:clip}

/* ── buttons ───────────────────────────────────────────────────────── */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;
  padding:11px 17px;border-radius:12px;border:1px solid var(--line2);background:var(--card);
  font-size:14.5px;font-weight:700;cursor:pointer;text-decoration:none;color:var(--ink)}
.btn:hover{border-color:var(--muted)}
.btn:active{transform:translateY(1px)}
.btn[disabled]{opacity:.45;pointer-events:none}
.btn.pri{background:var(--ink);border-color:var(--ink);color:#fff}
.btn.pri:hover{background:#15110E;border-color:#15110E}
.btn.gold{background:var(--gold);border-color:var(--gold);color:#fff}
.btn.gold:hover{background:var(--gold-d);border-color:var(--gold-d)}
.btn.danger{background:var(--red-s);border-color:var(--red-s);color:var(--red-t)}
.btn.wide{width:100%}
.btn.sm{min-height:36px;padding:7px 12px;font-size:13px;border-radius:10px}
.btn.sm .i{width:16px;height:16px}
.btn .i{width:18px;height:18px}

.ibtn{display:inline-grid;place-items:center;width:38px;height:38px;flex:none;border-radius:11px;
  border:1px solid var(--line);background:var(--card);cursor:pointer;color:var(--ink2);padding:0}
.ibtn:hover{background:var(--bg2);color:var(--ink)}

/* ── fields ────────────────────────────────────────────────────────── */
label.f{display:block;margin:0 0 14px}
label.f > span{display:block;font-size:13px;font-weight:700;margin:0 0 6px;color:var(--ink2)}
label.f > span em{font-style:normal;color:var(--muted);font-weight:600}
.in{width:100%;min-height:44px;padding:11px 13px;border:1px solid var(--line2);border-radius:11px;
  background:var(--card);font-size:15px;font-weight:600;outline:0}
/* On a phone anything under 16px makes iOS Safari zoom the page on focus. */
@media (max-width:860px){ .in{font-size:16px;min-height:48px} }
.in:focus{border-color:var(--gold);box-shadow:0 0 0 3px rgba(184,144,62,.16)}
textarea.in{resize:vertical;font-weight:500;line-height:1.55;min-height:80px}
select.in{appearance:none;-webkit-appearance:none;padding-right:38px;
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%23857A6F' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='M5 8l5 5 5-5'/></svg>");
  background-repeat:no-repeat;background-position:right 11px center}
label.f.bad .in{border-color:var(--red);background:var(--red-s)}
.bad-note{display:block;color:var(--red-t);font-size:12.5px;font-weight:700;margin-top:6px}

.two{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.three{display:grid;grid-template-columns:1fr 1fr 1fr;gap:10px}
@media (max-width:520px){ .three{grid-template-columns:1fr 1fr} }

.money{position:relative}
.money .in{padding-left:28px}
.money .rs{position:absolute;left:12px;top:50%;transform:translateY(-50%);font-size:14px;
  font-weight:700;color:var(--muted);pointer-events:none}
.moneyline{font-size:12.5px;font-weight:600;color:var(--muted);margin:-4px 0 4px;
  font-variant-numeric:tabular-nums}
.moneyline b{font-weight:800;color:var(--ink2)}

/* ── a value shown read-only ───────────────────────────────────────── */
.accrow{display:flex;gap:12px;align-items:baseline;padding:9px 0;border-bottom:1px solid var(--line)}
.accrow:last-of-type{border-bottom:0}
.accrow span{flex:none;width:8.5rem;color:var(--muted);font-size:12.5px;font-weight:700}
.accrow b{min-width:0;font-size:14px;font-weight:700;word-break:break-word}
@media (max-width:520px){ .accrow{display:block} .accrow span{width:auto;display:block;margin-bottom:2px} }

/* ── status pills. The word, not just the colour: red and green alone are not a
      difference for everyone who reads this screen. ───────────────────────────── */
.pill{display:inline-flex;align-items:center;gap:5px;font-size:10.5px;font-weight:800;
  letter-spacing:.05em;text-transform:uppercase;padding:4px 9px;border-radius:999px;
  background:var(--bg2);color:var(--muted)}
.pill.draft{background:var(--amber-s);color:var(--amber-t)}
.pill.ready{background:var(--gold-s);color:var(--gold-t)}
.pill.listed{background:var(--green-s);color:var(--green-t)}
.pill.rejected{background:var(--red-s);color:var(--red-t)}

/* ── messages ──────────────────────────────────────────────────────── */
.warn{display:flex;gap:10px;align-items:flex-start;padding:12px 14px;border-radius:12px;
  background:var(--amber-s);color:var(--amber-t);font-size:13px;font-weight:600;
  line-height:1.55;margin:0 0 16px}
.warn .i{width:18px;height:18px;flex:none;margin-top:1px}
.warn b{font-weight:800}
.warn.bad{background:var(--red-s);color:var(--red-t)}
.warn.good{background:var(--green-s);color:var(--green-t)}

.state{text-align:center;padding:40px 20px;color:var(--muted)}
.state .i{width:28px;height:28px;color:var(--line2);stroke-width:1.3}
.state b{display:block;font-size:15px;font-weight:700;color:var(--ink2);margin:10px 0 4px}
.state small{display:block;font-size:13px;line-height:1.5;max-width:34ch;margin:0 auto}

/* ── toast ─────────────────────────────────────────────────────────── */
#toast{position:fixed;left:50%;bottom:calc(24px + env(safe-area-inset-bottom,0px));
  transform:translate(-50%,16px);z-index:90;background:var(--ink);color:#fff;font-size:14px;
  font-weight:600;padding:12px 18px;border-radius:12px;max-width:calc(100vw - 32px);
  text-align:center;opacity:0;transition:opacity .18s,transform .18s;pointer-events:none;
  box-shadow:0 8px 28px rgba(42,36,32,.28)}
#toast.on{opacity:1;transform:translate(-50%,0)}
@media (max-width:860px){ #toast{bottom:calc(74px + env(safe-area-inset-bottom,0px))} }

.spin{display:inline-block;width:16px;height:16px;border:2px solid currentColor;
  border-right-color:transparent;border-radius:50%;animation:sp .7s linear infinite}
@keyframes sp{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){ .spin{animation-duration:2s} }
