/* Bondster – rezervace konzultací */
:root {
  --navy: #2b3663;
  --navy-700: #1f2749;
  --navy-50: #eef0f7;
  --navy-100: #dde1ef;
  --accent: #3a5bd9;
  --bg: #f5f6fa;
  --surface: #ffffff;
  --text: #1c2340;
  --muted: #6b7290;
  --border: #e2e5ef;
  --success: #1e8e5e;
  --success-bg: #e7f6ef;
  --warn: #c98a12;
  --warn-bg: #fdf4e3;
  --danger: #c93c3c;
  --danger-bg: #fcebeb;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(28, 35, 64, .05), 0 6px 24px rgba(28, 35, 64, .06);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
[hidden] { display: none !important; }
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; color: var(--navy); }
code { background: var(--navy-50); padding: .1em .35em; border-radius: 4px; font-size: .9em; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.container--narrow { max-width: 440px; }

/* Header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--navy); min-width: 0; }
.brand img { height: 32px; width: auto; flex-shrink: 0; }
.brand__divider { width: 1px; height: 28px; background: var(--border); flex-shrink: 0; }
.brand__title { font-weight: 600; font-size: .95rem; line-height: 1.3; }
.site-nav { display: flex; align-items: center; gap: 18px; font-size: .95rem; }
.site-nav form { margin: 0; }
.site-nav a { color: var(--navy); text-decoration: none; }
.site-nav a:hover { text-decoration: underline; }

.site-main { flex: 1; padding-bottom: 48px; }
.site-footer { color: var(--muted); font-size: .85rem; padding: 24px 0; border-top: 1px solid var(--border); background: var(--surface); }

/* Hero */
.hero { background: var(--navy); color: #fff; padding: 40px 0 76px; margin-bottom: -44px; }
.hero h1 { color: #fff; font-size: clamp(1.5rem, 3.2vw, 2.2rem); margin-bottom: .35em; }
.hero p { margin: 0; color: rgba(255, 255, 255, .8); max-width: 640px; }

/* Cards */
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; margin-bottom: 24px; }
.card__title { font-size: 1.15rem; display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.step { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--navy); color: #fff; font-size: .85rem; font-weight: 700; flex-shrink: 0; }
.card--success { border-top: 4px solid var(--success); }
.done-list { padding-left: 20px; }
.done-list li { margin: 4px 0; }

.empty-state { text-align: center; padding: 56px 24px; }
.empty-state svg { color: var(--navy); opacity: .5; margin-bottom: 12px; }
.empty-state h2 { font-size: 1.3rem; }

/* Alerts */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin: 16px 0; border: 1px solid transparent; position: relative; z-index: 1; }
.alert--error { background: var(--danger-bg); color: #8c2323; border-color: #f3caca; }
.alert--success { background: var(--success-bg); color: #145c3d; border-color: #bfe6d3; }
.is-public .hero + .container > .alert { margin-top: 0; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 999px; padding: 12px 24px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; transition: background .15s, opacity .15s; }
.btn--primary { background: var(--navy); color: #fff; }
.btn--primary:hover { background: var(--navy-700); }
.btn--primary:disabled { opacity: .45; cursor: not-allowed; }
.btn--ghost { background: transparent; color: var(--navy); border-color: var(--navy-100); }
.btn--ghost:hover { background: var(--navy-50); }
.btn--danger-ghost { background: transparent; color: var(--danger); border-color: #f0c9c9; }
.btn--danger-ghost:hover { background: var(--danger-bg); }
.btn--block { width: 100%; }
.btn--sm { padding: 6px 14px; font-size: .85rem; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.site-nav .link-btn { color: var(--navy); text-decoration: none; }
.site-nav .link-btn:hover { text-decoration: underline; }
.link-btn--danger { color: var(--danger); font-size: .9rem; }

/* Forms */
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; color: var(--navy); }
.field label .muted { font-weight: 400; }
.field input, .field textarea, .field select {
  width: 100%; font: inherit; color: var(--text); background: #fff;
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(58, 91, 217, .15); }
.field textarea { resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; margin: 6px 0 18px; cursor: pointer; }
.check input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--navy); flex-shrink: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Booking layout */
.booking { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; }
.booking .card { margin-bottom: 0; position: relative; }
.booking .booking__form { position: sticky; top: 16px; }

/* Calendar */
.calendar { user-select: none; }
.cal__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cal__title { font-weight: 700; color: var(--navy); text-transform: capitalize; font-size: 1.05rem; }
.cal__nav { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--border); background: #fff; color: var(--navy); font-size: 1.4rem; line-height: 1; cursor: pointer; }
.cal__nav:hover { background: var(--navy-50); }
.cal__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal__dow { text-align: center; font-size: .75rem; font-weight: 600; color: var(--muted); text-transform: uppercase; padding: 4px 0; }
.cal__day {
  min-height: 62px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  font: inherit; color: var(--muted); padding: 4px 2px; cursor: default;
}
.cal__day:disabled { background: transparent; border-color: transparent; }
.cal__day.is-past { opacity: .5; }
.cal__num { font-weight: 600; font-size: .95rem; }
.cal__badge { font-size: .68rem; line-height: 1.1; white-space: nowrap; padding: 2px 6px; border-radius: 999px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.cal__day.is-today .cal__num { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.cal__day.has-slots { cursor: pointer; color: var(--text); transition: transform .1s, box-shadow .15s; }
.cal__day.has-slots:hover { box-shadow: 0 2px 10px rgba(28, 35, 64, .12); }
.cal__day.is-free { border-color: #bcd0ff; background: #f3f6ff; }
.cal__day.is-free .cal__badge { background: var(--navy); color: #fff; }
.cal__day.is-partial { border-color: #f0d7a4; background: var(--warn-bg); }
.cal__day.is-partial .cal__badge { background: var(--warn); color: #fff; }
.cal__day.is-full { border-color: var(--border); background: #f2f3f7; }
.cal__day.is-full .cal__badge { background: #c9cddc; color: var(--navy); }
.calendar--admin .cal__day.is-full { border-color: #bfe6d3; background: var(--success-bg); }
.calendar--admin .cal__day.is-full .cal__badge { background: var(--success); color: #fff; }
.cal__day.is-selected { outline: 2px solid var(--navy); outline-offset: 1px; }

.legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 14px; font-size: .85rem; color: var(--muted); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 4px; vertical-align: middle; }
.dot--free { background: var(--navy); }
.dot--partial { background: var(--warn); }
.dot--full { background: var(--success); }

/* Day panel & slots */
.day-panel { margin-top: 24px; border-top: 1px solid var(--border); padding-top: 20px; }
.day-panel__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.day-panel__head h3 { font-size: 1rem; }
.slot-group { border: 0; margin: 0 0 18px; padding: 0; min-width: 0; }
.slot-group legend { font-weight: 600; color: var(--navy); margin-bottom: 8px; padding: 0; font-size: .95rem; }
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.slot {
  position: relative; display: flex; flex-direction: column; gap: 2px;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px 10px 38px;
  cursor: pointer; background: #fff; transition: border-color .15s, background .15s;
}
.slot input { position: absolute; left: 12px; top: 13px; width: 18px; height: 18px; accent-color: var(--navy); margin: 0; }
.slot:hover { border-color: #b5c2ec; }
.slot:has(input:checked) { border-color: var(--navy); background: var(--navy-50); }
.slot:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.slot__time { font-weight: 700; color: var(--navy); }
.slot__meta { font-size: .8rem; color: var(--success); }
.slot__note { font-size: .78rem; color: var(--muted); }
.slot.is-full { cursor: not-allowed; background: #f6f7fa; }
.slot.is-full .slot__time { color: var(--muted); text-decoration: line-through; }
.slot.is-full .slot__meta { color: var(--muted); }

/* Selection summary */
.selection { background: var(--navy-50); border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 18px; }
.selection__head { font-size: .9rem; color: var(--navy); }
.selection__list { list-style: none; margin: 8px 0 0; padding: 0; }
.selection__list li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid var(--navy-100); font-size: .88rem; }
.selection__list li:first-child { border-top: 0; }
.selection__remove { border: 0; background: transparent; color: var(--muted); font-size: 1.2rem; line-height: 1; cursor: pointer; padding: 0 4px; border-radius: 4px; }
.selection__remove:hover { color: var(--danger); }
.selection p { margin: 6px 0 0; }

/* Login */
.login-card { margin-top: 48px; }
.login-card h1 { font-size: 1.35rem; margin-bottom: 18px; }

/* Admin */
.admin { padding-top: 24px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px; }
.stat { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; display: flex; flex-direction: column; }
.stat__value { font-size: 1.8rem; font-weight: 700; color: var(--navy); line-height: 1.1; }
.stat__label { color: var(--muted); font-size: .9rem; }
.admin-grid { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 24px; align-items: start; }
.list-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.list-head .card__title { margin: 0; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chip { font-size: .85rem; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--border); color: var(--navy); text-decoration: none; background: #fff; }
.chip:hover { background: var(--navy-50); }
.chip.is-active { background: var(--navy); color: #fff; border-color: var(--navy); }
.admin-day { margin-bottom: 22px; }
.admin-day__title { font-size: 1rem; padding-bottom: 8px; border-bottom: 1px solid var(--border); margin-bottom: 10px; text-transform: none; }
.admin-slot { border: 1px solid var(--border); border-left: 4px solid var(--navy); border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 10px; }
.admin-slot--partial { border-left-color: var(--warn); }
.admin-slot--full { border-left-color: var(--success); }
.admin-slot__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.admin-slot__head form { margin: 0; }
.admin-slot__time { font-weight: 700; color: var(--navy); margin-right: 8px; }
.badge { display: inline-block; font-size: .75rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; margin-right: 6px; }
.badge--free { background: var(--navy-50); color: var(--navy); }
.badge--partial { background: var(--warn-bg); color: #8a5c05; }
.badge--full { background: var(--success-bg); color: var(--success); }
.bookers { list-style: none; margin: 10px 0 0; padding: 0; }
.booker { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 10px 0 0; border-top: 1px dashed var(--border); margin-top: 10px; font-size: .92rem; overflow-wrap: anywhere; }
.booker form { margin: 0; flex-shrink: 0; }
.booker__note { margin-top: 4px; padding: 6px 10px; background: var(--bg); border-radius: 6px; font-size: .88rem; }

/* Responsive */
@media (max-width: 960px) {
  .booking, .admin-grid { grid-template-columns: 1fr; }
  .booking .booking__form { position: static; }
}
@media (max-width: 600px) {
  .card { padding: 18px 16px; }
  .hero { padding: 28px 0 64px; }
  .brand img { height: 26px; }
  .brand__title { font-size: .85rem; }
  .cal__grid { gap: 4px; }
  .cal__day { min-height: 48px; }
  .cal__badge { font-size: .6rem; padding: 1px 4px; }
  .stats { gap: 10px; }
  .stat { padding: 12px; }
  .stat__value { font-size: 1.4rem; }
  .stat__label { font-size: .78rem; }
  .slot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 380px) {
  .brand__divider, .brand__title { display: none; }
  .cal__badge { display: none; }
  .field-row { grid-template-columns: 1fr; }
}
