/* The shop owner's phone page. Mobile first; follows the phone's light or dark setting. */
:root {
  --bg: #f4f6f9; --surface: #ffffff; --surface-2: #f7f9fb; --surface-3: #eef2f7;
  --border: #e4e9f0; --border-strong: #cfd8e3; --text: #101828; --text-dim: #5b6b80; --text-faint: #94a3b8;
  --brand: #0ea394; --brand-dark: #0b7f74; --brand-glow: rgba(14, 163, 148, .28);
  --ok: #16a34a; --warn: #d97706; --warn-light: #fef3c7; --danger: #dc2626; --danger-light: #fee2e2;
  --r-lg: 14px; --font: "Segoe UI", system-ui, -apple-system, "Noto Sans", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1220; --surface: #121c2e; --surface-2: #17233a; --surface-3: #1e2c47;
    --border: #22324d; --border-strong: #2d4063; --text: #e6edf6; --text-dim: #a6b4c8; --text-faint: #71839c;
    --brand: #14b8a6; --brand-dark: #0d9488; --warn-light: #3a2a0c; --danger-light: #3b1214;
    color-scheme: dark;
  }
  .fig-fresh.offline .fig-fresh-text span { color: #fcd9a0; }
  .fig-tag.tone-warn { color: #fcd9a0 !important; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; font-family: var(--font); font-size: 14px; color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
[hidden] { display: none !important; }
svg { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.16em; }

.o-card { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; }
#signin { min-height: 100vh; display: grid; place-items: center; padding: 20px 16px; }
.o-signin { width: 100%; max-width: 400px; padding: 28px 22px 22px; }
.o-logo { width: 56px; height: 56px; border-radius: 16px; display: block; margin-bottom: 14px; }
.o-signin h1 { margin: 0 0 6px; font-size: 21px; letter-spacing: -.02em; }
.o-signin p { margin: 0 0 18px; color: var(--text-dim); line-height: 1.5; }
.o-signin label { display: block; margin-bottom: 14px; }
.o-signin label span { display: block; font-size: 12px; font-weight: 600; color: var(--text-dim); margin-bottom: 6px; }
input { width: 100%; padding: 13px 14px; font: inherit; font-size: 16px; color: var(--text); background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: 11px; outline: none; }
input:focus { border-color: var(--brand); box-shadow: 0 0 0 3.5px var(--brand-glow); }
.o-btn { width: 100%; padding: 14px; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--surface);
  color: var(--text); font: inherit; font-size: 15.5px; font-weight: 600; cursor: pointer; }
.o-primary { background: linear-gradient(160deg, var(--brand), var(--brand-dark)); border-color: var(--brand-dark); color: #fff; }
.o-btn:disabled { opacity: .6; }
.o-error { margin: -4px 0 14px; padding: 10px 12px; border-radius: 10px; background: var(--danger-light); color: var(--danger); font-size: 13.5px; line-height: 1.45; }
.o-small { font-size: 12.5px; margin: 16px 0 0 !important; text-align: center; }

.o-top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  background: var(--surface); border-bottom: 1px solid var(--border); }
.o-shop { flex: 1; min-width: 0; }
.o-shop b { display: block; font-size: 16.5px; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.o-shop span { display: block; font-size: 12px; color: var(--text-faint); }
.o-icon { border: 0; background: transparent; color: var(--text-dim); padding: 8px; border-radius: 10px; display: grid; place-items: center; cursor: pointer; }
.o-icon svg { width: 22px; height: 22px; }
.o-menu { position: fixed; right: 12px; top: 60px; z-index: 20; min-width: 200px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; box-shadow: 0 16px 40px rgba(16, 24, 40, .22); overflow: hidden; }
.o-menu button { display: block; width: 100%; text-align: left; padding: 14px 16px; border: 0; background: transparent; color: var(--text);
  font: inherit; font-size: 15px; cursor: pointer; border-top: 1px solid var(--border); }
.o-menu button:first-child { border-top: 0; }
#figures { padding: 14px 12px 8px; }
.o-loading { padding: 40px 0; text-align: center; color: var(--text-faint); }

.o-sheet-bg { position: fixed; inset: 0; z-index: 30; background: rgba(4, 10, 20, .5); display: grid; align-items: end; }
.o-sheet { background: var(--surface); border-radius: 20px 20px 0 0; padding: 20px 18px calc(18px + env(safe-area-inset-bottom)); max-width: 520px; width: 100%; margin: 0 auto; }
.o-sheet h3 { margin: 0 0 14px; font-size: 17px; }
.o-sheet label { display: block; margin-bottom: 12px; }
.o-sheet label span { display: block; font-size: 12px; font-weight: 600; color: var(--text-dim); margin-bottom: 6px; }
.o-row { display: flex; gap: 10px; margin-top: 6px; }

#toasts { position: fixed; left: 12px; right: 12px; top: 12px; z-index: 50; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { background: var(--surface); color: var(--text); border: 1px solid var(--border); border-left: 4px solid var(--brand); border-radius: 10px;
  padding: 12px 14px; font-size: 14px; box-shadow: 0 12px 30px rgba(16, 24, 40, .2); pointer-events: auto; }
.toast.err { border-left-color: var(--danger); }
.toast.ok { border-left-color: var(--ok); }
.toast b { display: block; margin-bottom: 2px; }
@media (min-width: 761px) { #figures { padding: 20px 20px 8px; } #toasts { left: auto; width: 380px; } }

/* Installing the app (see /site/pwa.js) */
.o-link { display: block; margin: 12px auto 0; border: 0; background: none; color: var(--brand-dark); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.o-strip-wrap { padding: 12px 12px 0; }
@media (min-width: 761px) { .o-strip-wrap { padding: 16px 20px 0; } }
