@font-face { font-family: "Kangaroo Punch"; src: url("assets/kangaroo-punch-bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  --navy: #364878; --navy-2: #4A5D92; --cream: #E7E8CE; --sand: #E0D8AC; --paper: #FAFAF2;
  --orange: #EE5A37; --mustard: #E7BB36; --green: #4B593C;
  --red-text: #A8391B; --green-text: #3F4B32; --muted: #4B5A82; --line: #DADBC0; --card-line: #CFCFB0;
  --display: "Kangaroo Punch", Jost, sans-serif;
  /* Theme slots */
  --head-bg: var(--navy); --head-fg: var(--cream); --head-hover: var(--navy-2); --head-on-bg: var(--cream); --head-on-fg: var(--navy);
  --panel: var(--navy); --panel-2: var(--navy-2); --panel-fg: var(--cream); --panel-accent: var(--mustard); --panel-line: #6A7BA8;
  --scrim: rgba(54,72,120,.45);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--cream); color: var(--navy); font: 400 16px/1.5 Jost, "Futura", system-ui, sans-serif; }
a { color: var(--navy); } a:hover { color: var(--orange); }
h1, h2, h3 { font-family: var(--display); font-weight: 700; margin: 0; line-height: 1.05; }
h1 { font-size: clamp(38px, 6vw, 56px); }
h2 { font-size: 28px; }
h3 { font-size: 22px; }
button, input, select, textarea { font: inherit; color: inherit; }
.hidden { display: none !important; }

/* Header */
.top { background: var(--head-bg); padding: 14px 24px; }
.top-in { max-width: 1200px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.brand img { height: 30px; width: auto; display: block; }
.tag { font-weight: 700; font-size: 12px; letter-spacing: .08em; padding: 4px 10px; border-radius: 999px; background: var(--tag-bg, var(--mustard)); color: var(--tag-fg, var(--navy)); }
.logo-on-light { display: none !important; }
[data-header="light"] .logo-on-dark { display: none !important; }
[data-header="light"] .logo-on-light { display: block !important; }
.tag.admin { background: var(--orange); color: var(--paper); }
.nav { display: flex; flex-wrap: wrap; gap: 4px; }
.nav a { color: var(--head-fg); text-decoration: none; font-weight: 500; padding: 10px 14px; border-radius: 10px; }
.nav a:hover { background: var(--head-hover); color: var(--head-fg); }
.nav a.on { background: var(--head-on-bg); color: var(--head-on-fg); }
.who { display: flex; align-items: center; gap: 10px; color: var(--head-fg); font-size: 15px; flex-wrap: wrap; }
.who button { background: none; border: 1px solid var(--head-fg); color: var(--head-fg); border-radius: 8px; padding: 6px 10px; cursor: pointer; font-size: 14px; }
.pill { display: inline-block; padding: 6px 12px; border-radius: 999px; font-weight: 600; font-size: 14px; }
.pill.green { background: var(--green); color: var(--paper); }

main { max-width: 1200px; margin: 0 auto; padding: 36px 24px 72px; display: flex; flex-direction: column; gap: 26px; }
.row { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.grow { flex: 999 1 600px; min-width: 0; }
.side { flex: 1 1 320px; min-width: 0; }
.head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px; }
.lead { margin: 6px 0 0; font-size: 17px; }

/* Cards */
.card { background: var(--paper); border: 1.5px solid var(--card-line); border-radius: 20px; padding: 20px 22px; }
.card.dark { background: var(--panel); color: var(--panel-fg); border: none; }
.card.dark h2, .card.dark h3 { color: var(--panel-accent); }
.card.flush { padding-left: 0; padding-right: 0; }
.card.flush > h2, .card.flush > .pad { padding: 0 22px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.kpi { display: flex; flex-direction: column; gap: 4px; }
.kpi .lab { font-size: 14px; font-weight: 500; }
.kpi .num { font-family: var(--display); font-size: 38px; line-height: 1.1; }
.kpi .sub { font-size: 13px; }
.dark .num { color: var(--panel-accent); }
.sub, .muted { color: var(--muted); font-size: 13px; }
.dark .sub { color: var(--panel-fg); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 16px; border-radius: 12px; border: none; background: var(--navy); color: var(--cream); font-weight: 600; font-size: 15px; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--navy-2); color: var(--paper); }
.btn.big { min-height: 54px; font-size: 18px; border-radius: 14px; padding: 14px 20px; }
.btn.orange { background: var(--orange); color: var(--paper); }
.btn.orange:hover { background: #D94B29; }
.btn.green { background: var(--green); color: var(--paper); }
.btn.green:hover { background: #3C4830; }
.btn.ghost { background: var(--paper); color: var(--navy); border: 2px solid var(--navy); }
.btn.ghost:hover { background: var(--mustard); color: var(--navy); }
.btn.light { background: var(--cream); color: var(--navy); }
.btn.small { min-height: 36px; padding: 6px 12px; font-size: 14px; border-radius: 10px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.linkbtn { background: none; border: none; padding: 0; color: var(--navy); text-decoration: underline; cursor: pointer; font-weight: 600; }

/* Forms */
.fld { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }
.fld input, .fld select, .fld textarea, .inp { font-weight: 400; font-size: 16px; background: var(--paper); border: 1.5px solid var(--navy); border-radius: 10px; padding: 11px 13px; min-height: 46px; width: 100%; }
.fld textarea { min-height: 70px; resize: vertical; }
.fld .hint { font-weight: 400; color: var(--muted); font-size: 13px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 640px) { .grid2, .grid3 { grid-template-columns: minmax(0, 1fr); } }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip-check { display: flex; align-items: center; gap: 8px; border: 1.5px solid var(--navy); border-radius: 999px; padding: 8px 14px; font-size: 15px; cursor: pointer; background: var(--paper); }
fieldset { border: none; margin: 0; padding: 0; min-width: 0; }
legend { font-size: 14px; font-weight: 600; padding: 0; margin-bottom: 8px; }
.err { background: #F7D9CF; color: var(--red-text); border-radius: 12px; padding: 12px 14px; font-weight: 500; }
.ok { background: #DDE3CC; color: var(--green-text); border-radius: 12px; padding: 12px 14px; font-weight: 500; }
.note { background: var(--mustard); border-radius: 14px; padding: 14px 18px; }

/* Ordering */
.prod { background: var(--paper); border: 1.5px solid var(--card-line); border-radius: 20px; padding: 16px 20px; display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; }
.prod .nm { flex: 1 1 200px; min-width: 0; display: flex; align-items: center; gap: 14px; }
.bean { flex: none; width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center; }
.packs { display: flex; flex-wrap: wrap; gap: 20px; }
.pack { display: flex; flex-direction: column; gap: 6px; align-items: center; }
.pack .lab { font-size: 13px; font-weight: 600; }
.stepper { display: flex; align-items: center; gap: 8px; }
.step { width: 44px; height: 44px; border-radius: 12px; border: 1.5px solid var(--navy); background: var(--paper); font-size: 20px; font-weight: 600; cursor: pointer; }
.step:hover { background: var(--mustard); }
.qty { width: 34px; text-align: center; font-size: 20px; font-weight: 600; }
.line { flex: 0 0 110px; text-align: right; font-size: 19px; font-weight: 700; }
.grind { font-size: 14px; background: var(--cream); border: 1px solid var(--navy); border-radius: 8px; padding: 4px 6px; }
.sum-row { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.total-row { font-size: 22px; font-weight: 700; color: var(--panel-fg); }
.radio-card { display: flex; gap: 10px; align-items: flex-start; background: var(--panel-2); border-radius: 12px; padding: 12px; font-size: 15px; }
.divider { border-top: 1px solid var(--panel-line); }

/* Tables */
.tw { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 600px; }
.t th { text-align: left; font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; padding: 10px 12px; background: var(--sand); }
.t td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.t tfoot td { font-weight: 700; border-bottom: none; }
.n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.dr { color: var(--red-text); font-weight: 600; }
.cr { color: var(--green-text); font-weight: 600; }
.badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--sand); white-space: nowrap; }
.badge.warn { background: var(--orange); color: var(--paper); }
.badge.good { background: var(--green); color: var(--paper); }
.badge.info { background: var(--mustard); }
.list-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: none; }
.bar { height: 12px; background: var(--sand); border-radius: 999px; overflow: hidden; }
.bar > div { height: 12px; background: var(--orange); border-radius: 999px; }

/* Landing */
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.steps li { display: flex; gap: 16px; align-items: center; background: var(--sand); border-radius: 16px; padding: 14px 18px; font-size: 17px; }
.steps .dot { flex: none; width: 44px; height: 44px; border-radius: 999px; font-family: var(--display); font-size: 24px; display: flex; align-items: center; justify-content: center; }

/* Modal */
.modal-bg { position: fixed; inset: 0; background: var(--scrim); display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow-y: auto; z-index: 10; }
.modal { background: var(--paper); border-radius: 22px; padding: 24px; width: 100%; max-width: 520px; display: flex; flex-direction: column; gap: 14px; border: 2px solid var(--navy); }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--green); color: var(--paper); padding: 12px 18px; border-radius: 12px; font-weight: 600; z-index: 20; max-width: calc(100% - 32px); }
.loading { padding: 60px 0; text-align: center; color: var(--muted); }

/* Print: statement */
.print-only { display: none; }
@media print {
  body { background: #fff; }
  .top, .no-print, .btn, .modal-bg { display: none !important; }
  .print-only { display: block; }
  main { padding: 0; }
  .card { border: 1px solid #999; }
  table.t { min-width: 0; }
}
@media (max-width: 640px) { .line { flex: 1 1 100%; } }

/* ---------- Colour themes ---------- */
[data-theme="green"], [data-theme="sand"], [data-theme="mustard"] {
  --navy: #4B593C; --navy-2: #5E6E4C; --panel-line: #8A9878; --muted: #5A6450;
  --scrim: rgba(75,89,60,.45);
}
[data-theme="sand"] {
  --head-bg: #E0D8AC; --head-fg: #3F4B32; --head-hover: #D3CA96; --head-on-bg: #4B593C; --head-on-fg: #FAFAF2;
}
[data-theme="mustard"] {
  --head-bg: #E7BB36; --head-fg: #3F4B32; --head-hover: #D9AD2A; --head-on-bg: #3F4B32; --head-on-fg: #FAFAF2;
  --tag-bg: #3F4B32; --tag-fg: #FAFAF2;
}
