:root {
  --bg: #0f1115;
  --panel: #1a1d24;
  --panel-2: #232733;
  --ink: #f3f4f6;
  --muted: #9aa3b2;
  --accent: #e8b04b;
  --green: #36b37e;
  --red: #e0564b;
  --blue: #4b8fe8;
  --radius: 12px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
}
a { color: var(--accent); text-decoration: none; }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; background: var(--panel); border-bottom: 1px solid #000;
  position: sticky; top: 0; z-index: 10;
}
.brand { font-weight: 800; font-size: 20px; color: var(--ink); }
.brand-hy { color: var(--accent); font-weight: 600; }

.container { max-width: 720px; margin: 0 auto; padding: 16px; }

h1, h2, h3 { line-height: 1.2; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

.panel {
  background: var(--panel); border-radius: var(--radius);
  padding: 16px; margin-bottom: 16px;
}

.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 12px; background: var(--panel-2); }
.flash.error { background: #3a1f1d; color: #ffb3ac; }
.flash.success { background: #10261d; color: #8ce0bd; }

/* Buttons */
.btn {
  display: inline-block; border: none; border-radius: 10px;
  padding: 12px 16px; font-size: 15px; font-weight: 600;
  background: var(--panel-2); color: var(--ink); cursor: pointer;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #1a1206; }
.btn-green { background: var(--green); color: #042016; }
.btn-red { background: var(--red); color: #2a0a08; }
.btn-blue { background: var(--blue); color: #04152b; }
.btn-sm { padding: 9px 12px; font-size: 13px; min-height: 38px; }
.btn-block { display: block; width: 100%; text-align: center; }

/* Upcoming appointment rows */
.plain-list { list-style: none; margin: 0; padding: 0; }
.appt-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--panel-2); border-radius: 10px; padding: 12px; margin-bottom: 8px;
}
.appt-when { min-width: 108px; display: flex; flex-direction: column; }
.appt-time { color: var(--accent); font-weight: 700; }
.appt-who { flex: 1; min-width: 0; }
.appt-who a { display: block; }
/* Keep the cancel button from stretching to the input width set in Forms. */
.appt-row form { flex: 0 0 auto; width: auto; }

/* Forms */
label { display: block; margin: 10px 0 4px; font-size: 14px; color: var(--muted); }
input, select {
  width: 100%; padding: 12px; border-radius: 10px; border: 1px solid #2c3240;
  background: var(--panel-2); color: var(--ink); font-size: 16px;
}

/* Stats — wraps so four tiles stay readable on a phone. */
.stats { display: flex; flex-wrap: wrap; gap: 10px; }
.stat {
  flex: 1 1 120px; background: var(--panel-2); border-radius: 10px;
  padding: 12px; text-align: center;
}
.stat .n { font-size: 26px; font-weight: 800; }
.stat .l { font-size: 12px; color: var(--muted); }

/* Now serving */
.serving-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }

/* Display / TV page */
.display { text-align: center; padding: 24px; }
.display .now-big {
  font-size: clamp(48px, 14vw, 160px); font-weight: 900; color: var(--accent);
  line-height: 1;
}
.display .label-big { font-size: clamp(20px, 4vw, 36px); color: var(--muted); }
.display .line-count { font-size: clamp(24px, 6vw, 56px); margin-top: 24px; }
.next-list { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 16px; }
.next-list .ticket { font-size: clamp(20px, 5vw, 40px); font-weight: 800; background: var(--panel); padding: 8px 16px; border-radius: 12px; }

.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wa-btn { background: #25d366; color: #04331a; }
.lang-select { width: auto; padding: 6px 8px; font-size: 14px; }
.lang-form { margin: 0; }

/* ---------- Landing page ---------- */
.hero {
  position: relative;
  padding: 72px 20px 64px;
  text-align: center;
  background:
    radial-gradient(1200px 400px at 50% -10%, rgba(232,176,75,0.18), transparent 60%),
    linear-gradient(180deg, #12151c 0%, var(--bg) 100%);
  border-bottom: 1px solid #000;
  overflow: hidden;
}
.hero::before {
  /* subtle barber-pole stripe accent */
  content: "";
  position: absolute; inset: 0;
  background: repeating-linear-gradient(135deg, transparent 0 22px, rgba(255,255,255,0.012) 22px 44px);
  pointer-events: none;
}
.hero-photo {
  background:
    linear-gradient(180deg, rgba(15,17,21,0.62) 0%, rgba(15,17,21,0.88) 100%),
    var(--hero-img) center/cover no-repeat;
}
.hero-inner { position: relative; max-width: 680px; margin: 0 auto; }
.hero-status {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; color: var(--muted);
  background: rgba(0,0,0,0.35); border: 1px solid #2c3240;
  padding: 6px 14px; border-radius: 999px; margin-bottom: 18px;
}
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); display: inline-block; }
.dot-open { background: var(--green); box-shadow: 0 0 0 4px rgba(54,179,126,0.18); }
.hero-title {
  font-size: clamp(34px, 8vw, 60px); font-weight: 900; margin: 0 0 10px;
  letter-spacing: -0.02em; line-height: 1.05;
}
.hero-tagline { font-size: clamp(16px, 3.4vw, 20px); color: var(--muted); margin: 0 0 28px; }

.cta {
  display: inline-block; background: var(--accent); color: #1a1206;
  font-size: 19px; font-weight: 800; padding: 16px 38px; border-radius: 999px;
  box-shadow: 0 10px 30px rgba(232,176,75,0.28); transition: transform .08s ease;
}
.cta:active { transform: translateY(1px); }
.cta-disabled { background: var(--panel-2); color: var(--muted); box-shadow: none; }

.section { max-width: 680px; margin: 0 auto; padding: 36px 16px; }
.section-tight { padding: 18px 16px 0; }
.section-title {
  font-size: 13px; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--accent); margin: 0 0 16px;
}

.nowserving {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--panel); border-radius: var(--radius); padding: 12px 16px;
}
.ns-ticket { font-weight: 800; font-size: 20px; color: var(--green); }

.svc-list { display: flex; flex-direction: column; }
.svc {
  display: flex; align-items: baseline; justify-content: space-between; gap: 14px;
  padding: 14px 2px; border-bottom: 1px solid #1f2430;
}
.svc:last-child { border-bottom: none; }
.svc-main { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.svc-name { font-weight: 600; font-size: 17px; }
.svc-dur { color: var(--muted); font-size: 13px; }
.svc-price { font-weight: 800; color: var(--accent); white-space: nowrap; }

.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.gallery-item { margin: 0; }
.gallery-item img { width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: 12px; display: block; }
.gallery-item figcaption { font-size: 12px; color: var(--muted); margin-top: 4px; }

.join-card { background: var(--panel); border-radius: 16px; padding: 22px; border: 1px solid #1f2430; }

.info-grid { display: flex; flex-direction: column; gap: 10px; }
.info {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--panel); border-radius: 12px; padding: 14px 16px; color: var(--ink);
}
.info-icon { font-size: 20px; line-height: 1.3; }
.info-label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 2px; }

/* sticky mobile join button */
.sticky-cta {
  display: none;
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 30;
  text-align: center; background: var(--accent); color: #1a1206;
  font-weight: 800; padding: 15px; border-radius: 999px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
@media (max-width: 640px) {
  .sticky-cta { display: block; }
  .section { padding-bottom: 28px; }
  #visit { padding-bottom: 96px; }
}
html { scroll-behavior: smooth; }
.page-wide { width: 100%; max-width: none; padding: 0; }
hr.sep { border: none; border-top: 1px solid #2c3240; margin: 16px 0; }

/* ---------- Dashboard mobile polish ---------- */
html, body { max-width: 100%; overflow-x: hidden; }
.topbar nav { flex-wrap: wrap; justify-content: flex-end; row-gap: 8px; }

@media (max-width: 480px) {
  .topbar { padding: 10px 12px; gap: 10px; }
  .brand { font-size: 18px; }
  /* Stack each queue row's action buttons onto their own full-width line */
  .qrow { flex-wrap: wrap; }
  .qrow .who { flex-basis: calc(100% - 60px); }
  .qrow .actions { width: 100%; justify-content: flex-start; }
}
