/* DrillTrack capture app - MELT copy. Phone first (390 px wide), works on a tablet too. Navy + orange, huge buttons. */
:root { --navy: #0b1830; --navy2: #12233f; --navy3: #0f2a52; --line: #263b5e; --orange: #f7931e; --green: #1f9437;
  --red: #c62828; --amber: #f5a300; --txt: #f3f5f9; --txt2: #b9c4d8; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--navy); color: var(--txt); font: 19px/1.35 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  padding-bottom: env(safe-area-inset-bottom); }
button { font: inherit; cursor: pointer; }
.bar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 8px; padding: 8px 10px;
  padding-top: calc(8px + env(safe-area-inset-top)); background: #08111f; border-bottom: 3px solid var(--orange); }
.brand { display: flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; flex: 1; min-width: 0; }
.brand span { font-weight: 900; font-size: 21px; line-height: 1.05; }
.brand em { font-style: normal; color: var(--orange); }
.brand small { display: block; font-size: 12px; font-weight: 700; color: var(--txt2); text-transform: uppercase; letter-spacing: .4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.langs { display: inline-flex; border: 2px solid #3a4d70; border-radius: 10px; overflow: hidden; flex: none; }
.langs button { background: transparent; color: #fff; border: 0; font-weight: 900; padding: 0 10px; min-height: 44px; min-width: 44px; }
.langs button.on { background: var(--orange); color: #111; }
.dashlink { display: inline-flex; align-items: center; gap: 4px; color: #fff; text-decoration: none; font-weight: 800; font-size: 15px;
  background: var(--navy3); border: 2px solid #3a5b8f; border-radius: 10px; padding: 0 10px; min-height: 44px; flex: none; }
.dashlink svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 2; }
.syncrow { display: flex; gap: 8px; padding: 8px 10px 0; }
.sync { flex: 1; min-height: 44px; border-radius: 10px; border: 2px solid var(--line); background: var(--navy2); color: #fff; font-weight: 800; font-size: 16px; }
.sync.ok { border-color: #2c7a3c; color: #7ee28f; } .sync.wait { border-color: var(--amber); color: #ffd27a; } .sync.err { border-color: var(--red); color: #ff9a9a; }
.installbtn { min-height: 44px; border-radius: 10px; border: 0; background: var(--orange); color: #111; font-weight: 900; padding: 0 12px; }
main { padding: 10px 10px 40px; max-width: 900px; margin: 0 auto; }
.loading { font-size: 22px; text-align: center; margin-top: 20vh; color: var(--txt2); }
.ptitle, .dname { font-size: 34px; font-weight: 900; text-transform: uppercase; margin: 6px 0 10px; }
.dname { font-size: 40px; margin: 2px 0 6px; }
.picks { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.pickdrill { display: grid; gap: 4px; text-align: left; min-height: 104px; padding: 14px 16px; border-radius: 16px; color: #fff;
  background: linear-gradient(#13284a, #0c1a33); border: 2px solid #2d4a78; border-left-width: 10px; }
.pickdrill b { font-size: 30px; font-weight: 900; text-transform: uppercase; }
.pickdrill small { font-size: 17px; color: var(--txt2); font-weight: 700; }
.pickdrill.st-active { border-left-color: #2fb84a; } .pickdrill.st-delayed { border-left-color: var(--amber); }
.pickdrill.st-maintenance { border-left-color: var(--red); } .pickdrill.st-idle { border-left-color: #6b7a94; }
.pill { display: inline-flex; align-items: center; gap: 8px; font-weight: 900; font-size: 18px; text-transform: uppercase; }
.pill i { width: 16px; height: 16px; border-radius: 50%; background: #888; display: inline-block; }
.pill.st-active { color: #5fe07a; } .pill.st-active i { background: #2fb84a; }
.pill.st-delayed { color: #ffc23a; } .pill.st-delayed i { background: var(--amber); }
.pill.st-maintenance { color: #ff8a8a; } .pill.st-maintenance i { background: #e53935; }
.pill.st-idle { color: #c3cbd9; } .pill.st-idle i { background: #8592a8; }
.dtop { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 48px; padding: 0 14px; border-radius: 12px; border: 2px solid #3a5b8f;
  background: var(--navy3); color: #fff; font-weight: 800; font-size: 17px; }
.chip .ico { width: 22px; height: 22px; }
.today { display: grid; grid-template-columns: 1fr auto; gap: 10px; background: #eef2f8; color: #0b1830; border-radius: 16px; padding: 12px 14px; }
.ringbox b { display: block; font-size: 36px; font-weight: 900; line-height: 1.1; }
.ringbox span { font-size: 16px; font-weight: 700; color: #34435e; }
.pbar { height: 14px; background: #c9d0dc; border-radius: 7px; overflow: hidden; margin-bottom: 6px; }
.pbar i { display: block; height: 100%; background: #1f6fd1; border-radius: 7px; }
.hcount { text-align: center; border-left: 2px solid #c9d0dc; padding-left: 12px; display: flex; flex-direction: column; justify-content: center; }
.hcount b { font-size: 40px; font-weight: 900; line-height: 1; } .hcount span { font-size: 16px; font-weight: 700; color: #34435e; }
.bitline { font-size: 16px; color: var(--txt2); margin: 8px 2px; } .bitline b { color: #fff; }
.banner { display: grid; gap: 10px; border-radius: 16px; padding: 12px 14px; margin: 8px 0; }
.banner.orange { background: #5a3a06; border: 3px solid var(--amber); } .banner.red { background: #5a1414; border: 3px solid #e53935; }
.banner small { display: block; font-weight: 800; font-size: 16px; letter-spacing: .3px; }
.banner b { font-size: 26px; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.big { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 96px; padding: 8px;
  border-radius: 16px; border: 0; color: #fff; font-weight: 900; font-size: 22px; text-decoration: none; text-align: center;
  box-shadow: inset 0 -5px 0 rgba(0,0,0,.25); }
.big .ico { width: 34px; height: 34px; }
.big.wide { grid-column: 1 / -1; flex-direction: row; gap: 12px; min-height: 80px; width: 100%; }
.big.green { background: linear-gradient(#36c24f, #1f9437); }
.big.orange { background: linear-gradient(#ffa53a, #e5780b); color: #111; }
.big.red { background: linear-gradient(#ea4d4d, #b72424); }
.big.navy { background: var(--navy3); border: 2px solid #3a5b8f; }
.big.dark { background: #26324a; border: 2px solid #56657f; }
.big.ghost { background: transparent; border: 2px solid #56657f; min-height: 64px; font-size: 19px; }
.big[disabled] { opacity: .35; }
.sub { font-size: 22px; margin: 18px 0 8px; }
.holes, .days { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.holes button { width: 100%; display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; text-align: left;
  min-height: 56px; padding: 8px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--navy2); color: #fff; }
.holes span { font-weight: 800; } .holes small { color: var(--txt2); }
.days li { background: var(--navy2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; display: grid; gap: 2px; }
.days span { font-weight: 800; } .days small { color: var(--txt2); font-size: 16px; }
.tot { background: var(--navy2); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.tot h2 { margin: 0 0 6px; color: var(--orange); font-size: 20px; }
.tot dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 8px; margin: 0; }
.tot dt { font-size: 14px; color: var(--txt2); font-weight: 700; text-transform: uppercase; } .tot dd { margin: 0; font-size: 26px; font-weight: 900; }
.note { color: var(--txt2); font-size: 16px; }
/* sheets: full screen on a phone */
.sheet { position: fixed; inset: 0; z-index: 30; background: rgba(0,0,0,.55); display: flex; align-items: flex-end; justify-content: center; }
.sheet[hidden] { display: none; }
.sheet-inner { background: #0e1d36; width: 100%; max-width: 640px; max-height: 100%; overflow-y: auto; border-radius: 18px 18px 0 0;
  padding: 12px 14px calc(16px + env(safe-area-inset-bottom)); border-top: 4px solid var(--orange); }
@media (max-width: 640px) { .sheet-inner { min-height: 100%; border-radius: 0; } }
.shead { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.shead h2 { margin: 0; font-size: 26px; }
.shead.red { border-bottom: 3px solid #e53935; } .shead.orange { border-bottom: 3px solid var(--amber); }
.x { min-width: 52px; min-height: 52px; border-radius: 12px; border: 2px solid #56657f; background: transparent; color: #fff; font-size: 24px; }
.lbl { display: block; font-weight: 800; font-size: 19px; margin: 14px 0 6px; }
.field { display: grid; gap: 6px; margin: 12px 0; font-weight: 800; }
.field input { font: inherit; font-size: 24px; min-height: 60px; padding: 8px 12px; border-radius: 12px; border: 2px solid #56657f; background: #fff; color: #000; width: 100%; }
.field.big input { font-size: 40px; min-height: 80px; font-weight: 900; text-align: center; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips.col { display: grid; grid-template-columns: 1fr; }
.pick { min-height: 60px; padding: 0 16px; border-radius: 12px; border: 2px solid #3a5b8f; background: var(--navy3); color: #fff; font-weight: 800; font-size: 20px; text-align: left; }
.chips:not(.col) .pick { min-width: 96px; text-align: center; }
.pick.on { background: var(--orange); border-color: var(--orange); color: #111; }
.stepper { display: grid; grid-template-columns: 80px 1fr 80px; align-items: center; gap: 8px; }
.stepper button { min-height: 72px; border-radius: 14px; border: 2px solid #3a5b8f; background: var(--navy3); color: #fff; font-size: 38px; font-weight: 900; }
.stepper b { text-align: center; font-size: 44px; }
.err { color: #ff9a9a; font-weight: 800; min-height: 24px; margin: 10px 0 0; }
.sbar { display: grid; gap: 10px; margin-top: 8px; }
.q { font-size: 22px; font-weight: 700; }
.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 40; background: #fff; color: #111;
  font-weight: 900; font-size: 20px; padding: 14px 20px; border-radius: 14px; box-shadow: 0 6px 24px rgba(0,0,0,.5); max-width: 92vw; }
.ihelp { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 50; display: flex; align-items: center; justify-content: center; }
.ihelp[hidden] { display: none; }
.ihelp-in { background: #fff; color: #111; border-radius: 16px; padding: 22px; max-width: 420px; text-align: center; font-size: 19px; margin: 12px; }
.ihelp-in button { min-height: 52px; min-width: 120px; border-radius: 12px; border: 0; background: var(--orange); font-weight: 900; }
@media (min-width: 700px) { .grid { grid-template-columns: repeat(3, 1fr); } .dname { font-size: 48px; } }
.pill.st-done { color: #9cc3ff; } .pill.st-done i { background: #4a7bd1; } .pickdrill.st-done { border-left-color: #4a7bd1; }
.brand span { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
@media (max-width: 430px) { .dashlink span { display: none; } .brand span { font-size: 19px; } }
