/* ===== Meltemi Beach Club — design system ===== */
:root {
  --ink: #173B33;
  --ink2: #163A37;
  --accent: #CB5A3C;
  --accent-d: #B5482F;
  --sea: #1B8AA4;
  --panel: #F7F1E4;
  --input: #FFFDF8;
  --sand: #E7D4AC;
  --free: #7CAE86;
  --taken: #D3CAB6;
  --muted: #7E908C;
  --muted2: #8A9D99;
  --muted3: #9AA8A4;
  --soft: #5A726E;
  --line: rgba(23, 59, 51, 0.10);
  --line2: rgba(23, 59, 51, 0.16);
  --bg: #EFE7D7;
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.admin { background: #EAE1CE; }

@keyframes pop { from { transform: translateY(9px) scale(.992); opacity: .6; } to { transform: translateY(0) scale(1); opacity: 1; } }
@keyframes floatUp { from { transform: translate(-50%, 16px); opacity: .4; } to { transform: translate(-50%, 0); opacity: 1; } }
@keyframes barUp { from { transform: translateY(14px); } to { transform: translateY(0); } }

input, select, button, textarea { font-family: inherit; }
input:focus, select:focus, textarea:focus { outline: none; }
::placeholder { color: #A7B3AF; }
.hidden { display: none !important; }
.material-symbols-outlined, .ms { font-family: "Material Symbols Outlined"; font-weight: 400; line-height: 1; }

.serif { font-family: var(--serif); }
.muted { color: var(--muted); }
.kicker { font-size: 11px; font-weight: 700; letter-spacing: .22em; color: var(--accent-d); text-transform: uppercase; }
.h-title { font-family: var(--serif); font-weight: 400; line-height: 1.05; color: var(--ink2); margin: 8px 0 6px; font-size: clamp(28px, 4.6vw, 44px); }
.lead { font-size: 15px; line-height: 1.55; color: var(--soft); }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted2); }

/* layout shells */
.wrap { max-width: 1180px; margin: 0 auto; padding: 20px clamp(15px, 4vw, 40px) 132px; }
.pageGrid { display: grid; gap: 22px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .pageGrid { grid-template-columns: minmax(0, 1fr) 314px; align-items: start; } }
.pageGridMap { display: grid; gap: 22px; grid-template-columns: 1fr; }
@media (min-width: 1040px) { .pageGridMap { grid-template-columns: 248px minmax(0, 1fr); align-items: start; } }

/* header */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 13px; }
.brand-badge { width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(180deg, #E89A3A 0 47%, var(--sea) 47% 100%); box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06), 0 5px 12px rgba(20,40,38,0.18); position: relative; flex: 0 0 auto; overflow: hidden; }
.brand-badge::after { content: ""; position: absolute; left: 0; right: 0; top: 47%; height: 2px; background: #F4E7CF; transform: translateY(-1px); }
.brand-badge img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.brand-name { font-family: var(--serif); font-style: italic; font-size: 27px; color: var(--ink2); line-height: 1; }
.brand-sub { font-size: 9px; font-weight: 700; letter-spacing: .34em; color: #6E8480; margin-top: 4px; }

/* controls */
.mz-input, .mz-select { width: 100%; padding: 12px 14px; border: 1px solid var(--line2); border-radius: 13px; background: var(--input); font-size: 15px; font-weight: 500; color: var(--ink); }
.mz-select { appearance: none; padding-right: 30px; font-weight: 600; cursor: pointer; }
.mz-input:focus, .mz-select:focus, textarea.mz-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(203,90,60,0.15); }
.sel-wrap { position: relative; }
.sel-wrap .arrow { position: absolute; right: 13px; top: 50%; transform: translateY(-50%); pointer-events: none; font-size: 8px; color: #6E8480; }
.lab { display: block; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted2); margin-bottom: 7px; }
.req { color: var(--accent); }
.fieldhint { font-size: 12px; color: var(--muted3); margin-top: 6px; line-height: 1.5; }

/* buttons — base applies to every variant so they can be used standalone */
.btn, .btn-ghost, .btn-dark { border: none; border-radius: 13px; padding: 13px 24px; font-size: 14.5px; font-weight: 700; cursor: pointer; font-family: var(--sans); transition: background .15s, transform .05s; }
.btn { background: var(--accent); color: #FFF6EF; box-shadow: 0 8px 20px rgba(203,90,60,0.3); }
.btn:hover { background: var(--accent-d); }
.btn:active, .btn-ghost:active, .btn-dark:active { transform: translateY(1px); }
.btn-ghost { background: transparent; border: 1px solid rgba(23,59,51,0.2); color: var(--ink); box-shadow: none; }
.btn-ghost:hover { background: rgba(23,59,51,0.04); }
.btn-dark { background: var(--ink); color: #F4EAD6; box-shadow: none; }
.btn-dark:hover { background: #0F2A24; }
.btn-sm { padding: 9px 15px; font-size: 13px; border-radius: 11px; }
.pill { border-radius: 999px; }

/* chips */
.chip { padding: 10px 16px; border-radius: 999px; border: 1px solid var(--line2); background: var(--input); color: var(--ink); font-size: 14px; font-weight: 600; cursor: pointer; }
.chip.on { border: 1.5px solid var(--accent); background: rgba(203,90,60,0.08); color: var(--ink2); font-weight: 700; }
.chip.off { border: 1px dashed rgba(23,59,51,0.2); background: transparent; color: var(--muted3); cursor: not-allowed; }

/* panels */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 20px; box-shadow: 0 10px 30px rgba(20,40,38,0.05); }
.panel-sm { border-radius: 18px; padding: 18px; box-shadow: none; }
.panel-title { font-family: var(--serif); font-size: 20px; color: var(--ink2); }
.hr { height: 1px; background: var(--line); margin: 13px 0; border: 0; }

/* step progress */
.steps { display: flex; align-items: center; margin: 24px 0 26px; }
.step { display: flex; align-items: center; flex: 1; min-width: 0; }
.step-dot { width: 30px; height: 30px; flex: 0 0 auto; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; cursor: pointer; transition: all .2s; background: transparent; color: var(--muted3); border: 1.5px solid rgba(23,59,51,0.2); }
.step-dot.active { background: var(--accent); color: #FFF6EF; border: none; box-shadow: 0 6px 14px rgba(203,90,60,0.3); }
.step-dot.done { background: var(--sea); color: #fff; border: none; }
.step-lab { margin-left: 9px; font-size: 12.5px; font-weight: 700; white-space: nowrap; color: var(--muted3); }
.step-lab.active { color: var(--ink); } .step-lab.done { color: var(--sea); }
.step-line { flex: 1; height: 2px; margin: 0 10px; border-radius: 2px; background: var(--line); }
.step-line.done { background: var(--sea); }
@media (max-width: 560px) { .step-lab { display: none; } }

/* slot cards */
.slot-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 17px; border-radius: 15px; border: 1px solid rgba(23,59,51,0.14); background: var(--panel); cursor: pointer; text-align: left; width: 100%; }
.slot-card.on { border: 1.5px solid var(--accent); background: rgba(203,90,60,0.06); }
.slot-card.off { border: 1px dashed rgba(23,59,51,0.18); background: rgba(23,59,51,0.03); cursor: not-allowed; opacity: .6; }
.slot-tick { width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; flex: 0 0 auto; border: 1.5px solid rgba(23,59,51,0.18); color: transparent; }
.slot-tick.on { background: var(--accent); color: #fff; border: none; }

/* stepper */
.stepper-btn { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line2); background: var(--input); color: var(--ink); font-size: 18px; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }

/* map */
.map-frame { position: relative; width: 100%; overflow: hidden; border-radius: 15px; border: 1px solid var(--line); }
.map-canvas { position: absolute; top: 0; left: 0; width: 900px; height: 560px; transform-origin: top left; background: radial-gradient(rgba(120,90,40,0.05) 1px, transparent 1.5px) 0 0/20px 20px, var(--sand); }
.sea-band { position: absolute; overflow: hidden; }
.sea-label { position: absolute; left: 20px; top: 14px; font-size: 10px; font-weight: 700; letter-spacing: .32em; color: rgba(255,255,255,0.92); pointer-events: none; text-shadow: 0 1px 3px rgba(10,40,50,0.4); }
.seat { position: absolute; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 0; appearance: none; overflow: hidden; transition: transform .16s cubic-bezier(.2,.7,.3,1), box-shadow .16s ease; }
.seat.free { cursor: pointer; }
.seat.free:hover { transform: translateY(-4px); box-shadow: 0 16px 30px rgba(23,59,51,0.20), inset 0 1px 0 rgba(255,255,255,0.5); }
.seat-name { font-weight: 700; line-height: 1; letter-spacing: .01em; position: relative; z-index: 2; }
.seat-meta { font-weight: 600; font-size: 10px; letter-spacing: .07em; text-transform: uppercase; margin-top: 3px; opacity: .92; position: relative; z-index: 2; }

/* legend */
.legend-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px 10px; }
.legend-item { display: inline-flex; align-items: center; gap: 9px; font-size: 12px; color: #4A625E; font-weight: 600; }
.legend-swatch { position: relative; width: 24px; height: 24px; flex: 0 0 auto; border-radius: 6px; box-shadow: inset 0 1px 0 rgba(255,255,255,0.45), 0 1px 2px rgba(23,59,51,0.12); border: 1px solid rgba(23,59,51,0.10); overflow: hidden; }

/* sticky footer */
.actionbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: rgba(244,238,225,0.86); backdrop-filter: blur(12px); border-top: 1px solid rgba(23,59,51,0.12); animation: barUp .3s ease; }
.actionbar-in { max-width: 1180px; margin: 0 auto; padding: 13px clamp(15px,4vw,40px); display: flex; align-items: center; justify-content: space-between; gap: 14px; }

/* toast */
.toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); background: var(--ink); color: #F4EFE3; padding: 13px 20px; border-radius: 999px; font-size: 13.5px; font-weight: 600; box-shadow: 0 14px 30px rgba(20,40,38,0.32); z-index: 60; opacity: 0; pointer-events: none; }
.toast.show { animation: floatUp .25s ease; opacity: 1; }
.toast.err { background: var(--accent-d); }

/* modal */
.modal-bg { position: fixed; inset: 0; background: rgba(20,40,38,0.46); backdrop-filter: blur(4px); display: none; align-items: center; justify-content: center; padding: 20px; z-index: 50; }
.modal-bg.open { display: flex; }
.modal { width: min(440px, 100%); background: #F8F2E6; border-radius: 20px; padding: 24px; box-shadow: 0 30px 70px rgba(20,40,38,0.4); color: var(--ink); }
.modal-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .2em; color: var(--muted2); text-transform: uppercase; }
.modal-title { font-family: var(--serif); font-size: 26px; color: var(--ink2); margin: 4px 0 16px; }
.modal-actions { display: flex; gap: 10px; margin-top: 20px; align-items: center; }

/* toggle */
.tg { position: relative; width: 42px; height: 24px; border-radius: 999px; border: none; cursor: pointer; background: #CDC4B0; transition: background .18s; flex: 0 0 auto; padding: 0; }
.tg.on { background: var(--accent); }
.tg .knob { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: left .18s; box-shadow: 0 1px 3px rgba(0,0,0,0.2); }
.tg.on .knob { left: 21px; }

/* badges */
.bdg { display: inline-block; font-size: 11px; font-weight: 700; padding: 4px 9px; border-radius: 999px; }
.bdg.ok { background: rgba(111,160,120,0.18); color: #3C7A4E; }
.bdg.paid { background: rgba(27,138,164,0.14); color: #15728A; }
.bdg.cancelled { background: rgba(194,85,64,0.12); color: var(--accent-d); }

/* ===== ADMIN ===== */
.shell { display: grid; grid-template-columns: 1fr; min-height: 100vh; }
@media (min-width: 920px) { .shell { grid-template-columns: 240px minmax(0,1fr); } }
.side { background: var(--ink); color: #E9E0CC; display: flex; flex-direction: column; padding: 18px 14px; gap: 6px; min-height: 100vh; position: sticky; top: 0; align-self: start; }
.side-brand { display: flex; align-items: center; gap: 11px; padding: 6px 8px 16px; }
.nav-btn { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 11px; border: none; cursor: pointer; font-size: 13.5px; font-weight: 700; text-align: left; width: 100%; background: transparent; color: #A9BBB3; }
.nav-btn.on { background: rgba(244,234,214,0.14); color: #F4EAD6; }
.main { padding: 24px clamp(16px,3vw,34px) 60px; min-width: 0; }
.statGrid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 13px; }
@media (min-width: 680px) { .statGrid { grid-template-columns: repeat(3, minmax(0,1fr)); } }
@media (min-width: 1180px) { .statGrid { grid-template-columns: repeat(4, minmax(0,1fr)); } }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.stat .num { font-family: var(--serif); font-size: 34px; color: var(--ink2); line-height: 1.05; margin: 4px 0 2px; }
.stat .lbl { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted2); }
.stat .sub { font-size: 12px; color: var(--muted); font-weight: 600; }
.formGrid { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 900px) { .formGrid { grid-template-columns: 188px minmax(0,1fr); align-items: start; } }
.secnav-btn { border: none; cursor: pointer; text-align: left; padding: 9px 12px; border-radius: 10px; font-size: 13px; font-weight: 700; background: var(--panel); color: var(--soft); }
.secnav-btn.on { background: var(--ink); color: #F4EAD6; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { padding: 13px 14px; font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted2); border-bottom: 1px solid var(--line); text-align: left; }
.tbl td { padding: 13px 14px; font-size: 13px; border-bottom: 1px solid rgba(23,59,51,0.07); }
.tbl tr.cancelled { opacity: .55; }
.seatpill { font-weight: 800; font-size: 12.5px; background: var(--bg); border-radius: 7px; padding: 4px 8px; }
.tblWrap { overflow-x: auto; }

/* print */
.printSheet { display: none; }
@media print { .noprint { display: none !important; } .printSheet { display: block !important; } body { background: #fff; } }

@media (max-width: 560px) {
  .wrap { padding: 16px 14px 132px; }
  .topbar .brand-name { font-size: 22px; }
}

/* admin on phones/tablets: sidebar becomes a top bar */
@media (max-width: 920px) {
  .shell { grid-template-columns: 1fr; }
  .side { min-height: auto; position: static; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 14px; }
  .side-brand { padding: 0; margin-right: auto; }
  #nav { flex: 1 1 100%; order: 3; }
  .side > a.nav-btn, .side #logoutBtn { width: auto; }
  .main { padding: 16px 14px 60px; }
  .formGrid { grid-template-columns: 1fr; }
  .formGrid > nav { position: static !important; }
}
