/* Leave App extras on top of the driver app's app.css */
.field { margin-top: 18px; }
.field > label, .field > .label { display: block; font-weight: 600; margin-bottom: 6px; }
.field .muted.small { margin: -2px 0 8px; }
.input {
  width: 100%; min-height: 52px; padding: 0 14px; border: 2px solid var(--line); border-radius: 12px;
  background: var(--card); font-size: 18px;
}
textarea.input { padding: 12px 14px; min-height: 96px; resize: vertical; }
.input:focus { border-color: var(--accent); outline: none; }
.choice-list { display: flex; flex-direction: column; gap: 8px; }
.choice {
  display: block; width: 100%; text-align: left; padding: 12px 14px; border: 2px solid var(--line);
  border-radius: 12px; background: var(--card);
}
.choice b { display: block; font-size: 19px; }
.choice span { display: block; font-size: 15px; color: var(--muted); margin-top: 2px; }
.choice.on { border-color: var(--accent); background: var(--accent-soft); }
.choice.on b { color: var(--accent); }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.seg button { min-height: 48px; border: 2px solid var(--line); border-radius: 12px; background: var(--card); font-weight: 600; font-size: 16px; }
.seg button.on { border-color: var(--accent); background: var(--accent); color: #fff; }
.thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
.thumbs:empty { display: none; }
.thumb { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: #E2DFD6; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb button {
  position: absolute; top: 4px; right: 4px; width: 32px; height: 32px; border-radius: 50%; border: 0;
  background: rgba(0,0,0,.65); color: #fff; font-size: 18px; line-height: 1;
}
.req-dates { font-size: 18px; font-weight: 600; }
.req-reason { font-size: 15px; color: var(--muted); margin-top: 4px; overflow-wrap: anywhere; }
.summary-list { margin: 0 0 16px; padding: 0; list-style: none; font-size: 17px; }
.summary-list li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.summary-list li span:first-child { color: var(--muted); }
.summary-list li span:last-child { font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.big-check { width: 72px; height: 72px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin: 24px auto 8px; }
.big-check svg { width: 40px; height: 40px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
#logout { font-size: 14px; }
.grid2 > label { min-width: 0; }
.grid2 input[type="date"] { min-width: 0; width: 100%; padding: 0 10px; font-size: 16px; -webkit-appearance: none; appearance: none; }
/* Home menu */
.menu-tile { display: flex !important; align-items: center; gap: 14px; min-height: 84px; }
.menu-tile .ico { width: 34px; height: 34px; color: var(--accent); }
.menu-tile b { display: block; font-size: 20px; }
.menu-tile span span { display: block; font-size: 15px; color: var(--muted); }
/* Payslips */
h2.year { margin: 18px 0 2px; font-size: 17px; color: var(--muted); }
h2.year:first-child { margin-top: 0; }
.pay-row { display: flex !important; justify-content: space-between; align-items: center; gap: 12px; }
.pay-row b { display: block; font-size: 18px; }
.pay-row .amount { font-size: 18px; }
.pay-head { text-align: center; }
.pay-net-label { margin-top: 10px; font-weight: 600; color: var(--muted); }
.pay-head .big-amount { color: var(--accent); font-size: 34px; }
.pay-days { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 16px; margin-top: 6px; font-size: 15px; }
.pay-line { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 17px; }
.pay-line + .pay-line { border-top: 1px solid var(--line); }
.pay-line.total { font-weight: 700; border-top: 2px solid var(--ink); }
.pay-sum { margin-top: 16px; background: var(--accent-soft); border-color: var(--accent-soft); }
.pay-sum .pay-line.total { font-size: 20px; color: var(--accent); }
.pay-info { margin-top: 16px; }
.pay-info summary { font-weight: 600; cursor: pointer; min-height: 32px; }
.payslip + .grid2 { margin-top: 12px; }
@media print {
  .topbar, .no-print, .toast { display: none !important; }
  body, main { background: #fff; }
  .pay-info { display: block; }
  .pay-info > * { display: flex; }
}
/* 58mm thermal payslip: off-screen (not display:none) so its height can be measured */
#receipt {
  position: absolute; left: -9999px; top: 0; width: 48mm; padding: 1mm 1.5mm 3mm;
  font-family: Arial, Helvetica, sans-serif; font-size: 12px; font-weight: 600; line-height: 1.35;
  color: #000; background: #fff;
}
#receipt .center { text-align: center; }
#receipt .title { font-size: 13px; font-weight: 800; }
#receipt .bold { font-weight: 800; }
#receipt .line { border-top: 1.5px dashed #000; margin: 5px 0; }
#receipt table { width: 100%; border-collapse: collapse; }
#receipt td { padding: 1px 0; vertical-align: top; }
#receipt .amt { text-align: right; white-space: nowrap; padding-left: 4px; }
#receipt .tot td { font-weight: 800; border-top: 1px solid #000; padding-top: 2px; }
#receipt .net { font-size: 20px; font-weight: 800; }
#receipt .sign { margin-top: 4px; }
#receipt .sigline { border-bottom: 1.5px solid #000; height: 28px; }
#receipt .small { font-size: 10px; }
@media print {
  /* only the slip goes to the printer: no blank pages after it (they would feed paper) */
  body.print-58 > *:not(#receipt) { display: none !important; }
  body.print-58 #receipt { position: static; left: 0; }
  html, body.print-58 { padding: 0 !important; margin: 0 !important; min-height: 0 !important; background: #fff; }
  body:not(.print-58) #receipt { display: none; }
  html, body { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.bday { display: grid; grid-template-columns: 1.6fr 1fr 1.2fr; gap: 8px; margin-top: 8px; }
.bday label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; font-weight: 600; min-width: 0; }
.bday select { padding: 0 8px; min-width: 0; }
.pay-disclaimer { margin: 16px 0 4px; font-size: 13px; font-weight: 600; text-align: center; color: var(--muted); }
/* My attendance */
.att-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 12px 0 8px; }
.att-stat { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 8px 4px; text-align: center; }
.att-stat b { display: block; font-size: 22px; font-variant-numeric: tabular-nums; }
.att-stat span { display: block; font-size: 12px; color: var(--muted); }
.att-stat.warn { background: var(--warn-soft); border-color: var(--warn-soft); color: var(--warn); }
.att-stat.bad { background: var(--bad-soft); border-color: var(--bad-soft); color: var(--bad); }
.att-day.absent { border-color: var(--bad); }
.att-day.rest, .att-day.holiday { background: #FAF9F5; }
.att-day .req-dates { white-space: nowrap; }
.att-day .chip { white-space: normal; text-align: right; max-width: 58%; line-height: 1.25; }
.att-day .chip { border-radius: 10px; }
/* Unfiled absences */
.unfiled-card { display: block !important; margin-bottom: 12px; background: var(--bad-soft); border-color: var(--bad); color: var(--bad); text-align: left; }
.unfiled-card b { display: block; font-size: 18px; }
.unfiled-card span { display: block; font-size: 15px; }
.att-file { margin-top: 10px; min-height: 44px; font-size: 16px; }
textarea, select { font: inherit; color: inherit; }
.field label.btn { display: flex; margin-bottom: 0; }
.pdf-tile { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 6px; background: var(--bad-soft); color: var(--bad); text-align: center; }
.pdf-tile b { font-size: 20px; }
.pdf-tile span { font-size: 11px; color: var(--ink); overflow-wrap: anywhere; line-height: 1.2; max-height: 3.6em; overflow: hidden; }
/* Engage */
.engage-tile { border-color: var(--accent); background: var(--accent-soft); }
.prize-card { display: flex !important; flex-direction: column; gap: 2px; margin-bottom: 12px; background: #FFF6DA; border-color: #E9C66A; text-align: center; }
.prize-card b { font-size: 20px; }
.me-row { border-color: var(--accent); background: var(--accent-soft); }
.games-card { display: flex !important; flex-direction: column; gap: 4px; margin-top: 14px; border-style: dashed; }
/* Games */
.game-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.game-btn { display: flex !important; flex-direction: column; align-items: center; gap: 4px; padding: 18px 10px; text-align: center; border-color: var(--accent); }
.game-btn b { font-size: 18px; }
.game-btn span { color: #fff; background: var(--accent); border-radius: 999px; padding: 4px 16px; font-weight: 600; font-size: 15px; }
.game-wrap { position: relative; margin: -16px -16px 0; height: calc(100vh - 64px); max-height: 760px; }
.game-canvas { display: block; width: 100%; height: 100%; touch-action: none; user-select: none; -webkit-user-select: none; }
.game-over { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; gap: 10px; padding: 24px; background: rgba(244,243,239,.94); text-align: center; }
.game-over h2 { margin: 0; font-size: 28px; }
.seg4 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 420px) { .seg4 { grid-template-columns: repeat(4, 1fr); } }
/* Avatar + birthdays */
.hi-row { display: flex; align-items: center; gap: 12px; margin: 4px 0 12px; }
.hi-row h1 { margin: 0; }
.avatar { width: 46px; height: 46px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center;
  font-weight: 700; font-size: 20px; overflow: hidden; flex: none; border: 2px solid var(--accent); }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar.big { width: 76px; height: 76px; font-size: 30px; }
.photo-card { display: flex; align-items: center; gap: 14px; }
.photo-preview { display: flex; justify-content: center; margin-bottom: 10px; }
.photo-preview img { width: 200px; height: 200px; border-radius: 50%; object-fit: cover; border: 3px solid var(--accent); }
.bday-mine { display: flex !important; flex-direction: column; align-items: center; text-align: center; gap: 2px; margin-bottom: 12px;
  background: #FFF6DA; border-color: #E9C66A; }
.bday-mine b { font-size: 20px; color: var(--accent); }
.bday-cake { font-size: 36px; line-height: 1; }
.bday-others { display: flex !important; gap: 10px; align-items: center; margin-bottom: 12px; background: var(--accent-soft); border-color: var(--accent-soft); font-size: 16px; }
.confetti { position: fixed; inset: 0; z-index: 60; pointer-events: none; }
#photo-step .grid2 + p { margin-top: 8px; }
#photo-step .notice { margin-top: 8px; }
