/* NDEVIO warehouse kiosk — change these to match brand guidelines */
:root {
  /* Matches the NDEVIO CEO Dashboard */
  --brand: #0b1526;        /* dashboard sidebar navy */
  --brand-2: #1e3a5f;      /* dashboard active-nav */
  --accent: #0284c7;       /* dashboard accent */
  --accent-dark: #0369a1;
  --sky: #38bdf8;          /* logo N */
  --ok: #16a34a;
  --warn: #ea580c;
  --bad: #dc2626;
  --bg: #f3f5f9;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15,23,42,.06), 0 1px 8px rgba(15,23,42,.04);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); }
body { display: flex; flex-direction: column; -webkit-tap-highlight-color: transparent; }
button, input, select, textarea { font: inherit; color: inherit; }

.topbar {
  background: var(--brand); color: #cbd5e1;
  display: flex; align-items: center; gap: 18px; padding: 12px 28px; flex: none;
}
.brand { display: flex; gap: 12px; align-items: center; }
.brand img { width: 40px; height: 40px; border-radius: 10px; }
.brand strong { display: block; color: #fff; letter-spacing: .04em; font-size: 18px; }
.brand span { font-size: 13px; opacity: .7; }
.topbar .spacer { flex: 1; }
.topbar .clock { font-variant-numeric: tabular-nums; opacity: .85; }
.topbar a { color: #fff; opacity: .7; text-decoration: none; font-size: 14px; }

main { flex: 1; overflow: auto; padding: 28px; }
.wrap { max-width: 1100px; margin: 0 auto; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); padding: 28px; }
h1 { font-size: 30px; margin: 0 0 6px; }
h2 { font-size: 22px; margin: 0 0 14px; }
.sub { color: var(--muted); margin: 0 0 22px; font-size: 17px; }
.muted { color: var(--muted); }
.hidden { display: none !important; }

.btn {
  border: 0; border-radius: 12px; padding: 16px 26px; font-size: 18px; font-weight: 600; cursor: pointer;
  background: var(--accent); color: #fff; transition: background .15s, transform .05s;
}
.btn:hover { background: var(--accent-dark); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--text); border: 2px solid var(--line); }
.btn.ghost:hover { background: #f8fafc; }
.btn.ok { background: var(--ok); }
.btn.ok:hover { background: #15803d; }
.btn.danger { background: var(--bad); }
.btn.sm { padding: 8px 14px; font-size: 14px; border-radius: 9px; }
.btn.lg { padding: 22px 34px; font-size: 22px; }

.input {
  width: 100%; border: 2px solid var(--line); border-radius: 12px; padding: 16px 18px; font-size: 20px; background: #fff;
}
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(2,132,199,.15); }
.input.huge { font-size: 40px; text-align: center; letter-spacing: 3px; font-weight: 700; padding: 18px; }
label.f { display: block; font-size: 14px; color: var(--muted); margin: 12px 0 6px; font-weight: 600; }

.row { display: flex; gap: 14px; align-items: center; }
.row.flexwrap { flex-wrap: wrap; }
.grow { flex: 1; }

.steps { display: flex; gap: 10px; margin-bottom: 22px; }
.steps div { flex: 1; height: 6px; border-radius: 3px; background: #cbd5e1; }
.steps div.on { background: var(--accent); }

.project-card { border: 2px solid var(--ok); background: #f0fdf4; border-radius: 12px; padding: 18px 20px; margin-top: 18px; }
.project-card .num { font-size: 14px; font-weight: 700; color: var(--ok); letter-spacing: 1px; }
.project-card .name { font-size: 24px; font-weight: 700; margin: 4px 0; }
.error { color: var(--bad); font-weight: 600; margin-top: 12px; min-height: 24px; }

.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.people button {
  border: 2px solid var(--line); background: #fff; border-radius: 14px; padding: 22px 14px; font-size: 20px; font-weight: 600; cursor: pointer;
}
.people button:hover { border-color: var(--accent); background: #f0f9ff; }

.jobbar { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.pill { background: #e2e8f0; border-radius: 999px; padding: 8px 16px; font-weight: 600; font-size: 15px; }
.mode { display: inline-flex; background: #e2e8f0; border-radius: 12px; padding: 4px; }
.mode button { border: 0; background: transparent; padding: 10px 18px; border-radius: 9px; font-weight: 700; cursor: pointer; font-size: 16px; }
.mode button.on { background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.mode button.on.ret { color: var(--warn); }

.scanbox { display: flex; align-items: center; gap: 14px; border: 3px dashed var(--accent); border-radius: 14px; padding: 14px 18px; background: #f0f9ff; }
.scanbox.ret { border-color: var(--warn); background: #fff7ed; }
.scanbox .icon { font-size: 34px; }
.scanbox input { border: 0; background: transparent; font-size: 24px; flex: 1; outline: none; }
.flash { padding: 10px 14px; border-radius: 10px; margin: 12px 0 0; font-weight: 600; }
.flash.ok { background: #dcfce7; color: #166534; }
.flash.bad { background: #fee2e2; color: #991b1b; }

table.cart { width: 100%; border-collapse: collapse; margin-top: 18px; font-size: 17px; }
table.cart th { text-align: left; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; padding: 8px 10px; border-bottom: 2px solid var(--line); }
table.cart td { padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.cart .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.cart .sku { font-family: ui-monospace, Menlo, monospace; font-size: 14px; color: var(--muted); }
.qty { display: inline-flex; align-items: center; gap: 6px; }
.qty button { width: 42px; height: 42px; border-radius: 10px; border: 2px solid var(--line); background: #fff; font-size: 22px; font-weight: 700; cursor: pointer; }
.qty input { width: 90px; text-align: center; border: 2px solid var(--line); border-radius: 10px; padding: 8px; font-size: 18px; }
.x { border: 0; background: transparent; color: var(--bad); font-size: 22px; cursor: pointer; padding: 6px 10px; }
.empty { text-align: center; color: var(--muted); padding: 40px 0 26px; font-size: 18px; }
.totalbar { display: flex; justify-content: space-between; align-items: center; margin-top: 20px; gap: 16px; flex-wrap: wrap; }
.total { font-size: 26px; font-weight: 800; }
.stock-low { color: var(--warn); font-size: 13px; font-weight: 600; }

.modal-bg { position: fixed; inset: 0; background: rgba(15,23,42,.55); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 20px; }
.modal { background: #fff; border-radius: 18px; padding: 28px; width: min(560px, 100%); max-height: 90vh; overflow: auto; }
.modal h2 { margin-bottom: 6px; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.keypad button { padding: 18px; font-size: 24px; font-weight: 700; border-radius: 12px; border: 2px solid var(--line); background: #f8fafc; cursor: pointer; }
.results { list-style: none; padding: 0; margin: 12px 0 0; max-height: 50vh; overflow: auto; }
.results li { padding: 14px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; cursor: pointer; display: flex; justify-content: space-between; gap: 10px; }
.results li:hover { background: #f0f9ff; border-color: var(--accent); }

.done { text-align: center; padding: 30px 10px; }
.done .check { font-size: 72px; color: var(--ok); line-height: 1; }

/* ---------- manager page ---------- */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.tabs button { border: 0; background: #e2e8f0; padding: 11px 18px; border-radius: 10px; font-weight: 600; cursor: pointer; font-size: 15px; }
.tabs button.on { background: var(--brand-2); color: #fff; }
table.grid { width: 100%; border-collapse: collapse; font-size: 14px; background: #fff; }
table.grid th { text-align: left; background: #f8fafc; padding: 10px; border-bottom: 2px solid var(--line); font-size: 12px; text-transform: uppercase; color: var(--muted); position: sticky; top: 0; }
table.grid td { padding: 9px 10px; border-bottom: 1px solid var(--line); }
table.grid td.num, table.grid th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.grid tr.low td { background: #fff7ed; }
table.grid tr.inactive td { color: #94a3b8; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.badge.sent { background: #dcfce7; color: #166534; }
.badge.failed { background: #fee2e2; color: #991b1b; }
.badge.pending, .badge.skipped { background: #fef3c7; color: #92400e; }
.badge.return { background: #fef3c7; color: #92400e; }
.badge.checkout { background: #dbeafe; color: #1e40af; }
.formgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0 14px; }
.formgrid .input, .admin .input { font-size: 16px; padding: 10px 12px; }
details.lines summary { cursor: pointer; color: var(--accent); }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--brand); color: #fff; padding: 14px 22px; border-radius: 12px; z-index: 60; font-weight: 600; }
