/* Afrira Log staff app. Large type, large targets, high contrast. */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: #F5F7F8;
  color: #13212B;
  font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.4;
  -webkit-text-size-adjust: 100%;
}
button, input, textarea { font: inherit; }
.afl-shell { max-width: 560px; min-height: 100vh; min-height: 100dvh; margin: 0 auto; display: flex; flex-direction: column; background: #F5F7F8; }

.afl-brand { background: #0E6F78; color: #fff; padding: 28px 20px 22px; }
.afl-brand-mark { font-size: 14px; font-weight: 700; letter-spacing: 0.08em; }
.afl-brand h1 { margin: 6px 0 0; font-size: 24px; line-height: 1.25; }

.afl-top { background: #fff; border-bottom: 1px solid #DDE3E7; padding: 16px 20px 14px; position: sticky; top: 0; z-index: 2; }
.afl-top-row { display: flex; justify-content: space-between; align-items: center; }
.afl-top h1 { margin: 8px 0 10px; font-size: 19px; }
.afl-progress { font-size: 14px; color: #4A5A66; }
.afl-bar { height: 8px; background: #E3E9EC; border-radius: 4px; overflow: hidden; }
.afl-bar div { height: 100%; background: #0E6F78; border-radius: 4px; }

.afl-main { flex: 1; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.afl-main h2 { margin: 0; font-size: 24px; line-height: 1.25; }
.afl-hint, .afl-quiet { margin: 0; color: #4A5A66; font-size: 16px; }
.afl-error { margin: 0; padding: 12px 14px; border-radius: 12px; background: #FDECEA; color: #8A1C12; font-weight: 600; }

.afl-link { background: none; border: none; padding: 8px 0; color: #0E6F78; font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer; }
.afl-center { align-self: center; }

.afl-home { gap: 14px; }
.afl-card { display: flex; align-items: center; gap: 16px; padding: 16px; background: #fff; border: 1px solid #CBD4DA; border-radius: 16px; text-align: left; cursor: pointer; color: #13212B; }
.afl-card:active { background: #E2F3F4; }
.afl-card-num { flex: none; width: 64px; height: 64px; border-radius: 12px; background: #E6ECEF; color: #0E6F78; font-size: 28px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.afl-card-text { display: flex; flex-direction: column; gap: 4px; }
.afl-card-title { font-size: 19px; font-weight: 700; }
.afl-card-sub { font-size: 15px; color: #4A5A66; }
.afl-foot { display: flex; justify-content: space-between; padding: 12px 20px 22px; background: #fff; border-top: 1px solid #DDE3E7; }

.afl-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.afl-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.afl-tile { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 10px; min-height: 120px; background: #fff; border: 1px solid #CBD4DA; border-radius: 14px; cursor: pointer; color: #13212B; text-align: center; }
.afl-tile.is-on { border: 3px solid #0E6F78; background: #E2F3F4; padding: 8px; }
.afl-tile-mark { display: flex; align-items: center; justify-content: center; width: 100%; height: 64px; border-radius: 10px; background: #E6ECEF; color: #33444F; font-size: 20px; font-weight: 700; }
.afl-big .afl-tile-mark { height: 96px; font-size: 24px; }
.afl-small .afl-tile { min-height: 0; }
.afl-small .afl-tile-mark { height: 48px; font-size: 16px; }
.afl-small .afl-tile-label { font-size: 14px; }
.afl-tile-label { font-size: 15px; font-weight: 600; line-height: 1.25; }
.afl-tile-sub { font-size: 13px; color: #4A5A66; }

.afl-display { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 14px 18px; background: #fff; border: 2px solid #0E6F78; border-radius: 14px; }
.afl-num { font-size: 40px; font-weight: 700; overflow-wrap: anywhere; }
.afl-unit { font-size: 18px; font-weight: 600; color: #4A5A66; }
.afl-keys { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.afl-key { height: 60px; border-radius: 12px; border: 1px solid #CBD4DA; background: #fff; font-size: 24px; font-weight: 600; color: #13212B; cursor: pointer; }
.afl-key:active { background: #E2F3F4; }

.afl-label { font-weight: 600; }
.afl-input { width: 100%; padding: 14px 16px; font-size: 20px; border: 2px solid #CBD4DA; border-radius: 12px; background: #fff; color: #13212B; }
.afl-input:focus { outline: none; border-color: #0E6F78; }

.afl-photo { height: 260px; border-radius: 14px; background: #1E2B33; color: #fff; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.afl-photo img { width: 100%; height: 100%; object-fit: contain; }
.afl-file { position: relative; overflow: hidden; }
.afl-file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.afl-voice { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 16px 0 8px; }
.afl-mic { width: 132px; height: 132px; border-radius: 50%; border: none; background: #0E6F78; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.afl-mic.is-rec { background: #B3261E; }
.afl-mic.is-done { background: #2E7D4F; }
.afl-voice-text { margin: 0; font-weight: 600; text-align: center; }

.afl-summary { background: #fff; border: 1px solid #CBD4DA; border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.afl-summary p { margin: 0; font-size: 19px; }

.afl-nav { position: sticky; bottom: 0; display: flex; gap: 12px; padding: 14px 20px 20px; background: #fff; border-top: 1px solid #DDE3E7; }
.afl-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 60px; padding: 0 24px; border-radius: 30px; font-size: 18px; font-weight: 700; cursor: pointer; text-decoration: none; }
.afl-nav .afl-btn-secondary { flex: 1; }
.afl-nav .afl-btn-primary { flex: 2; }
.afl-btn-primary { background: #0E6F78; color: #fff; border: none; }
.afl-btn-secondary { background: #fff; color: #0E6F78; border: 2px solid #0E6F78; }
.afl-btn:disabled { opacity: 0.45; cursor: default; }

.afl-done { display: flex; flex-direction: column; align-items: center; gap: 12px; padding-top: 24px; text-align: center; }
.afl-done p { margin: 0; font-size: 18px; }
.afl-done .afl-btn { width: 100%; }

.afl-login { display: flex; flex-direction: column; gap: 10px; }
.afl-login label { font-weight: 600; }
.afl-login input { padding: 14px 16px; font-size: 20px; border: 2px solid #CBD4DA; border-radius: 12px; }
.afl-login .afl-btn { margin-top: 10px; }

@media (max-width: 360px) {
  .afl-cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.afl-fields { display: flex; flex-direction: column; gap: 8px; }
.afl-fields .afl-label { margin-top: 8px; }
.afl-opt { font-weight: 400; color: #4A5A66; font-size: 15px; }

.afl-select { appearance: none; -webkit-appearance: none; min-height: 60px; font-weight: 600; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%230E6F78' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 16px center; padding-right: 48px; }
.afl-select.is-on { border: 3px solid #0E6F78; background-color: #E2F3F4; }
.afl-label[for="afl-cust"] { margin-top: 18px; display: block; }

.afl-receipt { width: 100%; background: #fff; border: 2px solid #DDE3E7; border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 10px; margin: 6px 0 4px; }
.afl-receipt-h { margin: 0; font-weight: 600; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.afl-receipt-h b { color: #0E6F78; font-size: 22px; }
.afl-btn-wa { background: #1FAF54; color: #fff; border-color: #1FAF54; text-decoration: none; }
.afl-receipt .afl-btn { text-decoration: none; }

.afl-foot { flex-wrap: wrap; gap: 10px 18px; }
.afl-ok { margin: 0 0 8px; padding: 14px 16px; border-radius: 12px; background: #E6F4EA; color: #14532D; font-weight: 600; }
.afl-center { text-align: center; margin-top: 16px; }
