:root {
  --blue: #006bff;
  --blue-dark: #0052cc;
  --blue-text: #0060e6;
  --blue-tint: rgba(0, 107, 255, 0.065);
  --blue-tint-2: rgba(0, 107, 255, 0.14);
  --blue-line: rgba(0, 107, 255, 0.5);
  --ink: #1a1a1a;
  --ink-2: #4d5055;
  --muted: #6b6f76;
  --line: #e0e0e0;
  --line-2: #d4d4d4;
  --bg: #fafafa;
  --card: #ffffff;
  --green: #018850;
  --red: #c8102e;
  --dark-chip: #4d5055;
  --radius: 8px;
  --shadow: 0 1px 8px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 6px 30px rgba(0, 0, 0, 0.14);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); }
body { font-size: 14px; line-height: 1.5; }
button { font: inherit; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
.ico { flex: none; display: inline-block; vertical-align: middle; }
[hidden] { display: none !important; }

/* ---------- shared controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 20px; border-radius: 40px; border: 1px solid transparent; font-weight: 600; font-size: 14px; white-space: nowrap; transition: background .15s, border-color .15s, color .15s; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); }
.btn-primary:disabled { background: #9cc3ff; cursor: default; }
.btn-outline { background: #fff; color: var(--ink); border-color: var(--line-2); }
.btn-outline:hover { border-color: var(--ink-2); }
.btn-blue-outline { background: #fff; color: var(--blue); border-color: var(--blue); }
.btn-blue-outline:hover { background: var(--blue-tint); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: #a00d25; }
.btn-ghost { background: transparent; color: var(--blue); border: 0; padding: 0 10px; }
.btn-ghost:hover { background: var(--blue-tint); }
.btn-sm { height: 32px; padding: 0 14px; font-size: 13px; }
.icon-btn { width: 36px; height: 36px; border-radius: 50%; border: 0; background: transparent; color: var(--ink-2); display: inline-flex; align-items: center; justify-content: center; }
.icon-btn:hover { background: #f0f0f0; }

.field { margin-bottom: 20px; }
.field > label, .label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 8px; }
.field .hint { color: var(--muted); font-size: 13px; margin-top: 6px; }
.input, .textarea, .select { width: 100%; height: 46px; padding: 0 14px; border: 1px solid #b2b2b2; border-radius: var(--radius); background: #fff; outline: none; transition: border-color .15s, box-shadow .15s; }
.textarea { height: auto; min-height: 96px; padding: 12px 14px; resize: vertical; }
.input:focus, .textarea:focus, .select:focus { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue); }
.input-group { display: flex; align-items: stretch; border: 1px solid #b2b2b2; border-radius: var(--radius); overflow: hidden; background: #fff; }
.input-group:focus-within { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue); }
.input-group .prefix { display: flex; align-items: center; padding: 0 0 0 14px; color: var(--muted); white-space: nowrap; }
.input-group input { border: 0; outline: none; flex: 1; min-width: 0; height: 44px; padding: 0 14px 0 2px; background: transparent; }
.error-text { color: var(--red); font-size: 13px; margin-top: 6px; }

.avatar { border-radius: 50%; object-fit: cover; display: block; }
.avatar-initials { background: #e8eefc; color: var(--blue-text); display: flex; align-items: center; justify-content: center; font-weight: 700; }

.toasts { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 1000; }
.toast { display: flex; align-items: center; gap: 10px; background: #1a1a1a; color: #fff; padding: 12px 18px; border-radius: 8px; box-shadow: var(--shadow-lg); font-weight: 500; animation: toastIn .2s ease; transition: opacity .3s, transform .3s; }
.toast-ok .ico { color: #4ade80; }
.toast-err .ico { color: #ff8a8a; }
.toast.out { opacity: 0; transform: translateY(8px); }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }

.spinner { width: 28px; height: 28px; border: 3px solid var(--blue-tint-2); border-top-color: var(--blue); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- time zone picker ---------- */
.tzpick { position: relative; }
.tzpick-btn { display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; padding: 6px 4px; color: var(--ink); font-size: 14px; border-radius: 6px; max-width: 100%; text-align: left; }
.tzpick-btn:hover { background: #f3f3f3; }
.tzpick-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tzpick-menu { position: absolute; left: 0; bottom: calc(100% + 6px); width: 360px; max-width: calc(100vw - 32px); background: #fff; border-radius: 8px; box-shadow: var(--shadow-lg); border: 1px solid var(--line); z-index: 50; overflow: hidden; }
.tzpick-search { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); color: var(--muted); }
.tzpick-search input { border: 0; outline: none; flex: 1; font-size: 14px; color: var(--ink); }
.tzpick-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px 4px; font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .02em; }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 6px; overflow: hidden; }
.seg button { border: 0; background: #fff; padding: 3px 10px; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.seg button.on { background: var(--blue); color: #fff; }
.tzpick-list { max-height: 300px; overflow: auto; padding-bottom: 6px; }
.tzpick-group { padding: 12px 14px 4px; font-size: 12px; font-weight: 700; color: var(--ink); }
.tzpick-opt { display: flex; width: 100%; justify-content: space-between; gap: 12px; border: 0; background: none; padding: 8px 14px 8px 22px; text-align: left; font-size: 14px; color: var(--ink); }
.tzpick-opt:hover { background: var(--blue-tint); }
.tzpick-opt.sel { background: var(--blue); color: #fff; }
.tzpick-opt .t { color: inherit; opacity: .7; white-space: nowrap; }
.tzpick-empty { padding: 16px; color: var(--muted); }

/* ================= BOOKING PAGES ================= */
.book-shell { min-height: 100vh; display: flex; align-items: flex-start; justify-content: center; padding: 66px 16px 40px; }
.book-card { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; max-width: 1060px; min-height: 690px; display: flex; overflow: hidden; transition: max-width .25s ease; }
.book-card.narrow { max-width: 1000px; }
.book-card.compact { max-width: 880px; }
.book-card.centered { max-width: 680px; min-height: 0; display: block; }
.ribbon { position: absolute; top: 0; right: 0; width: 120px; height: 120px; overflow: hidden; pointer-events: none; }
.ribbon span { position: absolute; top: 25px; right: -38px; transform: rotate(45deg); width: 160px; text-align: center; background: #494949; color: #fff; font-size: 8px; font-weight: 700; letter-spacing: .06em; padding: 6px 0 5px; line-height: 1.15; }
.ribbon span b { display: block; font-size: 12px; letter-spacing: 0; }

.info-panel { flex: 0 0 34%; max-width: 360px; border-right: 1px solid var(--line); padding: 25px 24px 24px; position: relative; }
.info-panel .back { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--blue); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.info-panel .back:hover { background: var(--blue-tint); }
.info-panel .avatar { margin-bottom: 12px; }
.info-host { color: var(--muted); font-weight: 600; font-size: 16px; margin: 0 0 6px; }
.info-title { font-size: 28px; line-height: 1.25; font-weight: 700; margin: 0 0 24px; word-break: break-word; }
.info-line { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); font-weight: 600; font-size: 16px; margin-bottom: 16px; line-height: 1.4; }
.info-line .ico { margin-top: 1px; color: var(--muted); }
.info-line.strong { color: var(--ink); }
.info-line.strong .ico { color: var(--muted); }
.info-line s { font-weight: 500; }
.info-desc { color: var(--ink-2); font-size: 15px; margin-top: 18px; white-space: pre-wrap; word-break: break-word; }
.former { margin-bottom: 18px; }
.former .lbl { font-size: 13px; color: var(--muted); font-weight: 700; margin-bottom: 6px; }

.main-panel { flex: 1; min-width: 0; padding: 28px 32px; display: flex; flex-direction: column; }
.main-panel h2 { font-size: 20px; font-weight: 700; margin: 0 0 24px; }
.cal-times { display: flex; gap: 28px; flex: 1; }
.cal-wrap { flex: 1; min-width: 0; max-width: 460px; }
.cal-nav { display: flex; align-items: center; justify-content: center; gap: 40px; margin-bottom: 18px; }
.cal-nav .month { font-size: 16px; font-weight: 500; min-width: 140px; text-align: center; }
.cal-nav button { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--blue-tint); color: var(--blue); display: inline-flex; align-items: center; justify-content: center; }
.cal-nav button:hover:not(:disabled) { background: var(--blue-tint-2); }
.cal-nav button:disabled { background: none; color: #c4c4c4; cursor: default; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 6px; text-align: center; }
.cal-dow { font-size: 12px; font-weight: 500; color: var(--ink-2); padding: 6px 0 10px; text-transform: uppercase; }
.cal-day { position: relative; justify-self: center; width: 44px; height: 44px; border-radius: 50%; border: 0; background: none; font-size: 16px; color: var(--ink-2); display: flex; align-items: center; justify-content: center; cursor: default; padding: 0; }
.cal-day.avail { background: var(--blue-tint); color: var(--blue-text); font-weight: 700; cursor: pointer; }
.cal-day.avail:hover { background: var(--blue-tint-2); }
.cal-day.sel { background: var(--blue); color: #fff; font-weight: 700; }
.cal-day.today::after { content: ''; position: absolute; bottom: 6px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: currentColor; }
.cal-day.today:not(.avail):not(.sel)::after { background: var(--ink-2); }
.cal-loading { display: flex; justify-content: center; padding: 60px 0; }
.cal-empty { margin: 14px auto 0; background: #f5f7fa; border-radius: 8px; padding: 12px 16px; text-align: center; color: var(--ink-2); max-width: 380px; }
.cal-empty button { margin-top: 6px; }
.tz-block { margin-top: 26px; }
.tz-block .label { margin-bottom: 4px; font-size: 15px; }

.times { flex: 0 0 240px; display: flex; flex-direction: column; min-height: 0; }
.times.anim { animation: slideIn .25s ease; }
@keyframes slideIn { from { opacity: 0; transform: translateX(16px); } }
.times-head { font-size: 16px; margin: 58px 0 18px; font-weight: 500; }
.times-list { overflow-y: auto; max-height: 520px; padding-right: 6px; display: flex; flex-direction: column; gap: 10px; }
.slot { display: flex; gap: 8px; }
.slot-btn { flex: 1; height: 52px; border: 1px solid var(--blue-line); border-radius: 4px; background: #fff; color: var(--blue); font-weight: 700; font-size: 16px; transition: border-color .15s, flex .2s; }
.slot-btn:hover { border: 2px solid var(--blue); }
.slot.sel .slot-btn { background: var(--dark-chip); border-color: var(--dark-chip); color: #fff; flex: 1 1 50%; }
.slot-next { flex: 1 1 50%; height: 52px; border: 0; border-radius: 4px; background: var(--blue); color: #fff; font-weight: 700; font-size: 16px; animation: grow .2s ease; }
.slot-next:hover { background: var(--blue-dark); }
@keyframes grow { from { opacity: 0; transform: scaleX(.6); transform-origin: left; } }

.form-panel { max-width: 520px; }
.add-guests { margin-bottom: 20px; }
.guest-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.chip { display: inline-flex; align-items: center; gap: 4px; background: #eef3ff; color: var(--ink); border-radius: 16px; padding: 4px 6px 4px 12px; font-size: 13px; }
.chip button { border: 0; background: none; color: var(--muted); display: flex; padding: 2px; border-radius: 50%; }
.legal { color: var(--muted); font-size: 13px; margin: 6px 0 22px; }
.form-error { background: #fdecef; color: var(--red); border-radius: 8px; padding: 10px 14px; margin-bottom: 16px; font-weight: 500; }

/* profile */
.profile-head { text-align: center; padding: 40px 32px 30px; border-bottom: 1px solid var(--line); }
.profile-head .avatar { margin: 0 auto 14px; }
.profile-head h1 { font-size: 20px; margin: 0 0 8px; }
.profile-head p { color: var(--ink-2); max-width: 440px; margin: 0 auto; font-size: 15px; }
.profile-events { display: grid; grid-template-columns: 1fr 1fr; gap: 0; padding: 20px 28px 36px; }
.profile-event { display: flex; align-items: flex-start; gap: 14px; padding: 22px 18px; border-radius: 8px; color: var(--ink); text-decoration: none !important; border-bottom: 1px solid var(--line); }
.profile-event:hover { background: #f6f8fb; }
.profile-event .dot { width: 26px; height: 26px; border-radius: 50%; flex: none; }
.profile-event h3 { font-size: 18px; margin: 0 0 2px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.profile-event p { margin: 0; color: var(--muted); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.profile-event .go { margin-left: auto; color: var(--ink-2); align-self: center; }

/* confirmation / cancel */
.confirm { padding: 44px 40px 40px; text-align: center; }
.confirm .avatar { margin: 0 auto 18px; }
.confirm h1 { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 20px; margin: 0 0 8px; }
.confirm .ok { width: 26px; height: 26px; border-radius: 50%; background: var(--green); color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.confirm .sub { color: var(--ink-2); margin: 0 0 26px; }
.details-box { text-align: left; border: 1px solid var(--line); border-radius: 8px; padding: 22px 24px 8px; max-width: 460px; margin: 0 auto 24px; }
.details-box h3 { font-size: 18px; margin: 0 0 16px; }
.details-box .info-line { font-size: 15px; }
.details-box .info-line a { font-weight: 600; word-break: break-all; }
.confirm-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 22px; }
.confirm-foot { color: var(--muted); font-size: 14px; }
.confirm-foot a { font-weight: 600; }
.state-msg { padding: 80px 32px; text-align: center; }
.state-msg h1 { font-size: 22px; margin: 0 0 8px; }
.state-msg p { color: var(--ink-2); margin: 0 0 20px; }

@media (max-width: 820px) {
  .book-shell { padding: 0; }
  .book-card { flex-direction: column; border: 0; border-radius: 0; min-height: 100vh; box-shadow: none; }
  .book-card.centered { min-height: 100vh; }
  .info-panel { max-width: none; border-right: 0; border-bottom: 1px solid var(--line); padding: 20px 16px; }
  .info-title { font-size: 22px; margin-bottom: 14px; }
  .info-line { font-size: 15px; margin-bottom: 10px; }
  .main-panel { padding: 22px 16px 32px; }
  .cal-times { flex-direction: column; gap: 10px; }
  .cal-wrap { max-width: none; }
  .cal-day { width: 40px; height: 40px; }
  .times { flex: none; }
  .times-head { margin: 10px 0 14px; }
  .times-list { max-height: none; }
  .profile-events { grid-template-columns: 1fr; padding: 10px 8px 30px; }
  .confirm { padding: 32px 16px; }
  .ribbon { display: none; }
}

/* ================= ADMIN ================= */
.admin { display: flex; min-height: 100vh; background: #fff; }
.sidebar { width: 256px; flex: none; border-right: 1px solid var(--line); padding: 20px 12px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; background: #fff; z-index: 20; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 12px 22px; font-weight: 800; font-size: 20px; color: var(--blue); letter-spacing: -.02em; }
.brand-mark { width: 30px; height: 30px; border-radius: 50%; background: var(--blue); display: inline-flex; align-items: center; justify-content: center; color: #fff; }
.create-btn { margin: 0 4px 18px; height: 44px; border-radius: 40px; border: 1px solid var(--line-2); background: #fff; font-weight: 700; color: var(--ink); display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 15px; }
.create-btn:hover { border-color: var(--ink-2); background: #fafafa; }
.create-btn .ico { color: var(--blue); }
.nav a { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 8px; color: var(--ink); font-weight: 600; font-size: 15px; text-decoration: none; margin-bottom: 2px; }
.nav a:hover { background: #f4f6f8; }
.nav a.on { background: var(--blue-tint); color: var(--blue); }
.nav a .ico { color: inherit; }
.sidebar .grow { flex: 1; }
.sidebar .me { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-top: 1px solid var(--line); margin-top: 10px; }
.sidebar .me .nm { font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.main { flex: 1; min-width: 0; background: #fff; }
.topbar { display: none; }
.page { max-width: 1100px; margin: 0 auto; padding: 32px 40px 80px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 8px; }
.page-head h1 { font-size: 28px; margin: 0; font-weight: 700; letter-spacing: -.01em; }
.tabs { display: flex; gap: 28px; border-bottom: 1px solid var(--line); margin: 18px 0 24px; }
.tabs button { background: none; border: 0; padding: 10px 0 12px; font-weight: 600; color: var(--ink-2); font-size: 15px; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs button.on { color: var(--ink); border-bottom-color: var(--blue); }

.owner-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 0 18px; }
.owner-row .who { display: flex; align-items: center; gap: 12px; }
.owner-row .who b { display: block; font-size: 15px; }
.owner-row .who a { font-size: 14px; }
.search-box { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line-2); border-radius: 8px; padding: 0 12px; height: 40px; width: 260px; color: var(--muted); }
.search-box input { border: 0; outline: none; flex: 1; min-width: 0; }

.et-list { display: flex; flex-direction: column; gap: 14px; }
.et-row { display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.05); overflow: visible; position: relative; transition: box-shadow .15s; }
.et-row:hover { box-shadow: 0 2px 12px rgba(0,0,0,.09); }
.et-row .bar { width: 6px; flex: none; border-radius: 8px 0 0 8px; }
.et-row.off { opacity: .6; }
.et-body { flex: 1; min-width: 0; padding: 18px 20px; display: flex; align-items: center; gap: 16px; }
.et-text { flex: 1; min-width: 0; }
.et-text h3 { margin: 0 0 4px; font-size: 17px; font-weight: 700; cursor: pointer; }
.et-text h3:hover { text-decoration: underline; }
.et-meta { color: var(--muted); font-size: 14px; display: flex; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 4px; }
.et-text a { font-size: 14px; }
.et-actions { display: flex; align-items: center; gap: 8px; }
.menu { position: absolute; right: 12px; top: 56px; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow-lg); min-width: 220px; padding: 6px 0; z-index: 30; }
.menu button { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; padding: 9px 16px; text-align: left; color: var(--ink); font-size: 14px; }
.menu button:hover { background: #f4f6f8; }
.menu button.danger { color: var(--red); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
.toggle { position: relative; width: 40px; height: 22px; border-radius: 22px; background: #c7c7c7; border: 0; padding: 0; flex: none; transition: background .15s; }
.toggle::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .15s; }
.toggle.on { background: var(--blue); }
.toggle.on::after { left: 21px; }
.menu .toggle-line { display: flex; align-items: center; justify-content: space-between; padding: 9px 16px; }

.empty { text-align: center; padding: 60px 20px; color: var(--ink-2); border: 1px dashed var(--line-2); border-radius: 10px; }
.empty h3 { color: var(--ink); margin: 10px 0 6px; }

/* meetings */
.mt-day { font-weight: 700; background: #f7f8fa; padding: 10px 20px; border-bottom: 1px solid var(--line); border-top: 1px solid var(--line); font-size: 14px; }
.mt-wrap { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.mt-wrap .mt-day:first-child { border-top: 0; }
.mt-row { display: grid; grid-template-columns: 200px 1fr auto; gap: 18px; padding: 18px 20px; border-bottom: 1px solid var(--line); align-items: start; cursor: pointer; }
.mt-row:last-child { border-bottom: 0; }
.mt-row:hover { background: #fbfcfd; }
.mt-time { display: flex; gap: 10px; align-items: center; font-weight: 500; }
.mt-dot { width: 18px; height: 18px; border-radius: 50%; flex: none; }
.mt-who b { display: block; font-size: 15px; }
.mt-who span { color: var(--muted); }
.mt-detail { grid-column: 2 / 4; display: grid; grid-template-columns: 1fr 260px; gap: 20px; padding-top: 4px; cursor: default; }
.mt-detail dl { margin: 0; }
.mt-detail dt { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; margin-top: 12px; }
.mt-detail dt:first-child { margin-top: 0; }
.mt-detail dd { margin: 3px 0 0; white-space: pre-wrap; word-break: break-word; }
.mt-side { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.badge { display: inline-block; font-size: 12px; font-weight: 700; border-radius: 4px; padding: 2px 8px; background: #fdecef; color: var(--red); margin-left: 6px; }
.badge.blue { background: var(--blue-tint-2); color: var(--blue-text); }

/* availability */
.av-card { border: 1px solid var(--line); border-radius: 8px; padding: 24px; margin-bottom: 24px; }
.av-card h2 { margin: 0 0 4px; font-size: 18px; }
.av-card .sub { color: var(--muted); margin: 0 0 18px; }
.av-cols { display: grid; grid-template-columns: 1.3fr 1fr; gap: 28px; }
.day-row { display: flex; align-items: flex-start; gap: 16px; padding: 12px 0; border-bottom: 1px solid #f0f0f0; }
.day-row:last-child { border-bottom: 0; }
.day-badge { width: 32px; height: 32px; border-radius: 50%; background: #1a1a1a; color: #fff; font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: center; flex: none; margin-top: 4px; }
.day-badge.off { background: #e6e6e6; color: var(--ink-2); }
.day-intervals { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.iv { display: flex; align-items: center; gap: 8px; }
.iv input[type=time] { height: 40px; border: 1px solid #b2b2b2; border-radius: 6px; padding: 0 10px; width: 128px; background: #fff; }
.iv span { color: var(--muted); }
.unavail { color: var(--muted); height: 40px; display: flex; align-items: center; }
.day-tools { display: flex; gap: 2px; margin-top: 2px; }
.ov-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid #f0f0f0; gap: 10px; }
.ov-row b { display: block; }
.ov-row span { color: var(--muted); font-size: 13px; }
.save-bar { position: sticky; bottom: 0; background: #fff; border-top: 1px solid var(--line); padding: 14px 0; display: flex; gap: 10px; justify-content: flex-end; }

/* event editor */
.editor { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 32px; align-items: start; }
.ed-card { border: 1px solid var(--line); border-radius: 8px; margin-bottom: 18px; }
.ed-card > summary, .ed-card > .ed-head { list-style: none; padding: 18px 22px; font-weight: 700; font-size: 16px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.ed-card > summary::-webkit-details-marker { display: none; }
.ed-card > summary .ico { transition: transform .2s; color: var(--muted); }
.ed-card[open] > summary .ico { transform: rotate(180deg); }
.ed-card .ed-body { padding: 4px 22px 18px; border-top: 1px solid #f0f0f0; padding-top: 18px; }
.ed-card .sm { font-weight: 400; color: var(--muted); font-size: 13px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch { width: 30px; height: 30px; border-radius: 50%; border: 0; position: relative; color: #fff; display: flex; align-items: center; justify-content: center; }
.swatch.sel { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ink); }
.dur-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.dur-opts button { height: 38px; padding: 0 16px; border: 1px solid var(--line-2); border-radius: 6px; background: #fff; font-weight: 600; }
.dur-opts button.on { border-color: var(--blue); background: var(--blue-tint); color: var(--blue); }
.q-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.q-row label { display: flex; align-items: center; gap: 6px; white-space: nowrap; font-size: 13px; color: var(--ink-2); }
.preview { position: sticky; top: 24px; }
.preview .lbl { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 8px; display: flex; justify-content: space-between; }
.preview-card { border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); padding: 22px; background: #fff; }
.preview-card .info-title { font-size: 22px; margin-bottom: 14px; }
.preview-card .info-line { font-size: 14px; margin-bottom: 10px; }
.mini-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-top: 16px; text-align: center; font-size: 12px; }
.mini-cal span { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto; color: var(--ink-2); }
.mini-cal span.a { background: var(--blue-tint); color: var(--blue-text); font-weight: 700; }
.mini-cal b { font-size: 10px; color: var(--muted); font-weight: 600; }

/* integrations / settings */
.int-card { border: 1px solid var(--line); border-radius: 8px; padding: 24px; margin-bottom: 20px; }
.int-head { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.int-logo { width: 48px; height: 48px; border-radius: 10px; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; flex: none; }
.int-head h2 { margin: 0; font-size: 18px; }
.int-head p { margin: 2px 0 0; color: var(--muted); }
.status { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 13px; border-radius: 20px; padding: 4px 12px; }
.status.ok { background: #e3f6ec; color: var(--green); }
.status.no { background: #f1f1f1; color: var(--ink-2); }
.steps { margin: 0 0 18px; padding-left: 20px; color: var(--ink-2); }
.steps li { margin-bottom: 8px; }
.steps code, .codeline { background: #f3f4f6; border-radius: 4px; padding: 2px 6px; font-size: 13px; color: var(--ink); word-break: break-all; }
.codeline { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; margin: 6px 0; }
.cal-check { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.cal-check i { width: 12px; height: 12px; border-radius: 3px; flex: none; }
.callout { background: #fff8e6; border: 1px solid #f5d98b; border-radius: 8px; padding: 12px 14px; color: #6b4e00; margin-bottom: 18px; font-size: 13px; }
.callout.info { background: #eef4ff; border-color: #c7dbff; color: #1f3d75; }
.avatar-edit { display: flex; align-items: center; gap: 18px; margin-bottom: 20px; }
.share-modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.4); display: flex; align-items: center; justify-content: center; z-index: 200; padding: 16px; }
.modal { background: #fff; border-radius: 10px; box-shadow: var(--shadow-lg); width: 520px; max-width: 100%; padding: 24px; position: relative; }
.modal h2 { margin: 0 0 6px; font-size: 20px; }
.modal .sub { color: var(--muted); margin: 0 0 18px; }
.modal .x { position: absolute; top: 14px; right: 14px; }
.copy-field { display: flex; gap: 8px; }
.copy-field input { flex: 1; }

/* auth */
.auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; background: var(--bg); }
.auth-card { width: 440px; max-width: 100%; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 36px 32px; }
.auth-card .brand { justify-content: center; padding-bottom: 10px; }
.auth-card h1 { text-align: center; font-size: 22px; margin: 0 0 6px; }
.auth-card .sub { text-align: center; color: var(--muted); margin: 0 0 26px; }
.auth-card .btn { width: 100%; height: 46px; }

@media (max-width: 900px) {
  .editor, .av-cols { grid-template-columns: 1fr; }
  .preview { position: static; }
  .mt-row { grid-template-columns: 1fr; }
  .mt-detail { grid-column: 1; grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .admin { flex-direction: column; }
  .sidebar { position: fixed; left: 0; top: 0; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: none; }
  .topbar { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; z-index: 10; }
  .topbar .brand { padding: 0; font-size: 18px; }
  .page { padding: 20px 16px 80px; }
  .page-head h1 { font-size: 24px; }
  .owner-row { flex-direction: column; align-items: stretch; }
  .search-box { width: 100%; }
  .et-body { flex-direction: column; align-items: stretch; }
  .et-actions { justify-content: flex-start; }
  .row2 { grid-template-columns: 1fr; }
  .iv input[type=time] { width: 108px; }
}
.book-card.centered.profile { max-width: 1000px; }
