:root {
  /* Chabad Digital look: white surfaces, hairline borders, one indigo accent */
  --bg: #FFFFFF; --card: #FFFFFF; --line: #E7E8EC; --line-2: #F0F1F4; --input: #DADCE3;
  --text: #111322; --muted: #5D6272; --soft: #6E7383;
  --primary: #5843E6; --primary-dark: #4733C9; --primary-tint: #F0EEFE;
  --hover: #F5F6F8; --active: #F1F2F6; --head: #F8F8FA;
  --red: #D92D20; --red-tint: #FEF3F2; --green: #067647; --green-tint: #ECFDF3;
  --amber: #B54708; --amber-tint: #FFFAEB; --radius: 10px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: 'Inter', system-ui, sans-serif; font-size: 13.5px; -webkit-font-smoothing: antialiased; color: var(--text); background: var(--bg); }
[hidden] { display: none !important; }
a { color: var(--primary); }
button, input, select, textarea { font: inherit; color: inherit; }
h1 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
h2 { margin: 0; font-size: 15px; font-weight: 600; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.grow { flex: 1; }

/* ---------- login ---------- */
.login { min-height: 100%; background: #F7F7FA; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-card { width: 100%; max-width: 380px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 28px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 12px 32px rgba(17,19,34,.06); }
.login-card h1 { font-size: 22px; margin-top: 8px; }
.login-card p { margin: 0; }

/* ---------- layout ---------- */
.app { display: flex; min-height: 100%; }
.sidebar { width: 248px; flex: none; background: var(--card); border-right: 1px solid var(--line); padding: 14px 12px 12px; display: flex; flex-direction: column; gap: 1px; position: sticky; top: 0; height: 100vh; overflow-y: auto; transition: width .15s; }
.brand-row { display: flex; align-items: center; gap: 6px; padding: 0 2px 10px; }
.brand { display: flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 700; line-height: 1.1; letter-spacing: -0.01em; color: var(--text); text-decoration: none; padding: 2px 4px; min-width: 0; flex: 1; }
.brand .brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand .brand-sub { font-size: 11.5px; font-weight: 500; color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.logo { width: 30px; height: 30px; border-radius: 8px; background: var(--primary); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.collapse-btn { width: 28px; height: 28px; border: 0; border-radius: 6px; background: transparent; color: var(--soft); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: none; }
.collapse-btn:hover { background: var(--hover); color: var(--text); }
.org { display: none; }
.nav-section { padding: 14px 10px 4px; font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--soft); white-space: nowrap; }
.nav-item { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px; border-radius: 7px; text-decoration: none; font-weight: 500; color: #2B2F3D; border: 0; background: transparent; width: 100%; cursor: pointer; text-align: left; white-space: nowrap; }
.nav-item svg { flex: none; color: #4A4F5E; }
.nav-item:hover { background: var(--hover); }
.nav-item[aria-current="page"] { background: var(--active); color: var(--text); font-weight: 600; }
.nav-item[aria-current="page"] svg { color: var(--text); }
.nav-bottom { padding-top: 8px; display: flex; flex-direction: column; gap: 1px; }
.badge { margin-left: auto; white-space: nowrap; font-size: 10.5px; font-weight: 600; padding: 2px 7px; border-radius: 999px; background: var(--red-tint); color: var(--red); border: 1px solid #FECDCA; }
.app.collapsed .sidebar { width: 64px; }
.app.collapsed .brand-text, .app.collapsed .nav-item span, .app.collapsed .nav-section, .app.collapsed .badge { display: none; }
.app.collapsed .brand-row { flex-direction: column; }
.app.collapsed .nav-item { justify-content: center; padding: 0; }
.main-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 56px; display: flex; align-items: center; gap: 12px; padding: 0 28px; background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.search { position: relative; width: 300px; max-width: 45vw; }
.search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--soft); pointer-events: none; }
.search input { width: 100%; height: 34px; padding: 0 10px 0 32px; border-radius: 8px; border: 1px solid var(--line); background: #fff; }
.search input::placeholder { color: #9A9EAB; }
.crumb { color: var(--soft); font-size: 13px; }
.user { margin-left: auto; display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13px; padding: 4px 8px 4px 4px; border-radius: 8px; }
.user svg { color: var(--soft); }
.avatar { width: 26px; height: 26px; border-radius: 6px; background: var(--primary); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; }
.topbar .menu-btn { display: none; }
.view { padding: 24px 28px 48px; max-width: 1280px; width: 100%; display: flex; flex-direction: column; gap: 20px; outline: none; }

/* ---------- building blocks ---------- */
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 16px; }
.page-head p { margin: 4px 0 0; color: var(--muted); font-size: 13.5px; max-width: 640px; }
.page-head .btn, .page-head .actions { margin-top: 2px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.row { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.row > .card { flex: 1 1 340px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: var(--text); }
.tile .label { font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--soft); }
.tile .value { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; color: var(--primary); }
.tile .sub, .tile .meta { font-size: 12px; color: var(--soft); }
a.tile:hover { border-color: #CFCBF8; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line); background: #fff; font-weight: 600; font-size: 13px; cursor: pointer; text-decoration: none; color: var(--text); white-space: nowrap; box-shadow: 0 1px 2px rgba(17,19,34,.04); }
.btn:hover { background: var(--hover); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn.danger { color: var(--red); border-color: #FECDCA; }
.btn.danger:hover { background: var(--red-tint); }
.btn.urgent { background: var(--red); border-color: var(--red); color: #fff; }
.btn.small { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 7px; }
.btn.wide { width: 100%; height: 40px; }
.btn:disabled { opacity: .55; cursor: default; }
.icon-btn { width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line); background: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { font-size: 12.5px; font-weight: 500; color: #3A3F4E; }
.field input, .field select, .field textarea, input.input { height: 38px; padding: 0 11px; border-radius: 8px; border: 1px solid var(--input); background: #fff; min-width: 0; }
.field textarea { height: auto; padding: 9px 11px; min-height: 110px; resize: vertical; }
.field input[type="color"] { width: 52px; padding: 3px; }
.field input:focus, .field select:focus, .field textarea:focus, input.input:focus, .search input:focus { border-color: #A99CF5; box-shadow: 0 0 0 3px rgba(88,67,230,.12); outline: none; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; }
button:focus-visible, a:focus-visible, [contenteditable]:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.fields-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.hint { font-size: 12px; color: var(--soft); margin: 0; }
.form-error { color: var(--red); font-size: 13px; margin: 0; min-height: 0; }

/* segmented choices look like the Figma filter pills */
.seg { display: inline-flex; gap: 2px; flex-wrap: wrap; padding: 3px; border: 1px solid var(--line); border-radius: 9px; background: #fff; width: fit-content; max-width: 100%; }
.seg button { min-width: 64px; height: 30px; border-radius: 6px; border: 0; background: transparent; font-weight: 500; font-size: 12.5px; color: var(--muted); cursor: pointer; padding: 0 12px; }
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"] { background: var(--active); color: var(--text); font-weight: 600; }
.seg.red button[aria-pressed="true"][data-v="urgent"] { background: var(--red-tint); color: var(--red); }

.switch { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-weight: 500; }
.switch input { appearance: none; width: 36px; height: 20px; border-radius: 999px; background: #D5D7DF; position: relative; cursor: pointer; flex: none; transition: background .15s; }
.switch input::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: left .15s; }
.switch input:checked { background: var(--primary); }
.switch input:checked::after { left: 18px; }

.chip { display: inline-flex; align-items: center; font-size: 11.5px; font-weight: 500; padding: 2px 8px; border-radius: 999px; background: #F2F4F7; color: #475467; border: 1px solid #E4E7EC; white-space: nowrap; }
.chip.live { background: var(--green-tint); color: var(--green); border-color: #ABEFC6; }
.chip.scheduled { background: var(--primary-tint); color: var(--primary-dark); border-color: #D9D3FC; }
.chip.urgent { background: var(--red-tint); color: #B42318; border-color: #FECDCA; }
.chip.ended { background: #F2F4F7; color: #475467; }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.dot.on { background: #17B26A; } .dot.off { background: #F04438; }

.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; border: 1px solid transparent; cursor: pointer; background: transparent; width: 100%; text-align: left; }
.list-item:hover { background: var(--hover); }
.list-item[aria-current="true"] { background: var(--active); border-color: var(--line); }
.list-item .title { font-weight: 600; }
.list-item .meta { font-size: 13px; color: var(--muted); }
.empty { padding: 26px; text-align: center; color: var(--muted); border: 1px dashed #D5D7DF; border-radius: 10px; }

table.table { width: 100%; border-collapse: separate; border-spacing: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.table th { text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--soft); padding: 10px 14px; font-weight: 600; background: var(--head); border-bottom: 1px solid var(--line); }
.table td { padding: 10px 14px; border-top: 1px solid var(--line-2); vertical-align: middle; }
.table tbody tr:first-child td { border-top: 0; }
.table tbody tr:hover td { background: #FCFCFD; }
.table td input.input { height: 36px; width: 100%; }
.table .actions { flex-wrap: nowrap; }
.scroll-x { overflow-x: auto; }

/* rich text editor */
.rte { border: 1px solid var(--input); border-radius: 8px; overflow: hidden; background: #fff; }
.rte-bar { display: flex; flex-wrap: wrap; gap: 2px; padding: 5px; border-bottom: 1px solid var(--line-2); background: var(--head); }
.rte-bar button { min-width: 30px; height: 30px; border: 0; border-radius: 6px; background: transparent; cursor: pointer; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; padding: 0 8px; }
.rte-bar button:hover { background: var(--active); }
.rte-bar .sep { width: 1px; margin: 6px 4px; background: var(--line); }
.rte-body { min-height: 150px; padding: 14px 16px; line-height: 1.55; outline: none; }
.rte-body p { margin: 0 0 8px; }

/* preview */
.preview { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: #0B1020; border: 1px solid var(--line); }
.preview iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; pointer-events: none; }

/* posters */
.drop { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 28px; border: 1.5px dashed #C9CCD6; border-radius: var(--radius); background: #fff; text-align: center; cursor: pointer; }
.drop.over { border-color: var(--primary); background: var(--primary-tint); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.poster-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.poster { display: flex; flex-direction: column; gap: 6px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; text-align: left; }
.poster[aria-current="true"] { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.poster .thumb { aspect-ratio: 2 / 3; border-radius: 8px; background: #E9EDF5 center / cover no-repeat; display: flex; align-items: center; justify-content: center; color: var(--soft); font-size: 12px; }
.poster .name { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.place-box { position: relative; width: 300px; max-width: 100%; aspect-ratio: 6 / 7; border-radius: 12px; overflow: hidden; background: #111827; align-self: center; }
.place-box .bd { position: absolute; inset: -30px; background-size: cover; background-position: center; filter: blur(24px) brightness(.6); }
.place-box img { position: absolute; inset: 0; width: 100%; height: 100%; }
.anchors { display: grid; grid-template-columns: repeat(3, 44px); gap: 4px; }
.anchors button { height: 44px; border-radius: 8px; border: 1px solid var(--input); background: #fff; cursor: pointer; }
.anchors button[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); }
.progress { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--primary); width: 0; transition: width .2s; }

/* themes */
.theme-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.theme-card { display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 10px; border: 1px solid var(--line); background: #fff; cursor: pointer; text-align: left; }
.theme-card[aria-pressed="true"] { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.theme-card .sw { height: 56px; border-radius: 8px; display: grid; grid-template-columns: 1fr 1.4fr 1fr; gap: 4px; padding: 6px; }
.theme-card .sw span { border-radius: 4px; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.swatches button { width: 34px; height: 34px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--input); cursor: pointer; padding: 0; }
.swatches button[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--primary); }
.clock-preview { border-radius: 10px; background: #0B1020; padding: 28px; display: flex; justify-content: center; }
.clock-tile { padding: 24px 36px; border-radius: 20px; display: flex; flex-direction: column; gap: 8px; }
.clock-time { font-size: 72px; font-weight: 600; line-height: 1; letter-spacing: -0.02em; }
.clock-date { font-size: 20px; font-weight: 500; }

.urgent-box { border: 1px solid #FDA29B; box-shadow: 0 0 0 3px var(--red-tint); }
.urgent-live { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 10px; background: var(--red-tint); border: 1px solid #FECDCA; color: #B42318; font-weight: 600; }
.urgent-live .btn { background: #fff; color: #B42318; border-color: #FECDCA; }
.copy-row { display: flex; gap: 8px; flex-wrap: wrap; }
.copy-row input { flex: 1; min-width: 220px; font-family: ui-monospace, monospace; font-size: 12.5px; background: var(--head); }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); background: #111322; color: #fff; padding: 10px 16px; border-radius: 8px; font-weight: 600; opacity: 0; pointer-events: none; transition: all .2s; z-index: 50; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error { background: var(--red); }

@media (max-width: 860px) {
  .sidebar { position: fixed; z-index: 20; left: 0; top: 0; transform: translateX(-100%); transition: transform .2s; box-shadow: 0 10px 40px rgba(0,0,0,.2); }
  .app.menu-open .sidebar { transform: none; }
  .topbar .menu-btn { display: inline-flex; }
  .topbar { padding: 0 16px; }
  .collapse-btn { display: none; }
  .app.collapsed .sidebar { width: 248px; }
  .search { width: auto; flex: 1; }
  .view { padding: 20px 16px 40px; }
  #userEmail, .user svg { display: none; }
}

/* ---------- master admin + shared extras ---------- */
.logo.dark, .avatar.dark { background: #111322; }
.admin-tag { margin-left: 6px; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--primary); vertical-align: middle; }
.impersonate-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 28px; background: var(--primary); color: #fff; font-weight: 600; }
.impersonate-bar .btn { height: 30px; background: #fff; color: var(--primary-dark); border-color: #fff; }
.setup-link { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 10px; background: var(--primary-tint); border: 1px solid #D9D3FC; }
.feature-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line); }
.feature-row.on { background: #FAF9FF; border-color: #D9D3FC; }
.feature-row .note { font-size: 12px; color: var(--soft); }
.feature-row.soon { opacity: .6; }
.chip.office { background: var(--primary-tint); color: var(--primary-dark); border-color: #D9D3FC; }
.chip.shul { background: var(--amber-tint); color: var(--amber); border-color: #FEDF89; }
.chip.paused { background: #F2F4F7; color: #475467; }
.chip.active { background: var(--green-tint); color: var(--green); border-color: #ABEFC6; }
.table a.rowlink { color: var(--text); font-weight: 600; text-decoration: none; }
.table a.rowlink:hover { color: var(--primary); }

/* a table inside a card sits flush, like the Figma tables */
.card > .table, .card > .scroll-x > .table { border-radius: 8px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.card-head a, a.link { color: var(--primary); font-weight: 600; font-size: 13px; text-decoration: none; }
.card-head a:hover, a.link:hover { text-decoration: underline; }

/* ---------- announcements: list page + editor page ---------- */
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 13px; font-weight: 500; text-decoration: none; width: fit-content; margin-bottom: -8px; }
.back:hover { color: var(--text); }
.ann-table td { vertical-align: top; }
.ann-table td:first-child { min-width: 260px; max-width: 460px; }
.ann-table .meta { color: var(--soft); font-size: 12.5px; margin-top: 2px; }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nowrap { white-space: nowrap; }
.rowlink-row { cursor: pointer; }
.ann-editor { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr); gap: 20px; align-items: start; }
.ann-editor .rte-body { min-height: 260px; }
.ann-side { display: flex; flex-direction: column; gap: 20px; }
.form-bar { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 8px; padding-top: 4px; border-top: 1px solid var(--line); padding-top: 16px; }
@media (max-width: 900px) { .ann-editor { grid-template-columns: 1fr; } }
.search.inline { width: 240px; }
.select select { height: 34px; padding: 0 28px 0 10px; border-radius: 8px; border: 1px solid var(--line); background: #fff; font: inherit; font-size: 13px; color: var(--text); }

/* ---------- announcement sections ---------- */
.sections-pick { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.hint.warn { color: var(--amber); }
.minis { display: flex; flex-wrap: wrap; gap: 14px; }
.mini { margin: 0; display: flex; flex-direction: column; gap: 6px; width: 180px; }
.mini figcaption { font-size: 12px; font-weight: 600; color: var(--muted); }
.mini-screen { aspect-ratio: 16 / 9; border-radius: 6px; background: #1C1F2E; padding: 6px; display: grid; grid-template-columns: 1fr 1.5fr 1fr; gap: 4px; }
.mini-left, .mini-ann { display: flex; flex-direction: column; gap: 4px; min-height: 0; }
.mini-left i { flex: 1; border-radius: 3px; background: #343849; }
.mini-left i:first-child { flex: .6; }
.mini-poster { border-radius: 3px; background: #2A2E40; }
.mini-ann b { flex: 1; border-radius: 3px; background: #343849; color: #A4A8B8; font-size: 8px; font-weight: 600; padding: 3px 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-ann b.on { background: var(--primary); color: #fff; box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--primary); }
.copy-row input.plain { font-family: inherit; font-size: 13.5px; background: #fff; }

/* ---------- posters: list + editor ---------- */
.pgroup { display: flex; flex-direction: column; gap: 12px; }
.pgroup + .pgroup { margin-top: 10px; padding-top: 18px; border-top: 1px solid var(--line-2); }
.pgroup h3 { margin: 0; font-size: 13px; font-weight: 600; display: flex; gap: 6px; }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.pcard { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--text); padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: #fff; min-width: 0; }
.pcard:hover { border-color: #CFCBF8; box-shadow: 0 2px 8px rgba(17,19,34,.05); }
.pthumb { position: relative; aspect-ratio: 4 / 3; border-radius: 6px; background: #F2F3F6; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.pthumb img { width: 100%; height: 100%; object-fit: contain; }
.pthumb .pages { position: absolute; right: 6px; bottom: 6px; font-size: 10.5px; font-weight: 600; background: rgba(17,19,34,.75); color: #fff; padding: 2px 6px; border-radius: 4px; }
.pinfo { display: flex; justify-content: space-between; align-items: center; gap: 6px; padding: 2px 2px 0; }
.pname { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pmeta { font-size: 12px; color: var(--soft); padding: 0 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip.draft { background: var(--amber-tint); color: var(--amber); border-color: #FEDF89; }
.drop.big { padding: 64px 28px; }
.place-box.big { width: min(420px, 100%); }
.pstrip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.pstrip button { flex: none; width: 64px; height: 48px; padding: 2px; border: 1px solid var(--line); border-radius: 6px; background: #F2F3F6; cursor: pointer; }
.pstrip button[aria-pressed="true"] { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.pstrip img { width: 100%; height: 100%; object-fit: contain; }
details.opt { gap: 0; }
details.opt > summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; cursor: pointer; }
details.opt > summary::-webkit-details-marker { display: none; }
details.opt > summary > span:first-child { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
details.opt > summary b { font-size: 15px; font-weight: 600; }
.opt-sum { font-size: 12.5px; color: var(--soft); }
details.opt[open] > summary .link { visibility: hidden; }
.opt-body { display: flex; flex-direction: column; gap: 14px; padding-top: 16px; }
span.link { color: var(--primary); font-weight: 600; font-size: 13px; }
.pstrip:empty { display: none; }

/* ---------- editor pages: content on the left, one settings panel on the right ---------- */
.ann-editor { grid-template-columns: minmax(0, 1.6fr) minmax(300px, 400px); }
.stage-card { position: sticky; top: 76px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); gap: 0; overflow: hidden; }
.psec { display: flex; flex-direction: column; gap: 12px; padding: 18px 20px; border-top: 1px solid var(--line-2); }
.psec:first-child, .psec[hidden] + .psec:not([hidden]):nth-child(2) { border-top: 0; }
.psec[hidden] { display: none; }
.psec h2 { font-size: 13px; font-weight: 600; color: var(--text); }
.psec .card-head h2 { font-size: 13px; }
details.psec.opt > summary b { font-size: 13px; }
details.psec.opt[open] { background: #FCFCFD; }
.stage { display: flex; align-items: center; justify-content: center; min-height: 520px; border-radius: 8px; background: #F4F5F7; padding: 28px; }
.stage .place-box.big { width: min(400px, 100%); box-shadow: 0 1px 2px rgba(17,19,34,.08), 0 8px 24px rgba(17,19,34,.10); }
.drop.big { min-height: 520px; justify-content: center; gap: 10px; background: #FAFAFB; border-color: #D5D7DF; color: var(--text); }
.drop.big svg { color: var(--primary); margin-bottom: 4px; }
.drop.big u { text-decoration-color: #B9B2F7; text-underline-offset: 3px; color: var(--primary); text-decoration-thickness: 1.5px; font-weight: 500; }
.drop.big.over { background: var(--primary-tint); border-color: var(--primary); }
.formats { display: flex; gap: 6px; margin-top: 6px; }
.formats span { font-size: 10.5px; font-weight: 600; letter-spacing: .04em; color: var(--muted); border: 1px solid var(--line); background: #fff; padding: 2px 7px; border-radius: 4px; }
.drop-tip { font-size: 12px; color: var(--soft); max-width: 320px; text-align: center; line-height: 1.5; }
.ann-editor .rte-body { min-height: 340px; }
.form-bar { position: sticky; bottom: 0; background: rgba(255,255,255,.94); backdrop-filter: blur(6px); margin: 0 -28px; padding: 14px 28px; z-index: 3; }
@media (max-width: 900px) { .stage-card { position: static; } .stage, .drop.big { min-height: 360px; } }

/* ---------- directory: import pop-up + design page ---------- */
.dir-look { font-size: 12.5px; color: var(--soft); text-decoration: none; }
.dir-look:hover { color: var(--primary); }
dialog.modal { border: 0; padding: 0; border-radius: 12px; width: min(520px, calc(100vw - 32px)); box-shadow: 0 24px 64px rgba(17,19,34,.22); color: var(--text); }
dialog.modal::backdrop { background: rgba(17,19,34,.42); }
dialog.modal form { display: flex; flex-direction: column; gap: 16px; padding: 22px 24px 20px; }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.modal-head h2 { font-size: 16px; }
.modal-head .hint { margin-top: 3px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding-top: 16px; margin: 4px -24px 0; padding-left: 24px; padding-right: 24px; border-top: 1px solid var(--line-2); }
.icon-btn.ghost { border-color: transparent; box-shadow: none; width: 30px; height: 30px; color: var(--soft); }
.icon-btn.ghost:hover { background: var(--hover); color: var(--text); }
.drop.small-drop { padding: 22px; gap: 4px; background: #FAFAFB; border-color: #D5D7DF; }
.drop.small-drop.has { border-style: solid; border-color: #CFCBF8; background: var(--primary-tint); }
.drop.small-drop.over { border-color: var(--primary); }
.csv-help { display: flex; flex-direction: column; gap: 8px; }
.mini-table { border-collapse: collapse; font-size: 12px; width: 100%; border: 1px solid var(--line); border-radius: 6px; }
.mini-table th { text-align: left; font-family: ui-monospace, monospace; font-weight: 500; font-size: 11.5px; background: var(--head); padding: 6px 8px; border-bottom: 1px solid var(--line); color: var(--muted); }
.mini-table td { padding: 6px 8px; color: var(--soft); white-space: nowrap; }
.design-editor { display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); gap: 20px; align-items: start; }
.design-editor .form-bar { grid-column: 1 / -1; }
.preview-card .preview { border-radius: 8px; }
.sw-title { display: block; font-size: 13px; font-weight: 600; }
.switch > span { display: flex; flex-direction: column; gap: 2px; }
@media (max-width: 960px) { .design-editor { grid-template-columns: 1fr; } }

/* ---------- sign in: form on the left, glass towers on the right (desktop) ---------- */
.login { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 44%; align-items: stretch; justify-content: stretch; padding: 0; min-height: 100vh; background: #fff; }
.login::after { content: ''; margin: 16px 16px 16px 0; border-radius: 14px; background: #1B2233 url('/assets/signin.jpg') center 30% / cover no-repeat; }
.login > .login-card { align-self: center; justify-self: center; width: 100%; max-width: 380px; margin: 96px 40px; padding: 0; border: 0; box-shadow: none; background: transparent; gap: 16px; }
.login-card .brand { position: absolute; top: 34px; left: 44px; }
.login-card h1 { font-size: 28px; letter-spacing: -0.025em; margin: 0; }
.login-card > p.muted { font-size: 14px; margin-top: -8px; margin-bottom: 8px; }
.login-card .field input { height: 42px; }
.login-card .btn.wide { height: 42px; margin-top: 4px; }
.login-note { font-size: 12.5px; color: var(--soft); margin: 4px 0 0; }
.login-foot { position: absolute; left: 44px; bottom: 30px; font-size: 12px; color: var(--soft); }
@media (max-width: 900px) {
  .login { grid-template-columns: 1fr; }
  .login::after { display: none; }
  .login > .login-card { margin: 110px 24px 64px; }
  .login-card .brand { left: 24px; }
  .login-foot { left: 24px; }
}

/* =====================================================================
   Friendlier pass: rounder controls, warmer neutrals, sentence-case labels,
   status shown as a coloured dot + word instead of boxed badges.
   ===================================================================== */
:root {
  --bg: #F7F7F5; --card: #FFFFFF; --line: #E8E7E3; --line-2: #F0EFEC; --input: #DEDDD8;
  --text: #1A1A1F; --muted: #5E5E66; --soft: #7A7A82;
  --hover: #F3F2EF; --active: #EDECF8; --head: #FAFAF8;
  --radius: 16px;
}
body { font-size: 14px; background: var(--bg); }
.main-col { background: var(--bg); }
h1 { font-size: 24px; letter-spacing: -0.022em; }
h2 { font-size: 15px; letter-spacing: -0.01em; }

/* sidebar + top bar */
.sidebar { background: #FBFBFA; border-right-color: var(--line); }
.nav-section { text-transform: none; letter-spacing: 0; font-size: 12px; font-weight: 500; color: #9A9AA2; padding: 16px 12px 6px; }
.nav-item { height: 38px; border-radius: 999px; padding: 0 14px; color: #3A3A42; }
.nav-item[aria-current="page"] { background: var(--active); color: var(--primary-dark); }
.nav-item[aria-current="page"] svg { color: var(--primary); }
.topbar { background: rgba(247,247,245,.86); backdrop-filter: blur(8px); border-bottom-color: transparent; }
.search input { border-radius: 999px; height: 38px; background: #fff; border-color: var(--line); padding-left: 36px; }
.search svg { left: 13px; }
.user { border-radius: 999px; padding: 4px 12px 4px 4px; background: #fff; border: 1px solid var(--line); }
.avatar { border-radius: 50%; width: 28px; height: 28px; }
.logo { border-radius: 10px; }

/* surfaces */
.card, .tile, .panel, .pcard { border-radius: var(--radius); border-color: var(--line); }
.card { padding: 20px 22px; }
.tile { padding: 16px 18px; }
.tile .label { text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 500; color: var(--muted); }
.tile .value { font-size: 28px; color: var(--text); }
a.tile:hover { border-color: #D4D0F5; }

/* buttons: full pills */
.btn { border-radius: 999px; height: 38px; padding: 0 18px; font-weight: 600; box-shadow: none; border-color: var(--input); }
.btn.small { border-radius: 999px; height: 32px; padding: 0 14px; }
.btn.wide { border-radius: 999px; height: 44px; }
.btn.primary { box-shadow: 0 1px 2px rgba(71,51,201,.25); }
.icon-btn { border-radius: 50%; }

/* inputs */
.field input, .field select, .field textarea, input.input, .select select { border-radius: 12px; border-color: var(--input); }
.field input, .field select, input.input { height: 42px; }
.select select { height: 38px; border-radius: 999px; padding: 0 32px 0 14px; border-color: var(--line); }
.field > span { font-size: 13px; color: #45454D; }
.rte { border-radius: 14px; }
.rte-bar button { border-radius: 999px; }

/* segmented controls: pill track with pill buttons */
.seg { border-radius: 999px; padding: 4px; background: #F1F0ED; border-color: transparent; gap: 2px; }
.seg button { border-radius: 999px; height: 32px; padding: 0 14px; color: var(--muted); }
.seg button[aria-pressed="true"] { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(26,26,31,.12); }
.seg.red button[aria-pressed="true"][data-v="urgent"] { background: var(--red); color: #fff; }

/* status: dot + word, no boxes */
.chip { border: 0; background: transparent; padding: 0; gap: 6px; font-size: 12.5px; font-weight: 500; color: var(--muted); }
.chip::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #B4B4BB; flex: none; }
.chip.live, .chip.active { background: transparent; color: #11714A; } .chip.live::before, .chip.active::before { background: #1DB46F; }
.chip.scheduled { background: transparent; color: var(--primary-dark); } .chip.scheduled::before { background: var(--primary); }
.chip.urgent { background: transparent; color: #B42318; } .chip.urgent::before { background: #F04438; }
.chip.draft { background: transparent; color: var(--amber); } .chip.draft::before { background: #F79009; }
.chip.ended, .chip.paused { background: transparent; color: var(--soft); }
.chip.office, .chip.shul { background: var(--hover); padding: 3px 10px; border-radius: 999px; } .chip.office::before, .chip.shul::before { display: none; }

/* tables: lighter, sentence-case headers */
table.table { border-radius: 14px; border-color: var(--line); }
.table th { text-transform: none; letter-spacing: 0; font-size: 12.5px; font-weight: 500; color: var(--soft); background: var(--head); }
.table td { border-top-color: var(--line-2); padding: 12px 14px; }

/* lists, cards, misc */
.pthumb { border-radius: 10px; background: #F1F0ED; }
.pcard { padding: 10px; }
.drop, .drop.big, .drop.small-drop { border-radius: 16px; background: #FBFBFA; }
.stage { border-radius: 12px; background: #F1F0ED; }
.empty { border-radius: 14px; border-color: #DCDBD5; background: #FCFCFB; }
.preview, .place-box { border-radius: 12px; }
dialog.modal { border-radius: 20px; }
.toast { border-radius: 999px; padding: 11px 20px; }
.switch input { width: 40px; height: 22px; }
.switch input::after { width: 18px; height: 18px; }
.switch input:checked::after { left: 20px; }
.form-bar { background: rgba(247,247,245,.92); border-top-color: var(--line); }
.mini-screen { border-radius: 10px; }
.back { font-size: 13.5px; }
.login { background: #fff; }
.login::after { border-radius: 20px; }

/* Dropdowns: draw our own arrow with room inside the rounded border (the browser's
   arrow sat on top of the curve). */
select, .select select, .field select {
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235E5E66' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center; background-size: 12px;
  padding-right: 40px !important; cursor: pointer; text-overflow: ellipsis;
}
.select select { padding-left: 16px; }
.field select { padding-left: 14px; }
select::-ms-expand { display: none; }

/* urgent notice: button + how-it-shows choice */
.btn.urgent-outline { color: #B42318; border-color: #F5C2BD; background: #fff; }
.btn.urgent-outline:hover { background: var(--red-tint); }
.urgent-how { display: flex; flex-direction: column; gap: 10px; }
.field-label { font-size: 13px; font-weight: 500; color: #45454D; }
.how-options { display: flex; flex-direction: column; gap: 8px; }
.how { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; cursor: pointer; background: #fff; }
.how:hover { border-color: #DCDBD5; }
.how:has(input:checked) { border-color: #F04438; background: #FFF7F6; }
.how input { margin: 2px 0 0; accent-color: #D92D20; flex: none; }
.how > span { display: flex; flex-direction: column; gap: 2px; }
.how b { font-size: 13.5px; font-weight: 600; }
.how > span > span { font-size: 12.5px; color: var(--soft); line-height: 1.4; }
.cycle-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.unit { position: relative; display: block; }
.unit input { width: 100%; padding-right: 44px; }
.unit i { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-style: normal; font-size: 12.5px; color: var(--soft); pointer-events: none; }

/* text editor toolbar */
.rte-bar { align-items: center; gap: 4px; padding: 6px 8px; flex-wrap: wrap; }
.rte-bar .sep { width: 1px; height: 20px; background: var(--line); margin: 0 4px; }
.rte-bar button { min-width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; color: #3A3A42; font-size: 13px; font-weight: 600; }
.rte-select select { height: 32px; border-radius: 999px; border: 1px solid var(--line); background-color: #fff; font: inherit; font-size: 12.5px; padding-left: 12px; padding-right: 30px !important; background-position: right 11px center; }
.rte-color { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 32px; border-radius: 999px; cursor: pointer; }
.rte-color:hover { background: var(--active); }
.rte-color .a { font-weight: 700; font-size: 14px; border-bottom: 3px solid #EA580C; line-height: 1; padding: 0 2px 1px; }
.rte-color input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.rte .rte-body.urgent-bg { color: #fff; }
.rte-body.urgent-bg a { color: #fff; }
/* urgent background */
.bg-swatches { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.bg-swatches button { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; padding: 0; }
.bg-swatches button[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--text); }
.bg-custom { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px 0 4px; border: 1px solid var(--line); border-radius: 999px; font-size: 12.5px; cursor: pointer; background: #fff; }
.bg-custom input { width: 22px; height: 22px; border: 0; padding: 0; border-radius: 50%; background: none; cursor: pointer; }

/* ---------- People ---------- */
.seats { display: flex; gap: 4px; }
.seats i { width: 22px; height: 6px; border-radius: 999px; background: #E5E4E0; }
.seats i.on { background: var(--primary); }
.people { display: flex; flex-direction: column; }
.person { display: grid; grid-template-columns: 40px minmax(0, 1fr) 150px auto; gap: 14px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line-2); }
.person:first-child { border-top: 0; }
.person .avatar { width: 38px; height: 38px; font-size: 13px; }
.avatar.soft { background: var(--active); color: var(--primary-dark); }
.who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.who > span { font-size: 12.5px; color: var(--soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pending { color: var(--amber); }
.role-tag { display: inline-flex; height: 32px; align-items: center; padding: 0 14px; border-radius: 999px; background: var(--hover); font-size: 13px; font-weight: 500; }
.person .select select { width: 100%; }
.roles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.roles > div { display: flex; flex-direction: column; gap: 4px; }
.roles span { font-size: 13px; color: var(--muted); line-height: 1.45; }
.how.plain:has(input:checked) { border-color: var(--primary); background: #FAF9FF; }
.how.plain input { accent-color: var(--primary); }
.modal-done { display: flex; flex-direction: column; gap: 14px; padding: 22px 24px 20px; }
.modal-done h2 { font-size: 16px; }
@media (max-width: 760px) { .person { grid-template-columns: 40px 1fr; } .roles { grid-template-columns: 1fr; } }

/* ScreenKode admin: people on an account */
.m-person { display: grid; grid-template-columns: minmax(0, 1fr) 120px auto; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line-2); }
.m-person .select select { width: 100%; height: 32px; }
.add-person { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-items: center; padding-top: 12px; border-top: 1px solid var(--line-2); }
.add-person .input { height: 38px; border-radius: 999px; padding: 0 14px; }
.add-person .select select { width: 100%; }
