/* =========================================================
   NOOQUU: Design tokens
   Concept: the paper queue-ticket, redrawn as a scheduled time.
   ========================================================= */
:root {
  --paper: #F4F6F4;
  --card: #FFFFFF;
  --ink: #12181B;
  --muted: #5C6B68;
  --navy: #0B2436;
  --navy-light: #12324A;
  --ticket: #FF5A36;
  --ticket-dark: #E8451F;
  --go: #12B76A;
  --go-dark: #0E9257;
  --gold: #E8A33D;
  --line: #DFE5E2;
  --danger: #D6392A;
  --danger-bg: #FCEBE8;
  --success-bg: #E7F7EF;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 2px 8px rgba(11,36,54,0.06);
  --shadow-lg: 0 16px 40px rgba(11,36,54,0.14);
}

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

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
  font-size: 16px;
}

h1, h2, h3, .logo, .ticket-num {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(28px, 6vw, 44px); line-height: 1.1; margin: 0 0 12px; font-weight: 700; }
h2 { font-size: clamp(20px, 3.4vw, 26px); font-weight: 700; margin: 0; }
h3 { font-size: 18px; font-weight: 600; margin: 0; }

a { color: var(--navy); }

.mono, .ticket-time, .ticket-num { font-family: 'IBM Plex Mono', ui-monospace, monospace; }

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Header / nav ---------- */
.site-header {
  background: var(--navy);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 0 rgba(255,255,255,0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  position: relative;
}

.logo {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 2px;
}
.logo span { color: var(--ticket); }

.nav-toggle { display: none; }
.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 10px;
  margin: -10px;
}
.nav-burger span { width: 22px; height: 2px; background: #fff; border-radius: 2px; transition: transform .2s, opacity .2s; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.site-nav a {
  color: #D9E4E1;
  text-decoration: none;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 20px;
  white-space: nowrap;
}
.site-nav a:hover { color: #fff; background: rgba(255,255,255,0.08); }
.site-nav .btn-nav {
  background: var(--ticket);
  color: #fff;
  padding: 9px 18px;
  border-radius: 20px;
  font-weight: 600;
}
.site-nav .btn-nav:hover { background: var(--ticket-dark); }

@media (max-width: 760px) {
  .nav-burger { display: flex; }
  .site-nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--navy-light);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height .25s ease;
    border-top: 1px solid rgba(255,255,255,0.08);
  }
  .nav-toggle:checked ~ .site-nav { max-height: 480px; }
  .site-nav a { border-radius: 0; padding: 16px 20px; border-bottom: 1px solid rgba(255,255,255,0.07); }
  .site-nav .btn-nav { border-radius: 0; text-align: center; }
}

main { padding: 36px 20px 70px; min-height: 60vh; }
@media (max-width: 600px) { main { padding: 24px 16px 56px; } }

/* ---------- Hero + ticket signature ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
  padding: 36px 0 48px;
}
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; gap: 28px; padding: 20px 0 36px; text-align: center; }
  .hero .ticket-wrap { order: -1; max-width: 320px; margin: 0 auto; }
}
.hero .eyebrow {
  display: inline-block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--go-dark);
  background: var(--success-bg);
  padding: 5px 12px;
  border-radius: 20px;
  margin-bottom: 14px;
}
.hero p.lede { color: var(--muted); font-size: 17px; max-width: 460px; }
@media (max-width: 820px) { .hero p.lede { max-width: none; margin: 0 auto; } }
.hero .hero-ctas { display: flex; gap: 12px; margin-top: 22px; flex-wrap: wrap; }
@media (max-width: 820px) { .hero .hero-ctas { justify-content: center; } }

/* the ticket stub: perforated, torn-edge queue ticket */
.ticket {
  position: relative;
  background: #fff;
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  padding: 26px 24px 22px;
  transform: rotate(-2deg);
  animation: ticket-in .5s cubic-bezier(.2,.8,.3,1) both;
}
@keyframes ticket-in {
  from { opacity: 0; transform: rotate(-2deg) translateY(14px); }
  to { opacity: 1; transform: rotate(-2deg) translateY(0); }
}
.ticket::before, .ticket::after {
  content: '';
  position: absolute;
  width: 22px; height: 22px;
  background: var(--paper);
  border-radius: 50%;
  top: 50%;
  transform: translateY(-50%);
}
.ticket::before { left: -11px; }
.ticket::after { right: -11px; }
.ticket .perf {
  border-top: 2px dashed var(--line);
  margin: 16px 0;
}
.ticket .ticket-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.ticket .old-token {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 15px;
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-color: var(--ticket);
  text-decoration-thickness: 2px;
  margin: 2px 0 10px;
}
.ticket .ticket-time {
  font-size: 30px;
  font-weight: 700;
  color: var(--navy);
}
.ticket .ticket-shop { font-size: 13px; color: var(--muted); margin-top: 4px; }

/* ---------- Search / filter bar ---------- */
.search-bar {
  display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; margin-top: 8px; box-shadow: var(--shadow);
}
.search-bar > div { flex: 1; min-width: 150px; }
.search-bar label, .filter-bar label { margin: 0 0 6px; }
@media (max-width: 600px) {
  .search-bar { flex-direction: column; align-items: stretch; }
  .search-bar button { width: 100%; margin-top: 4px; }
}

/* ---------- Cards / grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 18px;
  margin-top: 28px;
  align-items: start;
}
@media (max-width: 560px) { .grid { grid-template-columns: 1fr; } }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: box-shadow .18s, transform .18s;
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }

.badge {
  display: inline-block;
  background: var(--success-bg);
  color: var(--go-dark);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 4px 11px;
  border-radius: 20px;
  text-transform: uppercase;
  margin-bottom: 8px;
  white-space: nowrap;
}
.badge-suspended { background: var(--danger-bg); color: var(--danger); }
.badge-offer { background: var(--ticket); color: #fff; }

.offer-price { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.offer-price .price-old {
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-color: var(--ticket);
  text-decoration-thickness: 2px;
  font-size: 18px;
}
.offer-price .price-new { color: var(--ink); font-size: 26px; font-weight: 800; }
.offer-price .price-per { color: var(--muted); font-size: 14px; }

.card h3 { margin: 4px 0 4px; font-size: 17px; }
.card p { margin: 2px 0; color: var(--muted); font-size: 14px; }

.stars { color: var(--gold); letter-spacing: 1px; }

/* ---------- Forms ---------- */
form {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  max-width: 480px;
  margin-top: 20px;
  box-shadow: var(--shadow);
}

label { display: block; font-size: 13px; font-weight: 600; margin: 14px 0 6px; color: var(--navy); }
input, select, textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
  min-height: 46px;
}
textarea { min-height: 90px; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(11,36,54,0.1);
}
input[type="checkbox"], input[type="radio"] { min-height: auto; width: auto; }

/* ---------- Buttons ---------- */
button, .btn {
  display: inline-block;
  background: var(--ticket);
  color: #fff;
  border: none;
  padding: 13px 22px;
  border-radius: 26px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 18px;
  text-decoration: none;
  text-align: center;
  min-height: 46px;
  transition: background .15s, transform .1s;
}
button:hover, .btn:hover { background: var(--ticket-dark); }
button:active, .btn:active { transform: scale(0.98); }

.btn-outline {
  background: transparent;
  color: var(--navy);
  border: 1.5px solid var(--navy);
}
.btn-outline:hover { background: var(--navy); color: #fff; }

.btn-whatsapp { background: #25D366; }
.btn-whatsapp:hover { background: #1EBE59; }

.btn-danger { background: var(--danger); color: #fff !important; border-color: var(--danger); }
.btn-danger:hover { background: #b32d20; }
.btn-sm { padding: 8px 14px; font-size: 13px; margin-top: 0; min-height: auto; border-radius: 8px; }

@media (max-width: 600px) {
  form button[type="submit"], .btn { width: 100%; }
  .btn.btn-sm, .table-actions .btn, .inline-form button { width: auto; }
}

/* ---------- Slot picker (ticket chips) ---------- */
.slot-list { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0; }
.slot-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1.5px solid var(--line);
  padding: 10px 16px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  font-family: 'IBM Plex Mono', monospace;
  background: #fff;
  transition: border-color .15s, background .15s, transform .1s;
}
.slot-pill:hover { border-color: var(--navy); }
.slot-pill:has(input:checked) {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
  transform: scale(1.03);
}

/* ---------- Tables (auto-wrapped for horizontal scroll on mobile via JS) ---------- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; margin-top: 20px; background: #fff; border-radius: var(--radius); overflow: hidden; }
.table-scroll table { margin-top: 0; box-shadow: none; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: 14px; white-space: nowrap; }
.wrap-cell { white-space: normal; word-break: break-word; max-width: 240px; }
th { background: #EEF2F0; font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: 0.03em; color: var(--muted); }
td:first-child, th:first-child { white-space: normal; }

/* Inputs placed inside table cells (e.g. editable service rows) use a
   smaller footprint than standalone form inputs, so rows stay compact and
   the table scrolls comfortably on narrow screens instead of every input
   claiming the full 46px form height. */
td input, td select {
  width: auto;
  min-height: 38px;
  padding: 8px 10px;
  font-size: 14px;
}
td input[type="text"] { min-width: 120px; }
@media (max-width: 600px) {
  td input[type="text"] { min-width: 100px; }
  td input[type="number"] { width: 72px; min-width: 0; }
}

/* ---------- Alerts ---------- */
.alert { padding: 13px 16px; border-radius: var(--radius-sm); margin: 16px 0; font-size: 14px; }
.alert-error { background: var(--danger-bg); color: var(--danger); }
.alert-success { background: var(--success-bg); color: var(--go-dark); }

.status-confirmed { color: var(--go-dark); font-weight: 600; }
.status-completed { color: var(--muted); }
.status-cancelled, .status-suspended { color: var(--danger); font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy);
  color: #9FB3AC;
  text-align: center;
  padding: 26px 0;
  font-size: 13px;
}
.site-footer a { color: #C8D6D1; }

.section-title { margin-top: 40px; margin-bottom: 10px; padding-top: 16px; position: relative; }
.section-title::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  border-top: 2px dashed var(--line);
}
.muted { color: var(--muted); font-size: 14px; }

/* ---------- Admin panel ---------- */
.admin-tag {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--ticket);
  color: #fff;
  padding: 3px 9px;
  border-radius: 20px;
  vertical-align: middle;
  margin-left: 6px;
}

.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; margin: 22px 0 8px; align-items: start; }
.stat-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.stat-card .stat-value { font-family: 'Space Grotesk', sans-serif; font-size: 30px; font-weight: 700; color: var(--navy); line-height: 1.2; word-break: break-word; }
.stat-card .stat-label { color: var(--muted); font-size: 13px; margin-top: 2px; }

.inline-form { display: inline-block; background: none; border: none; padding: 0; margin: 0; max-width: none; box-shadow: none; }
.table-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.filter-bar {
  display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; max-width: none; margin-top: 20px; box-shadow: var(--shadow);
}
.filter-bar > div { min-width: 160px; }

.panel-form { max-width: 640px; }
.wide-form { max-width: none; }

/* ---------- Utility ---------- */
.stack-mobile { display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 600px) { .stack-mobile { flex-direction: column; } }

/* ---------- PWA install banner ---------- */
.pwa-banner {
  position: fixed;
  left: 12px; right: 12px; bottom: 12px;
  background: var(--navy);
  color: #fff;
  border-radius: 14px;
  padding: 12px 12px 12px 16px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
  display: none;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-lg);
  z-index: 60;
  font-size: 13px;
  line-height: 1.4;
}
.pwa-banner.is-visible {
  display: flex;
  animation: pwa-banner-in .25s ease both;
}
@keyframes pwa-banner-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.pwa-banner span { flex: 1; }
.pwa-banner .btn-sm { margin: 0; white-space: nowrap; }
.pwa-dismiss {
  background: none; border: none; color: #C8D6D1;
  font-size: 16px; cursor: pointer; padding: 4px 6px;
  margin: 0; min-height: auto; line-height: 1;
}
.pwa-dismiss:hover { color: #fff; }
@media (min-width: 700px) { .pwa-banner { max-width: 420px; left: auto; } }

/* Fade/slide-in for text and ticket cards on pages like my_bookings.php,
   just to give a bit of life on load. Staggered via --delay per element. */
.animate-in {
  animation: fade-slide-in .5s ease both;
  animation-delay: var(--delay, 0s);
}
@keyframes fade-slide-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .animate-in { animation: none; }
}
