/* ============================================================
   METAPAD brand styles
   Navy = trust, teal = actions, coral = energy (used sparingly)
   ============================================================ */
:root {
  --ink: #0f2b3d;
  --bg: #f4f7f8;
  --fg: #14232e;
  --muted: #5d6f7c;
  --line: #dde5ea;
  --brand: #0b7a75;
  --brand-dark: #085f5b;
  --brand-fg: #fff;
  --accent: #ff6b4a;
  --danger: #c53030;
  --ok: #2f855a;
  --warn: #b7791f;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(15,43,61,.06), 0 4px 16px rgba(15,43,61,.05);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font: 16px/1.55 ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--fg);
}
main.container { flex: 1; width: 100%; }
a { color: var(--brand); }
h1, h2, h3 { color: var(--ink); letter-spacing: -.01em; line-height: 1.2; }
h1 { font-size: 1.6rem; margin: 0 0 1rem; font-weight: 800; }
h2 { font-size: 1.2rem; margin: 1.75rem 0 .75rem; font-weight: 750; }
h3 { font-size: 1rem; margin: 1rem 0 .5rem; font-weight: 700; }

/* ---------- Top bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem 1rem;
  padding: .7rem 1rem;
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
}
.brand { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--ink); }
.brand-mark { width: 32px; height: 32px; flex: none; }
.brand-name { font-weight: 800; letter-spacing: .06em; font-size: 1.05rem; }
.topbar nav { display: flex; gap: 1rem; align-items: center; }
.topbar nav a { text-decoration: none; color: var(--ink); font-weight: 600; font-size: .95rem; white-space: nowrap; }
.topbar nav a:hover { color: var(--brand); }
.topbar nav a.btn { color: var(--brand-fg); }
.topbar .inline { display: inline; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; font-size: .95rem; color: var(--muted); cursor: pointer; white-space: nowrap; }
.linkbtn:hover { color: var(--danger); }
.nav-badge { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: var(--ink); font-size: .72rem; font-weight: 800; text-align: center; line-height: 18px; }

/* ---------- Hamburger toggle (mobile only) ---------- */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  flex: none;
}
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .15s, opacity .15s; }
body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 719px) {
  .nav-toggle { display: flex; }

  /* The nav becomes a dropdown panel, closed by default, stacked
     vertically -- no more horizontal scrolling with no visual cue. */
  .topbar nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    order: 3;
    border-top: 1px solid var(--line);
    margin-top: .6rem;
    padding-top: .4rem;
  }
  body.nav-open .topbar nav { display: flex; }

  .topbar nav a, .topbar nav .linkbtn, .topbar nav form.inline {
    width: 100%;
  }
  .topbar nav a, .topbar nav .linkbtn {
    padding: .7rem .2rem;
    border-bottom: 1px solid var(--line);
    white-space: normal;
  }
  .topbar nav a.btn { margin: .5rem 0; width: auto; }
  .topbar nav form.inline .linkbtn { padding: .7rem .2rem; text-align: left; }
}

.container { max-width: 960px; margin: 0 auto; padding: 1.25rem 1rem 4rem; }

/* ---------- Landing page ---------- */
.hero {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 2rem;
  padding: 2.5rem 1.25rem;
  border-radius: 20px;
  color: #fff;
  background: var(--ink);
}
@media (min-width: 800px) {
  .hero { grid-template-columns: 1.15fr .85fr; padding: 3rem; text-align: left; }
  .hero-copy { text-align: left; }
  .hero-cta, .hero-points { justify-content: flex-start; }
  .lead { margin: 0 0 1.25rem; }
}
.hero-copy { text-align: center; }
.hero h1 { color: #fff; font-size: clamp(1.9rem, 5.5vw, 2.7rem); font-weight: 850; margin: 0 0 1rem; }
.lead { font-size: 1.1rem; color: var(--muted); max-width: 42ch; margin: 0 auto 1.25rem; }
.hero .lead { color: rgba(255,255,255,.82); }
.hero-cta { display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; margin: 1.25rem 0 1rem; }
.hero-points { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; justify-content: center; padding: 0; margin: 1rem 0 0; font-size: .92rem; color: rgba(255,255,255,.85); }
.hero-points li::before { content: "\2713"; color: var(--accent); font-weight: 800; margin-right: .4rem; }
.hero-stat { margin: 1.25rem 0 0; font-size: .95rem; color: rgba(255,255,255,.75); }
.hero-stat strong { color: #fff; font-size: 1.1rem; }

/* A real assignment, shown the way it looks in the app -- the hero's
   visual anchor instead of an abstract gradient. */
.hero-ticket {
  background: #fff;
  color: var(--fg);
  border-radius: 14px;
  padding: 1.1rem 1.25rem 0;
  box-shadow: 0 20px 40px rgba(0,0,0,.25);
  transform: rotate(-1.2deg);
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  font-size: .92rem;
}
.hero-ticket-row { display: flex; justify-content: space-between; align-items: center; }
.hero-ticket-head { margin-bottom: .3rem; }
.hero-ticket-store { font-weight: 800; color: var(--ink); }
.hero-ticket-body { border-top: 1px dashed var(--line); margin-top: .5rem; padding-top: .6rem; }
.hero-ticket-line { display: flex; justify-content: space-between; padding: .25rem 0; color: var(--muted); }
.hero-ticket-line strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.hero-ticket-foot {
  margin: .6rem -1.25rem 0;
  padding: .55rem 1.25rem;
  background: var(--bg);
  border-radius: 0 0 14px 14px;
  font-size: .78rem;
  color: var(--muted);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

.section { margin-top: 2.5rem; }
.section-title { text-align: center; font-size: 1.4rem; margin: 0 0 1.25rem; }
.steps { display: grid; gap: .85rem; grid-template-columns: 1fr; }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.step { background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--brand); border-radius: 8px; padding: 1.1rem; }
.step h3 { margin-top: .6rem; }
.step p { margin: 0; color: var(--muted); font-size: .95rem; }
.step-num { display: inline-flex; width: 28px; height: 28px; align-items: center; justify-content: center; border-radius: 50%; border: 2px solid var(--brand); color: var(--brand); font-weight: 800; font-size: .85rem; }
.features { display: grid; gap: .75rem; grid-template-columns: 1fr; }
@media (min-width: 720px) { .features { grid-template-columns: 1fr 1fr; } }
.feature { display: flex; flex-direction: column; gap: .2rem; padding: 1rem 1.1rem; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 4px; }
.feature strong { color: var(--ink); }
.feature span { color: var(--muted); font-size: .95rem; }
.faq { max-width: 720px; margin: 0 auto; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .85rem 1rem; margin-bottom: .6rem; }
.faq summary { cursor: pointer; font-weight: 700; color: var(--ink); }
.faq details p { margin: .6rem 0 0; color: var(--muted); }
.section > .small { text-align: center; }
.cta-band { margin-top: 2.5rem; text-align: center; padding: 2.25rem 1.25rem; border-radius: 16px; background: var(--brand); }
.cta-band h2 { margin: 0 0 .3rem; font-size: 1.4rem; color: #fff; }
.cta-band p { margin: 0 0 1rem; color: rgba(255,255,255,.85); }
.cta-band .btn-accent { box-shadow: 0 6px 16px rgba(0,0,0,.18); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: #fff; }
.footer-inner { max-width: 960px; margin: 0 auto; padding: 1.25rem 1rem 5rem; display: flex; flex-direction: column; gap: .6rem; }
.footer-brand { font-weight: 800; letter-spacing: .06em; color: var(--ink); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; }
.site-footer nav a { color: var(--muted); text-decoration: none; font-size: .92rem; }
.site-footer nav a:hover { color: var(--brand); }
.site-footer p { margin: 0; }

/* ---------- Layout blocks ---------- */
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem;
  margin: 1rem 0;
  box-shadow: var(--shadow);
}
.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr 1fr; }
@media (min-width: 720px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
}
.card .k { font-size: .82rem; color: var(--muted); font-weight: 600; border-left: 3px solid var(--brand); padding-left: .5rem; }
.card .v { font-size: 1.6rem; font-weight: 800; color: var(--ink); }

.cards { display: grid; gap: .75rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .cards { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .cards { grid-template-columns: 1fr 1fr 1fr; } }
.job { display: block; color: inherit; text-decoration: none; transition: border-color .15s, transform .15s; }
.job:hover { border-color: var(--brand); transform: translateY(-1px); }
.job .pay { font-weight: 800; color: var(--ok); }

/* ---------- Forms ---------- */
.field { margin: 0 0 .9rem; display: flex; flex-direction: column; gap: .3rem; }
.field label { font-size: .9rem; color: var(--muted); font-weight: 600; }
input:not([type]), input[type="text"], input[type="email"], input[type="password"],
input[type="number"], input[type="tel"], input[type="date"], input[type="datetime-local"],
input[type="file"], select, textarea {
  width: 100%;
  min-height: 44px;
  padding: .6rem .75rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  background: #fff;
  color: inherit;
}
input:focus, select:focus, textarea:focus {
  outline: 3px solid color-mix(in srgb, var(--brand) 30%, transparent);
  outline-offset: 0;
  border-color: var(--brand);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: .55rem 1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.2;
  transition: background .15s, border-color .15s, filter .15s;
}
.btn:hover { border-color: var(--brand); color: var(--brand); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: var(--brand-fg); }
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: var(--brand-fg); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.btn-accent:hover { filter: brightness(1.06); color: var(--ink); border-color: var(--accent); }
.btn-ghost { background: transparent; }
.btn-ghost-light { background: transparent; border-color: rgba(255,255,255,.45); color: #fff; }
.btn-ghost-light:hover { background: rgba(255,255,255,.1); border-color: #fff; color: #fff; }
.btn-danger { color: var(--danger); border-color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-sm { min-height: 34px; padding: .3rem .7rem; font-size: .88rem; }
.btn-lg { min-height: 50px; padding: .7rem 1.4rem; font-size: 1.05rem; }

.row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: .5rem 0; }
.row.between { justify-content: space-between; }
.inline { display: inline; }

/* ---------- Tables & lists ---------- */
.table-wrap, .table { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); display: block; -webkit-overflow-scrolling: touch; }
@media (min-width: 720px) { .table { display: table; } }
.table th, .table td { padding: .65rem .8rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { background: #f0f5f7; font-size: .82rem; color: var(--muted); font-weight: 700; border-bottom: 2px solid var(--line); }
.table tr:last-child td { border-bottom: none; }

.list { list-style: none; padding: 0; margin: 1rem 0; }
.list li { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .75rem 1rem; margin-bottom: .5rem; }
.list li.unread { border-left: 4px solid var(--accent); }

.pill { display: inline-block; padding: .1rem .55rem; border-radius: 999px; font-size: .75rem; font-weight: 700; background: #e6eef2; color: #3b5163; text-transform: lowercase; }
.pill-open, .pill-approved, .pill-paid, .pill-verified, .pill-active { background: #d6f2e1; color: #1a5e3a; }
.pill-draft, .pill-applied, .pill-pending, .pill-revision { background: #fff2c8; color: #7a5a00; }
.pill-closed, .pill-rejected, .pill-suspended { background: #f8dcdc; color: #7a1a1a; }
.pill-submitted { background: #d6e6f5; color: #1a3d6b; }

.alert { padding: .75rem 1rem; border-radius: 10px; margin: .75rem 0; border: 1px solid transparent; }
.alert-success { background: #e3f6e9; border-color: #b7e3c6; color: #1a5e3a; }
.alert-error   { background: #fbe3e3; border-color: #f0bcbc; color: #7a1a1a; }
.alert-info    { background: #e3eefb; border-color: #b7cbe3; color: #1a3d6b; }

.muted { color: var(--muted); }
.small { font-size: .85rem; }
.req { color: var(--danger); }
.rating { display: flex; gap: .75rem; flex-wrap: wrap; }
.rating label { display: inline-flex; gap: .25rem; align-items: center; }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: 1rem; }

/* ---------- Support widget ---------- */
.support-widget {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 50;
  font-size: .95rem;
}
.support-fab {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: var(--ink);
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0,0,0,.18);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.support-fab:hover { filter: brightness(1.05); }
.support-badge {
  position: absolute;
  top: -4px; right: -4px;
  background: var(--danger);
  color: #fff;
  font-size: .7rem;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  font-weight: 700;
}
.support-panel {
  position: absolute;
  right: 0;
  bottom: 72px;
  width: min(340px, calc(100vw - 2rem));
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,.15);
  overflow: hidden;
}
.support-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--line);
  background: #f0f5f7;
}
.support-panel-head button {
  background: none;
  border: none;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
}
.support-panel-body { padding: .75rem; }
.support-link {
  display: flex;
  gap: .75rem;
  align-items: center;
  padding: .6rem .5rem;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
}
.support-link:hover { background: #eef4f6; }
.support-link small { display: block; }
.support-ico { font-size: 1.4rem; }
.support-quick {
  margin-top: .5rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.support-quick textarea {
  width: 100%;
  padding: .55rem .7rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  resize: vertical;
}

/* ---------- Chat bubbles ---------- */
.chat {
  display: flex;
  flex-direction: column;
  gap: .6rem;
  margin: 1rem 0;
}
.bubble {
  max-width: 85%;
  padding: .6rem .85rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
}
.bubble-shopper { align-self: flex-end; background: #e2f3f1; border-color: #b9dedb; }
.bubble-admin   { align-self: flex-start; background: #f0f5f7; }
.bubble-meta { font-size: .75rem; color: var(--muted); margin-top: .25rem; }
.bubble-body { white-space: pre-wrap; }

/* ---------- Info page prose ---------- */
.prose { max-width: 68ch; }
.prose h2 { margin-top: 1.75rem; }
.prose p { margin: .5rem 0 1rem; }
/* ---------- Checks ---------- */
.check-img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 10px; background: #fff; }

@media (max-width: 719px) {
  .table th, .table td { padding: .5rem .55rem; font-size: .88rem; }
}

/* ---------- Information and legal pages ---------- */
.legal { max-width: 760px; margin: 0 auto; }
.legal h1 { font-size: 1.9rem; margin-bottom: .35rem; }
.legal h2 { font-size: 1.25rem; margin: 2rem 0 .6rem; }
.legal h3 { font-size: 1.05rem; margin: 1.25rem 0 .4rem; }
.legal p, .legal li { line-height: 1.7; }
.legal ul, .legal ol { padding-left: 1.3rem; }
.legal li { margin-bottom: .35rem; }
.legal .updated { color: var(--muted); font-size: .92rem; margin: 0 0 1.5rem; }
.legal .intro { font-size: 1.1rem; color: var(--muted); }
.legal .callout { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--radius); padding: .9rem 1.1rem; margin: 1.25rem 0; }
.legal-nav { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 auto 1.5rem; max-width: 760px; }
.legal-nav a { padding: .3rem .8rem; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); text-decoration: none; font-size: .88rem; font-weight: 600; }
.legal-nav a:hover { border-color: var(--brand); color: var(--brand); }
.legal-nav a.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.check-row { display: flex; gap: .6rem; align-items: flex-start; margin: 1rem 0; font-size: .92rem; line-height: 1.5; }
.check-row input { margin-top: .25rem; width: 18px; height: 18px; flex: none; }
.hp-field { position: absolute; left: -9999px; height: 0; width: 0; overflow: hidden; }

/* ---------- Captcha ---------- */
.captcha-field { align-items: flex-start; }
.captcha-img { display: block; border: 1px solid var(--line); border-radius: 8px; margin-bottom: .4rem; background: #f4f7f8; }

/* ---------- Error pages ---------- */
.error-page { max-width: 480px; margin: 3rem auto; text-align: center; }
.error-code { font-size: 4rem; font-weight: 900; color: var(--line); line-height: 1; }
.error-page h1 { margin: .5rem 0 .75rem; }
.error-page p { color: var(--muted); }
.error-page .actions { justify-content: center; }

/* ---------- Settings toggle switch ---------- */
.switch-row { display: flex; gap: .9rem; align-items: flex-start; cursor: pointer; }
.switch { position: relative; flex: none; }
.switch input { position: absolute; opacity: 0; width: 46px; height: 26px; margin: 0; cursor: pointer; }
.switch-track { display: block; width: 46px; height: 26px; border-radius: 999px; background: var(--line); transition: background .15s; }
.switch-thumb { display: block; width: 20px; height: 20px; margin: 3px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s; }
.switch input:checked + .switch-track { background: var(--brand); }
.switch input:checked + .switch-track .switch-thumb { transform: translateX(20px); }
.switch input:focus-visible + .switch-track { outline: 3px solid color-mix(in srgb, var(--brand) 30%, transparent); }
.switch-label { display: flex; flex-direction: column; gap: .2rem; }
