/* Shared visual system for Hebrew/RTL admin and the public calendar. */
:root {
  --bg: #f5f7fb;
  --text: #18243b;
  --muted: #526078;
  --border: #dce3ef;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 4px 20px rgba(25, 35, 56, .04);
  --space: 24px;
}
body { line-height: 1.65; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #1f54f4; outline-offset: 3px; }
input:focus, select:focus, textarea:focus { border-color: var(--brand-primary); }
input, select { min-height: 44px; }
input[type=checkbox], input[type=radio] { min-height: 0; width: 18px; height: 18px; accent-color: var(--brand-primary); flex-shrink: 0; }
input[type=url], input[type=email] { direction: ltr; text-align: start; }
.check { min-height: 44px; cursor: pointer; }
.btn, .tab, .viewswitch__btn { min-height: 44px; }
.btn { gap: 8px; padding: 10px 18px; border-radius: 11px; }
.btn--sm { min-height: 44px; padding: 7px 12px; }
.btn--primary { box-shadow: 0 3px 10px color-mix(in srgb, var(--brand-primary) 18%, transparent); }
.btn--ghost { background: #fff; }
.btn:disabled { cursor: wait; opacity: .65; }
.field > span { font-size: .88rem; margin-bottom: 7px; }
.field small { display: block; margin-top: 6px; line-height: 1.6; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; inset-block-start: 8px; inset-inline-start: 16px; transform: translateY(-200%); z-index: 100; background: #fff; padding: 10px 16px; border-radius: 8px; }
.skip-link:focus { transform: translateY(0); }
h1 { font-size: clamp(1.45rem, 2.5vw, 2rem); line-height: 1.3; letter-spacing: -.025em; }
.page-head { margin-bottom: 26px; align-items: center; }
.page-subtitle { margin: 8px 0 0; color: var(--muted); max-width: 65ch; font-size: .92rem; }
.eyebrow { color: var(--brand-primary); font-size: .78rem; font-weight: 750; margin: 0 0 8px; }
.card { padding: 24px; }
.card__title { font-size: 1.1rem; margin-bottom: 18px; }
.card--nested { padding: 16px; border-style: solid; border-radius: 12px; }
.topbar { height: 64px; padding-inline: 24px; box-shadow: 0 1px 8px rgba(25,35,56,.03); }
.topbar__brand { font-size: .98rem; line-height: 1.3; }
.topbar__menu, .topbar__icon { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
.topbar__menu { display: none; }
.shell { min-height: calc(100vh - 64px); }
.sidenav { width: 232px; padding: 24px 14px; }
.sidenav__nav { gap: 6px; top: 88px; }
.sidenav__link { min-height: 46px; padding: 11px 14px; }
.sidenav__link.is-active { background: color-mix(in srgb, var(--brand-primary) 9%, white); color: var(--brand-primary); box-shadow: inset 3px 0 0 var(--brand-primary); font-weight: 700; }
[dir=rtl] .sidenav__link.is-active { box-shadow: inset -3px 0 0 var(--brand-primary); }
.content { min-width: 0; max-width: 1480px; padding: 32px; margin-inline: auto; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--main { grid-template-columns: minmax(0, 1.8fr) minmax(280px, 1fr); }
.grid > *, .form--row > *, .marketing-layout > * { min-width: 0; }
.stat { text-align: start; padding: 22px 18px; }
.stat__num { font-size: 2rem; line-height: 1.3; }
.stat__label { font-size: .85rem; margin-top: 6px; }
.table { font-size: .88rem; }
.table th { background: #f8faff; font-size: .78rem; text-transform: none; letter-spacing: 0; padding-block: 14px; }
.table td { padding-block: 16px; overflow-wrap: anywhere; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fafbfe; }
.table--events .row-actions { min-width: 160px; }
.filters { padding: 18px; gap: 12px; }
.filters input[type=search] { flex: 1 1 240px; }
.filters select, .filters input { flex: 1 1 145px; min-width: 0; }
.pill { text-transform: none; letter-spacing: 0; font-size: .76rem; padding: 4px 10px; }
.form__sticky { border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 -3px 20px rgba(25,35,56,.05); padding: 14px 18px; background: rgba(255,255,255,.96); z-index: 20; }
.cover-preview { height: auto; aspect-ratio: 16 / 9; background: #f0f3f8; }
.cover-preview img, .media-card img, .ev-card__img img { object-fit: contain; }
.marketing-layout { display: grid; grid-template-columns: minmax(300px, .9fr) minmax(0, 1.1fr); gap: 24px; align-items: start; }
.marketing-output { position: sticky; top: 88px; min-height: 500px; }
.marketing-output .result-area { background: #f8faff; padding: 20px; line-height: 1.9; min-height: 340px; }
.section-divider { border: 0; border-top: 1px solid var(--border); margin: 24px 0; }
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 54px 24px; text-align: center; min-height: 350px; }
.empty-state h3 { margin: 18px 0 8px; font-size: 1.12rem; }
.empty-state p { color: var(--muted); max-width: 32ch; margin: 0; }
.empty-state__icon { width: 64px; height: 64px; border-radius: 20px; background: #eef3ff; color: var(--brand-primary); display: grid; place-items: center; font-size: 2rem; }
.output-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 14px; }
.notice { background: #fff8e6; color: #765310; padding: 12px 14px; border-radius: 10px; font-size: .88rem; }
.link-box { margin-top: 24px; border-top: 1px solid var(--border); padding-top: 20px; }
.public-header { background: #fff; color: var(--text); border-bottom: 1px solid var(--border); }
.public-header__inner { max-width: 1200px; min-height: 76px; }
.public-header__brand { color: var(--text); font-size: 1.05rem; }
.public-header__lang { display: flex; gap: 4px; flex-wrap: wrap; }
.public-header__lang a { color: var(--muted); margin: 0; min-height: 44px; padding: 9px 12px; display: inline-flex; align-items: center; border-radius: 10px; }
.public-header__lang a.is-active { color: var(--brand-primary); background: #eef3ff; }
.public-main { max-width: 1200px; padding: 32px 24px; }
.calendar-intro { padding: 28px 32px; margin-bottom: 24px; border: 1px solid #dce5ff; border-radius: 22px; background: linear-gradient(115deg, #eef3ff, #fff 80%); }
.calendar-intro h1 { max-width: 28ch; }
.calendar-intro > p:last-child { max-width: 75ch; color: var(--muted); margin-bottom: 0; }
.public-toolbar { background: #fff; padding: 18px; border: 1px solid var(--border); border-radius: 16px; gap: 18px; }
.viewswitch { gap: 6px; }
.viewswitch__btn { display: inline-flex; align-items: center; padding: 9px 15px; border-color: transparent; background: #f4f6fb; }
.public-filters { width: 100%; gap: 10px; }
.public-filters input, .public-filters select { flex: 1 1 145px; min-width: 0; }
.public-filters input[type=search] { flex: 2 1 220px; }
.event-cards { grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 22px; }
.ev-card { transition: box-shadow .18s, transform .18s; }
.ev-card:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(25,35,56,.09); }
.ev-card__img { aspect-ratio: 16 / 9; background: #edf1f7; }
.ev-card__img img { height: 100%; }
.ev-card__body { padding: 20px; }
.ev-card__title { font-size: 1.15rem; }
.ev-row { padding: 20px; gap: 20px; align-items: center; }
.ev-row__date { background: #eef3ff; padding: 12px; border-radius: 12px; min-width: 68px; }
.ev-row__body { min-width: 0; }
.event-detail { max-width: 860px; background: #fff; border: 1px solid var(--border); border-radius: 22px; padding: 28px; box-shadow: var(--shadow); }
.event-detail__back { min-height: 44px; display: inline-flex; gap: 8px; align-items: center; }
.event-detail__meta { background: #f8faff; border-radius: 12px; padding: 16px; color: #465574; }
.event-detail__content { font-size: 1rem; line-height: 1.9; overflow-wrap: anywhere; }
.event-detail__actions { border-top: 1px solid var(--border); padding-top: 22px; }
.event-registration { min-width: 190px; }
.auth__card { max-width: 430px; padding: 36px; }
.auth__title { font-size: 1.6rem; }
/* Consistent navigation, page hierarchy and form states across all screens. */
html { scroll-padding-top: 92px; }
body { -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
input, select, textarea { transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-primary) 12%, transparent); }
input:disabled, select:disabled, textarea:disabled { background: #f2f4f8; color: var(--muted); cursor: default; }
input[type=date], input[type=time] { direction: ltr; min-width: 0; }
fieldset { border: 0; margin: 0 0 20px; padding: 0; min-width: 0; }
legend { font-size: .9rem; font-weight: 700; padding: 0; margin-bottom: 10px; }
summary { cursor: pointer; min-height: 44px; display: list-item; align-content: center; font-weight: 650; }
.topbar { backdrop-filter: blur(14px); background: rgba(255,255,255,.96); }
.topbar__brand { max-width: 45ch; }
.topbar__icon { border-radius: 12px; }
.topbar__icon:hover { background: #eef3ff; text-decoration: none; }
.sidenav { background: #fff; flex-shrink: 0; }
.sidenav__identity { display: flex; gap: 12px; padding: 0 12px 22px; border-bottom: 1px solid var(--border); margin-bottom: 20px; align-items: center; }
.sidenav__monogram { display: grid; place-items: center; width: 40px; height: 40px; flex-shrink: 0; background: var(--brand-primary); color: #fff; border-radius: 13px; font-weight: 800; }
.sidenav__identity strong { font-size: .85rem; line-height: 1.5; display: block; }
.sidenav__identity small { color: var(--muted); font-size: .75rem; }
.sidenav__section { font-size: .7rem; letter-spacing: .02em; color: var(--muted); padding-inline: 14px; margin-top: 20px; }
.sidenav__link { border-radius: 10px; color: #495872; gap: 12px; }
.sidenav__link:hover { background: #f4f7fc; text-decoration: none; }
.nav-icon { width: 20px; height: 20px; flex-shrink: 0; stroke-width: 1.7; }
.page-head__actions { flex-wrap: wrap; }
.stat { border-top: 3px solid color-mix(in srgb, var(--brand-primary) 55%, #fff); border-radius: 14px; }
.stat__num { font-variant-numeric: tabular-nums; font-weight: 750; }
.table { min-width: 520px; }
.card:has(> .table) { overflow-x: auto; }
.table--events { min-width: 0; }
.pill--amber { background: #fff2d5; color: #805300; }
.repeat-badge { display: inline-flex; align-items: center; gap: 4px; background: #edf3ff; color: #2148a1; font-size: .73rem; font-weight: 650; padding: 3px 9px; border-radius: 7px; line-height: 1.6; }
.event-series { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: .9rem; color: var(--muted); }
.event-title-cell { display: grid; gap: 8px; justify-items: start; }
.events-results { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; gap: 12px; flex-wrap: wrap; }
.events-results p { margin: 0; color: var(--muted); font-size: .85rem; }
.tenant-delete { max-width: 320px; }
.tenant-delete > form { margin-block-start: 8px; padding: 14px; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.status-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.status-tabs a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 18px; border-radius: 10px; color: var(--muted); border: 1px solid transparent; }
.status-tabs a[aria-current=page] { background: #fff; color: var(--brand-primary); border-color: var(--border); font-weight: 700; box-shadow: var(--shadow); }
.editor-sections { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.editor-sections a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 14px; border: 1px solid var(--border); border-radius: 10px; background: #fff; color: #495872; font-size: .85rem; }
.editor-sections a:hover { border-color: var(--brand-primary); color: var(--brand-primary); text-decoration: none; }
.event-editor-grid { grid-template-columns: minmax(0, 1.65fr) minmax(260px, 1fr); gap: 24px; align-items: start; }
.editor-label { font-size: .88rem; font-weight: 650; margin: 18px 0 8px; }
.event-form .ql-toolbar { border-radius: 10px 10px 0 0; border-color: var(--border); }
.event-form .ql-container { border-radius: 0 0 10px 10px; border-color: var(--border); font: inherit; }
.event-form .ql-snow .ql-picker.ql-header .ql-picker-label[data-label]::before,
.event-form .ql-snow .ql-picker.ql-header .ql-picker-item[data-label]::before { content: attr(data-label); }
.event-form .ql-editor { min-height: 220px; line-height: 1.9; text-align: start; }
.event-form [dir=rtl] .ql-editor { direction: rtl; }
.event-form .tabs { margin-bottom: 22px; }
.event-form .form__sticky { display: flex; gap: 12px; align-items: center; bottom: 12px; flex-wrap: wrap; }
.save-context { flex: 1 1 250px; display: grid; max-width: 65ch; margin-inline-end: auto; }
#saveState { color: #8a5600; font-weight: 600; }
.choice-row { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.choice-row .check, .taxonomy-choices .check { padding: 8px 12px; border: 1px solid var(--border); border-radius: 9px; background: #fafbfe; }
.choice-row .check:has(:checked), .taxonomy-choices .check:has(:checked) { background: #edf3ff; border-color: color-mix(in srgb, var(--brand-primary) 35%, white); }
.taxonomy-choices fieldset + fieldset { border-top: 1px solid var(--border); padding-top: 22px; }
.taxonomy-choices fieldset:last-child { margin-bottom: 0; }
.recurrence-heading { display: flex; gap: 10px; margin: 0; align-items: center; font-size: 1.05rem; }
.recurrence-heading > span { font-size: 1.4rem; color: var(--brand-primary); }
.repeat-interval { display: flex; gap: 12px; align-items: center; }
.repeat-interval input { max-width: 100px; }
.repeat-interval > span { padding-top: 14px; }
.weekday-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.weekday-choices label { position: relative; cursor: pointer; }
.weekday-choices input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.weekday-choices span { display: inline-flex; min-height: 44px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 10px; font-size: .8rem; align-items: center; }
.weekday-choices :checked + span { background: var(--brand-primary); color: #fff; border-color: var(--brand-primary); }
.weekday-choices :focus-visible + span { outline: 3px solid var(--brand-primary); outline-offset: 3px; }
.recurrence-preview { background: #f4f7ff; border: 1px solid #dce6ff; padding: 18px; border-radius: 12px; margin: 16px 0; }
.recurrence-preview ol { margin: 10px 0 0; padding-inline-start: 22px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 24px; font-size: .85rem; }
#repeatError, .is-error { color: #a42626; }
.advanced-section[open] > summary { margin-bottom: 18px; }
.picker-grid button { border: 1px solid var(--border); background: #f5f7fb; padding: 4px; border-radius: 10px; cursor: pointer; min-width: 0; }
.picker-grid button img { width: 100%; height: 120px; object-fit: contain; }
.modal__close { min-width: 44px; min-height: 44px; }
.calendar-intro { border: 0; padding: 36px; background: radial-gradient(ellipse at 10% 0%, #dee8ff, transparent 65%), #edf3ff; }
.calendar-intro h1 { font-size: clamp(1.7rem, 3.5vw, 2.65rem); }
.calendar-intro .eyebrow { color: #234dba; }
.viewswitch__btn.is-active { color: #fff; background: var(--brand-primary); box-shadow: 0 3px 8px #1f54f426; }
.public-date-filters { flex: 1 1 100%; }
.public-date-filters summary { font-size: .85rem; color: var(--muted); }
.public-date-filters .form--row { padding-top: 12px; max-width: 500px; }
.calendar-results-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 16px 0; font-size: .85rem; color: var(--muted); }
.calendar-results-head p { margin: 0; }
.calendar-dynamic.is-loading { opacity: .65; pointer-events: none; }
.filter-banner { border-radius: 12px; }
#calendar { background: #fff; padding: 20px; border: 1px solid var(--border); border-radius: 16px; }
.fc { --fc-border-color: #e3e8f2; --fc-today-bg-color: #f0f5ff; --fc-button-bg-color: #fff; --fc-button-border-color: #dce3ef; --fc-button-text-color: #344664; --fc-button-hover-bg-color: #edf3ff; --fc-button-hover-border-color: #c7d5ef; --fc-button-active-bg-color: #e5edff; --fc-button-active-border-color: #b9caec; }
.fc .fc-toolbar-title { font-size: 1.2rem; }
.fc .fc-button { min-height: 44px; border-radius: 9px; }
.fc .fc-col-header-cell-cushion { padding: 12px 4px; color: var(--muted); font-size: .85rem; }
.fc .fc-daygrid-event { border-radius: 5px; padding: 3px 5px; }
.fc .fc-event-custom { overflow: hidden; font-size: .78rem; }
.fc .fc-event-time { font-weight: 650; }
.event-cards > .empty-state { grid-column: 1 / -1; }
.pager__item { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
.ev-card { border-radius: 16px; overflow: hidden; }
.ev-card__date { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ev-card__excerpt { color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ev-card__price { display: inline-flex; border-radius: 8px; background: #f3f6fc; padding: 4px 10px; margin-top: 10px; }
.auth { background: radial-gradient(ellipse at top, #e3ecff, var(--bg) 65%); }
.flash { border-inline-start: 4px solid currentColor; line-height: 1.7; }
@media (max-width: 1100px) { .event-editor-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 768px) {
  .page-head { align-items: flex-start; gap: 16px; }
  .page-head__actions { width: 100%; }
  .page-head__actions > .btn--primary { flex: 1; }
  .topbar__email { display: none; }
  .topbar__brand { max-width: 26ch; }
  .event-editor-grid { gap: 0; }
  .recurrence-preview ol { grid-template-columns: minmax(0, 1fr); }
  .event-form .form__sticky { bottom: 6px; padding: 12px; gap: 10px; }
  .save-context { flex-basis: 100%; }
  .event-form .form__sticky > .btn { flex: 1; }
  #calendar { padding: 10px 4px; }
  .fc .fc-toolbar { gap: 12px; flex-wrap: wrap; }
  .fc .fc-toolbar-title { font-size: 1rem; }
  .fc .fc-col-header-cell-cushion { font-size: .7rem; }
  .fc .fc-daygrid-event { padding: 2px; }
  .fc .fc-event-character { display: none; }
  .fc .fc-event-custom { font-size: .65rem; }
  .sidenav { overflow-y: auto; max-height: calc(100dvh - 64px); }
  .sidenav__nav { position: static; }
  .calendar-intro { padding: 24px; }
}
@media (max-width: 600px) {
  .fc .fc-daygrid-day-frame { min-height: 76px; }
  .fc .fc-daygrid-more-link { display: flex; justify-content: center; align-items: center; min-height: 44px; white-space: normal; text-align: center; font-size: .66rem; line-height: 1.4; margin: 0; border-radius: 7px; background: #edf3ff; color: #2148a1; padding: 4px 2px; }
  .fc .fc-popover { max-width: calc(100vw - 32px); border-radius: 12px; overflow: hidden; box-shadow: 0 12px 30px #18243b26; }
  .fc .fc-popover .fc-event-custom { font-size: .85rem; }
  .fc .fc-popover .fc-event-title { white-space: normal; font-size: .85rem; }
  .fc .fc-popover .fc-event { min-height: 44px; padding: 8px; }
}
@media (max-width: 1150px) {
  .grid--main { grid-template-columns: minmax(0, 1fr); }
  .stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .content { padding: 24px; }
}
@media (max-width: 900px) {
  .marketing-layout { grid-template-columns: minmax(0, 1fr); }
  .marketing-output { position: static; }
  .table--events, .table--events tbody, .table--events tr, .table--events td { display: block; width: 100%; }
  .table--events thead { display: none; }
  .table--events tr { border: 1px solid var(--border); border-radius: 14px; margin-bottom: 14px; padding: 12px; }
  .table--events td { border: 0; padding: 7px 4px; }
  .table--events td[data-label]::before { content: attr(data-label); font-weight: 600; color: var(--muted); margin-inline-end: 12px; font-size: .78rem; }
  .table--events td:first-child { font-size: 1rem; font-weight: 700; }
  .table--events .row-actions { display: flex; padding-top: 12px; }
}
@media (max-width: 768px) {
  .topbar { padding-inline: 12px; gap: 4px; }
  .topbar__brand { font-size: .85rem; }
  .topbar__menu { display: inline-flex; }
  .sidenav { top: 64px; visibility: hidden; }
  body.nav-open .sidenav { visibility: visible; }
  body.nav-open .nav-scrim { inset-block-start: 64px; }
  .content { padding: 20px 14px; }
  .grid--2 { grid-template-columns: minmax(0, 1fr); }
  .card { padding: 18px; overflow-x: auto; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { padding: 16px; }
  .public-main { padding: 20px 14px; }
  .public-header__inner { padding: 12px 16px; }
  .calendar-intro { padding: 22px; }
  .viewswitch { flex-wrap: nowrap; overflow-x: auto; width: 100%; padding-bottom: 4px; }
  .viewswitch__btn { flex-shrink: 0; }
  .event-detail { padding: 18px; }
  .event-detail__actions > * { flex: 1 1 140px; }
  .public-filters > * { flex-basis: calc(50% - 10px) !important; }
  .public-filters input[type=search] { flex-basis: 100% !important; }
  .form--row .field { min-width: min(140px, 100%); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
