/**
 * NogaTech Edge Simulator — global styles (dark glass aesthetic).
 * Uses logical properties where layout must track RTL (nav, banner).
 */
:root {
  --bg: #0b0f14;
  --bg0: #070a12;
  --bg1: #0b1224;
  --panel: rgba(255, 255, 255, 0.06);
  --panel2: rgba(255, 255, 255, 0.08);
  --line: rgba(255, 255, 255, 0.1);
  --txt: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.66);
  --ok: #5eead4;
  --warn: #f59e0b;
  --bad: #fb7185;
  --accent: #60a5fa;
  --glass: rgba(255, 255, 255, 0.055);
  --glass2: rgba(255, 255, 255, 0.075);
  --shadow: 0 26px 70px rgba(0, 0, 0, 0.42);
  --shadowSoft: 0 14px 40px rgba(0, 0, 0, 0.32);
  --ring: 0 0 0 1px rgba(255, 255, 255, 0.07), 0 0 0 4px rgba(96, 165, 250, 0.14);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--txt);
  background:
    radial-gradient(1000px 520px at 20% 10%, rgba(96, 165, 250, 0.22), transparent 58%),
    radial-gradient(900px 520px at 85% 45%, rgba(245, 158, 11, 0.18), transparent 62%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
  min-height: 100vh;
}

@media (prefers-reduced-motion: no-preference) {
  * {
    scroll-behavior: smooth;
  }
}

/* Brief haptic feedback when policy blocks a control */
#hapticRoot.haptic {
  animation: hapticShake 0.35s ease;
}

@keyframes hapticShake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-3px);
  }
  75% {
    transform: translateX(3px);
  }
}

.app {
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
}

/* Home screen: semi-transparent Shabbat lock / unlock window */
.homeShabbatBanner {
  border-radius: 14px;
  padding: 14px 18px;
  margin-bottom: 4px;
  background:
    radial-gradient(900px 280px at 20% 0%, rgba(96, 165, 250, 0.12), transparent 60%),
    radial-gradient(700px 260px at 88% 80%, rgba(245, 158, 11, 0.11), transparent 62%),
    var(--glass);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadowSoft);
}

.homeShabbatBannerInner {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.homeLockTimesLine {
  font-size: 15px;
  font-weight: 650;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.45;
}

.fullWidthInput {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.fullWidthInput.inputError,
input.inputError {
  border-color: rgba(251, 113, 133, 0.85) !important;
  box-shadow: 0 0 0 1px rgba(251, 113, 133, 0.35);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brandTitle {
  font-size: 16px;
  letter-spacing: 0.2px;
}

.brandSub {
  font-size: 12px;
  color: var(--muted);
}

.topActions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.langToggle {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.2);
}

.langToggle button {
  width: auto;
  padding: 8px 12px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.langToggle button.active {
  color: var(--txt);
  background: rgba(96, 165, 250, 0.18);
}

.iconBtn {
  width: auto;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.2);
  color: var(--txt);
  cursor: pointer;
}

/* Persistent connection banner (Phase 1) */
.connBanner {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid rgba(251, 113, 133, 0.35);
  background: rgba(251, 113, 133, 0.1);
  backdrop-filter: blur(10px);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.9);
  margin-inline: 0;
}

.connBanner.is-visible {
  display: flex;
}

.connBanner[data-severity="warn"] {
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.1);
}

.connBannerDot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--bad);
  box-shadow: 0 0 0 3px rgba(251, 113, 133, 0.15);
}

.connBanner[data-severity="warn"] .connBannerDot {
  background: var(--warn);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

/* Core health banner uses the same glass banner styling */
#coreBanner[data-severity="ok"] {
  border-color: rgba(94, 234, 212, 0.35);
  background: rgba(94, 234, 212, 0.08);
}
#coreBanner[data-severity="ok"] .connBannerDot {
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(94, 234, 212, 0.12);
}

/* Hash routing nav — logical margins for RTL */
.appNav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  margin-inline: 0;
}

.appNav a {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.18);
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  transition: background 0.15s ease, color 0.15s ease;
}

.appNav a:hover {
  color: var(--txt);
  background: rgba(255, 255, 255, 0.06);
}

.appNav a.is-active {
  color: var(--txt);
  background: rgba(96, 165, 250, 0.18);
  border-color: rgba(96, 165, 250, 0.35);
}

.statusPills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.18);
  font-size: 12px;
  color: var(--muted);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.05);
}

.dot.ok {
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(94, 234, 212, 0.1);
}

.dot.warn {
  background: var(--warn);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.dot.bad {
  background: var(--bad);
  box-shadow: 0 0 0 3px rgba(251, 113, 133, 0.1);
}

.view[hidden] {
  display: none !important;
}

.main {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 14px;
  align-items: start;
}

/* Home: calendar column + detail / devices column */
.dashboardHome {
  grid-template-columns: minmax(340px, 480px) minmax(260px, 380px);
  align-items: start;
}

@media (max-width: 900px) {
  .dashboardHome {
    grid-template-columns: 1fr;
  }
}

.dashboardHome__primary,
.dashboardHome__side {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.adminMain {
  grid-template-columns: 1fr;
  max-width: 720px;
}

.card {
  background:
    radial-gradient(900px 360px at 15% 0%, rgba(96, 165, 250, 0.08), transparent 62%),
    radial-gradient(760px 320px at 85% 90%, rgba(245, 158, 11, 0.06), transparent 62%),
    var(--glass);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.cardInner {
  padding: 16px;
}

.sectionTitle {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.62);
  margin-bottom: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

label {
  font-size: 12px;
  color: var(--muted);
  display: block;
  margin: 0 0 6px 2px;
}

input,
select,
button,
textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.22);
  color: var(--txt);
  outline: none;
  transition: transform 140ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(96, 165, 250, 0.36);
  box-shadow: var(--ring);
}

button {
  cursor: pointer;
  background: rgba(96, 165, 250, 0.14);
  border-color: rgba(96, 165, 250, 0.35);
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.28);
  border-color: rgba(96, 165, 250, 0.55);
}

button:active {
  transform: translateY(0px);
}

button.secondary {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
}

button.danger {
  background: rgba(251, 113, 133, 0.14);
  border-color: rgba(251, 113, 133, 0.35);
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.row3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}

.mt8 {
  margin-top: 8px;
}

.mt12 {
  margin-top: 12px;
}

.mt16 {
  margin-top: 16px;
}

.devicesGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 12px;
}

.deviceCard {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.18);
  border-radius: 12px;
  padding: 10px;
  margin-top: 10px;
}

.deviceHead {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
  font-size: 12px;
  color: var(--muted);
}

.deviceTitleRow {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.switchStateLamp {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.switchStateLamp.is-on {
  background: radial-gradient(circle at 35% 30%, #fffef5, #ffd54a 42%, #d4a017);
  box-shadow:
    0 0 14px rgba(255, 200, 60, 0.9),
    0 0 4px rgba(255, 255, 255, 0.35) inset;
}

.switchStateLamp.is-off {
  background: rgba(255, 255, 255, 0.06);
  box-shadow: none;
}

.deviceTitle {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
  letter-spacing: 0.1px;
}

.lockBadge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 999px;
  border: 1px solid rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.1);
  color: rgba(245, 158, 11, 0.95);
  font-weight: 600;
}

.unlockBadge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 999px;
  border: 1px solid rgba(94, 234, 212, 0.35);
  background: rgba(94, 234, 212, 0.08);
  color: rgba(94, 234, 212, 0.95);
  font-weight: 600;
}

.controlHint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
}

.adminWarn {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.1);
  color: var(--txt);
  font-size: 13px;
  line-height: 1.4;
}

.adminCardTint {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
}

.sliderRow {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.valuePill {
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.22);
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
  min-width: 68px;
  text-align: center;
}

.suggestWrap {
  position: relative;
}

.suggestList {
  position: absolute;
  top: calc(100% + 6px);
  inset-inline: 0;
  background: rgba(10, 14, 26, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  overflow: hidden;
  z-index: 20;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
}

.suggestItem {
  padding: 10px 12px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.86);
  font-size: 12px;
}

.suggestItem:last-child {
  border-bottom: 0;
}

.suggestItem:hover {
  background: rgba(96, 165, 250, 0.12);
}

.blackbox {
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

.blackboxHead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
}

.blackboxTitle {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.86);
}

.blackboxTools {
  display: flex;
  gap: 10px;
  align-items: center;
}

.blackboxLog {
  height: 28vh;
  max-height: 320px;
  min-height: 180px;
  overflow: auto;
  padding: 10px 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
  line-height: 1.35;
  white-space: pre-wrap;
  word-break: break-word;
}

.logLine {
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.logLine:last-child {
  border-bottom: 0;
}

.logTs {
  color: rgba(255, 255, 255, 0.55);
}

.logTopic {
  color: var(--accent);
}

.toast {
  position: fixed;
  bottom: 18px;
  inset-inline: 18px;
  max-width: 820px;
  margin-inline: auto;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(10, 14, 26, 0.92);
  color: rgba(255, 255, 255, 0.88);
  display: none;
  /* Above modals / overlays */
  z-index: 10050;
}

.toast.show {
  display: block;
}

/* Admin MQTT debug log */
.mqttDebugLog {
  margin: 0;
  margin-top: 8px;
  max-height: 180px;
  overflow: auto;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.35);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 11px;
  line-height: 1.45;
  color: rgba(255, 230, 200, 0.92);
  white-space: pre-wrap;
  word-break: break-word;
}

[dir="rtl"] .topbar,
[dir="rtl"] .main {
  direction: rtl;
}

/* Monthly calendar (dashboard) */
.monthlyCalendarCard .sectionTitle {
  margin-bottom: 10px;
}

.monthlyCalendarToolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.calendarMonthTitle {
  margin: 0;
  flex: 1;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 0;
}

.calendarMonthTitleGreg {
  display: block;
  line-height: 1.25;
}

.calendarMonthTitleHeb {
  display: block;
  font-size: 0.82rem;
  font-weight: 550;
  letter-spacing: 0.04em;
  color: var(--muted);
  line-height: 1.3;
  max-width: 100%;
}

.calNavBtn {
  flex: 0 0 auto;
  min-width: 2.25rem;
  max-width: 2.75rem;
  padding-inline: 8px;
  padding-block: 6px;
  font-size: 1.1rem;
  line-height: 1;
}

.monthlyCalendarWeekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.monthlyCalendarWeekdays .calWeekday {
  text-align: center;
  padding: 4px 2px;
}

.monthlyCalendarGrid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-template-rows: repeat(6, minmax(72px, 1fr));
  gap: 4px;
}

.calCell {
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  min-height: 72px;
  padding: 0;
  overflow: hidden;
  transition: transform 140ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
}

.calCellInner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 2px;
  width: 100%;
  padding: 5px 4px;
  text-align: center;
  line-height: 1.2;
}

.calCell--selected {
  border-color: rgba(96, 165, 250, 0.55);
  background: rgba(96, 165, 250, 0.12);
  box-shadow: 0 0 0 1px rgba(96, 165, 250, 0.2);
}

.calCell--rich {
  cursor: pointer;
}

.calCell--rich:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.32);
}

.calCell--rich:active {
  transform: translateY(0px);
}
.calGreg {
  font-size: 14px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95);
}

/* Daily detail panel (dashboard) */
.dailyDetailBody {
  font-size: 13px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.88);
}

/*
 * Day-detail sections: base `.dailyDetailBlock` + optional BEM modifier for stable hooks / theming.
 * Emitted from `renderDailyDetailPanel()` in app.js — keep names in sync when adding sections.
 *   --hero      always shown (date header)
 *   --holidays  conditional (holiday chips)
 *   --locks     conditional (Shabbat / Yom Tov windows)
 *   --zmanim    detail level ≥ 2
 *   --tzadikim  detail level ≥ 3, only when yahrzeit labels exist
 */
.dailyDetailBlock {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.dailyDetailBlock:first-of-type {
  margin-top: 0;
}

.dailyDetailBlockTitle {
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.dailyDetailBlockTitleRow {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.dailyDetailBlockTitleRow .dailyDetailBlockTitle {
  margin-bottom: 0;
}

.dailyDetailLocBadge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(96, 165, 250, 0.14);
  border: 1px solid rgba(96, 165, 250, 0.28);
  white-space: nowrap;
}

.dailyDetailDates {
  font-weight: 650;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.92);
}

.dailyDetailHebrewLine {
  margin-top: 4px;
  font-size: 16px;
  letter-spacing: 0.02em;
}

.dailyDetailChipList {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.dailyDetailLockList {
  margin-top: 6px;
}

.dailyDetailChip {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(96, 165, 250, 0.15);
  border: 1px solid rgba(96, 165, 250, 0.28);
  color: rgba(255, 255, 255, 0.9);
}

.dailyDetailMuted {
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
}

.dailyDetailZmanimGrid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 12px;
  font-size: 12px;
  align-items: baseline;
}

.dailyDetailZmanimGrid dt {
  margin: 0;
  color: var(--muted);
  font-weight: 550;
}

.dailyDetailZmanimGrid dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
}

.dailyDetailLockList {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dailyDetailLockItem {
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 12px;
}

.dailyDetailLockReason {
  font-weight: 650;
  color: rgba(245, 158, 11, 0.95);
  margin-bottom: 4px;
}

.dailyDetailYahrList {
  margin: 0;
  padding-inline-start: 18px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 12px;
}

.dailyDetailYahrList li {
  margin-bottom: 4px;
}

.calHebrew {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calMarkers {
  font-size: 9px;
  font-weight: 600;
  color: rgba(96, 165, 250, 0.95);
  max-width: 100%;
  max-height: 2.6em;
  overflow: hidden;
  line-height: 1.25;
}

/* Intentionally no yahrzeit line in calendar cells (kept in daily detail panel only). */

.calCell--muted {
  border-color: transparent;
  background: transparent;
  pointer-events: none;
}

.calCell--today {
  border-color: rgba(96, 165, 250, 0.55);
  box-shadow: 0 0 0 1px rgba(96, 165, 250, 0.25);
}

.calCell--today .calGreg {
  color: var(--accent);
}

/** Hardware lock (MQTT overlay, location-adjusted) — Shabbat */
.calCell--lock-shabbat {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.35);
}

.calCell--today.calCell--lock-shabbat {
  background: linear-gradient(160deg, rgba(96, 165, 250, 0.1), rgba(245, 158, 11, 0.16));
}

/** Hardware lock — Yom Tov (non-Shabbat reason codes) */
.calCell--lock-yomtov {
  background: rgba(251, 113, 133, 0.1);
  border-color: rgba(251, 113, 133, 0.32);
}

.calCell--today.calCell--lock-yomtov {
  background: linear-gradient(160deg, rgba(96, 165, 250, 0.1), rgba(251, 113, 133, 0.14));
}

@media (max-width: 1080px) {
  .main {
    grid-template-columns: 1fr;
  }

  .blackboxLog {
    height: 30vh;
  }
}
