/* Fonts: Barlow / Barlow Condensed came from next/font in the app build. Here
   they are loaded from Google Fonts with a system fallback so the pages still
   render correctly offline, when the font request cannot complete. */
:root {
  color-scheme: dark;
  --font-body: 'Barlow', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --font-display: 'Barlow Condensed', 'Barlow', system-ui, Arial, sans-serif;
  --ink: #04070d;
  --surface: #070c16;
  --surface-raised: #0a1220;
  --line: #14203a;
  --text: #eef2f7;
  --muted: #8fa2b8;
  --soft: #c8d4e2;
  --blue: #35b6ff;
  --green: #2fd06b;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
}

/* Panels and alerts are toggled with the `hidden` attribute; without this a
   later `display: grid/flex` rule would keep them on screen. */
[hidden] { display: none !important; }

/* Global contact bar — stays pinned to the top even while scrolling (Phase 1). */
.contact-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem 1.1rem;
  padding: 0.45rem 1rem;
  background: linear-gradient(90deg, #0c9d4d, #0f7a3d);
  color: #fff;
  font-family: var(--font-body), Arial, sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  position: sticky;
  top: 0;
  z-index: 300;
}
/* Never print the on-screen contact bar on receipts. */
@media print {
  .contact-bar,
  .staff-notify-root { display: none !important; }
}
.contact-bar__logo {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: cover;
  box-shadow: 0 1px 4px rgb(0 0 0 / 35%);
}

/* The header mark, sized here rather than per page. It used to live only in
   cafe.css and landing.css, so a page that loaded neither rendered the logo at
   its natural size — several hundred pixels of it. */
.brandLogo {
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 2px 10px rgb(0 0 0 / 35%);
}
.contact-bar__label {
  opacity: 0.85;
  font-weight: 500;
}
/* Logo used on the auth (login/signup) brand lockup. */
.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 9px;
  object-fit: cover;
  vertical-align: middle;
}
.contact-bar a {
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
}
.contact-bar a:hover {
  border-bottom-color: #fff;
}
@media (max-width: 520px) {
  .contact-bar { gap: 0.2rem 0.7rem; padding: 0.4rem 0.6rem; font-size: 0.8rem; }
  /* The mark is repeated in the header immediately below, and a whole row of a
     phone screen is too much to spend saying it twice. */
  .contact-bar__logo { display: none; }
  .contact-bar__label { flex-basis: 100%; text-align: center; }
}

/* Below this the three numbers stop fitting beside each other at 0.8rem. Shrink
   the type and let them share one row rather than stacking into four lines. */
@media (max-width: 400px) {
  .contact-bar { gap: 0.15rem 0.5rem; font-size: 0.72rem; }
  .contact-bar__logo { width: 22px; height: 22px; }
  .contact-bar a { flex: 1 1 auto; text-align: center; }
}

html {
  background: var(--ink);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-body), Arial, sans-serif;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

/* iOS zooms the whole page in when a focused field is under 16px, and never
   zooms back out. Every form on the site is affected, so the floor is set once
   here rather than per page. */
@media (max-width: 820px) {
  input,
  select,
  textarea { font-size: 16px; }
}

::selection {
  background: var(--blue);
  color: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 4px;
}

/* Auth pages (login / signup) */
.auth-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 34px;
  min-height: 100vh;
  padding: 48px 20px;
  background:
    radial-gradient(720px 420px at 50% -10%, rgb(53 182 255 / 14%), transparent 70%),
    radial-gradient(560px 380px at 85% 100%, rgb(47 208 107 / 7%), transparent 70%),
    var(--ink);
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display), sans-serif;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 3px;
  text-decoration: none;
  text-transform: uppercase;
}

.brand-mark {
  width: 14px;
  height: 14px;
  background: var(--blue);
  transform: skewX(-8deg);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  padding: 36px 32px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-raised);
  box-shadow: 0 24px 60px rgb(0 0 0 / 45%);
}

.auth-kicker {
  margin: 0 0 4px;
  color: var(--blue);
  font-family: var(--font-display), sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
}

.auth-card h1 {
  margin: 0 0 24px;
  font-family: var(--font-display), sans-serif;
  font-size: 38px;
  font-weight: 800;
  letter-spacing: 0.5px;
  line-height: 1;
  text-transform: uppercase;
}

.auth-notice {
  margin: 0 0 16px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--soft);
  font-size: 14px;
}

.auth-success {
  display: flex;
  gap: 12px;
  margin: 4px 0 16px;
  padding: 12px 14px;
  border: 1px solid rgb(47 208 107 / 45%);
  border-radius: 8px;
  background: rgb(47 208 107 / 10%);
}

.auth-success span {
  color: var(--green);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
}

.auth-success strong {
  color: var(--green);
  font-size: 14px;
}

.auth-success p {
  margin: 2px 0 0;
  color: var(--soft);
  font-size: 14px;
}

.auth-error {
  margin: 4px 0 16px;
  padding: 10px 14px;
  border: 1px solid rgb(255 92 92 / 45%);
  border-radius: 8px;
  background: rgb(255 92 92 / 10%);
  color: #ff9d9d;
  font-size: 14px;
}

.auth-input {
  width: 100%;
  margin: 4px 0 14px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
}

.auth-input::placeholder { color: var(--muted); }

.auth-submit {
  width: 100%;
  margin-top: 6px;
  padding: 13px 18px;
  border: 0;
  border-radius: 8px;
  background: var(--blue);
  color: var(--ink);
  cursor: pointer;
  font-family: var(--font-display), sans-serif;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  transition: filter 200ms var(--ease-out), translate 200ms var(--ease-out);
}

.auth-submit:hover:not(:disabled) {
  filter: brightness(1.12);
  translate: 0 -1px;
}

.auth-submit:disabled {
  cursor: default;
  opacity: 0.65;
}

.auth-alt {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.auth-alt a {
  color: var(--blue);
  text-decoration: none;
}

.auth-alt a:hover {
  text-decoration: underline;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
