@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');
:root {
  --brand: #0f62fe; --brand-ink: #fff; --ink: #0f172a; --ink2: #475569; --ink3: #94a3b8;
  --line: #e2e8f0; --bg: #f6f7fb; --card: #fff; --ok: #16a34a; --warn: #d97706; --bad: #dc2626;
  --r: 14px; --shadow: 0 1px 2px rgba(15,23,42,.04), 0 8px 24px rgba(15,23,42,.06);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: 'Plus Jakarta Sans', system-ui, -apple-system, Segoe UI, sans-serif; color: var(--ink); background: var(--bg); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0 0 .4em; letter-spacing: -.02em; line-height: 1.2; }
h1 { font-size: 28px; font-weight: 800; } h2 { font-size: 20px; font-weight: 700; } h3 { font-size: 16px; font-weight: 700; }
.muted { color: var(--ink2); } .faint { color: var(--ink3); } .small { font-size: 13px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.pad { padding: 22px; }
.row { display: flex; gap: 12px; align-items: center; } .row.wrap { flex-wrap: wrap; } .between { justify-content: space-between; }
.grid { display: grid; gap: 14px; } .g2 { grid-template-columns: repeat(2, minmax(0,1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0,1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
@media (max-width: 860px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); background: #fff; color: var(--ink); padding: 9px 16px; border-radius: 10px; font: inherit; font-weight: 600; cursor: pointer; transition: .15s; white-space: nowrap; }
.btn:hover { border-color: var(--ink3); text-decoration: none; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--bad); } .btn.sm { padding: 6px 11px; font-size: 13px; border-radius: 8px; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
label { display: block; font-weight: 600; font-size: 13px; margin: 0 0 6px; color: var(--ink); }
input, select, textarea { width: 100%; font: inherit; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; outline: none; transition: .15s; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
textarea { min-height: 84px; resize: vertical; }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--brand); }
.field { margin-bottom: 14px; }
.help { font-size: 12px; color: var(--ink2); margin-top: 4px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #eef2ff; color: #3730a3; }
.pill.ok { background: #dcfce7; color: #166534; } .pill.warn { background: #fef3c7; color: #92400e; } .pill.bad { background: #fee2e2; color: #991b1b; } .pill.grey { background: #f1f5f9; color: #475569; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.err { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; padding: 10px 12px; border-radius: 10px; font-size: 14px; }
.notice { background: #eff6ff; color: #1e3a8a; border: 1px solid #bfdbfe; padding: 10px 12px; border-radius: 10px; font-size: 14px; }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 12px; font-weight: 600; box-shadow: var(--shadow); z-index: 100; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink3); font-weight: 700; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
code { background: #f1f5f9; padding: 2px 6px; border-radius: 6px; }
.hidden { display: none !important; }
.spinner { width: 22px; height: 22px; border: 3px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; margin: 30px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Booking page ---------- */
.bk-wrap { max-width: 1040px; margin: 40px auto; padding: 0 16px; }
.bk { display: grid; grid-template-columns: 300px 1fr; min-height: 560px; overflow: hidden; }
.bk.embed-mode { margin: 0; }
.bk-side { padding: 28px; border-right: 1px solid var(--line); }
.bk-main { padding: 28px; }
.bk-org { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink2); margin-bottom: 18px; }
.bk-org img { width: 34px; height: 34px; border-radius: 8px; object-fit: cover; }
.bk-meta { display: grid; gap: 10px; margin-top: 16px; color: var(--ink2); font-weight: 500; }
.bk-meta div { display: flex; gap: 10px; align-items: center; }
.bk-meta svg { width: 18px; height: 18px; flex: none; color: var(--ink3); }
.bk-cal-grid { display: grid; grid-template-columns: 1fr 230px; gap: 26px; }
@media (max-width: 860px) { .bk { grid-template-columns: 1fr; } .bk-side { border-right: 0; border-bottom: 1px solid var(--line); } .bk-cal-grid { grid-template-columns: 1fr; } }
.cal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; text-align: center; }
.cal .dow { font-size: 11px; font-weight: 700; color: var(--ink3); text-transform: uppercase; padding: 6px 0; }
.cal button { aspect-ratio: 1; border: 0; border-radius: 50%; font: inherit; font-weight: 600; background: transparent; color: var(--ink3); cursor: default; max-width: 46px; margin: auto; width: 100%; }
.cal button.av { background: color-mix(in srgb, var(--brand) 10%, #fff); color: var(--brand); cursor: pointer; }
.cal button.av:hover { background: color-mix(in srgb, var(--brand) 20%, #fff); }
.cal button.sel { background: var(--brand); color: #fff; }
.cal button.today { box-shadow: inset 0 0 0 2px var(--line); }
.slots { display: grid; gap: 8px; max-height: 420px; overflow: auto; padding-right: 4px; }
.slot { display: flex; gap: 8px; }
.slot button { flex: 1; padding: 12px; border: 1px solid color-mix(in srgb, var(--brand) 50%, #fff); color: var(--brand); background: #fff; border-radius: 10px; font: inherit; font-weight: 700; cursor: pointer; transition: .15s; }
.slot button:hover { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.slot button.go { background: var(--brand); color: #fff; flex: 0 0 auto; }
.slot .seats { font-size: 11px; font-weight: 600; display: block; color: var(--ink2); }
.tzsel { margin-top: 18px; }
.done-ic { width: 56px; height: 56px; border-radius: 50%; background: #dcfce7; color: var(--ok); display: grid; place-items: center; margin-bottom: 12px; }
.powered { text-align: center; margin: 16px 0; font-size: 12px; color: var(--ink3); }
.et-list { display: grid; gap: 12px; }
.et-item { display: flex; gap: 14px; padding: 18px; align-items: flex-start; border: 1px solid var(--line); border-radius: 12px; background: #fff; transition: .15s; color: var(--ink); }
.et-item:hover { border-color: var(--brand); text-decoration: none; transform: translateY(-1px); }
.et-bar { width: 5px; align-self: stretch; border-radius: 4px; }

/* ---------- Admin ---------- */
.shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.nav { background: #0b1020; color: #cbd5e1; padding: 20px 14px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; }
.nav .logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; color: #fff; padding: 4px 10px 22px; letter-spacing: -.02em; }
.nav .logo span.mark { width: 30px; height: 30px; border-radius: 9px; background: var(--brand); display: grid; place-items: center; color: #fff; }
.nav a { display: flex; align-items: center; gap: 10px; color: #cbd5e1; padding: 9px 12px; border-radius: 9px; font-weight: 600; margin-bottom: 2px; }
.nav a:hover { background: rgba(255,255,255,.06); text-decoration: none; color: #fff; }
.nav a.on { background: rgba(255,255,255,.1); color: #fff; }
.nav svg { width: 18px; height: 18px; }
.nav .foot { margin-top: auto; font-size: 13px; padding: 10px; color: #94a3b8; }
.main { padding: 28px 34px; max-width: 1180px; width: 100%; }
.top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; gap: 12px; flex-wrap: wrap; }
.stat { padding: 18px; } .stat b { font-size: 28px; display: block; letter-spacing: -.02em; }
.bk-row { display: grid; grid-template-columns: 110px 1fr auto; gap: 14px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.bk-row:last-child { border-bottom: 0; }
.bk-time { font-weight: 700; } .bk-time small { display: block; color: var(--ink3); font-weight: 500; }
.day-h { padding: 10px 16px; background: #f8fafc; font-weight: 700; font-size: 13px; color: var(--ink2); border-bottom: 1px solid var(--line); }
.et-card { padding: 18px; border-top: 5px solid var(--brand); display: flex; flex-direction: column; gap: 8px; }
.drawer-bg { position: fixed; inset: 0; background: rgba(15,23,42,.35); z-index: 50; display: flex; justify-content: flex-end; }
.drawer { width: min(640px, 100%); background: #fff; height: 100%; overflow: auto; padding: 26px; box-shadow: -8px 0 30px rgba(0,0,0,.1); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg button { border: 0; background: #fff; padding: 8px 14px; font: inherit; font-weight: 600; cursor: pointer; color: var(--ink2); }
.seg button.on { background: var(--brand); color: #fff; }
.mode-opt { display: flex; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; cursor: pointer; align-items: flex-start; }
.mode-opt.on { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 5%, #fff); }
.mode-opt input { margin-top: 4px; }
.week-row { display: grid; grid-template-columns: 90px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); align-items: start; }
.iv { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; } .iv input { width: 120px; }
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(1200px 600px at 10% -10%, #dbeafe, transparent), radial-gradient(900px 500px at 110% 110%, #ede9fe, transparent), var(--bg); }
.auth { width: min(420px, 100%); }
.int-card { padding: 18px; display: flex; gap: 14px; align-items: center; }
.int-logo { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; color: #fff; flex: none; }
@media (max-width: 860px) { .shell { grid-template-columns: 1fr; } .nav { position: static; height: auto; flex-direction: row; flex-wrap: wrap; } .nav .foot { display: none; } .main { padding: 20px; } }
.btn.disabled { opacity: .45; pointer-events: none; filter: grayscale(.6); }
.iv input { width: 136px; }
@media (min-width: 861px) { .shell { background: linear-gradient(to right, #0b1020 236px, transparent 236px); } }
.mode-opt svg { width: 18px; height: 18px; vertical-align: -3px; margin-right: 4px; flex: none; }
