/* =====================================================
   CROUSTY TAC — shared design tokens (v2)
   Orange + white, matching the client-approved reference
   design. Poppins for headings, Work Sans for body text.
   ===================================================== */
:root {
  --orange: #ff5b0a;
  --orange-deep: #f45100;
  --orange-tint: #fff1e9;
  --ink: #202124;
  --charcoal: #303136;
  --white: #ffffff;
  --bg: #f6f6f8;
  --line: #e8e8ec;
  --muted: #85868b;
  --green: #2E9E5B;
  --star: #ff5b0a;
  --shadow: 0 5px 18px rgba(32, 33, 36, .06);
  --radius-s: 8px;
  --radius-m: 14px;
  --radius-l: 16px;
  --font-display: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Poppins', var(--font-body);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
input, select, textarea { font-family: inherit; }

:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ---------------------------------------------------
   Shared app-state screens: loading spinner, offline
   banner, generic error page. Used across all 3 areas.
   --------------------------------------------------- */
.app-loading {
  position: fixed; inset: 0; z-index: 200;
  background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px;
}
.app-loading .spinner {
  width: 40px; height: 40px; border-radius: 50%;
  border: 4px solid var(--orange-tint); border-top-color: var(--orange);
  animation: spin 0.8s linear infinite;
}
.app-loading .spinner-label { font-size: 13px; color: var(--muted); font-weight: 600; }
@keyframes spin { to { transform: rotate(360deg); } }

.app-banner {
  position: fixed; left: 12px; right: 12px; z-index: 150;
  display: none; align-items: center; gap: 10px;
  background: var(--ink); color: #fff;
  padding: 12px 16px; border-radius: var(--radius-m);
  font-size: 12.5px; font-weight: 600;
  box-shadow: 0 10px 24px rgba(0,0,0,.25);
}
.app-banner.show { display: flex; }
.app-banner.offline { top: 12px; background: var(--charcoal); }
.app-banner .dot { width: 8px; height: 8px; border-radius: 50%; background: #ff5b5b; flex-shrink: 0; }
.app-banner .retry-btn {
  margin-left: auto; background: var(--orange); color: #fff; border: none;
  padding: 6px 12px; border-radius: 999px; font-size: 11.5px; font-weight: 700;
}

.state-screen {
  min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 32px; background: var(--bg);
}
.state-screen .emoji { font-size: 52px; margin-bottom: 14px; }
.state-screen h1 { font-family: var(--font-display); font-weight: 700; font-size: 21px; color: var(--ink); margin: 0 0 8px; }
.state-screen p { color: var(--muted); font-size: 13.5px; max-width: 300px; margin: 0 0 22px; line-height: 1.55; }
.state-screen .action-btn {
  background: var(--orange); color: #fff; border: none; padding: 13px 28px;
  border-radius: 999px; font-weight: 700; font-size: 13.5px; box-shadow: 0 8px 18px rgba(255,122,41,.3);
}
.state-screen .action-btn.secondary { background: transparent; color: var(--orange-deep); box-shadow: none; border: 1.5px solid var(--orange); }
