/* CWS — Worcester Screenprinters. Clean uniform-shop look: navy, chalk white, a warm accent. */
:root {
  --bg: #f6f4ef; --paper: #ffffff; --line: #e3dfd6; --line2: #cfc9bd;
  --ink: #15213a; --muted: #5d6578; --dim: #8b92a3;
  --navy: #1b3f8a; --navy2: #15306b; --navy-soft: #e8eefb;
  --gold: #e0a319; --gold-soft: #fff4d6; --green: #1f8a4c; --green-soft: #e3f5ea; --red: #c0272d; --red-soft: #fde5e6;
  --r: 16px; --r2: 10px; --shadow: 0 8px 24px rgba(21,33,58,.10);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.45; min-height: 100dvh; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: var(--navy); text-decoration: none; }
h1, h2, h3 { margin: 0; font-weight: 800; letter-spacing: -.01em; }
h1 { font-size: 28px; } h2 { font-size: 20px; } h3 { font-size: 16px; }
.muted { color: var(--muted); } .dim { color: var(--dim); } .small { font-size: 13px; } .tiny { font-size: 12px; }
.row { display: flex; align-items: center; gap: 10px; } .grow { flex: 1; min-width: 0; } .wrapw { flex-wrap: wrap; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.hide { display: none !important; }
.right { text-align: right; } .center { text-align: center; }
.mt { margin-top: 14px; } .mb { margin-bottom: 14px; }

/* header */
.bar { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 50; box-shadow: 0 2px 10px rgba(0,0,0,.15); }
.bar .wrap { display: flex; align-items: center; gap: 12px; min-height: 58px; }
.bar .brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; }
.bar .brand .mark { width: 34px; height: 34px; border-radius: 9px; background: var(--gold); color: var(--navy2); display: grid; place-items: center; font-weight: 900; font-size: 13px; letter-spacing: .02em; }
.bar nav { display: flex; gap: 4px; margin-left: auto; overflow: auto; }
.bar nav a { color: rgba(255,255,255,.85); padding: 8px 10px; border-radius: 8px; font-weight: 600; font-size: 14px; white-space: nowrap; }
.bar nav a.on, .bar nav a:hover { background: rgba(255,255,255,.14); color: #fff; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 16px; border-radius: 999px; background: #fff;
  color: var(--ink); font-weight: 700; border: 1px solid var(--line2); transition: transform .08s, background .15s; font-size: 15px; }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--navy); color: #fff; border-color: transparent; box-shadow: 0 6px 16px rgba(27,63,138,.25); }
.btn.gold { background: var(--gold); color: var(--navy2); border-color: transparent; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--navy); }
.btn.ok { background: var(--green-soft); border-color: #b9e4c8; color: var(--green); }
.btn.danger { background: var(--red-soft); border-color: #f3bfc2; color: var(--red); }
.btn.big { padding: 15px 22px; font-size: 17px; width: 100%; }
.btn.sm { padding: 7px 12px; font-size: 13px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700;
  background: var(--navy-soft); color: var(--navy); }
.pill.gold { background: var(--gold-soft); color: #8a6100; } .pill.green { background: var(--green-soft); color: var(--green); }
.pill.red { background: var(--red-soft); color: var(--red); } .pill.grey { background: #eceae4; color: var(--muted); }

/* inputs */
.field { display: block; margin: 0 0 12px; }
.field > span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 5px; font-weight: 700; }
.input, .select, .textarea { width: 100%; padding: 11px 13px; border-radius: var(--r2); background: #fff; border: 1px solid var(--line2); color: var(--ink); outline: none; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--navy); box-shadow: 0 0 0 3px var(--navy-soft); }
.textarea { min-height: 70px; resize: vertical; }
.seg { display: flex; background: #fff; border: 1px solid var(--line2); border-radius: 999px; padding: 3px; }
.seg button { flex: 1; padding: 9px 10px; border-radius: 999px; font-weight: 700; color: var(--muted); font-size: 14px; }
.seg button.on { background: var(--navy); color: #fff; }
.chips { display: flex; gap: 8px; overflow: auto; padding: 4px 0 8px; scrollbar-width: none; }
.chip { flex: none; padding: 8px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line2); color: var(--muted); font-weight: 700; font-size: 14px; white-space: nowrap; }
.chip.on { background: var(--navy); color: #fff; border-color: var(--navy); }

/* cards */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; }
.card.pad0 { padding: 0; overflow: hidden; }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.grid.wide { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.list > * + * { border-top: 1px solid var(--line); }
.notice { background: var(--gold-soft); border: 1px solid #f1dc9c; color: #6b4b00; border-radius: var(--r2); padding: 10px 12px; font-size: 14px; }
.notice.blue { background: var(--navy-soft); border-color: #c7d6f4; color: var(--navy2); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); background: var(--ink); color: #fff; padding: 12px 18px;
  border-radius: 999px; font-weight: 600; opacity: 0; transition: .2s; z-index: 200; pointer-events: none; max-width: 92vw; text-align: center; box-shadow: var(--shadow); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.bad { background: var(--red); }

/* sheet */
.scrim { position: fixed; inset: 0; background: rgba(21,33,58,.45); opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 90; }
.scrim.show { opacity: 1; pointer-events: auto; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; max-height: 92dvh; background: #fff; border-radius: 22px 22px 0 0;
  transform: translateY(105%); transition: transform .25s cubic-bezier(.2,.8,.2,1); z-index: 100; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 -10px 40px rgba(0,0,0,.2); }
.sheet.show { transform: translateY(0); }
.sheet .head { padding: 14px 16px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.sheet .body { padding: 14px 16px; overflow: auto; }
.sheet .foot { padding: 12px 16px; border-top: 1px solid var(--line); background: #fafaf7; }
@media (min-width: 720px) { .sheet { left: 50%; right: auto; width: 560px; transform: translate(-50%, 105%); border-radius: 22px 22px 0 0; } .sheet.show { transform: translate(-50%, 0); } }

/* school tiles */
.hero { padding: 28px 0 18px; }
.hero h1 { font-size: 30px; } @media (min-width: 720px) { .hero h1 { font-size: 40px; } }
.tile { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 10px 14px; text-align: center; background: #fff; border: 1px solid var(--line);
  border-radius: var(--r); color: var(--ink); transition: transform .1s, box-shadow .15s; position: relative; }
.tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.tile .badge { width: 86px; height: 86px; display: grid; place-items: center; }
.tile .badge img { max-height: 86px; max-width: 86px; object-fit: contain; }
.tile .initials { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 900; font-size: 22px; }
.tile .name { font-weight: 800; font-size: 14px; line-height: 1.25; }
.tile.soon { opacity: .75; }

/* product cards */
.prod { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.prod .ph { aspect-ratio: 4/5; background: #ededea; display: grid; place-items: center; color: var(--dim); font-size: 13px; }
.prod .ph img { width: 100%; height: 100%; object-fit: cover; }
.prod .info { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 6px; }
.prod .price { font-weight: 800; }
.sizes { display: flex; flex-wrap: wrap; gap: 6px; }
.size { padding: 5px 9px; border-radius: 8px; border: 1px solid var(--line2); background: #fff; font-size: 13px; font-weight: 700; position: relative; }
.size.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.size.out { opacity: .4; text-decoration: line-through; }
.size .dot { position: absolute; top: -4px; right: -4px; width: 9px; height: 9px; border-radius: 50%; border: 2px solid #fff; }
.dot.in { background: var(--green); } .dot.low { background: var(--gold); } .dot.out { background: var(--red); }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); align-items: center; }
.legend .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 4px; }

/* fab / cart */
.fab { position: fixed; right: 16px; bottom: 16px; z-index: 60; box-shadow: 0 10px 26px rgba(27,63,138,.35); }

/* tables */
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { padding: 8px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.cell { min-width: 44px; height: 36px; border-radius: 8px; border: 1px solid var(--line2); background: #fff; font-weight: 700; text-align: center; }
.cell.low { background: var(--gold-soft); border-color: #f1dc9c; } .cell.out { background: var(--red-soft); border-color: #f3bfc2; color: var(--red); }

/* progress */
.steps { display: flex; gap: 4px; }
.steps span { flex: 1; height: 8px; border-radius: 4px; background: #e7e4dc; }
.steps span.done { background: var(--green); } .steps span.now { background: var(--navy); }

/* login */
.login { max-width: 360px; margin: 48px auto; }
.pin { font-size: 28px; letter-spacing: .4em; text-align: center; }

/* two-column layouts on desktop */
.cols { display: grid; gap: 16px; }
@media (min-width: 900px) { .cols { grid-template-columns: 1fr 380px; align-items: start; } .cols.rev { grid-template-columns: 360px 1fr; } .sticky { position: sticky; top: 72px; } }
footer { padding: 30px 0; color: var(--dim); font-size: 13px; }
