/* ===================== THEME TOKENS ===================== */
:root {
  --blue-900: #0b1f3a;
  --blue-800: #102a4c;
  --blue-700: #1d4ed8;
  --blue-600: #2563eb;
  --blue-500: #3b82f6;
  --teal-500: #06b6d4;
  --teal-400: #22d3ee;

  --ink: #0f172a;
  --ink-soft: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #f6f9fc;
  --bg-alt: #eef3fb;
  --white: #ffffff;

  --ok: #16a34a;
  --warn: #d97706;
  --danger: #dc2626;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 10px 30px rgba(15, 23, 42, 0.10);
  --shadow-lg: 0 20px 50px rgba(13, 42, 92, 0.18);
  --container: 1080px;

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ===================== BASE ===================== */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); color: var(--ink);
  background: var(--bg); line-height: 1.6; -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; } /* ensure the hidden attribute always wins over display rules */
h1, h2, h3, h4 { line-height: 1.2; color: var(--ink); margin: 0 0 .5em; }
p { margin: 0 0 1em; }
a { color: var(--blue-600); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.container.narrow { max-width: 760px; }
.muted { color: var(--muted); font-weight: 500; }
.fine { font-size: .85rem; color: var(--muted); }
.accent { color: var(--teal-400); }
.empty-note { color: var(--muted); padding: 1.5rem; text-align: center; background: #fff; border: 1px dashed var(--line); border-radius: var(--radius); }

/* ===================== BUTTONS ===================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .8rem 1.4rem; border-radius: 999px; font-weight: 600; font-size: 1rem;
  cursor: pointer; border: 2px solid transparent; text-decoration: none;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--blue-600); color: #fff; box-shadow: var(--shadow-md); }
.btn-primary:hover { background: var(--blue-700); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.btn-ghost:hover { background: rgba(255,255,255,.12); }
.btn-ghost.btn-dark { color: var(--ink-soft); border-color: var(--line); }
.btn-ghost.btn-dark:hover { background: var(--bg-alt); }
.btn-block { width: 100%; }

/* ===================== HEADER / NAV ===================== */
.site-header {
  position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.9);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: .55rem; font-weight: 800; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-mark {
  display: inline-grid; place-items: center; width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--blue-600), var(--teal-500));
  color: #fff; border-radius: 9px; font-size: .85rem; font-weight: 700;
}
.brand-name { font-size: 1.05rem; }
.nav-links { display: flex; align-items: center; gap: 1.4rem; }
.nav-links a { color: var(--ink-soft); font-weight: 500; }
.nav-links a:hover { color: var(--blue-600); text-decoration: none; }
.nav-cta { background: var(--blue-600); color: #fff !important; padding: .5rem 1rem; border-radius: 999px; font-weight: 600; }
.nav-cta:hover { background: var(--blue-700); }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 6px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: .2s; }

/* ===================== HERO ===================== */
.hero {
  background: radial-gradient(1200px 500px at 70% -10%, rgba(34,211,238,.25), transparent 60%),
              linear-gradient(160deg, var(--blue-900), var(--blue-700));
  color: #eaf2ff; padding: 88px 0 96px; position: relative; overflow: hidden;
}
.hero-inner { max-width: 760px; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; font-weight: 600; color: var(--teal-400); margin-bottom: 1rem; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; color: #fff; }
.hero-sub { font-size: 1.15rem; color: #cdddf5; max-width: 600px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1.8rem 0 1.6rem; }
.hero-badges { display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; list-style: none; padding: 0; margin: 0; color: #bcd3f2; font-weight: 500; font-size: .95rem; }

/* ===================== SECTIONS ===================== */
.section { padding: 72px 0; }
.section-alt { background: var(--bg-alt); }
.section-title { font-size: clamp(1.6rem, 3.5vw, 2.2rem); font-weight: 800; }
.section-lead { color: var(--ink-soft); font-size: 1.1rem; max-width: 640px; margin-bottom: 2rem; }
.sub-head { margin-top: 2.4rem; font-size: 1.25rem; font-weight: 700; color: var(--blue-800); }

/* ===================== GRIDS / CARDS ===================== */
.grid { display: grid; gap: 1.2rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; box-shadow: var(--shadow-sm); }
.card h3 { font-size: 1.15rem; }
.card-muted { background: #fbfdff; }
.check-list, .x-list { list-style: none; padding: 0; margin: 0; }
.check-list li, .x-list li { padding: .35rem 0 .35rem 1.8rem; position: relative; color: var(--ink-soft); }
.check-list li::before { content: "✔"; position: absolute; left: 0; color: var(--teal-500); font-weight: 700; }
.x-list li::before { content: "✕"; position: absolute; left: 0; color: #ef4444; font-weight: 700; }

.mini-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow-sm); }
.mini-card h4 { font-size: 1.05rem; margin: .4rem 0 .3rem; }
.mini-card p { margin: 0; color: var(--muted); font-size: .95rem; }
.mini-num { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(135deg, var(--blue-600), var(--teal-500)); color: #fff; font-weight: 700; }

.policy { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem; box-shadow: var(--shadow-sm); }
.policy h4 { font-size: 1.02rem; color: var(--blue-800); margin-bottom: .3rem; }
.policy p { margin: 0; color: var(--ink-soft); font-size: .95rem; }

/* ===================== SERVICE GRID ===================== */
.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.service-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; }
.service-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); transition: .15s; }
.service-icon { font-size: 1.9rem; }
.service-card h3 { font-size: 1.1rem; margin: .5rem 0 .35rem; }
.service-blurb { color: var(--ink-soft); font-size: .95rem; flex: 1; }
.service-price { font-weight: 700; color: var(--blue-700); margin: .4rem 0 1rem; }

/* ===================== FORMS ===================== */
select, input, textarea {
  font-family: inherit; font-size: 1rem; width: 100%; padding: .7rem .85rem;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: #fff; color: var(--ink);
}
select:focus, input:focus, textarea:focus { outline: none; border-color: var(--blue-600); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
textarea { resize: vertical; }
.form-field { display: block; margin-bottom: 1rem; }
.form-field > span { display: block; font-weight: 600; font-size: .92rem; margin-bottom: .4rem; color: var(--ink-soft); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field-hint { font-size: .9rem; color: var(--muted); margin: .2rem 0 0; }

.radio-row { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.radio-card { position: relative; cursor: pointer; }
.radio-card input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.radio-body { display: block; border: 2px solid var(--line); border-radius: var(--radius-sm); padding: .9rem 1rem; transition: .15s; background: #fbfdff; }
.radio-body strong { display: block; font-size: 1rem; }
.radio-body small { color: var(--muted); }
.radio-card input:checked + .radio-body { border-color: var(--blue-600); background: #eef4ff; box-shadow: 0 0 0 3px rgba(37,99,235,.12); }

/* ===================== BOOKING WIZARD ===================== */
.book-main { padding: 40px 20px 80px; }
.book-title { font-size: 2rem; font-weight: 800; margin-bottom: 1rem; }
.demo-banner { background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; padding: .8rem 1rem; border-radius: var(--radius-sm); margin-bottom: 1.2rem; font-size: .92rem; }

.wiz-progress { list-style: none; display: flex; gap: .4rem; padding: 0; margin: 0 0 1.6rem; counter-reset: step; flex-wrap: wrap; }
.wiz-progress li { flex: 1; min-width: 120px; font-size: .85rem; font-weight: 600; color: var(--muted); padding: .5rem .7rem; border-radius: var(--radius-sm); background: #fff; border: 1px solid var(--line); counter-increment: step; position: relative; }
.wiz-progress li::before { content: counter(step); display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--line); color: #fff; font-size: .75rem; margin-right: .4rem; }
.wiz-progress li.active { color: var(--blue-700); border-color: var(--blue-600); background: #eef4ff; }
.wiz-progress li.active::before { background: var(--blue-600); }
.wiz-progress li.done { color: var(--ok); }
.wiz-progress li.done::before { content: "✓"; background: var(--ok); }

.wstep { margin-bottom: 1.2rem; }
.wstep h2 { font-size: 1.3rem; margin-bottom: 1.1rem; }
.wiz-actions { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 1.4rem; }
.pay-buttons { display: flex; flex-direction: column; gap: .7rem; margin: 1.2rem 0; }

/* ===================== SLOT PICKER ===================== */
.slot-picker { display: flex; flex-direction: column; gap: 1.1rem; }
.slot-day h4 { font-size: 1rem; color: var(--blue-800); margin-bottom: .5rem; }
.slot-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.slot-btn { padding: .55rem .9rem; border: 1.5px solid var(--line); background: #fff; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: .9rem; color: var(--ink-soft); transition: .12s; }
.slot-btn:hover { border-color: var(--blue-500); }
.slot-btn.selected { background: var(--blue-600); color: #fff; border-color: var(--blue-600); }

/* ===================== SUMMARY ===================== */
.summary-card { margin: 1.2rem 0; }
.summary-list { list-style: none; padding: 0; margin: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; }
.summary-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .7rem 1rem; border-bottom: 1px solid var(--line); }
.summary-list li:last-child { border-bottom: 0; }
.summary-list li span:first-child { color: var(--muted); }
.summary-list li span:last-child { font-weight: 600; text-align: right; }
.summary-total { background: #eef4ff; }
.summary-total span { color: var(--blue-700) !important; font-size: 1.1rem; font-weight: 800 !important; }

/* ===================== SUCCESS ===================== */
.form-success { text-align: center; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 2.4rem 1.8rem; box-shadow: var(--shadow-md); margin-top: 1.5rem; }
.success-mark { display: inline-grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; background: var(--teal-500); color: #fff; font-size: 1.8rem; margin-bottom: .8rem; }
.cal-buttons { margin-top: 1.8rem; display: flex; flex-direction: column; gap: .6rem; align-items: center; }
.cal-buttons .btn { width: 100%; max-width: 320px; }

/* ===================== FOOTER ===================== */
.site-footer { background: var(--blue-900); color: #cdddf5; padding: 40px 0 24px; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.5rem; }
.footer-brand { font-weight: 700; color: #fff; display: flex; align-items: center; gap: .5rem; margin-bottom: .3rem; }
.footer-contact p { margin: .2rem 0; }
.footer-contact a { color: var(--teal-400); }
.site-footer .fine { color: #8fb0d6; }
.footer-fine { text-align: center; color: #6f93bd; font-size: .82rem; margin: 1.6rem 0 0; border-top: 1px solid rgba(255,255,255,.1); padding-top: 1rem; }

/* ===================== ADMIN ===================== */
.admin-body { background: var(--bg-alt); }
.admin-gate { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.gate-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 2.2rem; max-width: 380px; width: 100%; text-align: center; }
.gate-card h1 { font-size: 1.5rem; }
.auth-msg { color: var(--danger); font-size: .9rem; margin-top: .8rem; min-height: 1em; }

.admin-header { background: var(--blue-900); color: #fff; }
.admin-bar { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.admin-header .brand, .admin-header .brand-name { color: #fff; }
.admin-user { display: flex; align-items: center; gap: .8rem; }
.admin-user .fine { color: #bcd3f2; }
.admin-main { padding: 28px 20px 80px; }

.tabs { display: flex; gap: .5rem; margin-bottom: 1.4rem; }
.tab-btn { padding: .6rem 1.1rem; border: 1px solid var(--line); background: #fff; border-radius: 999px; font-weight: 600; cursor: pointer; color: var(--ink-soft); }
.tab-btn.active { background: var(--blue-600); color: #fff; border-color: var(--blue-600); }

.admin-table-wrap { background: #fff; }
.admin-table { width: 100%; border-collapse: collapse; min-width: 760px; }
.admin-table th, .admin-table td { padding: .8rem .9rem; text-align: left; border-bottom: 1px solid var(--line); font-size: .92rem; vertical-align: top; }
.admin-table thead th { background: var(--blue-800); color: #fff; font-weight: 600; }
.admin-table td:last-child { white-space: nowrap; }

.badge { display: inline-block; padding: .2rem .6rem; border-radius: 999px; font-size: .78rem; font-weight: 700; }
.badge-ok { background: #dcfce7; color: #15803d; }
.badge-warn { background: #fef3c7; color: #b45309; }
.badge-info { background: #dbeafe; color: #1d4ed8; }
.badge-muted { background: #e2e8f0; color: #475569; }

.mini-btn { padding: .35rem .7rem; border-radius: 8px; border: 1px solid var(--line); background: #fff; font-weight: 600; font-size: .82rem; cursor: pointer; margin: .15rem .15rem 0 0; }
.mini-primary { background: var(--blue-600); color: #fff; border-color: var(--blue-600); }
.mini-ok { background: var(--ok); color: #fff; border-color: var(--ok); }
.mini-danger { background: #fff; color: var(--danger); border-color: #fecaca; }
.mini-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }

.slot-checks { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; }
.slot-check { display: flex; align-items: center; gap: .35rem; font-size: .9rem; background: #fbfdff; border: 1px solid var(--line); border-radius: 8px; padding: .45rem .6rem; cursor: pointer; }
.slot-check input { width: auto; }

.avail-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.avail-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.2rem; display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; box-shadow: var(--shadow-sm); }
.avail-slots { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .5rem; }
.avail-slots span { background: var(--bg-alt); border-radius: 6px; padding: .15rem .5rem; font-size: .8rem; color: var(--ink-soft); }

/* ===================== MODAL ===================== */
.modal { position: fixed; inset: 0; background: rgba(15,23,42,.55); display: grid; place-items: center; padding: 20px; z-index: 100; }
.modal-card { background: #fff; border-radius: var(--radius); padding: 1.8rem; max-width: 480px; width: 100%; position: relative; box-shadow: var(--shadow-lg); max-height: 90vh; overflow: auto; }
.modal-close { position: absolute; top: .8rem; right: 1rem; background: none; border: 0; font-size: 1.6rem; cursor: pointer; color: var(--muted); }
.detail-row { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.detail-row span:first-child { color: var(--muted); }
.detail-row span:last-child { font-weight: 600; text-align: right; }
.detail-problem { margin-top: 1rem; background: var(--bg-alt); padding: .9rem; border-radius: var(--radius-sm); font-size: .92rem; }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 860px) {
  .service-grid { grid-template-columns: repeat(2, 1fr); }
  .avail-list { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch;
    gap: 0; background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow-md);
    padding: .5rem 20px 1rem; display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: .7rem 0; border-bottom: 1px solid var(--line); }
  .nav-cta { text-align: center; margin-top: .6rem; border-bottom: 0 !important; }
  .grid-2, .grid-3, .form-grid, .radio-row, .service-grid { grid-template-columns: 1fr; }
  .slot-checks { grid-template-columns: repeat(2, 1fr); }
  .hero { padding: 64px 0 72px; }

  /* admin table → cards */
  .admin-table-wrap { overflow: visible; background: transparent; border: 0; box-shadow: none; }
  .admin-table { min-width: 0; }
  .admin-table thead { display: none; }
  .admin-table, .admin-table tbody, .admin-table tr, .admin-table td { display: block; width: 100%; }
  .admin-table tr { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: .9rem; padding: .4rem .2rem; box-shadow: var(--shadow-sm); }
  .admin-table td { border-bottom: 1px solid var(--line); padding: .55rem 1rem; display: flex; justify-content: space-between; gap: 1rem; }
  .admin-table td:last-child { border-bottom: 0; white-space: normal; }
  .admin-table td::before { content: attr(data-label); font-weight: 600; color: var(--muted); font-size: .8rem; }
}
