/* Equipment Book — mobile-first, gloves-on sizing.
   Every tappable thing is at least 48px tall. Big type, high contrast. */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 18px; line-height: 1.45; color: #14202b; background: #f4f6f8;
}
main { max-width: 720px; margin: 0 auto; padding: 16px 14px 48px; }
h1 { font-size: 28px; margin: 10px 0 8px; }
h2 { font-size: 21px; margin: 26px 0 10px; }
a { color: #0b5cad; }
.muted { color: #5a6b7a; font-size: 16px; }
.sub { color: #5a6b7a; }
.center { text-align: center; }
.error { background: #fde8e8; border: 1px solid #e5a3a3; color: #8c1d1d; padding: 12px; border-radius: 10px; }
.flag { color: #b00020; font-weight: 700; }
.ready { color: #0a7a33; font-weight: 700; }
.big-text { font-size: 22px; }
.locmsg { margin: 2px 0 8px; }

/* header: shop name at the very top, one nav row underneath — icon +
   visible text label on every item (Phase 6). Sticky, so the row
   never moves — position teaches meaning. */
.topnav {
  background: #14202b; position: sticky; top: 0; z-index: 500;
  padding-top: env(safe-area-inset-top);
}
.shopbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px 0;
}
.shopname { color: #fff; font-size: 21px; font-weight: 800; }
.logoutbtn { color: #9fb4c6; font-size: 15px; padding: 10px 4px; min-height: 44px; }
.iconnav { display: flex; gap: 2px; padding: 4px 6px 8px; }
.iconnav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; min-height: 56px; padding: 5px 2px 6px; line-height: 1.15; text-decoration: none;
  color: #fff; border-radius: 10px;
}
.iconnav .navicon { font-size: 24px; line-height: 1; }
.iconnav .navlabel { font-size: 13px; font-weight: 700; letter-spacing: .01em; white-space: nowrap; }
.iconnav a:active { background: #2a3d4f; }
.iconnav a.active { background: #2a3d4f; box-shadow: inset 0 -3px 0 #f5a623; }
.inline { display: inline; }
.linkbtn { background: none; border: none; cursor: pointer; font: inherit; }

/* cards, forms, buttons */
.card {
  background: #fff; border: 1px solid #d8e0e7; border-radius: 12px;
  padding: 16px; margin: 14px 0;
}
label { display: block; font-weight: 600; margin: 12px 0; font-size: 16px; }
input, select, textarea {
  display: block; width: 100%; min-height: 52px; margin-top: 6px;
  font-size: 18px; padding: 10px 12px; border: 1.5px solid #9fb0bf; border-radius: 10px;
  background: #fff; color: #14202b; font-weight: 400;
}
input[type="checkbox"] { width: 30px; height: 30px; min-height: 30px; flex: none; }
button.big, a.btn, a.big, label.big {
  display: block; width: 100%; min-height: 56px; margin: 14px 0;
  font-size: 19px; font-weight: 700; border-radius: 12px; cursor: pointer;
  border: 1.5px solid #9fb0bf; background: #fff; color: #14202b;
  text-align: center; text-decoration: none; padding: 14px 12px;
}
button.primary, a.btn.primary { background: #0b5cad; border-color: #0b5cad; color: #fff; }
a.btn { display: inline-block; width: auto; min-width: 44%; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }

/* rows (big tappable list items) */
.row {
  display: flex; align-items: center; gap: 10px; background: #fff;
  border: 1px solid #d8e0e7; border-radius: 12px; padding: 14px;
  margin: 10px 0; text-decoration: none; color: inherit; min-height: 64px;
}
.row span:first-child { flex: 1; }
.chev { font-size: 26px; color: #9fb0bf; }
/* completed parts: muted but still fully legible and tappable */
.row.done { opacity: .62; background: #eef2f5; }
/* status changer on the part page: current status clearly marked */
button.big.current { background: #e2efe4; border-color: #2e7d32; color: #1c4d21; }
.checkrow { cursor: pointer; }
.crumb { margin: 4px 0 10px; }
.crumb a {
  display: inline-flex; align-items: center; min-height: 48px; padding: 8px 16px;
  background: #fff; border: 1.5px solid #9fb0bf; border-radius: 10px;
  text-decoration: none; font-weight: 700; font-size: 17px; color: #14202b;
}
a.big.backbtn { text-align: left; }

/* home tiles */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0; }
.tile {
  background: #fff; border: 1px solid #d8e0e7; border-radius: 12px;
  padding: 18px 12px; text-align: center; text-decoration: none; color: inherit;
  display: flex; flex-direction: column; gap: 4px; min-height: 96px; justify-content: center;
}
.tilenum { font-size: 32px; font-weight: 800; color: #0b5cad; }
.searchbar { display: flex; gap: 8px; margin: 14px 0; }
.searchbar input { flex: 1; margin-top: 0; }
.searchbar button {
  min-height: 52px; min-width: 96px; font-size: 18px; font-weight: 700;
  border-radius: 10px; border: 1.5px solid #0b5cad; background: #0b5cad; color: #fff; cursor: pointer;
}

/* tables (load sheet) */
table { width: 100%; border-collapse: collapse; background: #fff; margin: 10px 0; }
th, td { border: 1px solid #c9d4de; padding: 10px; text-align: left; font-size: 17px; }
th { background: #eef3f7; }
ul.plain { list-style: none; padding: 0; }
ul.plain li { background: #fff; border: 1px solid #d8e0e7; border-radius: 10px; padding: 12px; margin: 8px 0; }

/* photos */
.photogrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0; }
.photogrid a { text-decoration: none; color: inherit; }
.photogrid img { width: 100%; height: 150px; object-fit: cover; border-radius: 10px; border: 1px solid #c9d4de; display: block; }
.photocat { font-size: 14px; color: #5a6b7a; display: block; padding-top: 4px; }

/* map */
#map { height: 62vh; min-height: 340px; border-radius: 12px; border: 1px solid #c9d4de; z-index: 1; }
.leaflet-tooltip { font-size: 15px; font-weight: 700; }
.mapnote { background: #fff7e0; border: 1px solid #e0cf8f; color: #6b5b12; padding: 12px; border-radius: 10px; }

/* "you seem to be at" card (home) */
.nearbycard {
  position: relative; background: #e9f6ec; border: 2px solid #0a7a33;
  border-radius: 12px; padding: 16px; margin: 14px 0;
}
.nearbytext { font-size: 19px; margin: 4px 30px 10px 0; }
.nearbyx {
  position: absolute; top: 4px; right: 4px; width: 48px; height: 48px;
  font-size: 28px; line-height: 1; background: none; border: none; cursor: pointer; color: #33503a;
}
a.btn.block { display: block; width: 100%; }

/* directions chooser */
.dirlinks { margin: 2px 0 10px; }
.dirlast { color: #0a7a33; font-weight: 700; font-size: 15px; }

@media print {
  .topnav, .noprint, .crumb { display: none !important; }
  body { background: #fff; font-size: 14px; }
  main { max-width: none; }
}

/* next-service-due strip (home) */
.nextdue {
  display: block; background: #fff; border: 2px solid #f0ad4e; border-left: 10px solid #f0ad4e;
  border-radius: 12px; padding: 14px 16px; margin: 14px 0; text-decoration: none; color: inherit;
}
.nextdue.od { border-color: #d32f2f; border-left-color: #d32f2f; background: #fdf0f0; }
.nextduelabel { display: block; font-size: 14px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #8a6d1a; }
.nextdue.od .nextduelabel { color: #b00020; }
.nextduemain { display: block; font-size: 21px; margin: 4px 0 2px; }
.nextduesub { display: block; color: #5a6b7a; font-size: 16px; }

/* home calendar */
.calbar { display: flex; align-items: center; justify-content: space-between; margin: 22px 0 8px; }
.caltitle { font-size: 20px; font-weight: 800; }
.calnav {
  display: flex; align-items: center; justify-content: center; width: 52px; height: 52px;
  font-size: 30px; text-decoration: none; background: #fff; border: 1.5px solid #9fb0bf;
  border-radius: 10px; color: #14202b;
}
.calgrid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.calhead { text-align: center; font-size: 13px; font-weight: 700; color: #5a6b7a; padding: 4px 0; }
.calcell {
  background: #fff; border: 1px solid #d8e0e7; border-radius: 8px; min-height: 52px;
  padding: 4px; text-decoration: none; color: inherit; display: flex; flex-direction: column;
}
.calcell.empty { background: transparent; border: none; }
.calcell.today { border: 2px solid #0b5cad; }
.calcell.sel { background: #e3f0fa; border-color: #0b5cad; }
.calnum { font-size: 15px; font-weight: 700; }
.dots { display: flex; gap: 3px; flex-wrap: wrap; margin-top: 3px; align-items: center; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.dot.red { background: #d32f2f; }
.dot.amber { background: #f59e0b; }
.dot.green { background: #2e7d32; }
.dotmore { font-size: 11px; color: #5a6b7a; }
.callegend { font-size: 14px; color: #5a6b7a; display: flex; gap: 5px; align-items: center; flex-wrap: wrap; margin: 8px 0 0; }
.row span.chip { flex: none; }
.chip { width: 16px; height: 16px; border-radius: 5px; }
.chip.red { background: #d32f2f; }
.chip.amber { background: #f59e0b; }
.chip.green { background: #2e7d32; }

/* home week strip */
.calgrid.week .calcell { min-height: 68px; }
.wkdow { font-size: 12px; font-weight: 700; color: #5a6b7a; text-transform: uppercase; letter-spacing: .04em; }

/* due-date timeframe chips */
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 2px 0 10px; }
.chipbtn {
  min-height: 48px; padding: 10px 18px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid #0b5cad; background: #eef4fa; color: #0b5cad;
  font-size: 17px; font-weight: 700;
}

/* service-type badge */
.typebadge {
  display: inline-block; background: #e2efe4; color: #1c4d21; border: 1px solid #2e7d32;
  border-radius: 999px; padding: 1px 10px; font-size: 14px; font-weight: 700;
}

/* photo picker: visually-hidden inputs behind two big label buttons */
.vh { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
label.big.photobtn { text-align: center; cursor: pointer; }

/* customers search-first */
.custsearch { margin-top: 4px; }
.custsearch input { min-height: 56px; font-size: 19px; }

/* v2: jobs (blue), success box, hub toggle, low-stock strip */
.dot.blue { background: #1565c0; }
.chip.blue { background: #1565c0; }
.success { background: #e9f6ec; border: 1px solid #7fc48d; color: #14532d; padding: 12px; border-radius: 10px; }
.hubtoggle { display: flex; gap: 8px; margin: 12px 0 4px; }
.hubbtn {
  flex: 1; display: flex; align-items: center; justify-content: center; min-height: 56px;
  font-size: 18px; font-weight: 700; text-decoration: none; color: #14202b;
  background: #fff; border: 1.5px solid #9fb0bf; border-radius: 12px; padding: 10px 6px; text-align: center;
}
.hubbtn.active { background: #14202b; color: #fff; border-color: #14202b; }

/* Team page section links (Phase 6): the page holds team members,
   invites, and my account — each says its name, in words. */
.subnav { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 4px; }
.subnav a {
  display: inline-flex; align-items: center; min-height: 48px; padding: 8px 14px;
  font-size: 16px; font-weight: 700; text-decoration: none; color: #14202b;
  background: #fff; border: 1.5px solid #9fb0bf; border-radius: 999px;
}
.lowstrip {
  display: block; background: #fdf0f0; border: 2px solid #d32f2f; border-radius: 12px;
  padding: 14px 16px; margin: 14px 0; text-decoration: none; color: #8c1d1d; font-weight: 700; font-size: 18px;
}

/* due rows with a Remind text button beside the checkbox row */
.duerow { display: flex; gap: 8px; align-items: stretch; margin: 10px 0; }
.duerow .row { flex: 1; margin: 0; }
a.btn.remindbtn { min-width: 0; width: auto; display: flex; align-items: center; margin: 0; }

/* nameplate scan review card (unit page) */
.scancard {
  background: #eef4fa; border: 2px solid #0b5cad; border-radius: 12px;
  padding: 16px; margin: 14px 0;
}
.scancard form.inline { display: inline-block; margin-right: 8px; }

/* job checklist */
.checkline {
  display: flex; align-items: center; gap: 12px; background: #f7fafc;
  border: 1px solid #d8e0e7; border-radius: 10px; padding: 12px; margin: 8px 0;
  font-size: 18px; cursor: pointer;
}
.checkline input[type="checkbox"] { flex: none; }

/* inventory quantity controls */
.qtyctrl { display: flex; align-items: center; gap: 8px; flex: none; }
.qtyctrl form { margin: 0; }
.qtybtn {
  width: 52px; height: 52px; font-size: 28px; font-weight: 800; line-height: 1;
  border-radius: 12px; border: 1.5px solid #0b5cad; background: #eef4fa; color: #0b5cad; cursor: pointer;
}
.qtybtn.big { width: 72px; height: 72px; font-size: 40px; }
.qtynum { font-size: 24px; font-weight: 800; min-width: 40px; text-align: center; }
.qtynum.low { color: #b00020; }
.qtynum.xl { font-size: 44px; }
.qtybig { display: flex; align-items: center; justify-content: center; gap: 22px; }
.qtybig form { margin: 0; }
.invrow { gap: 12px; }

/* team page bits */
.memberactions { display: flex; gap: 8px; flex-wrap: wrap; }
.memberactions form { margin: 0; }
.smallbtn {
  min-height: 48px; padding: 10px 14px; font-size: 16px; font-weight: 700; cursor: pointer;
  border-radius: 10px; border: 1.5px solid #9fb0bf; background: #fff; color: #14202b;
}
.dangertext { color: #b00020; }
button.big.dangerbtn { border-color: #d32f2f; color: #b00020; }
.linkrow { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 10px 0; }
.linkrow input { flex: 1; min-width: 220px; margin-top: 0; font-size: 14px; }
.linkrow form { margin: 0; }

/* 2FA */
.qrimg { width: 240px; height: 240px; }
.secretkey {
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 19px; letter-spacing: 2px;
  background: #f4f6f8; border: 1px dashed #9fb0bf; border-radius: 10px; padding: 12px; text-align: center; word-break: break-all;
}
.codesbox { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; text-align: center; }
.codesbox span {
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 20px; font-weight: 700;
  background: #f4f6f8; border: 1px solid #d8e0e7; border-radius: 8px; padding: 10px 4px;
}

/* manuals */
.docrow p { margin: 6px 0; }
.attachrow { display: flex; gap: 8px; align-items: center; margin: 8px 0; }
.attachrow select { margin-top: 0; flex: 1; }
.attachrow .pickwrap { flex: 1; }

/* v3: searchable pickers (customers & equipment at scale) */
.pickwrap { position: relative; }
.picklist {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 600;
  background: #fff; border: 1.5px solid #9fb0bf; border-radius: 12px;
  box-shadow: 0 10px 28px rgba(20, 32, 43, .22); margin-top: 4px;
  max-height: 320px; overflow-y: auto; padding: 6px;
}
.pickopt {
  display: block; width: 100%; text-align: left; background: #fff; cursor: pointer;
  border: none; border-bottom: 1px solid #e4ebf0; padding: 13px 12px;
  font-size: 18px; color: #14202b; min-height: 52px;
}
.pickopt:last-child { border-bottom: none; }
.pickopt:active { background: #eef4fa; }
.pickopt.addnew { color: #0b5cad; font-weight: 700; }
.picknone { padding: 10px 12px; margin: 0; }
.pickadd { margin-top: 10px; }

/* customer kind badge */
.kindbadge {
  display: inline-block; background: #eef4fa; color: #33506b; border: 1px solid #9fb0bf;
  border-radius: 999px; padding: 1px 10px; font-size: 14px; font-weight: 700; vertical-align: middle;
}
.kindbadge.comm { background: #fdf3e0; border-color: #e0a83c; color: #6b4e12; }

/* schedule-a-job: what's already on the day */
.dayjobs {
  background: #f7fafc; border: 1px dashed #9fb0bf; border-radius: 10px;
  padding: 10px 14px; margin: 4px 0 6px;
}
.dayjobs p { margin: 6px 0; }
.dayjobstitle { font-weight: 800; font-size: 15px; text-transform: uppercase; letter-spacing: .05em; color: #5a6b7a; }
.dayjobrow { font-size: 17px; }
