/* Premium Kitchens — one stylesheet, self-hosted, no framework.
   Designed mobile-first: the technician view is the one used in bad light, in a
   hot kitchen, with one hand. Targets are large; nothing important is a hover. */

:root {
  --ink:        #10242e;
  --ink-soft:   #4b6470;
  --line:       #d8e2e6;
  --bg:         #f4f7f8;
  --card:       #ffffff;
  --brand:      #12303f;
  --brand-ink:  #ffffff;
  --accent:     #0f7b6c;
  --warn:       #a8590a;
  --danger:     #a32020;
  --ok:         #1c7a44;
  --radius:     10px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ---------------------------------------------------------------- chrome */
header.top {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  background: var(--brand); color: var(--brand-ink);
  padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top));
}
header.top .brand { font-weight: 700; color: var(--brand-ink); text-decoration: none; font-size: 17px; }
header.top nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
header.top nav a {
  color: #cfe3ea; text-decoration: none; padding: 6px 10px; border-radius: 6px; font-size: 15px;
}
header.top nav a:hover, header.top nav a:focus { background: rgba(255,255,255,.14); color: #fff; }
header.top .who { font-size: 13px; color: #a9c6d1; }
header.top .who { display: inline-flex; align-items: baseline; gap: 8px; }
header.top .signout { display: inline; margin: 0; }
header.top .signout button {
  background: none; border: 0; color: #fff; padding: 0; margin: 0; min-height: 0;
  font: inherit; font-weight: 500; text-decoration: underline; cursor: pointer;
}

main { max-width: 1080px; margin: 0 auto; padding: 18px 16px 64px; }

/* Deliberately loud. This banner is the only thing standing between a prospect and
   believing they are looking at their own live records. */
#demobar {
  background: #4a2c7a; color: #fff; padding: 9px 16px; font-size: 14px;
  text-align: center; font-weight: 600; letter-spacing: .01em;
}

#demobar.contaminated { background: #96201f; }
#demobar code { background: rgba(255,255,255,.18); padding: 1px 5px; border-radius: 3px; }

#netbar {
  background: var(--warn); color: #fff; padding: 10px 16px; font-size: 15px; text-align: center;
}

/* ---------------------------------------------------------------- blocks */
h1 { font-size: 22px; margin: 4px 0 16px; }
h2 { font-size: 18px; margin: 26px 0 10px; }
h3 { font-size: 15px; margin: 18px 0 8px; color: var(--ink-soft); text-transform: uppercase;
     letter-spacing: .04em; }
p  { margin: 8px 0; }
a  { color: var(--accent); }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; margin-bottom: 16px;
}
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
        padding: 14px 16px; }
.stat b { display: block; font-size: 30px; line-height: 1.1; }
.stat span { color: var(--ink-soft); font-size: 14px; }

table { width: 100%; border-collapse: collapse; background: var(--card); }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line);
         font-size: 15px; vertical-align: top; }
th { color: var(--ink-soft); font-size: 13px; text-transform: uppercase; letter-spacing: .03em; }
tr:last-child td { border-bottom: 0; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }

.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px;
        font-weight: 600; border: 1px solid transparent; white-space: nowrap; }
.pill.new         { background: #e8eef1; color: #43606d; }
.pill.assigned    { background: #e4eefb; color: #1d4f86; }
.pill.in_progress { background: #fdf0da; color: var(--warn); }
.pill.awaiting_otp{ background: #f6e5f7; color: #7a2384; }
.pill.completed   { background: #e2f3e8; color: var(--ok); }
.pill.cancelled   { background: #eee; color: #666; }
.pill.warranty    { background: #e2f3e8; color: var(--ok); }
.pill.billable    { background: #fdeaea; color: var(--danger); }
.pill.claim       { background: #e4eefb; color: #1d4f86; border-color: #b9d0ea; }
.pill.inhouse     { background: #eaf1f4; color: var(--brand); }

/* ---------------------------------------------------------------- forms */
label { display: block; font-size: 13px; color: var(--ink-soft); margin: 10px 0 4px;
        font-weight: 600; }
input, select, textarea {
  width: 100%; padding: 11px 12px; font-size: 16px;   /* 16px: iOS zooms below this */
  border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink);
  font-family: inherit;
}
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent);
}
.row { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

button, .btn {
  display: inline-block; padding: 12px 18px; font-size: 16px; font-weight: 600;
  border: 0; border-radius: 8px; background: var(--brand); color: #fff;
  cursor: pointer; text-decoration: none; margin-top: 12px; min-height: 46px;
}
button.secondary, .btn.secondary { background: #e7edef; color: var(--ink); }
button.go, .btn.go { background: var(--accent); }
button.danger { background: var(--danger); }
button:disabled { opacity: .5; cursor: not-allowed; }

.err  { background: #fdeaea; border: 1px solid #f0bcbc; color: var(--danger);
        padding: 11px 14px; border-radius: 8px; margin: 12px 0; }
.note { background: #eef4f6; border: 1px solid var(--line); color: var(--ink-soft);
        padding: 11px 14px; border-radius: 8px; margin: 12px 0; font-size: 14px; }
.muted { color: var(--ink-soft); font-size: 14px; }

/* ---------------------------------------------------------------- login */
.login-wrap { max-width: 380px; margin: 8vh auto; }
.login-wrap h1 { text-align: center; }

/* ---------------------------------------------------------------- tech */
.jobcard {
  background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--brand);
  border-radius: var(--radius); padding: 14px 16px; margin-bottom: 14px;
  display: block; text-decoration: none; color: inherit;
}
.jobcard.in_progress { border-left-color: var(--warn); }
.jobcard.awaiting_otp { border-left-color: #7a2384; }
.jobcard .ref { font-size: 13px; color: var(--ink-soft); }
.jobcard .cust { font-weight: 700; font-size: 17px; margin: 2px 0; }
.jobcard .meta { font-size: 14px; color: var(--ink-soft); }

.rec { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin-bottom: 8px;
       background: #fbfdfd; }
.rec .why { font-size: 13px; color: var(--ink-soft); }
.rec .score { float: right; font-weight: 700; }

.otp { font-size: 30px; letter-spacing: .3em; text-align: center; font-weight: 700;
       font-variant-numeric: tabular-nums; }

.totals td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.totals tr.grand td { font-weight: 700; font-size: 17px; }

.queued { font-size: 13px; color: var(--warn); font-weight: 600; }

@media (max-width: 560px) {
  header.top nav a { padding: 6px 8px; font-size: 14px; }
  main { padding: 14px 12px 72px; }
  th, td { padding: 9px 8px; font-size: 14px; }
}
