/* Tech phone page (PREVIEW). Bright cream like the board; big touch targets. */
[hidden] { display: none !important; }
.tech-page { padding-bottom: calc(24px + env(safe-area-inset-bottom)); min-height: 100vh; }
.preview-ribbon { background: #2b1d1f; color: #fff; text-align: center; font-size: 12px; font-weight: 700; padding: 4px 8px; letter-spacing: .02em; }
.thead { display: flex; align-items: center; gap: 10px; padding: 12px 14px 8px; max-width: 520px; margin: 0 auto; }
.brand { font-weight: 800; font-size: 20px; color: var(--accent); flex: 1; }
.brand small { display: inline; margin-left: 4px; }
.so { min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); font-weight: 700; font-size: 14px; }
.signin, .app { max-width: 520px; margin: 0 auto; padding: 4px 14px 20px; }
h1 { font-size: 26px; margin: 8px 0 2px; }
h1 small { font-size: 14px; }
.hint { color: var(--muted); font-size: 14px; margin: 4px 0 8px; font-weight: 600; }
.err { color: #8b1b1b; font-weight: 700; font-size: 15px; margin: 6px 0; }

.name-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.name-btn { min-height: 64px; border: 2px solid var(--line); border-radius: 16px; background: var(--card); font-size: 22px; font-weight: 800; padding: 6px 10px; text-align: center; }
.name-btn small { margin-top: 1px; }
.name-btn.in small { color: #1c6b3b; font-weight: 700; }
.name-btn:active { border-color: var(--accent); background: var(--accent-soft); }

.pass-card { display: grid; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 16px; margin-top: 8px; }
.pass-card h1 { margin: 0; }
.back { justify-self: start; min-height: 44px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); padding: 0 12px; font-weight: 700; }
#passInput { width: 100%; min-height: 72px; border: 2px solid var(--line); border-radius: 16px; font-size: 36px; letter-spacing: .4em; text-align: center; background: #fff; }
#passInput:focus { outline: none; border-color: var(--accent); }
.big-btn { min-height: 60px; border: 0; border-radius: 16px; background: var(--accent); color: #fff; font-size: 20px; font-weight: 800; padding: 6px 14px; width: 100%; }
.big-btn small { color: #f3d6df; }
.big-btn:disabled { opacity: .55; }
.ghost { min-height: 52px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); font-weight: 700; padding: 6px 12px; }

.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 4px; }
.tab { min-height: 56px; border: 0; border-radius: 12px; background: transparent; font-weight: 800; font-size: 16px; }
.tab.on { background: var(--accent); color: #fff; }
.tab.on small { color: #f3d6df; }
.live { font-size: 13px; font-weight: 700; color: #1c6b3b; text-align: right; margin: 6px 2px; }
.live.off { color: var(--muted); }
.pane { display: grid; gap: 12px; }

/* big status */
.status { border-radius: 24px; padding: 22px 16px; text-align: center; border: 3px solid var(--line); background: var(--card); }
.s-hi { font-size: 18px; font-weight: 700; color: var(--muted); }
.s-big { font-size: 38px; line-height: 1.05; font-weight: 900; margin: 6px 0; }
.s-sub { font-size: 17px; font-weight: 700; }
.status.s-next { background: #1f7a45; border-color: #14572f; color: #fff; animation: pulse 1.6s ease-in-out infinite; }
.status.s-next .s-hi { color: #d5f3e0; }
.status.s-line { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.status.s-out, .status.s-not { background: #f0ebe4; border-color: #d7cdc0; color: #5b4f49; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(31,122,69,.5); } 50% { box-shadow: 0 0 0 14px rgba(31,122,69,0); } }
.bonus-chip { background: var(--gold-soft); color: #7a5300; border: 2px solid var(--gold); border-radius: 16px; padding: 10px 14px; font-weight: 800; text-align: center; font-size: 18px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 10px 6px; text-align: center; }
.stat b { display: block; font-size: 36px; font-weight: 900; color: var(--accent); font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat.gold b { color: var(--gold); }
.stat span { font-size: 13px; font-weight: 700; color: var(--muted); }
.line-note { color: var(--muted); font-weight: 600; text-align: center; margin: 0; font-size: 15px; }

.alerts { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 14px; display: grid; gap: 8px; }
.alerts h2 { margin: 0; font-size: 18px; }
.a-state { margin: 0; font-weight: 700; }
.a-state.ok { color: #1c6b3b; }
.a-state.warn { color: #8b5a00; }
.a-row { display: grid; gap: 8px; }
.ios-note { background: #fff4d6; border: 1px solid var(--gold); border-radius: 12px; padding: 10px 12px; margin: 0; font-size: 15px; }
.fine { color: var(--muted); font-size: 13px; margin: 0; }

/* services */
.sec { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 10px 2px 2px; }
.sec .cnt { color: var(--ink); }
.daycard { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 12px; display: grid; gap: 8px; }
.day-tot { display: flex; gap: 8px; flex-wrap: wrap; font-weight: 800; }
.day-tot span { background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-size: 15px; }
.day-tot .g { background: var(--gold-soft); border-color: var(--gold); color: #7a5300; }
.tks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tk { border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; background: var(--bg); }
.tk-top { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--muted); }
.tk-top .res { margin-left: auto; font-size: 22px; font-weight: 900; color: var(--accent); }
.tk-top .res.bonus { color: var(--gold); }
.tk-top .res.none { color: var(--muted); font-size: 15px; }
.tk-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tk-chips span { font-size: 15px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-weight: 600; }
.tk-reason { margin-top: 4px; font-size: 13px; color: var(--muted); }
.empty { color: var(--muted); text-align: center; padding: 10px; font-weight: 600; }
.hist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.hrow { background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.hbtn { width: 100%; min-height: 64px; display: flex; align-items: center; gap: 10px; border: 0; background: transparent; padding: 8px 12px; text-align: left; }
.hd { flex: 1; font-weight: 800; font-size: 17px; }
.hd small { font-weight: 600; }
.ht { font-weight: 900; font-size: 26px; color: var(--accent); font-variant-numeric: tabular-nums; text-align: right; }
.ht small { text-align: right; }
.hbody { padding: 0 12px 12px; display: grid; gap: 8px; }

/* RING overlay */
.ring-ov {
  position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 18px; padding: 24px; text-align: center; color: #fff; animation: flash .7s steps(1) infinite;
}
.ring-ov[hidden] { display: none; }
@keyframes flash { 0% { background: #c4161c; } 50% { background: #ffb400; } }
.ring-ov .ring-bell { font-size: 96px; animation: shake .5s ease-in-out infinite; }
@keyframes shake { 0%, 100% { transform: rotate(-18deg); } 50% { transform: rotate(18deg); } }
.ring-title { font-size: 48px; font-weight: 900; line-height: 1.05; text-shadow: 0 2px 8px rgba(0,0,0,.4); }
.ring-title small { color: #fff; font-size: 20px; margin-top: 8px; }
.ring-ack { width: 100%; max-width: 360px; min-height: 84px; border: 4px solid #fff; border-radius: 22px; background: #14572f; color: #fff; font-size: 28px; font-weight: 900; }
.ring-ack small { color: #d5f3e0; font-size: 15px; }
.ring-sound { min-height: 52px; border: 2px solid #fff; border-radius: 14px; background: rgba(0,0,0,.35); color: #fff; font-weight: 800; padding: 0 16px; }
@media (prefers-reduced-motion: reduce) { .ring-ov { animation-duration: 1.4s; } .ring-ov .ring-bell { animation: none; } }

/* notifications */
.notif-pill { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .02em; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line); background: #f0ebe4; color: #5b4f49; white-space: nowrap; }
.notif-pill.on { background: #e3f4ea; border-color: #1c6b3b; color: #14572f; }
.notif-pill.off { background: #fff4d6; border-color: var(--gold); color: #7a5300; }
.notif-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.notif-setup { border-width: 2px; }
.notif-setup.is-on { border-color: #1c6b3b; }
.sound-limit { background: #f7f3ee; border-radius: 10px; padding: 8px 10px; }
.est-note { margin: 0 0 12px; padding: 8px 10px; border-radius: 10px; background: #f7f3ee; color: #5b4f49; font-size: 13px; line-height: 1.4; font-weight: 600; }
@media (min-width: 900px) { .est-note { font-size: 14px; max-width: 52rem; } }
.install-tip {
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff4d6;
  border: 1px solid var(--gold);
  color: #5b3d00;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.35;
}
.install-tip small { display: block; margin-top: 4px; font-weight: 600; opacity: .85; }
.skip-banner { background: #fff4d6; border: 2px solid var(--gold); color: #7a5300; border-radius: 16px; padding: 10px 14px; font-weight: 800; text-align: center; }

/* tech board (reuse employee styles from board.css; readable type on a phone) */
.tech-board { padding: 0; max-width: none; }
.tech-board .emp-row.is-me, .tech-board .bl-row.is-me { outline: 3px solid var(--accent); background: #fde8ef; }
.tech-board .emp-row.is-me .emp-pos { background: var(--accent); color: #fff; }

/* Banners stay side by side on phones. Lists stack under 430px so names stay readable. */
#techBoard.tech-board .emp-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
#techBoard.tech-board .emp-name {
  font-size: clamp(28px, 7.2vw, 34px);
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#techBoard.tech-board .emp-lbl { font-size: 11px; letter-spacing: .04em; }
#techBoard.tech-board .emp-lbl small { display: block; font-weight: 700; margin-top: 1px; }
#techBoard.tech-board .emp-up, #techBoard.tech-board .emp-bon { padding: 10px 12px 12px; border-radius: 16px; }
#techBoard.tech-board .emp-cols {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
}
#techBoard.tech-board .emp-nm,
#techBoard.tech-board .bl-nm {
  font-size: 17px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#techBoard.tech-board .emp-turns b { font-size: 22px; }
#techBoard.tech-board .bl-ct { font-size: 14px; }
#techBoard.tech-board .bl-row.first .bl-nm { font-size: 18px; }
#techBoard.tech-board .bl-hint { font-size: 13px; line-height: 1.35; margin: 0 2px 8px; }
#techBoard.tech-board .emp-h { font-size: 15px; margin: 4px 2px 8px; }
#techBoard.tech-board .emp-row,
#techBoard.tech-board .bl-row { padding: 8px 10px; min-height: 48px; gap: 8px; }

@media (min-width: 430px) {
  #techBoard.tech-board .emp-cols {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
  }
  #techBoard.tech-board .emp-nm,
  #techBoard.tech-board .bl-nm { font-size: 16px; }
  #techBoard.tech-board .emp-turns b { font-size: 22px; }
  #techBoard.tech-board .bl-hint { font-size: 12px; }
}

/* Desktop: a wide, readable workspace — not the phone column, not the TV type. */
@media (min-width: 900px) {
  body.tech-mode #app.app,
  body.tech-mode #app {
    max-width: 1160px;
    margin: 0 auto;
    padding: 12px 28px 48px;
  }
  body.tech-mode #app .tabs {
    max-width: 420px;
  }
  body.tech-mode #tabTurn.pane {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
    column-gap: 24px;
    row-gap: 14px;
    align-items: start;
  }
  body.tech-mode #app .tabs { grid-column: 1 / -1; }
  body.tech-mode #status { grid-column: 1; grid-row: 1; margin: 0; padding: 18px 16px; }
  body.tech-mode #status .s-big { font-size: 32px; }
  body.tech-mode #bonusChip { grid-column: 1; }
  body.tech-mode #tabTurn .stats {
    grid-column: 2;
    grid-row: 1;
    align-self: stretch;
    gap: 12px;
  }
  body.tech-mode #tabTurn .stat { display: flex; flex-direction: column; justify-content: center; padding: 16px 10px; }
  body.tech-mode #stLine { display: none; }
  body.tech-mode #skipBanner { grid-column: 1 / -1; }
  body.tech-mode #techBoard { grid-column: 1 / -1; }
  body.tech-mode #notifSetup { grid-column: 1 / -1; }
  body.tech-mode #tabSvc { max-width: 820px; }

  /* Cancel the landscape TV rules on .emp (2-col cards, huge clamp type). */
  #techBoard.tech-board {
    max-width: none;
    padding: 0;
  }
  #techBoard.tech-board .emp-top {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 8px;
  }
  #techBoard.tech-board .emp-up,
  #techBoard.tech-board .emp-bon {
    padding: 14px 18px 16px;
    border-radius: 18px;
  }
  #techBoard.tech-board .emp-lbl {
    font-size: 12px;
    letter-spacing: .06em;
  }
  #techBoard.tech-board .emp-lbl small {
    display: inline;
    margin-left: 6px;
    font-size: 12px;
  }
  #techBoard.tech-board .emp-name {
    font-size: 36px;
    line-height: 1.15;
  }
  #techBoard.tech-board .emp-bon .emp-name { font-size: 32px; }
  #techBoard.tech-board .emp-cols {
    grid-template-columns: minmax(0, 1.25fr) minmax(280px, .9fr);
    gap: 28px;
    align-items: start;
  }
  #techBoard.tech-board .emp-h {
    font-size: 15px;
    letter-spacing: .04em;
    margin: 4px 2px 10px;
  }
  #techBoard.tech-board .emp-list,
  #techBoard.tech-board .bl-list {
    grid-template-columns: 1fr !important;
    gap: 8px;
  }
  #techBoard.tech-board .emp-row,
  #techBoard.tech-board .bl-row {
    padding: 10px 14px;
    min-height: 56px;
    gap: 12px;
  }
  #techBoard.tech-board .emp-pos {
    width: 36px;
    height: 36px;
    font-size: 16px;
    flex: none;
  }
  #techBoard.tech-board .emp-nm,
  #techBoard.tech-board .bl-nm {
    font-size: 18px;
    line-height: 1.2;
    white-space: nowrap;
  }
  #techBoard.tech-board .emp-meta { font-size: 13px; }
  #techBoard.tech-board .emp-turns b { font-size: 22px; }
  #techBoard.tech-board .bl-hint {
    font-size: 13px;
    line-height: 1.4;
    margin: 0 2px 10px;
  }
  #techBoard.tech-board .bl-ct,
  #techBoard.tech-board .bl-pos { font-size: 15px; }
  #techBoard.tech-board .bl-row.first .bl-nm { font-size: 18px; }
  #techBoard.tech-board .bl-row.first .bl-nm::after { content: none; }
}

/* Mid-width phones/tablets stay on the stacked-or-side-by-side rules above;
   never use the TV 2-column card grid for the tech turn list. */
@media (min-width: 430px) and (max-width: 899px) {
  #techBoard.tech-board .emp-list,
  #techBoard.tech-board .bl-list {
    grid-template-columns: 1fr !important;
  }
}

.tk-st { display: inline-block; font-size: 0.75rem; font-weight: 700; padding: 0.1rem 0.45rem; border-radius: 999px; margin-left: 0.3rem; }
.tk-st.in-service { background: #e7f4ec; color: #1d6b4f; }
.tk-st.pending { background: #f8ead8; color: #8a4b12; }
.tk.is-open { cursor: pointer; }
.tk.is-open:hover { background: rgba(29,107,79,.06); }

/* PIN pad (clock in / My Turn): no names on screen; digits hidden (type=password). */
.pin-pad input[type="password"] { font-size: 32px; letter-spacing: .5em; text-align: center; min-height: 60px; border: 2px solid var(--line); border-radius: 14px; padding: 6px 10px; width: 100%; box-sizing: border-box; }
.pin-ok { margin: 4px 0; padding: 10px 12px; border-radius: 12px; background: #e3f4e8; color: #1c6b3b; font-weight: 800; font-size: 18px; }
.pin-myturn { min-height: 48px; border-radius: 14px; font-size: 16px; font-weight: 700; width: 100%; }
.pin-clockout { min-height: 52px; border-radius: 14px; font-size: 17px; font-weight: 800; width: 100%; }
