/* ==========================================================================
   Simple app — "field scanner".
   One job per screen, one bright action, huge type, calm dark surface.
   Scoped to body.simple-app so the detailed register pages are unchanged.
   ========================================================================== */
@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-latin.031441473c86.woff2") format("woff2");
  font-weight: 400 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

body.simple-app {
  --ink: #0c1612;
  --ink-2: #13211b;
  --ink-3: #1c2e26;
  --line: rgba(236, 244, 232, .14);
  --text: #eef4ea;
  --muted: #9fb2a6;
  --signal: #c8f25a;
  --signal-ink: #10200a;
  --alert: #ff5d4d;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(120% 60% at 100% 0%, rgba(200, 242, 90, .07), transparent 60%),
    radial-gradient(90% 50% at 0% 100%, rgba(80, 160, 120, .10), transparent 60%),
    var(--ink);
  font-family: "Archivo", system-ui, sans-serif;
  font-stretch: 100%;
  -webkit-tap-highlight-color: transparent;
}
.simple-app .primary-nav { display: none; }
.simple-app .topbar { padding: 14px 18px; background: transparent; border: 0; box-shadow: none; }
.simple-app .brand, .simple-app .brand strong, .simple-app .brand-product { color: var(--text); }
.simple-app .brand small { display: none; }
.simple-app .brand-mark { background: var(--signal); color: var(--signal-ink); }
.simple-app .user-chip { background: transparent; border: 0; color: var(--muted); }
.simple-app .user-name { display: none; }
.simple-app .link-button, .simple-app .settings-link { color: var(--muted); }
.simple-app .shell { max-width: 560px; padding: 4px 18px 140px; }
.simple-app h1, .simple-app h2 { color: var(--text); font-stretch: 78%; font-weight: 850; letter-spacing: -.01em; line-height: 1.02; }
.simple-app .muted, .simple-app small { color: var(--muted); }
.simple-app .card { background: transparent; border: 0; box-shadow: none; padding: 0; color: var(--text); }

/* Buttons: one bright action, everything else quiet. */
.simple-app .button { border-radius: 16px; font-family: inherit; font-weight: 800; letter-spacing: .01em; transition: transform .12s ease, background .2s ease; }
.simple-app .button:active { transform: scale(.98); }
.simple-app .button.primary { background: var(--signal); border: 0; color: var(--signal-ink); box-shadow: 0 10px 30px rgba(200, 242, 90, .18); }
.simple-app .button.primary:disabled { background: var(--ink-3); color: var(--muted); box-shadow: none; }
.simple-app .button.secondary { background: transparent; border: 1.5px solid var(--line); color: var(--text); }
.simple-app .messages .message { border: 0; border-radius: 14px; background: var(--ink-3); color: var(--text); }
.simple-app .messages .message.success { background: rgba(200, 242, 90, .12); color: var(--signal); }
.simple-app .messages .message.warning, .simple-app .messages .message.error { background: rgba(255, 93, 77, .14); color: #ffb3aa; }
.simple-app .field-error { color: #ffb3aa; background: rgba(255, 93, 77, .12); border: 0; border-radius: 12px; }

/* Step marker: "2 / 4" plus dots. */
.flow-step { display: flex; align-items: center; gap: 10px; margin: 6px 0 14px; color: var(--muted); font-weight: 700; font-size: .9rem; letter-spacing: .12em; }
.flow-step i { width: 26px; height: 5px; border-radius: 3px; background: var(--ink-3); }
.flow-step i.on { background: var(--signal); }
.flow-title { margin: 0 0 6px; font-size: clamp(2.3rem, 11vw, 3.2rem); }
.flow-hint { margin: 0 0 20px; font-size: 1.05rem; }

/* Home: two giant tiles. */
.simple-app .staff-home { gap: 14px; margin-top: 8vh; }
.simple-app .staff-home__button { min-height: 32vh; justify-items: start; align-content: end; padding: 24px; font-size: clamp(3rem, 16vw, 4.6rem); font-stretch: 70%; font-weight: 900; letter-spacing: .01em; animation: rise .45s ease both; }
.simple-app .staff-home__button + .staff-home__button { animation-delay: .07s; }
.simple-app .staff-home__button small { font-size: 1.05rem; font-stretch: 100%; font-weight: 600; opacity: .8; }
.simple-app .staff-home__button svg { width: 38px; height: 38px; margin-bottom: auto; stroke-width: 2.2; }
.simple-app .staff-home__button.secondary { background: var(--ink-2); border-color: var(--line); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* Wizard steps: bare pages with a pinned action bar. */
/* Fade only: a transform animation would stop the action bar from pinning to the screen. */
.simple-app .wizard-page { background: transparent; border: 0; box-shadow: none; padding: 0; animation: fade .25s ease both; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.simple-app .wizard-actions {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: grid; grid-template-columns: 72px 1fr; gap: 10px;
  padding: 14px 16px max(16px, env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--ink) 70%, transparent);
}
.simple-app .wizard-actions .button { min-height: 64px; font-size: 1.35rem; }
.simple-app .wizard-actions .button.secondary { font-size: 0; position: relative; }
.simple-app .wizard-actions .button.secondary::before { content: "←"; font-size: 1.6rem; }
.simple-app .wizard-actions > span:empty { display: none; }
.simple-app .wizard-actions:has(> span:empty) { grid-template-columns: 1fr; }

/* Photos step, before/after the camera. */
.simple-app .photo-first-section { background: transparent; border: 0; padding: 0; }
.simple-app .photo-first-section h2 { font-size: 2.4rem; }
.simple-app #start-device-camera { min-height: 180px; font-size: 1.6rem; border-radius: 22px; }
.simple-app .photo-fallback summary, .simple-app .gallery-photo-button { color: var(--muted); }
.simple-app .selected-photo-summary { background: var(--ink-2); border: 1px solid var(--line); border-radius: 18px; }

/* Camera (dialog) — already dark; tighten and brighten. */
.simple-app .device-camera-dialog { background: #050b08; font-family: inherit; }
.simple-app .device-camera-header h2 { font-stretch: 80%; font-size: 1.5rem; }
.simple-app .device-camera-header .eyebrow, .simple-app .camera-guidance { display: none; }
.simple-app .camera-viewport { border-radius: 20px; }
.simple-app .camera-shutter { width: 78px; height: 78px; border-width: 4px; }
.simple-app .camera-shutter span { background: var(--signal); }
.simple-app .camera-thumbnail__image { border-radius: 12px; }
.simple-app .camera-thumbnail.is-saving { opacity: .6; }
.simple-app #review-device-photos.camera-next-button,
.simple-app #review-device-photos { background: var(--signal); color: var(--signal-ink); border: 0; font-size: 1.4rem; font-weight: 900; min-height: 64px; border-radius: 16px; }

/* Select photos: its own screen inside the camera dialog. */
.simple-app #device-camera-review-stage { background: #050b08; color: var(--text); padding: 6px 16px calc(110px + env(safe-area-inset-bottom)); overflow-y: auto; }
.simple-app #device-camera-review-stage > p { color: var(--muted); font-size: 1.05rem; }
.simple-app .camera-review-photo { border: 3px solid var(--signal); border-radius: 16px; background: var(--ink-2); }
.simple-app .camera-review-photo.is-deselected { border-color: transparent; opacity: .3; }
.simple-app .camera-review-count { color: var(--muted); text-align: center; }
.simple-app .camera-review-actions {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; display: grid; grid-template-columns: 1fr 1.6fr; gap: 10px;
  padding: 14px 16px max(16px, env(safe-area-inset-bottom)); background: linear-gradient(to top, #050b08 70%, transparent);
}
.simple-app .camera-review-actions .button { min-height: 64px; font-size: 1.25rem; }
.simple-app .camera-review-actions .button.primary { background: var(--signal); color: var(--signal-ink); border: 0; }

/* What is it? */
.simple-app #id_notes { width: 100%; min-height: 150px; padding: 16px; border: 1.5px solid var(--line); border-radius: 18px; background: var(--ink-2); color: var(--text); font: 500 1.2rem/1.4 "Archivo", system-ui, sans-serif; }
.simple-app #id_notes:focus { outline: none; border-color: var(--signal); }
.simple-app .capture-voice { justify-items: center; margin: 22px 0; }
.simple-app [data-capture-voice-start], .simple-app [data-capture-voice-stop] {
  width: 132px; height: 132px; min-height: 0; padding: 0; border-radius: 50%;
  display: grid; place-items: center; align-content: center; gap: 6px; font-size: .95rem;
}
.simple-app [data-capture-voice-start] { background: var(--ink-2); border: 2px solid var(--signal); color: var(--signal); }
.simple-app [data-capture-voice-start] svg { width: 40px; height: 40px; }
.simple-app [data-capture-voice-stop] { background: var(--alert); color: white; border: 0; box-shadow: 0 0 0 0 rgba(255, 93, 77, .6); animation: recording 1.3s ease-out infinite; }
@keyframes recording { to { box-shadow: 0 0 0 26px rgba(255, 93, 77, 0); } }
.simple-app [data-capture-voice-preview] { width: 100%; }
.simple-app [data-capture-voice-delete] { color: var(--muted); }

/* Where is it? */
.simple-app .location-button-grid { display: grid; gap: 10px; }
.simple-app .location-choice {
  min-height: 70px; padding: 0 20px; display: flex; align-items: center; gap: 14px;
  border: 1.5px solid var(--line); border-radius: 18px; background: var(--ink-2); color: var(--text);
  font: 750 1.3rem "Archivo", system-ui, sans-serif; text-align: left;
}
.simple-app .location-choice[aria-pressed="true"] { background: var(--signal); border-color: var(--signal); color: var(--signal-ink); }
.simple-app .add-location-choice { border-style: dashed; color: var(--muted); background: transparent; }
.simple-app .add-location-panel input, .simple-app .location-detail-field input { background: var(--ink-2); border: 1.5px solid var(--line); color: var(--text); border-radius: 14px; min-height: 54px; font-size: 1.1rem; }

/* Label */
.simple-app .label-print-button { min-height: 84px; font-size: 2rem; font-stretch: 75%; letter-spacing: .08em; border-radius: 20px; }
.simple-app .label-copy-list .label-stage { min-height: 150px; margin: 16px 0; background: var(--ink-2); border-radius: 20px; }
.simple-app .label-image { box-shadow: 0 16px 40px rgba(0, 0, 0, .45); border-radius: 6px; }
.simple-app .print-next { margin-top: 10px; }
.simple-app .label-next-actions { display: grid; grid-template-columns: 1.5fr 1fr; gap: 10px; }
.simple-app .label-next-actions .button { min-height: 60px; }

/* Find */
.simple-app .staff-find { padding: 0; }
.simple-app .find-search input { background: var(--ink-2); border: 1.5px solid var(--line); color: var(--text); border-radius: 14px; }
.simple-app .find-search .button { min-height: 48px; }
.simple-app .find-row { border-color: var(--line); padding: 12px 0; }
.simple-app .find-thumb { background: var(--ink-3); border-radius: 12px; }
.simple-app .find-text strong { color: var(--text); font-size: 1.05rem; }
.simple-app .find-row .button { min-height: 48px; border-radius: 12px; }

/* Sign in */
.simple-app .login-card { margin-top: 10vh; }
.simple-app .login-card h1 { font-size: 3rem; }
.simple-app .login-card .eyebrow { color: var(--signal); }
.simple-app .login-card input { width: 100%; min-height: 64px; padding: 0 18px; border: 1.5px solid var(--line); border-radius: 16px; background: var(--ink-2); color: var(--text); font: 700 1.6rem "Archivo", system-ui, sans-serif; letter-spacing: .06em; }
.simple-app .login-card input:focus { outline: none; border-color: var(--signal); }
.simple-app .login-card label { display: grid; gap: 8px; color: var(--muted); font-weight: 600; }
.simple-app .login-card .button { min-height: 64px; font-size: 1.25rem; }
.simple-app .login-card a { color: var(--muted); }

/* Polish */
.simple-app .staff-home__button { text-align: left; justify-items: start; }
.simple-app .staff-home__button small { color: inherit; }
.simple-app .button[data-capture-voice-start] { background: var(--ink-2); border: 2px solid var(--signal); color: var(--signal); box-shadow: none; }
.simple-app .button[data-capture-voice-stop] { background: var(--alert); color: white; box-shadow: 0 0 0 0 rgba(255, 93, 77, .6); animation: recording 1.3s ease-out infinite; }
.simple-app .print-next {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; margin: 0;
  padding: 14px 16px max(16px, env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--ink) 70%, transparent);
}
.simple-app .print-next h2, .simple-app .print-next p { display: none; }
.simple-app .staff-home .staff-home__button { justify-content: start; justify-items: start; }
.simple-app .label-next-actions .button.primary { background: transparent; border: 1.5px solid var(--signal); color: var(--signal); box-shadow: none; }
.simple-app .voice-status { min-height: 1.4em; margin: 0; text-align: center; font-size: 1.05rem; font-weight: 600; color: var(--signal); }
.simple-app .voice-status:empty { display: none; }
.simple-app .voice-status.is-error { padding: 12px 14px; border-radius: 14px; background: rgba(255, 93, 77, .16); color: #ffc2bb; text-align: left; }
.simple-app .button[data-capture-voice-start]:disabled { opacity: .7; }

/* Voice note: idle → recording → recorded. Only the current state is shown. */
.capture-voice .voice-idle, .capture-voice .voice-live, .capture-voice .voice-recorded { display: none; }
.capture-voice[data-voice-state="idle"] .voice-idle,
.capture-voice[data-voice-state="recording"] .voice-live,
.capture-voice[data-voice-state="recorded"] .voice-recorded { display: grid; justify-items: center; gap: 14px; width: 100%; }
.simple-app .capture-voice { display: grid; gap: 14px; margin: 18px 0 24px; }
.simple-app .button.voice-mic {
  width: 140px; height: 140px; min-height: 0; padding: 0; border-radius: 50%;
  display: grid; place-content: center; justify-items: center; gap: 6px;
  background: var(--ink-2); border: 2px solid var(--signal); color: var(--signal); font-size: 1rem; box-shadow: none;
}
.simple-app .button.voice-mic svg { width: 44px; height: 44px; }
.voice-meter { height: 64px; width: 100%; max-width: 320px; display: grid; grid-template-columns: repeat(15, 1fr); gap: 6px; align-items: center; }
.voice-meter i { height: 100%; border-radius: 4px; background: var(--signal, #c8f25a); transform: scaleY(.08); transform-origin: center; transition: transform .08s linear; }
.simple-app .button.voice-stop {
  width: 140px; height: 140px; min-height: 0; padding: 0; border-radius: 50%;
  display: grid; place-content: center; justify-items: center; gap: 8px;
  background: var(--alert); color: white; border: 0; font-size: 1.4rem; font-weight: 900;
  box-shadow: 0 0 0 0 rgba(255, 93, 77, .6); animation: recording 1.3s ease-out infinite;
}
.voice-stop b { width: 30px; height: 30px; border-radius: 6px; background: white; }
.voice-hint { margin: 0; color: var(--muted, #9fb2a6); font-size: .95rem; }
.voice-player { width: 100%; display: grid; grid-template-columns: 76px 1fr; gap: 14px; align-items: center; padding: 14px; border: 1.5px solid var(--line, #ccc); border-radius: 20px; background: var(--ink-2, #fff); }
.voice-play { width: 76px; height: 76px; border: 0; border-radius: 50%; background: var(--signal, #c8f25a); color: var(--signal-ink, #111); font-size: 1.7rem; font-weight: 900; display: grid; place-items: center; cursor: pointer; }
.voice-play:active { transform: scale(.96); }
.voice-track { display: grid; gap: 8px; }
.voice-progress { height: 8px; border-radius: 4px; background: var(--ink-3, #ddd); overflow: hidden; }
.voice-progress i { display: block; height: 100%; background: var(--signal, #c8f25a); transform: scaleX(0); transform-origin: left; transition: transform .2s linear; }
.voice-track small { color: var(--muted, #666); font-size: 1rem; font-weight: 700; }
.voice-actions { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.simple-app .voice-actions .button { min-height: 54px; font-size: 1.05rem; }
