:root {
  --bg: #f4f7fb;
  --panel: #ffffff;
  --ink: #102333;
  --muted: #6b7a8b;
  --line: #e4eaf1;
  --brand: #0b6f7b;
  --brand-2: #13a0aa;
  --soft: #eaf7f8;
  --ok: #1f9d63;
  --warn: #d78b00;
  --danger: #c83b45;
  --shadow: 0 18px 45px rgba(12, 33, 54, .09);
  --radius: 20px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: radial-gradient(circle at top left, rgba(19,160,170,.16), transparent 34%), var(--bg);
  color: var(--ink);
  min-height: 100vh;
}
.app-shell { width: min(1180px, calc(100% - 32px)); margin: 24px auto 42px; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 22px; }
.brand { display: flex; align-items: center; gap: 16px; }
.brand img { width: 58px; height: 58px; object-fit: contain; background: white; border-radius: 16px; padding: 8px; box-shadow: var(--shadow); }
.brand h1 { margin: 0; font-size: clamp(24px, 3vw, 34px); letter-spacing: -.03em; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.env-badge { background: #fff3d8; color: #895800; border: 1px solid #ffdda0; padding: 8px 12px; border-radius: 999px; font-size: 12px; font-weight: 900; letter-spacing: .06em; }
.lang-toggle, .ghost-link, .primary-btn, .secondary-btn {
  border: 0; border-radius: 999px; padding: 11px 16px; font-weight: 800; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.lang-toggle, .ghost-link, .secondary-btn { background: white; color: var(--brand); box-shadow: 0 8px 22px rgba(12,33,54,.07); }
.primary-btn { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: white; box-shadow: 0 12px 25px rgba(11,111,123,.22); }
button:disabled { opacity: .45; cursor: not-allowed; transform: none !important; }
.lang-toggle:hover, .ghost-link:hover, .primary-btn:hover, .secondary-btn:hover { transform: translateY(-1px); }
.compact { padding: 9px 13px; font-size: 13px; }
.grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 22px; align-items: start; }
.panel { background: rgba(255,255,255,.94); border: 1px solid rgba(255,255,255,.75); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; backdrop-filter: blur(10px); }
.panel h2 { margin: 0 0 8px; font-size: 22px; letter-spacing: -.02em; }
.panel p { color: var(--muted); line-height: 1.5; }
.form-grid { display: grid; gap: 14px; }
.form-grid.full { grid-template-columns: 1fr; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-size: 13px; font-weight: 800; color: #304458; }
.field input { width: 100%; border: 1px solid var(--line); border-radius: 14px; padding: 12px 13px; font: inherit; background: white; color: var(--ink); }
.notice { border-radius: 16px; padding: 13px 15px; margin-top: 14px; line-height: 1.45; }
.notice.info { background: var(--soft); color: #185b64; border: 1px solid #d3ecef; }
.notice.ok { background: #eefaf4; color: #17613f; border: 1px solid #cbeedb; }
.notice.warn { background: #fff7e6; color: #795100; border: 1px solid #ffe0a3; }
.notice.danger { background: #fff1f2; color: #8e2430; border: 1px solid #ffd1d6; }
.hidden { display: none !important; }
.action-row { margin-bottom: 0; }
.step-list { display: grid; gap: 16px; margin-top: 16px; }
.step { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; align-items: start; }
.step > b:first-child { background: var(--brand); color: white; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; }
.step div > b { display: block; margin: 2px 0 6px; color: var(--ink); font-weight: 900; }
.step div p { margin: 0; }
.calendar-title-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.month-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 8px 0 14px; }
.month-head strong { font-size: 20px; text-transform: capitalize; }
.month-nav { min-width: 46px; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); gap: 8px; }
.weekday { color: var(--muted); font-weight: 800; text-align: center; font-size: 12px; padding-bottom: 4px; }
.day { min-height: 92px; border: 1px solid var(--line); border-radius: 16px; background: white; padding: 9px; cursor: pointer; display: flex; flex-direction: column; justify-content: space-between; gap: 8px; overflow: hidden; color: var(--ink); }
.day .num { font-weight: 900; }
.day .cap { display: block; margin-top: 4px; font-size: 11px; color: var(--muted); }
.day.available { border-color: rgba(31,157,99,.35); }
.day.available .pill { background: #eaf8f0; color: var(--ok); }
.day.low .pill { background: #fff7e6; color: var(--warn); }
.day.full, .day.closed, .day.out { cursor: not-allowed; background: #f6f7f9; color: #a5afba; }
.day.selected { border: 2px solid var(--brand); box-shadow: inset 0 0 0 2px rgba(19,160,170,.14); }
.pill { border-radius: 999px; padding: 5px 8px; font-size: 11px; font-weight: 900; display: inline-flex; width: fit-content; }
.calendar-loading { padding: 28px 10px; text-align: center; color: var(--muted); }
.summary-card { display: grid; gap: 10px; }
.summary-row { display: flex; justify-content: space-between; gap: 16px; border-bottom: 1px dashed var(--line); padding-bottom: 9px; }
.summary-row span:first-child { color: var(--muted); }
.summary-row span:last-child { font-weight: 800; text-align: right; max-width: 65%; }
.sticky-panel { position: sticky; top: 18px; align-self: start; }
.button-stack { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.footer-note { margin-top: 18px; color: var(--muted); font-size: 13px; text-align: center; }
@media (max-width: 920px) {
  .grid { grid-template-columns: 1fr; }
  .sticky-panel { position: static; }
  .calendar-grid { gap: 6px; }
  .day { min-height: 78px; padding: 7px; border-radius: 13px; }
}
@media (max-width: 640px) {
  .app-shell { width: min(100% - 18px,1180px); margin-top: 14px; }
  .topbar { align-items: flex-start; flex-direction: column; }
  .brand img { width: 48px; height: 48px; }
  .panel { padding: 16px; }
  .calendar-title-row { flex-direction: column; }
  .calendar-grid { grid-template-columns: repeat(7, minmax(38px,1fr)); }
  .day { min-height: 66px; }
  .day .cap { font-size: 9px; }
  .pill { font-size: 9px; padding: 4px 5px; }
  .summary-row { align-items: flex-start; }
  .summary-row span:last-child { max-width: 62%; }
}


/* Booking confirmation modal */
body.modal-open { overflow: hidden; }
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(12, 33, 54, .58);
  backdrop-filter: blur(7px);
}
.confirmation-modal {
  width: min(720px, 62vw);
  max-height: calc(100vh - 48px);
  overflow: auto;
  background: white;
  border-radius: 28px;
  padding: clamp(24px, 4vw, 42px);
  box-shadow: 0 30px 90px rgba(7, 26, 45, .28);
  text-align: center;
}
.confirmation-check, .final-check {
  width: 76px;
  height: 76px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #eaf8f0;
  color: var(--ok);
  font-size: 42px;
  font-weight: 900;
}
.confirmation-modal h2 { margin: 0; font-size: clamp(26px, 3vw, 36px); letter-spacing: -.03em; }
.confirmation-lead { margin: 12px auto 24px; max-width: 580px; color: var(--muted); font-size: 17px; line-height: 1.55; }
.confirmation-details {
  display: grid;
  gap: 0;
  margin: 8px 0 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  text-align: left;
}
.confirmation-row { display: grid; grid-template-columns: minmax(145px, .8fr) minmax(0, 1.2fr); gap: 18px; padding: 15px 17px; border-bottom: 1px solid var(--line); align-items: start; }
.confirmation-row:last-child { border-bottom: 0; }
.confirmation-row span { color: var(--muted); }
.confirmation-row strong { text-align: right; overflow-wrap: anywhere; }
.confirmation-test-note { background: #fff7e6; color: #795100; border: 1px solid #ffe0a3; border-radius: 14px; padding: 11px 13px; font-size: 13px; }
.confirmation-close { min-width: 180px; margin-top: 6px; }
.final-view { max-width: 680px; margin: 72px auto; text-align: center; padding: 42px; }
.final-view h2 { font-size: 30px; }
.final-view p { font-size: 17px; }

@media (max-width: 920px) {
  .confirmation-modal { width: min(760px, 92vw); }
}
@media (max-width: 640px) {
  .modal-overlay { padding: 10px; }
  .confirmation-modal { width: 100%; max-height: calc(100vh - 20px); border-radius: 22px; padding: 24px 18px; }
  .confirmation-row { grid-template-columns: 1fr; gap: 5px; }
  .confirmation-row strong { text-align: left; }
  .confirmation-close { width: 100%; }
  .final-view { margin: 30px auto; padding: 28px 20px; }
}
