/* =====================================================================
   style.css  -  shared styles for index.html and admin.html
   ===================================================================== */
:root {
  --primary: #0f9b8e;
  --primary-dark: #0b7a70;
  --primary-soft: #e6f6f4;
  --ink: #14232b;
  --muted: #5b6b73;
  --line: #e1e8eb;
  --bg: #f5f9fa;
  --card: #ffffff;
  --danger: #d64545;
  --warn: #c98512;
  --ok: #1f9d55;
  --info: #2f6fdb;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(15, 60, 70, .08);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  color: var(--ink); background: var(--bg); line-height: 1.5; font-size: 16px;
}
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4.5vw, 3rem); }
h2 { font-size: 1.7rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1rem; margin-top: 1.5rem; }
a { color: var(--primary-dark); }
.container { width: min(1120px, 100% - 32px); margin-inline: auto; }
.section { padding: 48px 0; }
.muted { color: var(--muted); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 10px; border: 1.5px solid transparent;
  font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; transition: .15s;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--primary-dark); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover:not(:disabled) { border-color: var(--primary); color: var(--primary-dark); }
.btn-danger { background: #fff; color: var(--danger); border-color: #f0c4c4; }
.btn-danger:hover { background: #fdeeee; }
.btn-sm { padding: 5px 10px; font-size: .82rem; border-radius: 8px; }
.btn-lg { padding: 13px 26px; font-size: 1.05rem; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn:focus-visible, .option-card:focus-visible, .date-btn:focus-visible, .slot-btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(15, 155, 142, .35); outline-offset: 2px;
}

/* ---------- header ---------- */
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 66px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.1rem; color: var(--ink); text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--primary-soft); font-size: 1.2rem; }
.site-header nav { display: flex; align-items: center; gap: 18px; }
.site-header nav a:not(.btn) { color: var(--muted); text-decoration: none; font-weight: 500; }
.site-header nav a:not(.btn):hover { color: var(--primary-dark); }

/* ---------- hero ---------- */
.hero { background: linear-gradient(135deg, #e6f6f4 0%, #f5f9fa 70%); padding: 56px 0; }
.hero-inner { display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; align-items: center; }
.eyebrow { color: var(--primary-dark); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .8rem; margin: 0 0 8px; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 520px; margin: 0 0 24px; }
.hero-facts { list-style: none; margin: 0; padding: 20px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); display: grid; gap: 14px; }
.hero-facts li { display: flex; gap: 12px; align-items: flex-start; }
.hero-facts .ico { width: 36px; height: 36px; flex: none; display: grid; place-items: center; background: var(--primary-soft); border-radius: 10px; }
.hero-facts strong { display: block; }
.hero-facts span { color: var(--muted); font-size: .92rem; }

/* ---------- cards ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }

/* ---------- stepper ---------- */
.stepper { list-style: none; padding: 0; margin: 20px 0 24px; display: flex; gap: 8px; counter-reset: s; }
.stepper li {
  flex: 1; counter-increment: s; display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; background: #fff; border: 1px solid var(--line); border-radius: 10px;
  color: var(--muted); font-weight: 600; font-size: .92rem;
}
.stepper li::before {
  content: counter(s); width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: var(--line); color: var(--muted); font-size: .82rem; flex: none;
}
.stepper li.active { color: var(--ink); border-color: var(--primary); }
.stepper li.active::before { background: var(--primary); color: #fff; }
.stepper li.done::before { content: "✓"; background: var(--ok); color: #fff; }

/* ---------- booking layout ---------- */
.book-layout { display: grid; grid-template-columns: 1fr 300px; gap: 24px; align-items: start; }
.panel-wrap { padding: 28px; }
.panel { display: none; }
.panel.active { display: block; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.option-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.option-card {
  text-align: left; background: #fff; border: 1.5px solid var(--line); border-radius: 12px; padding: 14px 16px;
  font: inherit; cursor: pointer; display: grid; gap: 3px; transition: .15s; color: var(--ink);
}
.option-card:hover { border-color: var(--primary); }
.option-card.selected { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 3px rgba(15, 155, 142, .15); }
.option-card span { color: var(--muted); font-size: .88rem; }
.option-card em { font-style: normal; color: var(--primary-dark); font-weight: 600; font-size: .85rem; }

.date-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; max-height: 240px; overflow-y: auto; padding: 2px; }
.date-btn {
  border: 1.5px solid var(--line); background: #fff; border-radius: 10px; padding: 8px 4px; font: inherit;
  cursor: pointer; display: grid; gap: 0; justify-items: center; color: var(--ink);
}
.date-btn small { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; }
.date-btn b { font-size: 1.2rem; }
.date-btn:hover:not(:disabled) { border-color: var(--primary); }
.date-btn.selected { border-color: var(--primary); background: var(--primary); color: #fff; }
.date-btn.selected small { color: #d7f3ef; }
.date-btn:disabled { background: #f1f4f5; color: #a7b3b8; cursor: not-allowed; }
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; }
.slot-btn { border: 1.5px solid var(--line); background: #fff; border-radius: 10px; padding: 9px 6px; font: inherit; font-weight: 600; cursor: pointer; color: var(--ink); }
.slot-btn:hover:not(:disabled) { border-color: var(--primary); }
.slot-btn.selected { background: var(--primary); border-color: var(--primary); color: #fff; }
.slot-btn:disabled { background: #f1f4f5; color: #a7b3b8; text-decoration: line-through; cursor: not-allowed; }
.hint { color: var(--muted); font-size: .92rem; margin: 6px 0 0; }

.nav-row { display: flex; justify-content: space-between; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }

.summary { padding: 20px; position: sticky; top: 86px; }
.summary h3 { font-size: 1.05rem; }
.summary dl { margin: 0; display: grid; gap: 12px; }
.summary dt { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }
.summary dd { margin: 2px 0 0; font-weight: 600; }
.summary dd.empty { color: #a7b3b8; font-weight: 400; }

/* ---------- forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 6px; }
.field.full { grid-column: 1 / -1; }
label, .label { font-weight: 600; font-size: .9rem; }
label small { font-weight: 400; color: var(--muted); }
input, select, textarea {
  font: inherit; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); width: 100%;
}
input:focus, select:focus, textarea:focus { border-color: var(--primary); }
textarea { min-height: 84px; resize: vertical; }
.field.invalid input, .field.invalid textarea, .field.invalid select { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: .82rem; min-height: 0; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: .9rem; color: var(--muted); }
.check input { width: auto; margin-top: 4px; }

/* ---------- confirmation ---------- */
.confirm-box { text-align: center; padding: 8px 0; }
.confirm-icon { width: 64px; height: 64px; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; font-size: 2rem; margin: 0 auto 14px; }
.booking-id { display: inline-block; font-family: ui-monospace, Consolas, monospace; font-size: 1.4rem; font-weight: 700; letter-spacing: .08em; background: var(--primary-soft); color: var(--primary-dark); padding: 8px 18px; border-radius: 10px; margin: 8px 0 16px; }
.detail-list { text-align: left; max-width: 420px; margin: 0 auto 18px; display: grid; gap: 8px; }
.detail-list div { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.detail-list dt { color: var(--muted); }
.detail-list dd { margin: 0; font-weight: 600; text-align: right; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

/* ---------- lookup ---------- */
.lookup { padding: 28px; max-width: 720px; }
.lookup-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; }
.lookup-result { margin-top: 20px; }

/* ---------- footer ---------- */
.site-footer { background: #0f2a30; color: #cfe0e3; padding: 36px 0; margin-top: 24px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; }
.site-footer h4 { color: #fff; margin-top: 0; }
.site-footer p { margin: 4px 0; }

/* ---------- badges ---------- */
.badge { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: .78rem; font-weight: 700; text-transform: capitalize; }
.badge.pending   { background: #fdf3dc; color: var(--warn); }
.badge.confirmed { background: #e0eefe; color: var(--info); }
.badge.completed { background: #dff5e8; color: var(--ok); }
.badge.cancelled { background: #fbe4e4; color: var(--danger); }

/* ---------- toast ---------- */
.toast-box { position: fixed; right: 16px; bottom: 16px; display: grid; gap: 8px; z-index: 100; }
.toast { background: #14232b; color: #fff; padding: 12px 18px; border-radius: 10px; box-shadow: var(--shadow); animation: fade .25s; transition: opacity .3s; }
.toast.error { background: var(--danger); }
.toast.success { background: var(--ok); }
.toast.out { opacity: 0; }

/* =====================================================================
   ADMIN
   ===================================================================== */
.admin-body { background: #f0f5f6; }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login-card { width: min(400px, 100%); padding: 32px; display: grid; gap: 16px; }
.login-card .brand { justify-content: center; }
.admin-header { background: #0f2a30; color: #fff; }
.admin-header .header-inner { height: 64px; }
.admin-header .brand { color: #fff; }
.admin-header .brand-mark { background: rgba(255, 255, 255, .12); }
.admin-header .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .3); }
.admin-header .btn-ghost:hover { border-color: #fff; color: #fff; }
.admin-header .right { display: flex; gap: 10px; align-items: center; }
.admin-main { padding: 24px 0 48px; display: grid; gap: 18px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.stat { padding: 18px; }
.stat span { color: var(--muted); font-size: .85rem; font-weight: 600; }
.stat strong { display: block; font-size: 2rem; line-height: 1.1; margin-top: 4px; }
.stat.accent strong { color: var(--primary-dark); }
.stat.warn strong { color: var(--warn); }
.toolbar { padding: 16px; display: grid; gap: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1.5px solid var(--line); background: #fff; padding: 6px 14px; border-radius: 99px; font: inherit; font-weight: 600; font-size: .88rem; cursor: pointer; color: var(--muted); }
.chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.filters { display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 10px; align-items: center; }
.filters .btn-row { justify-content: flex-end; }
.table-card { overflow: hidden; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 860px; }
th { text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 12px 16px; background: #f8fbfb; border-bottom: 1px solid var(--line); }
td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafdfd; }
td .sub { display: block; color: var(--muted); font-size: .85rem; }
td .note { display: block; color: var(--muted); font-size: .82rem; font-style: italic; margin-top: 2px; max-width: 260px; }
.row-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.empty-msg { text-align: center; padding: 40px 16px; color: var(--muted); }
.tag-staff { font-size: .7rem; background: #eef1f3; color: var(--muted); padding: 1px 7px; border-radius: 6px; margin-left: 6px; font-weight: 600; }

.modal { position: fixed; inset: 0; background: rgba(15, 35, 43, .55); display: grid; place-items: center; padding: 16px; z-index: 50; }
.modal-card { width: min(560px, 100%); max-height: 92vh; overflow-y: auto; padding: 24px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.modal-head h3 { margin: 0; }
.icon-btn { background: none; border: 0; font-size: 1.5rem; cursor: pointer; color: var(--muted); line-height: 1; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .hero-inner, .book-layout { grid-template-columns: 1fr; }
  .summary { position: static; order: -1; }
  .stepper li span { display: none; }
  .stepper li { justify-content: center; }
  .filters { grid-template-columns: 1fr 1fr; }
  .filters .btn-row { grid-column: 1 / -1; justify-content: flex-start; }
  .lookup-form { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .form-grid { grid-template-columns: 1fr; }
  .panel-wrap { padding: 18px; }
  .site-header nav a:not(.btn) { display: none; }
  .filters { grid-template-columns: 1fr; }
}
