/* =========================================================
   Foglaló – stíluslap
   Mobilra tervezve, asztali nézetben kiszélesedik.
   Szerkezet: 1. változók  2. alapok  3. elrendezés
              4. gombok  5. űrlapok  6. kártyák, üzenetek
              7. nyilvános foglalóoldal  8. admin naptár
   ========================================================= */

/* ---------- 1. Változók (a színeket itt egy helyen állítod) ---------- */
:root {
  --bg: #F7F7F5;
  --surface: #FFFFFF;
  --ink: #16181D;
  --muted: #5C5F66;
  --line: #DCDCD8;
  --line-soft: #E4E4E0;
  --soft: #EEEEEC;

  --brand: #1F7A45;
  --brand-dark: #145C33;

  /* naptár-állapotok */
  --free-bg: #E3F4E8;    --free-line: #9FD5B0;    --free-ink: #145C33;
  --pend-bg: #FFF1C2;    --pend-line: #E8C65A;    --pend-ink: #6B4A00;
  --book-bg: #DCE8FF;    --book-line: #A9C3F2;    --book-ink: #1A438F;
  --busy-bg: #EEEEEC;    --busy-line: #E4E4E0;    --busy-ink: #6E6E6A;

  --danger: #B42318;     --danger-bg: #FEF3F2;    --danger-line: #F4C7C3;

  --radius: 12px;
  --radius-sm: 10px;
  --radius-lg: 16px;
  --tap: 44px;           /* minimális érintési méret */
}

/* ---------- 2. Alapok ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

a { color: var(--brand); }
a:hover { color: var(--brand-dark); }

h1, h2, h3 { margin: 0; line-height: 1.25; }
h1 { font-size: 22px; font-weight: 700; }
h2 { font-size: 17px; font-weight: 700; }

.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }

:focus-visible { outline: 3px solid #9FD5B0; outline-offset: 2px; }

/* ---------- 3. Elrendezés ---------- */

/* Középre igazított, keskeny oldal (bejelentkezés, regisztráció, foglalás) */
.page-narrow {
  max-width: 440px;
  margin: 0 auto;
  padding: 20px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-card { width: 100%; max-width: 420px; }

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  color: var(--ink);
  text-decoration: none;
}
.brand-logo {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--brand);
  display: flex; align-items: center; justify-content: center;
}

/* Admin felső sáv */
.topbar { background: var(--surface); border-bottom: 1px solid var(--line-soft); }
.topbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.nav { display: flex; flex-wrap: wrap; gap: 4px; }
.nav a {
  padding: 10px 14px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--muted);
}
.nav a.active { background: var(--soft); color: var(--ink); font-weight: 600; }

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px;
}

/* Admin: naptár + oldalsáv; mobilon egymás alá kerülnek */
.admin-grid { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.admin-main { flex: 999 1 560px; min-width: 0; }
.admin-side { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }

.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.row-between { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }

.avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px;
  flex-shrink: 0;
}
.avatar-lg { width: 56px; height: 56px; font-size: 20px; }

/* ---------- 4. Gombok ---------- */
.btn {
  min-height: var(--tap);
  padding: 0 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  cursor: pointer;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #000; color: #fff; }
.btn-outline { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-outline:hover { background: var(--soft); color: var(--ink); }
.btn-danger { background: var(--surface); color: var(--danger); border-color: var(--danger-line); }
.btn-block { width: 100%; }
.btn-lg { min-height: 52px; border-radius: 14px; font-size: 16px; }
.btn:disabled, .btn[aria-disabled="true"] {
  background: #DEDED9; color: var(--muted); border-color: transparent; cursor: not-allowed;
}
.btn-icon { width: var(--tap); padding: 0; }

/* ---------- 5. Űrlapok ---------- */
.field { display: flex; flex-direction: column; gap: 4px; }

.label { font-size: 13px; font-weight: 600; color: var(--muted); }

.input, .select, .textarea {
  width: 100%;
  min-height: var(--tap);
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 16px; /* iPhone-on 16px alatt ránagyít a mezőre */
}
.textarea { padding: 10px 12px; min-height: 88px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(31, 122, 69, .15);
}
.input.is-invalid, .select.is-invalid, .textarea.is-invalid { border-color: var(--danger); }

.field-error { font-size: 13px; color: var(--danger); }
.hint { font-size: 13px; color: var(--muted); }

.checkbox { display: flex; align-items: center; gap: 8px; min-height: var(--tap); }
.checkbox input { width: 20px; height: 20px; accent-color: var(--brand); }

/* ---------- 6. Kártyák, üzenetek ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.card-head { display: flex; flex-direction: column; gap: 4px; margin-bottom: 16px; }

.alert {
  padding: 12px 14px;
  border-radius: var(--radius);
  font-size: 14px;
  border: 1px solid;
}
.alert-success { background: var(--free-bg); border-color: var(--free-line); color: var(--free-ink); }
.alert-warning { background: var(--pend-bg); border-color: var(--pend-line); color: var(--pend-ink); }
.alert-error   { background: var(--danger-bg); border-color: var(--danger-line); color: var(--danger); }

.badge {
  min-width: 24px; height: 24px;
  padding: 0 8px;
  border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
}
.badge-pending { background: var(--pend-bg); color: var(--pend-ink); }

.empty {
  padding: 16px;
  border-radius: var(--radius);
  background: var(--soft);
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.divider { height: 1px; background: var(--line-soft); border: 0; margin: 4px 0; }

/* ---------- 7. Nyilvános foglalóoldal ---------- */
.profile { display: flex; align-items: center; gap: 14px; }
.profile-name { font-size: 20px; font-weight: 700; }

.section-title {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; font-weight: 600; color: var(--muted);
  margin-bottom: 8px;
}

/* Szolgáltatás-választó (rádiógombokból, JavaScript nélkül is működik) */
.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span {
  display: flex; flex-direction: column;
  min-height: 64px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
}
.choice strong { font-size: 15px; }
.choice small { font-size: 13px; color: var(--muted); }
.choice input:checked + span { border: 2px solid var(--ink); padding: 11px; }
.choice input:focus-visible + span { outline: 3px solid #9FD5B0; outline-offset: 2px; }

/* Napválasztó */
.day-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.day {
  height: 60px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-decoration: none;
  font: inherit;
}
.day small { font-size: 12px; color: var(--muted); }
.day strong { font-size: 17px; }
.day.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }
.day.is-active small { color: #fff; }
.day.is-off { opacity: .45; }

/* Jelmagyarázat */
.legend { display: flex; flex-wrap: wrap; gap: 10px 16px; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 12px; border-radius: 3px; border: 1px solid; display: inline-block; }
.legend .l-free    { background: var(--free-bg); border-color: var(--free-line); }
.legend .l-busy    { background: #DEDED9; border-color: #DEDED9; }
.legend .l-pending { background: var(--pend-bg); border-color: var(--pend-line); }
.legend .l-booked  { background: var(--book-bg); border-color: var(--book-line); }
.legend .l-blocked { border-color: var(--line); background: repeating-linear-gradient(135deg, #E2E2DE 0 3px, #F4F4F1 3px 6px); }
.legend .l-off     { border-style: dashed; border-color: #CFCFCA; background: transparent; }

/* Időpontok: ügyfélnézetben csak zöld (szabad) és szürke (nem foglalható) */
.slot-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.slot input { position: absolute; opacity: 0; pointer-events: none; }
.slot span {
  height: var(--tap);
  border-radius: var(--radius-sm);
  border: 1px solid var(--free-line);
  background: var(--free-bg);
  color: var(--free-ink);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 600;
  cursor: pointer;
}
.slot input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 700; }
.slot input:focus-visible + span { outline: 3px solid #9FD5B0; outline-offset: 2px; }
.slot.is-busy span {
  background: var(--busy-bg); border-color: var(--busy-line); color: var(--busy-ink);
  text-decoration: line-through; cursor: not-allowed; font-weight: 400;
}

.sticky-bottom {
  position: sticky;
  bottom: 0;
  margin: 0 -20px -20px;
  padding: 12px 20px 20px;
  background: linear-gradient(to top, var(--bg) 75%, rgba(247, 247, 245, 0));
  display: flex; flex-direction: column; gap: 8px;
}

/* Visszaigazoló oldal */
.done-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--free-bg);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto;
}

/* ---------- 8. Admin heti naptár ---------- */
.week-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.week { min-width: 760px; display: flex; flex-direction: column; gap: 4px; }
.week-row { display: grid; grid-template-columns: 56px repeat(7, minmax(0, 1fr)); gap: 4px; }
.week-head { text-align: center; padding: 6px 0; font-size: 13px; color: var(--muted); }
.week-head strong { color: var(--ink); font-size: 15px; }
.week-time { font-size: 12px; color: var(--muted); padding-top: 4px; }

.cell {
  height: 48px;
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 6px 8px;
  font-size: 12px;
  overflow: hidden;
  display: flex; flex-direction: column; gap: 1px;
  text-decoration: none;
}
.cell strong { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cell-free    { background: var(--free-bg); border-color: #BFE3CB; color: var(--free-ink); }
.cell-pending { background: var(--pend-bg); border-color: var(--pend-line); color: var(--pend-ink); }
.cell-booked  { background: var(--book-bg); border-color: var(--book-line); color: var(--book-ink); }
.cell-blocked {
  background: repeating-linear-gradient(135deg, #E9E9E5 0 6px, #F5F5F2 6px 12px);
  border-color: var(--line); color: #3F4147;
}
.cell-off { border: 1px dashed var(--line); background: transparent; }

/* Függő kérések az oldalsávban */
.request {
  border: 1px solid var(--pend-line);
  background: #FFFBEB;
  border-radius: var(--radius);
  padding: 14px;
  display: flex; flex-direction: column; gap: 10px;
}
.request-actions { display: flex; gap: 8px; }
.request-actions form, .request-actions .btn { flex: 1; }
.request-actions form .btn { width: 100%; }

.stat { display: flex; justify-content: space-between; font-size: 14px; }
.stat span { color: var(--muted); }

/* Munkaidő-sablon sorai a beállítások oldalon */
.hours-row {
  display: grid;
  grid-template-columns: 90px 1fr auto 1fr;
  align-items: center;
  gap: 8px;
}
@media (max-width: 480px) {
  .hours-row { grid-template-columns: 1fr 1fr; }
  .hours-row .hours-day { grid-column: 1 / -1; font-weight: 600; }
  .hours-row .hours-sep { display: none; }
}

/* ---------- 9. Nyilvános oldal: linkes választók, időpont-gombok, felugró ablak ---------- */

/* Szolgáltatás-választó linkként */
.choice-link {
  display: flex; flex-direction: column;
  min-height: 64px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
}
.choice-link:hover { color: var(--ink); border-color: #BDBDB8; }
.choice-link strong { font-size: 15px; }
.choice-link small { font-size: 13px; color: var(--muted); }
.choice-link.is-selected { border: 2px solid var(--ink); padding: 11px; }

.day:hover { color: var(--ink); border-color: #BDBDB8; }
.day.is-active:hover { color: #fff; }

/* Időpont gomb: zöld = szabad, szürke = nem foglalható */
.slot-btn {
  height: var(--tap);
  border-radius: var(--radius-sm);
  border: 1px solid var(--free-line);
  background: var(--free-bg);
  color: var(--free-ink);
  display: flex; align-items: center; justify-content: center;
  font: inherit; font-size: 15px; font-weight: 600;
  cursor: pointer;
}
.slot-btn:hover { background: #D3EEDC; }
.slot-btn.is-busy {
  background: var(--busy-bg); border-color: var(--busy-line); color: var(--busy-ink);
  text-decoration: line-through; font-weight: 400; cursor: not-allowed;
}

/* Felugró ablak: telefonon alulról csúszik fel, asztalon középen */
.sheet {
  border: 0;
  padding: 0;
  width: 100%;
  max-width: 440px;
  max-height: 92vh;
  margin: auto auto 0;
  border-radius: 20px 20px 0 0;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 -8px 30px rgba(22, 24, 29, .15);
}
.sheet::backdrop { background: rgba(22, 24, 29, .45); }
.sheet form { padding: 12px 20px 24px; }
.sheet[open] { animation: sheet-up .2s ease-out; }
@keyframes sheet-up { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }
@media (min-width: 600px) {
  .sheet { margin: auto; border-radius: 20px; }
}
.sheet-handle { width: 40px; height: 4px; border-radius: 2px; background: var(--line); margin: 0 auto 4px; }
.sheet-summary {
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--free-bg);
  border: 1px solid var(--free-line);
  color: var(--free-ink);
  font-size: 15px;
}
.sheet-actions { display: grid; grid-template-columns: 1fr 2fr; gap: 8px; }

/* ---------- 10. Kezelőfelület: áttekintés, beállítások ---------- */
.nav a { display: inline-flex; align-items: center; gap: 4px; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.stat-card { display: flex; flex-direction: column; gap: 4px; padding: 16px 20px; }
.stat-number { font-size: 28px; line-height: 1.1; }

.link-box { display: flex; gap: 8px; }
.link-box .input { flex: 1; min-width: 0; font-size: 15px; background: var(--bg); }

/* Szolgáltatás sora: név | időtartam | gombok – telefonon két sorba törik */
.service-row {
  display: grid;
  grid-template-columns: 1fr 160px auto;
  gap: 10px;
  align-items: start;
}
.service-actions { display: flex; gap: 8px; padding-top: 22px; }
@media (max-width: 560px) {
  .service-row { grid-template-columns: 1fr auto; }
  .service-name { grid-column: 1 / -1; }
  .service-actions { padding-top: 22px; }
}

/* Munkaidő sorai: [✓ Hétfő] [08:00] – [16:00] */
.hours-row {
  display: grid;
  grid-template-columns: 150px 1fr auto 1fr;
  align-items: center;
  gap: 8px;
}
.hours-error { grid-column: 1 / -1; }
.hours-row:has(input[type="checkbox"]:not(:checked)) input[type="time"] { opacity: .4; }
@media (max-width: 480px) {
  .hours-row { grid-template-columns: 1fr auto 1fr; }
  .hours-row .hours-day { grid-column: 1 / -1; font-weight: 600; min-height: 32px; }
  .hours-row .hours-sep { display: inline; }
}

/* ---------- 11. Heti naptár (1 perc = 1 px) ---------- */
.cal {
  min-width: 820px;
  display: grid;
  grid-template-columns: 52px repeat(7, minmax(0, 1fr));
  column-gap: 4px;
}
.cal-head { text-align: center; padding: 6px 0 8px; font-size: 13px; color: var(--muted); }
.cal-head strong { color: var(--ink); font-size: 15px; }
.cal-head.is-today strong {
  background: var(--brand); color: #fff;
  border-radius: 999px; padding: 1px 8px;
}

.cal-times { position: relative; }
.cal-times span {
  position: absolute; left: 0;
  transform: translateY(-7px);
  font-size: 11px; color: var(--muted);
}

.cal-day {
  position: relative;
  border-radius: 8px;
  /* óránkénti vonalak */
  background-image: repeating-linear-gradient(to bottom, var(--line-soft) 0 1px, transparent 1px 60px);
}
.cal-day.is-off { outline: 1px dashed #CFCFCA; outline-offset: -1px; background-color: transparent; }
.cal-day.is-today { box-shadow: inset 0 0 0 2px rgba(31, 122, 69, .25); }

.cal-item {
  position: absolute; left: 2px; right: 2px;
  border-radius: 6px;
  border: 1px solid transparent;
  padding: 3px 6px;
  font-size: 11px;
  line-height: 1.3;
  overflow: hidden;
  display: flex; flex-direction: column;
}
.cal-item strong { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-free    { background: var(--free-bg); border-color: #CDEBD6; }
.cal-pending { background: var(--pend-bg); border-color: var(--pend-line); color: var(--pend-ink); z-index: 2; }
.cal-booked  { background: var(--book-bg); border-color: var(--book-line); color: var(--book-ink); z-index: 2; }
.cal-blocked {
  background: repeating-linear-gradient(135deg, #E9E9E5 0 6px, #F5F5F2 6px 12px);
  border-color: var(--line); color: #3F4147; z-index: 1;
}

/* ---------- 12. Blokkolás oldal ---------- */
.segmented {
  display: inline-grid; grid-auto-flow: column;
  background: var(--soft); border-radius: var(--radius-sm); padding: 4px; gap: 4px;
  justify-self: start; width: fit-content;
}
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span {
  display: flex; align-items: center; justify-content: center;
  min-height: 38px; padding: 0 16px; border-radius: 8px;
  font-weight: 600; color: var(--muted); cursor: pointer;
}
.segmented input:checked + span { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.segmented input:focus-visible + span { outline: 3px solid #9FD5B0; }

.two-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 480px) { .two-cols { grid-template-columns: 1fr; } }

/* A kiválasztott típus mezői látszanak, a másiké nem */
.block-form:has(#type-once:checked) .weekly-fields { display: none; }
.block-form:has(#type-weekly:checked) .once-fields { display: none; }

.block-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: repeating-linear-gradient(135deg, #F1F1EE 0 6px, #F8F8F6 6px 12px);
  border: 1px solid var(--line-soft);
  font-size: 14px;
}

/* ---------- 13. Telefonos napi lista, lebegő gomb, foglalás űrlap ---------- */

/* Telefonon napi lista, asztalon heti táblázat */
.mobile-only { display: none; }
@media (max-width: 899px) {
  .mobile-only { display: flex; }
  .desktop-only { display: none !important; }
  .container { padding: 16px 12px 96px; } /* alul hely a lebegő gombnak */
  .card { padding: 16px; }
}
.week-title { font-size: 18px; min-width: 0; }

.agenda { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.agenda-item {
  display: flex; align-items: center; gap: 8px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  padding-right: 6px;
}
.agenda-link {
  flex: 1; min-width: 0;
  display: flex; align-items: center; gap: 12px;
  min-height: 52px;
  padding: 8px 12px;
  color: inherit; text-decoration: none;
}
.agenda-link:hover { color: inherit; }
.agenda-time { width: 92px; flex-shrink: 0; font-weight: 600; font-size: 14px; font-variant-numeric: tabular-nums; }
.agenda-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.agenda-body strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agenda-body small { font-size: 12px; opacity: .85; }
.agenda-plus { font-size: 24px; font-weight: 400; line-height: 1; }
.agenda-call { background: rgba(255,255,255,.7); }

.agenda-free    { background: var(--free-bg); border-color: #CDEBD6; color: var(--free-ink); }
.agenda-free .agenda-body strong { font-weight: 500; }
.agenda-pending { background: var(--pend-bg); border-color: var(--pend-line); color: var(--pend-ink); }
.agenda-booked  { background: var(--book-bg); border-color: var(--book-line); color: var(--book-ink); }
.agenda-blocked {
  background: repeating-linear-gradient(135deg, #EDEDEA 0 6px, #F7F7F4 6px 12px);
  border-color: var(--line); color: #3F4147;
}

/* Lebegő + gomb (telefon) */
.fab {
  position: fixed; right: 18px; bottom: 18px; z-index: 20;
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--brand); color: #fff;
  align-items: center; justify-content: center;
  box-shadow: 0 6px 18px rgba(31, 122, 69, .35);
}
.fab:hover { color: #fff; background: var(--brand-dark); }

/* Kattintható naptárelemek */
a.cal-item { text-decoration: none; cursor: pointer; }
a.cal-item:hover { filter: brightness(.97); outline: 2px solid rgba(0,0,0,.08); }
a.cal-head { text-decoration: none; border-radius: 8px; }
a.cal-head:hover { background: var(--soft); }
.request-info { color: inherit; text-decoration: none; }
.request-info:hover { color: inherit; }

/* Foglalás űrlap */
.form-page { max-width: 560px; margin: 0 auto; width: 100%; }
.status { font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.status-pending   { background: var(--pend-bg); color: var(--pend-ink); }
.status-accepted  { background: var(--book-bg); color: var(--book-ink); }
.status-rejected, .status-cancelled { background: var(--soft); color: var(--muted); }

/* ---------- 14. Beállítások: lenyitható fülek ---------- */
.setting { padding: 0; }
.setting > summary {
  list-style: none;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 20px;
  min-height: 64px;
  cursor: pointer;
  border-radius: var(--radius-lg);
}
.setting > summary::-webkit-details-marker { display: none; }
.setting > summary:hover { background: #FBFBFA; }
.setting-head { display: flex; flex-direction: column; min-width: 0; }
.setting-head strong { font-size: 17px; }
.setting-head small { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.setting-chevron { flex-shrink: 0; color: var(--muted); transition: transform .15s ease; }
.setting[open] .setting-chevron { transform: rotate(180deg); }
.setting[open] > summary { border-bottom: 1px solid var(--line-soft); border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.setting-body { padding: 16px 20px 20px; }
@media (max-width: 899px) {
  .setting > summary { padding: 14px 16px; }
  .setting-body { padding: 14px 16px 16px; }
}

/* ---------- 15. Rendszer menü: fiókok ---------- */
.account-list { display: flex; flex-direction: column; gap: 10px; }
.account {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.6fr) auto;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
}
.account-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.account-info { display: flex; flex-direction: column; min-width: 0; }
.account-info > * { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.account-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0; }
.account-stats dt { font-size: 11px; color: var(--muted); }
.account-stats dd { margin: 0; font-weight: 600; }
.tag {
  display: inline-block; margin-left: 6px; padding: 1px 8px;
  border-radius: 999px; background: var(--free-bg); color: var(--free-ink);
  font-size: 11px; font-weight: 600; vertical-align: middle;
}
@media (max-width: 899px) {
  .account { grid-template-columns: 1fr; gap: 12px; padding: 14px 16px; }
  .account-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .account-edit { width: 100%; }
}

.slug-input { display: flex; align-items: stretch; }
.slug-prefix {
  display: flex; align-items: center;
  padding: 0 10px;
  border: 1px solid var(--line); border-right: 0;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  background: var(--soft); color: var(--muted);
  font-size: 13px; white-space: nowrap;
  max-width: 55%; overflow: hidden; text-overflow: ellipsis;
}
.slug-input .input { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; min-width: 0; }

.danger-zone { border-color: var(--danger-line); }

/* Foglalt időpont gombként (le van tiltva) */
.slot-btn:disabled { cursor: not-allowed; }
.slot-btn.is-busy:hover { background: var(--busy-bg); }

/* Jogi szöveg (adatkezelési tájékoztató) */
.legal h2 { font-size: 16px; margin-top: 8px; }
.legal p, .legal ul { margin: 0; font-size: 14px; line-height: 1.6; }
.legal ul { padding-left: 20px; }

/* Naptár: óravonalak a méretarányhoz igazítva, rövid foglalás egy sorban */
.cal-day { background-image: repeating-linear-gradient(to bottom, var(--line-soft) 0 1px, transparent 1px var(--hour, 60px)); }
.cal-item.is-compact { padding: 2px 6px; justify-content: center; }
.cal-line { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-line b { font-weight: 700; margin-right: 2px; }
.cal-item { font-size: 12px; }
.cal-item strong { font-size: 13px; }

/* ---------- 16. Ügyfél: foglalásaid, felugró üzenet, botcsapda ---------- */
.my-bookings { border-color: var(--book-line); }
.my-booking {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px; border-radius: var(--radius); border: 1px solid var(--line-soft);
}
.my-booking-info { display: flex; flex-direction: column; color: inherit; text-decoration: none; min-width: 0; }
.my-booking-info span { font-size: 13px; }
.my-booking-actions { display: flex; gap: 6px; }
.my-booking-actions .btn { min-height: 38px; padding: 0 12px; font-size: 14px; }
.status-box-pending  { background: var(--pend-bg); border-color: var(--pend-line); color: var(--pend-ink); }
.status-box-accepted { background: var(--book-bg); border-color: var(--book-line); color: var(--book-ink); }

.toast {
  position: fixed; left: 50%; top: 16px; transform: translateX(-50%); z-index: 50;
  max-width: calc(100% - 24px);
  padding: 14px 18px; border-radius: 14px;
  font-weight: 600; box-shadow: 0 10px 30px rgba(22, 24, 29, .2);
  animation: toast-in .25s ease-out;
}
.toast-success { background: var(--brand); color: #fff; }
.toast-error   { background: var(--danger); color: #fff; }
@keyframes toast-in { from { transform: translate(-50%, -12px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }

/* A botcsapda mező: képernyőn kívül, ember nem látja */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- 17. Kapcsoló (toggle) ---------- */
.switch { display: flex; align-items: flex-start; gap: 12px; padding: 8px 0; cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch-track {
  flex-shrink: 0; position: relative;
  width: 44px; height: 26px; border-radius: 13px;
  background: #CFCFCA; transition: background .15s;
  margin-top: 2px;
}
.switch-track::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 20px; height: 20px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2);
  transition: transform .15s;
}
.switch input:checked + .switch-track { background: var(--brand); }
.switch input:checked + .switch-track::after { transform: translateX(18px); }
.switch input:focus-visible + .switch-track { outline: 3px solid #9FD5B0; outline-offset: 2px; }
.switch-text { display: flex; flex-direction: column; }
.switch-text small { font-size: 13px; color: var(--muted); }

/* Nyelvváltó (HU / SK) */
.profile { justify-content: flex-start; }
.profile .lang-switch { margin-left: auto; }
.lang-switch { display: inline-flex; gap: 2px; background: var(--soft); padding: 3px; border-radius: 999px; }
.lang-switch a {
  min-width: 36px; padding: 4px 8px; border-radius: 999px;
  font-size: 12px; font-weight: 600; text-align: center;
  color: var(--muted); text-decoration: none;
}
.lang-switch a.active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }

/* =========================================================
   18. Foglalóoldal – új kinézet (bp = booking page)
   Mobilon: színes sáv + kártyák egymás alatt.
   Asztalon: bal oldalt a vállalkozás, jobb oldalt a foglalás.
   A --brand színt a vállalkozás választja (Beállítások → Profil).
   ========================================================= */
.bp { min-height: 100vh; display: flex; flex-direction: column; }

.bp-cover {
  height: 148px;
  background: var(--brand);
  /* finom, alig látható mintázat, hogy ne legyen lapos */
  background-image:
    radial-gradient(circle at 20% 0%, rgba(255,255,255,.14), transparent 45%),
    radial-gradient(circle at 90% 120%, rgba(0,0,0,.18), transparent 50%);
}

.bp-layout {
  width: 100%;
  max-width: 1040px;
  margin: -104px auto 0;
  padding: 0 14px 24px;
  display: grid;
  gap: 14px;
  flex: 1;
}
@media (min-width: 900px) {
  .bp-layout { grid-template-columns: 320px minmax(0, 1fr); gap: 20px; align-items: start; padding: 0 20px 32px; }
  .bp-biz { position: sticky; top: 20px; }
}

.bp-biz, .bp-main > .card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  box-shadow: 0 1px 2px rgba(22,24,29,.04), 0 10px 28px rgba(22,24,29,.07);
}
.bp-biz { padding: 20px; display: flex; flex-direction: column; gap: 14px; }

.bp-biz-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.bp-logo {
  width: 76px; height: 76px; border-radius: 20px;
  object-fit: cover; flex-shrink: 0;
  border: 3px solid var(--surface);
  box-shadow: 0 2px 8px rgba(22,24,29,.12);
  margin-top: -2px;
}
.bp-monogram {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand); color: #fff;
  font-weight: 700; font-size: 26px; letter-spacing: .5px;
}
.bp-name { font-size: 22px; font-weight: 700; letter-spacing: -.2px; }
.bp-sub { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.bp-desc { margin: 0; font-size: 14px; line-height: 1.55; color: #3F4147; white-space: pre-line; }

.bp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.bp-chip {
  display: inline-flex; align-items: center; gap: 6px;
  max-width: 100%;
  min-height: 38px; padding: 6px 12px;
  border: 1px solid var(--line); border-radius: 999px;
  color: var(--ink); text-decoration: none; font-size: 14px;
  background: var(--surface);
}
.bp-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bp-chip svg { color: var(--brand); flex-shrink: 0; }
.bp-chip:hover { border-color: var(--brand); color: var(--ink); }

.bp-hours { margin: 0; padding-top: 12px; border-top: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.bp-hours div { display: flex; justify-content: space-between; gap: 12px; }
.bp-hours dt { color: var(--muted); }
.bp-hours dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }

.bp-main { gap: 14px; min-width: 0; }

/* Számozott lépések: 1 Szolgáltatás · 2 Nap · 3 Időpont */
.bp-steps { padding: 20px; counter-reset: step; }
.bp-steps > section { counter-increment: step; padding-bottom: 20px; margin-bottom: 20px; border-bottom: 1px solid var(--line-soft); }
.bp-steps > section:last-of-type { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.bp-steps .section-title { font-size: 14px; color: var(--ink); font-weight: 600; margin-bottom: 12px; }
.bp-steps .section-title > span:first-child { display: inline-flex; align-items: center; gap: 8px; }
.bp-steps .section-title > span:first-child::before {
  content: counter(step);
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--brand); color: #fff;
  font-size: 12px; font-weight: 700;
}

/* A választott szín a kijelöléseken */
.bp .day.is-active, .page-narrow .day.is-active { background: var(--brand); border-color: var(--brand); }
.bp .choice-link.is-selected { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.bp .slot-grid { grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); }
.bp .slot-btn { border-radius: 12px; }

.bp .lang-switch { flex-shrink: 0; }

.bp-footer {
  display: flex; justify-content: center; gap: 8px;
  padding: 8px 16px 28px;
  font-size: 12px; color: var(--muted);
}
.bp-footer a { color: var(--muted); }

/* Kis fejléc a visszaigazoló / "Foglalásom" oldalakon */
.mini-head { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; align-self: center; }
.mini-logo { width: 40px; height: 40px; border-radius: 12px; object-fit: cover; font-size: 15px; }

/* Beállítások → Profil */
.logo-row { display: flex; align-items: flex-start; gap: 14px; }
.logo-preview { width: 72px; height: 72px; border-radius: 18px; object-fit: cover; flex-shrink: 0; }
.logo-monogram { display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 24px; }
.file-input { padding: 8px; min-height: auto; font-size: 14px; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; }
.swatch input { position: absolute; opacity: 0; pointer-events: none; }
.swatch span { width: 40px; height: 40px; border-radius: 12px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.swatch small { font-size: 12px; color: var(--muted); }
.swatch input:checked + span { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--ink); }
.swatch input:focus-visible + span { outline: 3px solid #9FD5B0; outline-offset: 3px; }
.bp-steps .section-title { flex-wrap: wrap; row-gap: 6px; }
.bp-steps .section-title > span:first-child { white-space: nowrap; }
.bp .slot-grid { grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); }
@media (max-width: 899px) {
  .bp-hours { display: none; } /* telefonon gyorsabban jöjjön a naptár */
  .bp-biz { gap: 12px; padding: 18px; }
  .bp-logo { width: 64px; height: 64px; border-radius: 18px; font-size: 22px; }
}

/* ---------- 19. Foglalás kártya az ügyfélnek (állapot színnel) ---------- */
.my-bookings-title { font-size: 16px; }
.bk-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 14px;
  align-items: center;
  padding: 16px;
  border-radius: 16px;
  border: 2px solid;
  background: var(--surface);
  transition: background .3s, border-color .3s;
}
.bk-icon {
  width: 44px; height: 44px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  grid-row: span 1;
}
.bk-body { display: flex; flex-direction: column; min-width: 0; }
.bk-status { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; }
.bk-service { font-size: 18px; line-height: 1.25; }
.bk-when { font-size: 14px; font-variant-numeric: tabular-nums; }
.bk-cancel { grid-column: 1 / -1; margin-top: 10px; }

.bk-pending  { background: var(--pend-bg); border-color: var(--pend-line); color: var(--pend-ink); }
.bk-pending .bk-icon { background: #FFE38A; }
.bk-accepted { background: var(--free-bg); border-color: #6CC08A; color: var(--free-ink); }
.bk-accepted .bk-icon { background: var(--brand-ok, #1F7A45); color: #fff; }
.bk-rejected { background: var(--danger-bg); border-color: #E8958D; color: var(--danger); }
.bk-rejected .bk-icon { background: var(--danger); color: #fff; }
.bk-cancelled, .bk-expired { background: var(--soft); border-color: var(--line); color: var(--muted); }
.bk-cancelled .bk-icon, .bk-expired .bk-icon { background: #DEDED9; }

.bk-card .bk-cancel .btn { background: rgba(255,255,255,.75); }
