/* Coach Hours — coach app styles (on top of /shared/base.css). */

body { overscroll-behavior-y: none; }
.wrap { padding-bottom: calc(40px + var(--safe-b)); }
body.has-tabs .wrap { padding-bottom: calc(110px + var(--safe-b)); }
body:not(.has-tabs) .toast-host { bottom: calc(24px + var(--safe-b)); }
/* while a sheet is open, toasts drop from the top so they never cover its Save button */
body:has(.sheet-backdrop) .toast-host { top: calc(12px + var(--safe-t)); bottom: auto; }
@media (prefers-color-scheme: dark) {
  .toast { background: #2b3656; border: 1px solid #44527a; }
  .toast.error { background: #b8352a; border-color: #e0493b; }
}
button { -webkit-user-select: none; user-select: none; touch-action: manipulation; }

/* ---------- names ---------- */
.names-head { display: flex; align-items: center; gap: 14px; margin: 8px 0 18px; }
.brand-dot {
  width: 48px; height: 48px; border-radius: 14px; background: var(--primary); color: var(--primary-ink);
  display: inline-flex; align-items: center; justify-content: center; font-size: 26px; flex: none;
}
.kiosk-label { align-self: flex-start; margin-top: 4px; }
.name-search { margin-bottom: 12px; }
.name-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.name-btn {
  display: flex; align-items: center; gap: 14px; min-height: 68px; padding: 10px 14px 10px 12px;
  background: var(--surface); border: 0; border-radius: var(--radius); box-shadow: var(--shadow);
  cursor: pointer; text-align: left; font-size: 19px; font-weight: 650; color: var(--text);
  transition: transform .06s ease;
}
.name-btn:active { transform: scale(.985); background: var(--surface-2); }
.name-btn .avatar { width: 46px; height: 46px; font-size: 17px; }
.name-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.name-main { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.name-sub { font-size: 14px; font-weight: 600; color: var(--primary); }
.pin-title { margin-top: 14px; font-size: 20px; }
.chev { font-size: 24px; color: var(--muted); line-height: 1; }
.names-screen .banner { margin-bottom: 14px; }
.names-install { margin-top: 18px; }
.names-install .banner { margin-bottom: 0; }
.names-screen .empty { grid-column: 1 / -1; }
.offline { padding-top: 60px; align-items: center; }
.big-ico { font-size: 48px; }
body.kiosk .name-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
body.kiosk .name-btn { min-height: 76px; font-size: 21px; }

/* ---------- PIN ---------- */
.pin-screen { display: flex; flex-direction: column; align-items: center; min-height: 100dvh; padding-top: calc(8px + var(--safe-t)); }
.pin-top { align-self: stretch; display: flex; min-height: 44px; }
.not-you { padding-left: 4px; font-size: 17px; min-height: 44px; }
.pin-who { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 4px; }
.pin-who h1 { font-size: 24px; }
.pin-dots { display: flex; gap: 20px; margin: 22px 0 10px; }
.pin-dots .dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--muted); transition: background .1s, border-color .1s, transform .1s; }
.pin-dots .dot.on { background: var(--text); border-color: var(--text); transform: scale(1.08); }
.pin-dots.shake { animation: shake .42s ease; }
.pin-dots.shake .dot { border-color: var(--stop); }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  15% { transform: translateX(-12px); } 30% { transform: translateX(10px); }
  45% { transform: translateX(-8px); } 60% { transform: translateX(6px); } 75% { transform: translateX(-3px); }
}
.pin-msg { min-height: 44px; margin: 0 0 8px; text-align: center; color: var(--muted); font-size: 16px; max-width: 320px; }
.pin-msg.err { color: var(--stop); font-weight: 650; }
.pin-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; width: 100%; max-width: 330px; }
.pin-pad.busy { opacity: .6; pointer-events: none; }
.key {
  height: 74px; border-radius: 22px; border: 0; background: var(--surface); box-shadow: var(--shadow);
  font-size: 30px; font-weight: 600; color: var(--text); cursor: pointer; font-variant-numeric: tabular-nums;
}
.key:active { background: var(--primary-soft); transform: scale(.97); }
.key-back { background: transparent; box-shadow: none; font-size: 26px; color: var(--muted); }
.key-spacer { display: block; }
@media (max-height: 700px) {
  .pin-who .avatar { width: 56px !important; height: 56px !important; }
  .key { height: 62px; }
  .pin-dots { margin: 14px 0 6px; }
}
@media (min-width: 700px) {
  .key { height: 84px; font-size: 32px; }
  .pin-pad { max-width: 380px; }
}

/* ---------- top bar ---------- */
.app-top { align-items: flex-start; margin: 4px 0 0; }
.app-top h1 { font-size: 28px; }
.today-date { font-size: 15px; margin-top: 2px; }
.me-btn { border: 0; background: none; padding: 0; cursor: pointer; border-radius: 50%; width: 48px; height: 48px; display: inline-flex; align-items: center; justify-content: center; }
.me-btn .avatar { width: 42px; height: 42px; }
.done-btn { min-height: 44px; }

/* ---------- install banner ---------- */
.install-host:empty { display: none; }
.install-banner { gap: 10px; padding: 10px 10px 10px 14px; }
.install-ico { font-size: 22px; }
.install-x { width: 40px; height: 40px; font-size: 16px; color: var(--muted); flex: none; }
.share-glyph { display: inline-block; margin: 0 2px 0 3px; color: var(--primary); font-weight: 800; }

/* ---------- clock card ---------- */
.clock-card { display: flex; flex-direction: column; gap: 14px; padding: 18px; }
.today-shift { font-size: 17px; }
.clock-btn { min-height: 84px; font-size: 26px; font-weight: 750; letter-spacing: .01em; border-radius: 22px; }
.btn.go.clock-btn { box-shadow: 0 6px 18px color-mix(in srgb, var(--go) 35%, transparent); }
.btn.stop.clock-btn { box-shadow: 0 6px 18px color-mix(in srgb, var(--stop) 35%, transparent); }
.add-past { min-height: 48px; margin: -6px 0 -8px; }
.clock-card.is-in { background: var(--go-soft); box-shadow: none; border: 1.5px solid color-mix(in srgb, var(--go) 35%, transparent); }
.in-line { display: flex; align-items: center; gap: 10px; font-size: 18px; }
.live-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--go); flex: none; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--go) 60%, transparent); } 50% { box-shadow: 0 0 0 7px transparent; } }
.clock-el { font-size: 60px; color: var(--text); }
/* segmented single-choice (locations): all options on one row when they fit */
.chips.seg { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; }
.chips.seg .chip { justify-content: center; padding: 0 6px; min-height: 50px; font-size: 15.5px; border-radius: 14px; text-align: center; line-height: 1.15; }

.stale-card { background: var(--warn-soft); box-shadow: none; border: 1.5px solid color-mix(in srgb, var(--warn) 45%, transparent); display: flex; flex-direction: column; gap: 12px; }
.stale-title { display: flex; gap: 10px; font-size: 18px; font-weight: 650; line-height: 1.3; }
.stale-ico { font-size: 22px; line-height: 1.2; }
.stale-row { gap: 10px; }
.stale-row input { flex: 1; min-width: 0; }
.stale-row .btn { flex: none; }

/* ---------- tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 8px; }
.tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  min-height: 88px; padding: 10px 6px; border: 0; border-radius: var(--radius); background: var(--surface);
  box-shadow: var(--shadow); cursor: pointer; color: var(--text); text-align: center;
}
.tile:active { transform: scale(.97); background: var(--surface-2); }
.tile-ico { font-size: 26px; line-height: 1; }
.tile-label { font-size: 14px; font-weight: 650; line-height: 1.15; hyphens: manual; }
/* 2 or 4 tiles (v3: no lesson tile) → two columns, icon beside the label */
.tiles.two { grid-template-columns: 1fr 1fr; }
.tiles.two .tile { flex-direction: row; justify-content: flex-start; gap: 12px; min-height: 68px; padding: 10px 16px; text-align: left; }
.tiles.two .tile-label { font-size: 16px; }

/* ---------- pay period ---------- */
.period-box { display: flex; flex-direction: column; gap: 12px; }
.period-head { display: flex; align-items: flex-end; gap: 8px; margin: 8px 2px 0; }
.period-navs { gap: 2px; flex: none; }
.period-nav { padding: 0 10px; min-height: 44px; font-size: 15px; }
.totals-card { display: flex; flex-direction: column; gap: 6px; }
.total-line { display: flex; align-items: baseline; gap: 8px; }
.total-num { font-size: 44px; font-weight: 800; letter-spacing: -.02em; line-height: 1; }
.total-unit { font-size: 20px; font-weight: 650; color: var(--muted); }
.pending-line { color: var(--warn); font-weight: 650; font-size: 15px; }
.stats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.stat { background: var(--surface-2); border-radius: 12px; padding: 8px 12px; flex: 1 1 calc(50% - 4px); min-width: 0; }
.stat-v { font-weight: 750; font-size: 16px; }
.stat-k { font-size: 12px; color: var(--muted); font-weight: 650; }
.closed-note { margin-top: 6px; }
.day-group { display: flex; flex-direction: column; gap: 6px; }
.day-title { font-size: 14px; font-weight: 700; color: var(--muted); margin: 6px 4px 0; }
.entry-row { align-items: center; padding: 12px 12px 12px 16px; gap: 10px; }
.entry-main { font-weight: 650; font-size: 17px; }
.entry-right { font-weight: 700; white-space: nowrap; font-size: 16px; }
.entry-row .chev { font-size: 22px; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 5px; }
.warn-text { color: var(--warn); font-weight: 650; margin-top: 4px; }
.entry-row.is-open { background: color-mix(in srgb, var(--go-soft) 60%, var(--surface)); }

/* ---------- sheets ---------- */
.entry-sheet { padding-bottom: 0; }
.entry-form { gap: 16px; padding-bottom: calc(12px + var(--safe-b)); }
.for-who { font-size: 17px; margin-top: -4px; }
.date-other { margin-top: 8px; }
.times { gap: 10px; }
.time-lab { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 650; color: var(--muted); }
.time-lab input { color: var(--text); font-size: 19px; font-weight: 600; min-height: 56px; text-align: left; }
input[type=time]::-webkit-date-and-time-value { text-align: left; }
.usual-box:not(:empty) { margin-bottom: 4px; }
.usual-chip { background: var(--go-soft); border-color: color-mix(in srgb, var(--go) 40%, transparent); color: var(--text); min-height: 48px; }
.usual-chip[aria-pressed="true"] { background: var(--go); border-color: var(--go); color: #fff; }
.preview { min-height: 24px; }
.preview-hrs strong { font-size: 22px; }
.preview-err { color: var(--stop); font-weight: 650; font-size: 15px; }
.preview-warn { color: var(--warn); font-weight: 650; margin-top: 2px; }
.dur-other { margin-top: 8px; }
.dur-other input { max-width: 140px; }
.big-num { font-size: 22px !important; font-weight: 650; }
.suffix-input { position: relative; }
.suffix-input .suffix { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 650; }
.suffix-input input { padding-right: 44px; }
.money-input::before { font-size: 20px; font-weight: 650; }
.sched-field { margin-top: -6px; }
.sched-field .btn.small { min-height: 32px; }
.sheet-actions {
  position: sticky; bottom: 0; z-index: 2; display: flex; flex-direction: column; gap: 6px;
  background: var(--bg); padding: 10px 0 calc(8px + var(--safe-b)); margin-top: 4px;
  box-shadow: 0 -10px 12px -10px rgba(0, 0, 0, .12);
}
.save-btn { min-height: 58px; font-size: 19px; }
.btn.danger-link { color: var(--stop); }
.entry-sheet .chip { min-height: 48px; font-size: 16px; }

/* ---------- confirmation overlay ---------- */
.celebrate {
  position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  padding: 24px; animation: fade .15s ease; cursor: pointer;
}
.celebrate.out { opacity: 0; transition: opacity .18s ease; }
.celebrate.full { background: var(--go); }
.celebrate.full.is-out { background: var(--primary); }
.celebrate-card {
  background: var(--surface); border-radius: 26px; box-shadow: 0 20px 60px rgba(0, 0, 0, .18);
  padding: 30px 24px 18px; width: 100%; max-width: 380px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px;
  animation: pop .28s cubic-bezier(.2, 1.4, .4, 1);
}
.celebrate.full .celebrate-card { background: transparent; box-shadow: none; color: #fff; max-width: 640px; }
.check {
  width: 92px; height: 92px; border-radius: 50%; background: var(--go); color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 54px; font-weight: 800; margin-bottom: 8px;
}
.celebrate.is-out:not(.full) .check { background: var(--primary); color: var(--primary-ink); }
.celebrate.full .check { background: #fff; color: var(--go); width: 130px; height: 130px; font-size: 78px; }
.celebrate.full.is-out .check { color: var(--primary); }
.celebrate-title { font-size: 24px; font-weight: 800; line-height: 1.2; }
.celebrate.full .celebrate-title { font-size: 38px; }
.celebrate-sub { font-size: 18px; color: var(--muted); font-weight: 600; }
.celebrate.full .celebrate-sub { color: rgba(255, 255, 255, .9); font-size: 24px; }
.celebrate-note { margin-top: 8px; background: var(--warn-soft); color: var(--text); border-radius: 14px; padding: 10px 14px; font-weight: 650; font-size: 16px; }
.celebrate.full .celebrate-note { font-size: 20px; }
.celebrate-tap { color: var(--muted); margin-top: 10px; min-height: 16px; }
@keyframes pop { from { transform: scale(.85); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- approvals ---------- */
.rv-card { display: flex; flex-direction: column; gap: 10px; transition: opacity .2s ease, transform .2s ease; }
.rv-card.leaving { opacity: 0; transform: translateX(40px); }
.rv-who { display: flex; align-items: center; gap: 12px; }
.avatar.sm { width: 38px; height: 38px; font-size: 14px; }
.rv-times { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 16px; }
.rv-extra { background: var(--warn-soft); color: var(--text); border-radius: 12px; padding: 8px 12px; font-weight: 750; font-size: 17px; border-left: 4px solid var(--warn); }
.rv-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rv-actions .btn { padding: 0 12px; }
.rv-approve { grid-column: 1 / -1; min-height: 56px; font-size: 18px; }
.rv-deny { color: var(--stop); }
.rv-mine-note { background: var(--surface-2); color: var(--muted); border-radius: 12px; padding: 10px 12px; font-weight: 650; font-size: 15px; }
.reapprove-note { color: var(--warn); font-weight: 650; }
.all-clear h2 { color: var(--text); }
.add-someone { min-height: 56px; }

/* ---------- menu ---------- */
.menu-who { display: flex; align-items: center; gap: 14px; margin-bottom: 6px; }
.signout-btn { color: var(--stop); }

/* ---------- wider screens ---------- */
@media (min-width: 700px) {
  .clock-card { padding: 22px; }
  .tile { min-height: 96px; }
}

/* ---------- v2: receipt photo ---------- */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.receipt-field { position: relative; }
.btn.receipt-btn { min-height: 64px; font-size: 18px; border: 2px dashed color-mix(in srgb, var(--primary) 45%, var(--line)); color: var(--primary); }
.btn.receipt-btn.need { border-color: var(--stop); background: var(--stop-soft); animation: shake .42s ease; }
.receipt-preview { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1.5px solid var(--line); border-radius: 16px; padding: 10px; }
.receipt-thumb-btn { border: 0; padding: 0; background: none; cursor: zoom-in; flex: none; border-radius: 10px; overflow: hidden; }
.receipt-thumb { display: block; width: 84px; height: 84px; object-fit: cover; background: var(--surface-2); }
.receipt-side { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; }
.receipt-status { font-weight: 650; color: var(--go); }
.photo-view {
  position: fixed; inset: 0; z-index: 95; background: rgba(0, 0, 0, .9); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px; padding: calc(16px + var(--safe-t)) 16px calc(16px + var(--safe-b)); cursor: zoom-out;
}
.photo-view img { max-width: 100%; max-height: calc(100% - 40px); object-fit: contain; border-radius: 8px; }
.photo-close { color: #fff; opacity: .8; font-size: 14px; }

/* ---------- v2: reason for extra time ---------- */
.reason-input { min-height: 84px; font-size: 17px; }
.reason-form { align-self: stretch; display: flex; flex-direction: column; gap: 8px; margin-top: 10px; text-align: left; }
.reason-label { font-weight: 700; font-size: 17px; }
.reason-label span { font-weight: 500; color: var(--muted); font-size: 14px; }
.reason-send { min-height: 54px; }
.reason-skip { min-height: 44px; }
.celebrate.has-form { align-items: flex-start; overflow-y: auto; padding-top: calc(24px + var(--safe-t)); cursor: default; }
.celebrate.has-form .check { width: 64px; height: 64px; font-size: 36px; margin-bottom: 2px; }
.celebrate.full.has-form .check { width: 88px; height: 88px; font-size: 52px; }
.celebrate.full .reason-label { color: #fff; }
.celebrate.full .reason-label span { color: rgba(255, 255, 255, .85); }
.celebrate.full .reason-input { background: #fff; color: #16202f; border-color: transparent; }
.celebrate.full .reason-send { background: #fff; color: var(--primary); }
.celebrate.full.is-in .reason-send { color: var(--go); }
.celebrate.full .reason-skip { color: #fff; }
.celebrate.full .celebrate-note { background: rgba(255, 255, 255, .92); }
.entry-reason { font-style: italic; margin-top: 3px; }

/* approvals: the coach's reason */
.rv-reason-wrap { display: flex; flex-direction: column; gap: 2px; }
.rv-reason-label { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.rv-reason { font-size: 17px; font-style: italic; line-height: 1.35; padding-left: 12px; border-left: 3px solid var(--line); }
.rv-no-reason { margin-top: -4px; }

/* ---------- v3: read-only lesson info ---------- */
.fam-pill { font-weight: 700; }
.ro-list .ro-row { display: flex; justify-content: space-between; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); }
.ro-list .ro-row:first-child { border-top: 0; }
.ro-k { color: var(--muted); font-weight: 650; }
.ro-v { font-weight: 650; text-align: right; }
.ro-source { margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--primary-soft); font-weight: 600; }
.ro-close { min-height: 54px; }

/* remember me */
.remember-row { max-width: 320px; margin: 18px auto 0; padding: 10px 14px; background: var(--surface); border-radius: 14px; box-shadow: var(--shadow); text-align: left; }
.remember-row > span { display: flex; flex-direction: column; }
.remember-sub { font-weight: 400; }
.me-body { gap: 16px; }
.me-card { display: flex; align-items: center; gap: 16px; width: 100%; padding: 20px; border: 0; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); cursor: pointer; text-align: left; color: inherit; }
.me-card:active { background: var(--surface-2); }
.me-card-txt { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.me-card-name { font-size: 22px; font-weight: 750; }
.me-card .chev { font-size: 28px; color: var(--muted); }
