:root {
  --bg: #f0f4f7;
  --surface: #ffffff;
  --surface-soft: #f7f9fb;
  --surface-alpha: #ffffff;
  --surface-soft-alpha: #f7f9fb;
  --surface-raised: #ffffff;
  --surface-field: #ffffff;
  --surface-inset: #f7f9fb;
  --table-soft-alpha: #f0f4f7;
  --table-soft: #f0f4f7;
  --table-row: #ffffff;
  --table-row-alt: #f0f4f7;
  --table-head: #c7d4de;
  --text: #1d2733;
  --muted: #5d6b78;
  --line: #d6e0e8;
  --line-soft: #dae4ea;
  --brand-blue: #044795;
  --brand-blue-strong: #002e6d;
  --brand-blue-hover: #084998;
  --nav-bg: #044795;
  --nav-hover: #084998;
  --button-bg: #044795;
  --button-hover: #084998;
  --brand-gold: #dba900;
  --ledger-line: #dba900;
  --ledger-line-soft: rgba(219, 169, 0, 0.18);
  --accent-warm: #db5000;
  --danger: #8b0000;
  --focus: rgba(4, 71, 149, 0.18);
  --shadow-soft: rgba(29, 39, 51, 0.12);
  --shadow-elevated: rgba(29, 39, 51, 0.18);
  --glass-blur: blur(0px);
  --radius-compact: 6px;
  --radius-system: 8px;
  --radius-pill: 999px;
  --notification-bell-size: 42px;
  --notification-bell-gap: 24px;
}

html.theme-light,
body.theme-light {
  color-scheme: light;
}

html.theme-dark,
body.theme-dark {
  color-scheme: dark;
  --bg: #070a0f;
  --surface: rgba(13, 18, 25, 0.96);
  --surface-soft: rgba(18, 24, 33, 0.78);
  --surface-alpha: rgba(13, 18, 25, 0.88);
  --surface-soft-alpha: rgba(18, 24, 33, 0.7);
  --surface-raised: rgba(20, 27, 36, 0.94);
  --surface-field: rgba(7, 11, 16, 0.92);
  --surface-inset: rgba(9, 13, 19, 0.96);
  --table-soft: rgba(20, 27, 36, 0.74);
  --table-soft-alpha: rgba(20, 27, 36, 0.66);
  --table-row: rgba(11, 16, 23, 0.96);
  --table-row-alt: rgba(15, 21, 30, 0.96);
  --table-head: rgba(27, 36, 48, 0.98);
  --text: #eef3f8;
  --muted: #b0bcc8;
  --line: rgba(151, 170, 193, 0.28);
  --line-soft: rgba(151, 170, 193, 0.16);
  --brand-blue: #92b7db;
  --brand-blue-strong: #d9e5ef;
  --brand-blue-hover: #b1cbe3;
  --nav-bg: rgba(10, 28, 45, 0.78);
  --nav-hover: rgba(49, 77, 108, 0.7);
  --button-bg: #2f5d86;
  --button-hover: #3d719e;
  --brand-gold: #cdb36d;
  --ledger-line: rgba(205, 179, 109, 0.58);
  --ledger-line-soft: rgba(205, 179, 109, 0.18);
  --accent-warm: #bd7652;
  --danger: #e09898;
  --focus: rgba(134, 168, 201, 0.24);
  --shadow-soft: rgba(0, 0, 0, 0.28);
  --shadow-elevated: rgba(0, 0, 0, 0.44);
  --glass-blur: blur(10px);
}

@media (prefers-reduced-transparency: reduce) {
  html.theme-dark,
  body.theme-dark {
    --surface: #0d1219;
    --surface-soft: #121821;
    --surface-alpha: #0d1219;
    --surface-soft-alpha: #121821;
    --surface-raised: #141b24;
    --surface-field: #070b10;
    --surface-inset: #090d13;
    --table-soft: #141b24;
    --table-soft-alpha: #141b24;
    --table-row: #0b1017;
    --table-row-alt: #0f151e;
    --table-head: #1b2430;
    --nav-bg: #0a1c2d;
    --nav-hover: #314d6c;
    --glass-blur: blur(0px);
  }

  .site-header,
  .current-user-menu-panel,
  .nav-group-panel,
  .hero,
  .panel,
  .search-select-list,
  .notification-popover {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .initial-session-fields,
  .calendar-event {
    animation: none;
    transition: none;
  }
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "PT Sans", "Arial", "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--text);
}

body.theme-dark {
  background: linear-gradient(180deg, #06090d 0%, #0a0f16 46%, #070a0f 100%);
}

a {
  color: var(--brand-blue);
}

.shell {
  width: min(1920px, calc(100vw - 18px));
  margin: 0 auto;
  padding: 0 0 28px;
}

.site-header {
  position: relative;
  z-index: 300;
  margin-bottom: 14px;
  background: var(--surface);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-left: 1px solid var(--line);
  border-radius: var(--radius-system);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.topbar {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 12px;
  border-radius: var(--radius-system);
  background: var(--nav-bg);
}

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-height: 74px;
  padding: 12px 24px;
}

.header-status {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
  margin-left: auto;
  padding-right: calc(var(--notification-bell-size) + 12px);
}

.current-user-card {
  min-width: 0;
  max-width: 620px;
  display: grid;
  grid-template-columns: minmax(0, auto) auto;
  align-items: center;
  gap: 14px;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
}

.current-user-photo-link {
  display: inline-flex;
  border-radius: var(--radius-system);
  color: inherit;
  text-decoration: none;
}

.current-user-media {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 5px;
}

.current-user-menu {
  position: relative;
}

.current-user-photo-trigger {
  position: relative;
  display: inline-flex;
  border-radius: var(--radius-system);
  cursor: pointer;
  list-style: none;
}

.current-user-photo-trigger::-webkit-details-marker {
  display: none;
}

.current-user-menu[open] .current-user-photo-trigger {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.current-user-photo,
.user-photo-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: var(--radius-system);
  background: var(--surface-soft);
  color: var(--brand-blue-strong);
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  object-fit: cover;
}

.current-user {
  min-width: 0;
  display: grid;
  gap: 5px;
  text-align: right;
}

.current-user-meta {
  min-width: 0;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.2;
  white-space: nowrap;
}

.current-user-meta span {
  min-width: 0;
}

.current-user-name-row {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.current-user-name {
  min-width: 0;
  color: var(--brand-blue-strong);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.current-user-name:hover {
  color: var(--brand-blue);
  text-decoration: underline;
}

.current-user-logout {
  margin: 0;
}

.current-user-menu-panel {
  position: absolute;
  z-index: 100;
  top: calc(100% + 8px);
  right: 0;
  width: min(280px, calc(100vw - 32px));
  display: grid;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: var(--radius-system);
  padding: 6px;
  background: var(--surface);
  box-shadow: 0 12px 28px var(--shadow-soft);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.current-user-menu:not([open]) .current-user-menu-panel {
  display: none;
}

.current-user-menu-item {
  width: 100%;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  border: 0;
  border-radius: var(--radius-compact);
  padding: 8px 10px;
  background: transparent;
  color: var(--brand-blue);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  text-align: left;
  text-decoration: none;
}

.current-user-menu-item:hover,
.current-user-menu-item:focus-visible {
  background: var(--table-soft);
  color: var(--brand-blue-hover);
  outline: none;
}

.current-user-menu-button {
  text-transform: lowercase;
}

.current-user-menu-separator {
  height: 1px;
  margin: 4px 2px;
  background: var(--line);
}

.brand {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  max-width: 780px;
  color: var(--brand-blue-strong);
  text-decoration: none;
}

.brand-mark {
  width: 46px;
  height: 54px;
  object-fit: contain;
}

.brand-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.brand-kicker {
  color: var(--brand-gold);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
}

.brand-title {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--brand-blue);
  font-size: 21px;
  font-weight: 700;
  line-height: 1.05;
  text-transform: uppercase;
}

.brand-title-mark {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  object-fit: contain;
}

.brand-title-text {
  min-width: 0;
  overflow-wrap: anywhere;
}

.global-search {
  min-width: min(100%, 260px);
  max-width: 620px;
  flex: 1 1 360px;
  display: grid;
  gap: 6px;
}

.global-search-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
}

.global-search-control {
  min-height: 42px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-system);
  background: var(--surface-field);
}

.global-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  padding: 0 12px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  outline: none;
}

.global-search input::placeholder {
  color: var(--muted);
  opacity: 0.78;
}

.global-search-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-left: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--brand-blue);
  cursor: pointer;
}

.global-search-submit:hover,
.global-search-submit:focus-visible {
  background: var(--table-soft);
  color: var(--brand-blue-strong);
  outline: none;
}

.global-search-submit:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: -3px;
}

.global-search-icon {
  width: 18px;
  height: 18px;
  color: currentColor;
}

.nav-search-slot {
  min-width: 0;
  flex: 0 1 300px;
  display: flex;
  align-items: center;
  margin-left: auto;
  padding: 4px 0 4px 8px;
}

.nav-search-slot:empty {
  display: none;
}

.nav-search-slot .global-search {
  width: 100%;
  min-width: 0;
  max-width: none;
  flex: 1 1 auto;
  gap: 0;
}

.nav-search-slot .global-search-control {
  min-height: 34px;
  grid-template-columns: minmax(0, 1fr) 34px;
  border-radius: var(--radius-compact);
}

.nav-search-slot .global-search input {
  padding: 0 10px;
  font-size: 13px;
}

.nav {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
}

.nav-link,
.nav-group > summary {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-compact);
  color: #ffffff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
}

.nav-link.active,
.nav-link:hover,
.nav-group.active > summary,
.nav-group > summary:hover,
.nav-group[open] > summary {
  background: var(--nav-hover);
  color: #ffffff;
}

.nav-group {
  position: relative;
}

.nav-group > summary {
  list-style: none;
}

.nav-link > span,
.nav-group > summary > span {
  min-width: 0;
}

.nav-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  color: currentColor;
}

.nav-group > summary::-webkit-details-marker {
  display: none;
}

.nav-group > summary::after {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
}

.nav-group[open] > summary::after {
  transform: rotate(225deg) translateY(-1px);
}

.nav-group-panel {
  position: absolute;
  z-index: 50;
  top: 100%;
  left: 0;
  min-width: 220px;
  display: grid;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: var(--radius-system);
  background: var(--surface);
  box-shadow: 0 12px 28px var(--shadow-soft);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  padding: 6px;
}

.nav-group:not([open]) .nav-group-panel {
  display: none;
}

.nav-group-panel .nav-link {
  min-height: 34px;
  border-left: 0;
  border-radius: var(--radius-compact);
  padding: 8px 10px;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  justify-content: flex-start;
  text-transform: none;
}

.nav-group-panel .nav-icon {
  color: var(--brand-blue);
}

.nav-group-panel .nav-link.active,
.nav-group-panel .nav-link:hover {
  background: var(--table-soft);
  color: var(--brand-blue-strong);
}

.nav-form {
  display: inline-flex;
  margin: 0;
}

.nav-button {
  border-top: 0;
  border-right: 0;
  border-bottom: 0;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
}

.nav-user-name {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.hero,
.panel {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius-system);
  padding: 20px 22px;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.hero {
  border-top: 4px solid var(--brand-blue);
}

.panel {
  margin-top: 12px;
}

.panel.has-open-search-select,
.hero.has-open-search-select {
  position: relative;
  z-index: 120;
  overflow: visible;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--brand-gold);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  color: var(--text);
  letter-spacing: 0;
}

h1 {
  max-width: 780px;
  font-size: 34px;
  line-height: 1.15;
}

h2 {
  font-size: 22px;
  line-height: 1.25;
}

.lead {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.42;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 5px 10px;
  border: 1px solid var(--button-bg);
  border-radius: var(--radius-system);
  background: var(--button-bg);
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.button.secondary {
  background: var(--surface);
  color: var(--brand-blue);
}

.button.danger {
  border-color: var(--danger);
  background: var(--surface);
  color: var(--danger);
}

.button:hover {
  border-color: var(--button-hover);
  background: var(--button-hover);
  color: #ffffff;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.button.secondary:hover {
  background: var(--table-soft);
  color: var(--brand-blue-hover);
}

.button.danger:hover {
  border-color: var(--danger);
  background: #f7e8e8;
  color: var(--danger);
}

.theme-dark .hero {
  border-top: 1px solid var(--line);
}

.theme-dark .eyebrow,
.theme-dark .brand-kicker {
  color: color-mix(in srgb, var(--brand-gold), var(--muted) 42%);
}

.theme-dark .site-header {
  overflow: visible;
  border-color: var(--line-soft);
  background: linear-gradient(180deg, rgba(13, 18, 25, 0.98) 0%, rgba(10, 15, 22, 0.96) 100%);
}

.theme-dark .masthead {
  border-bottom: 1px solid var(--line-soft);
}

.theme-dark .topbar {
  border-top: 1px solid var(--ledger-line-soft);
  border-radius: 0 0 var(--radius-system) var(--radius-system);
  background: rgba(8, 12, 18, 0.72);
}

.theme-dark .global-search-label {
  color: color-mix(in srgb, var(--brand-gold), var(--muted) 48%);
}

.theme-dark .global-search-control {
  border-color: var(--ledger-line-soft);
  background: var(--surface-field);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.theme-dark .global-search-submit {
  border-left-color: var(--line-soft);
  background: color-mix(in srgb, var(--surface-soft), var(--brand-blue) 8%);
  color: var(--brand-blue-strong);
}

.theme-dark .global-search-submit:hover,
.theme-dark .global-search-submit:focus-visible {
  background: color-mix(in srgb, var(--button-bg), var(--surface-soft) 48%);
  color: #ffffff;
}

.theme-dark .nav-link,
.theme-dark .nav-group > summary {
  border-left: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  color: var(--muted);
}

.theme-dark .nav-link.active,
.theme-dark .nav-link:hover,
.theme-dark .nav-group.active > summary,
.theme-dark .nav-group > summary:hover,
.theme-dark .nav-group[open] > summary {
  border-bottom-color: var(--ledger-line);
  background: rgba(146, 183, 219, 0.12);
  color: var(--brand-blue-strong);
}

.theme-dark .nav-group-panel .nav-link {
  border-bottom: 0;
  border-radius: var(--radius-compact);
}

.theme-dark .site-header,
.theme-dark .hero,
.theme-dark .panel,
.theme-dark .nav-group-panel,
.theme-dark .current-user-menu-panel,
.theme-dark .notification-popover {
  border-color: var(--line-soft);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.theme-dark .hero,
.theme-dark .section-heading {
  border-top: 2px solid var(--ledger-line);
  border-left-width: 1px;
  border-left-color: var(--line-soft);
  background: var(--surface);
}

.theme-dark .panel {
  background: var(--surface);
}

.theme-dark .filter-panel,
.theme-dark .analytics-facts-panel,
.theme-dark .table-panel,
.theme-dark .settings-panel {
  background: var(--surface-inset);
}

.theme-dark .filter-panel {
  border-top: 2px solid var(--ledger-line-soft);
}

.theme-dark .table-panel {
  border-top: 2px solid var(--ledger-line);
}

.theme-dark .button {
  border-color: color-mix(in srgb, var(--button-bg), var(--line) 25%);
  background: color-mix(in srgb, var(--button-bg), transparent 14%);
}

.theme-dark .button.secondary {
  border-color: var(--line);
  background: color-mix(in srgb, var(--surface-soft), transparent 22%);
  color: var(--brand-blue-strong);
}

.theme-dark .button.secondary:hover {
  border-color: color-mix(in srgb, var(--brand-blue), var(--line) 35%);
  background: color-mix(in srgb, var(--brand-blue), var(--surface-soft) 86%);
  color: var(--brand-blue-strong);
}

.theme-dark .button.danger:hover {
  background: rgba(255, 143, 143, 0.12);
}

.button.header-logout-button,
.button.header-logout-button:hover {
  min-height: auto;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--brand-blue);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  text-transform: lowercase;
}

.button.header-logout-button:hover {
  color: var(--brand-blue-hover);
  text-decoration: underline;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.section-actions,
.report-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.filter-actions .report-actions {
  display: contents;
}

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin: 12px 0 0;
}

.home-facts {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.home-fact-wide {
  grid-column: span 2;
}

.facts div {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-system);
  padding: 10px 12px;
  background: var(--surface-soft);
}

.theme-dark .facts div,
.theme-dark .profile-photo-frame,
.theme-dark .event-detail-grid div,
.theme-dark .event-history-item,
.theme-dark .event-history-empty,
.theme-dark .timeline-item,
.theme-dark .calendar-cell,
.theme-dark .empty-panel,
.theme-dark .readonly-field,
.theme-dark .checkbox-field,
.theme-dark .message-detail-facts div,
.theme-dark .message-detail-body-block,
.theme-dark .messages-detail-section,
.theme-dark .incoming-message-note-shell,
.theme-dark .incoming-message-event-shell,
.theme-dark .incoming-message-note-body,
.theme-dark .incoming-message-event-intro,
.theme-dark .incoming-message-event-facts div,
.theme-dark .message-reply-reference,
.theme-dark .message-forward-picker.is-empty,
.theme-dark .message-forward-recipient-list,
.theme-dark .message-forward-empty,
.theme-dark .message-forward-recipient,
.theme-dark .message-forward-selected-chip,
.theme-dark .message-thread-item,
.theme-dark .message-thread-empty {
  border-color: var(--line);
  background: var(--surface-raised);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

dt {
  color: var(--muted);
  font-size: 13px;
}

dd {
  margin: 3px 0 0;
  color: var(--brand-blue-strong);
  font-size: 17px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.profile-card {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  align-items: start;
  gap: 22px;
}

.profile-photo-frame {
  width: 180px;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-system);
  background: var(--surface-soft);
}

.profile-photo {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  object-fit: cover;
}

.profile-photo.user-photo-placeholder {
  font-size: 42px;
}

.profile-summary {
  min-width: 0;
}

.profile-summary h2 {
  color: var(--brand-blue-strong);
  font-size: 28px;
  line-height: 1.18;
}

.profile-facts {
  grid-template-columns: repeat(2, minmax(180px, 1fr));
}

.profile-form .field,
.profile-form .checkbox-field {
  min-width: 0;
}

.profile-form .field-wide,
.profile-form .checkbox-field {
  grid-column: 1 / -1;
}

.roadmap {
  margin: 16px 0 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.7;
}

.link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.link-grid a {
  min-height: 40px;
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-system);
  padding: 9px 12px;
  background: var(--surface-soft);
  color: var(--brand-blue);
  font-weight: 700;
  text-decoration: none;
}

.link-grid a:hover {
  border-color: var(--brand-blue);
  background: var(--table-soft);
}

.system-map {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.system-map-card {
  --map-icon-color: var(--brand-blue);
  --map-icon-accent: var(--brand-gold);
  min-width: 0;
  min-height: 92px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--map-icon-color);
  border-radius: var(--radius-system);
  padding: 13px 14px 13px 12px;
  background: linear-gradient(180deg, #ffffff 0%, var(--surface-soft) 100%);
  color: var(--brand-blue);
  text-decoration: none;
}

.theme-dark .system-map-card {
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-soft) 100%);
}

.system-map-card:hover {
  border-color: var(--map-icon-color);
  background: var(--table-soft);
}

.system-map-card-gold {
  --map-icon-color: var(--brand-gold);
  --map-icon-accent: var(--brand-blue-strong);
}

.system-map-card-gold:hover {
  border-color: var(--brand-gold);
}

.system-map-card-venues,
.system-map-card-calendar,
.system-map-card-users {
  --map-icon-color: var(--brand-blue-hover);
}

.system-map-card-events,
.system-map-card-notifications,
.system-map-card-audit {
  --map-icon-color: var(--brand-blue-strong);
  --map-icon-accent: #e8c77a;
}

.system-map-card-analytics,
.system-map-card-messages {
  --map-icon-color: #075c78;
  --map-icon-accent: var(--brand-gold);
}

.system-map-card-requests,
.system-map-card-access {
  --map-icon-color: var(--brand-gold);
  --map-icon-accent: var(--brand-blue-strong);
}

.system-map-icon-shell {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
}

.system-map-icon {
  width: 36px;
  height: 36px;
  display: block;
  color: var(--map-icon-color);
}

.system-map-card:hover .system-map-icon {
  color: var(--map-icon-accent);
}

.system-map-copy {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.system-map-copy strong {
  color: var(--brand-blue-strong);
  font-size: 16px;
  line-height: 1.2;
}

.system-map-copy small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.32;
}

.system-map-copy em {
  color: var(--map-icon-color);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
}

.theme-dark .system-map-card,
.theme-dark .system-map-card-gold,
.theme-dark .system-map-card-venues,
.theme-dark .system-map-card-calendar,
.theme-dark .system-map-card-users,
.theme-dark .system-map-card-events,
.theme-dark .system-map-card-notifications,
.theme-dark .system-map-card-audit,
.theme-dark .system-map-card-analytics,
.theme-dark .system-map-card-messages,
.theme-dark .system-map-card-requests,
.theme-dark .system-map-card-access {
  --map-icon-color: color-mix(in srgb, var(--brand-blue), var(--muted) 30%);
  --map-icon-accent: var(--brand-blue-strong);
  border-left-color: color-mix(in srgb, var(--map-icon-color), var(--line) 58%);
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-soft) 100%);
}

.theme-dark .system-map-card:hover {
  border-color: color-mix(in srgb, var(--map-icon-color), var(--line) 18%);
  background: var(--table-soft);
}

.theme-dark .system-map-icon {
  opacity: 0.82;
}

.theme-dark .system-map-copy em {
  color: var(--muted);
}

.home-dashboard-head {
  align-items: center;
}

.home-dashboard-actions {
  justify-content: flex-end;
}

.home-filter-panel {
  padding: 14px 16px;
}

.home-filter-grid {
  grid-template-columns: minmax(210px, 1fr) minmax(230px, 1fr) auto;
  align-items: end;
}

.home-filter-grid .filter-actions {
  grid-column: auto;
  align-items: center;
  padding-top: 0;
  border-top: 0;
}

.home-core-panel {
  padding: 14px 16px;
}

.home-dashboard-primary-stack {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.home-dashboard-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.home-dashboard-primary-stack .panel,
.home-dashboard-summary-grid .panel {
  margin-top: 0;
}

.home-new-events-panel .table-panel-heading,
.home-upcoming-panel .table-panel-heading {
  min-width: 0;
  padding-bottom: 14px;
}

.home-new-events-scroll {
  max-height: min(56vh, 520px);
  overflow: auto;
  border-top: 1px solid var(--line-soft);
}

.home-new-events-scroll thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface);
  box-shadow: 0 1px 0 var(--line-soft);
}

.theme-dark .home-new-events-scroll thead th {
  background: var(--surface-raised);
}

.home-new-events-panel table,
.home-upcoming-panel table,
.home-status-panel table,
.home-institutions-panel table {
  min-width: 0;
}

.home-new-events-panel td:first-child,
.home-upcoming-panel td:first-child,
.home-institutions-panel td:first-child {
  min-width: 280px;
}

.home-status-panel h2,
.home-institutions-panel h2 {
  padding: 14px 16px;
}

.table-panel {
  padding: 0;
  overflow-x: auto;
}

.table-panel > h2 {
  margin: 0;
  border-bottom: 1px solid var(--line-soft);
  padding: 14px 18px 10px;
  color: var(--brand-blue-strong);
  font-size: 20px;
  line-height: 1.2;
}

.theme-dark .table-panel > h2 {
  background: var(--surface-raised);
}

.table-panel-heading {
  min-width: 720px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 18px 0;
}

.table-panel-heading h2 {
  margin: 0 0 4px;
  color: var(--brand-blue-strong);
  font-size: 18px;
}

.table-panel-heading p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.messages-history-more {
  min-width: 980px;
  border-top: 1px solid var(--line-soft);
}

.messages-history-more > summary {
  cursor: pointer;
  padding: 13px 18px;
  color: var(--brand-blue-strong);
  font-weight: 700;
}

.messages-history-more > summary:hover {
  background: var(--surface-raised);
}

.messages-history-more table {
  border-top: 1px solid var(--line-soft);
}

.table-scroll-shell {
  position: relative;
  margin-top: 12px;
}

.table-scroll-shell > .panel {
  margin-top: 0;
}

.table-scroll-shell .table-panel,
.table-scroll-shell .calendar-panel {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.table-scroll-shell .table-panel::-webkit-scrollbar,
.table-scroll-shell .calendar-panel::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.table-top-scroll {
  display: none;
  position: sticky;
  top: 0;
  z-index: 40;
  height: 18px;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: var(--radius-system) var(--radius-system) 0 0;
  background: var(--surface);
  scrollbar-gutter: stable both-edges;
  scrollbar-width: thin;
  scrollbar-color: var(--brand-blue) var(--table-soft);
}

.table-top-scroll-inner {
  height: 1px;
}

.table-sticky-head {
  position: sticky;
  top: 0;
  z-index: 39;
  height: 0;
  overflow: visible;
  pointer-events: none;
  visibility: hidden;
}

.table-scroll-shell.is-top-scrollable .table-sticky-head {
  top: 18px;
}

.table-sticky-head.is-visible {
  visibility: visible;
}

.table-sticky-head-inner {
  width: 100%;
  overflow: hidden;
  border-right: 1px solid var(--line);
  border-left: 1px solid var(--line);
  background: var(--table-head);
  box-shadow: 0 8px 18px var(--shadow-soft);
}

.table-sticky-head table {
  margin: 0;
  transform-origin: 0 0;
  will-change: transform;
}

.table-sticky-head th {
  background: var(--table-head);
}

.table-top-scroll::-webkit-scrollbar {
  height: 12px;
  background: transparent;
}

.table-top-scroll::-webkit-scrollbar-track {
  border-radius: var(--radius-pill);
  background: var(--table-soft);
}

.table-top-scroll::-webkit-scrollbar-thumb {
  min-width: 48px;
  border: 2px solid transparent;
  border-radius: var(--radius-pill);
  background: var(--brand-blue);
  background-clip: content-box;
}

.table-scroll-shell.is-top-scrollable .table-top-scroll {
  display: block;
}

table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
}

.compact-table {
  min-width: 420px;
}

.events-table {
  min-width: 1900px;
}

.events-registry-group-heading,
.events-registry-group-heading:nth-child(2n + 1) {
  background: var(--table-soft);
}

.events-registry-group-heading td {
  padding: 12px 16px;
}

.events-registry-group-heading h2 {
  margin: 0 0 4px;
  color: var(--brand-blue-strong);
  font-size: 18px;
  line-height: 1.25;
}

.events-registry-group-heading p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

thead {
  background: var(--table-head);
}

tbody tr {
  background: var(--table-row);
}

tbody tr:nth-child(2n + 1) {
  background: var(--table-row-alt);
}

th,
td {
  border-bottom: 1px solid var(--line-soft);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--brand-blue-strong);
  font-size: 13px;
  font-weight: 700;
}

.theme-dark thead {
  border-bottom: 1px solid var(--ledger-line-soft);
  background: var(--table-head);
}

.theme-dark th {
  color: color-mix(in srgb, var(--brand-blue-strong), #ffffff 10%);
}

.theme-dark td {
  border-bottom-color: var(--line-soft);
}

.theme-dark tbody tr:hover {
  background: color-mix(in srgb, var(--table-row-alt), var(--brand-blue) 9%);
}

td {
  font-size: 13px;
  line-height: 1.3;
}

td strong,
td small {
  display: block;
}

td strong {
  color: var(--text);
}

td a {
  color: var(--brand-blue);
  text-decoration: none;
}

td a:hover {
  text-decoration: underline;
}

td small {
  margin-top: 4px;
  color: var(--muted);
}

.table-panel td .inline-form {
  max-width: 300px;
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.table-panel td .inline-form select {
  flex: 1 1 180px;
  min-width: min(180px, 100%);
}

.table-panel td .inline-form .inline-check {
  flex: 1 1 100%;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  line-height: 1.25;
  color: var(--text);
}

.table-panel td .inline-form .inline-check input {
  flex: 0 0 auto;
}

.table-panel td .inline-form .button {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 5px 9px;
  white-space: nowrap;
}

.table-action {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius-system);
  padding: 5px 9px;
  background: var(--surface);
  color: var(--brand-blue);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.table-action:hover {
  border-color: var(--brand-blue);
  background: var(--table-soft);
  text-decoration: none;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.status {
  --status-color: var(--brand-blue);
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border: 1px solid color-mix(in srgb, var(--status-color), #ffffff 35%);
  border-radius: var(--radius-compact);
  padding: 3px 7px;
  background: color-mix(in srgb, var(--status-color), #ffffff 84%);
  color: var(--brand-blue-strong);
  font-weight: 700;
}

.theme-dark .status {
  border-color: color-mix(in srgb, var(--status-color), var(--line) 58%);
  border-left-width: 3px;
  border-left-color: color-mix(in srgb, var(--status-color), #ffffff 10%);
  background: color-mix(in srgb, var(--status-color), var(--surface-soft) 88%);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.event-deletion-badge {
  --status-color: #8b0000;
  margin-top: 4px;
}

.event-deletion-pending {
  --status-color: #d8a948;
}

.event-soft-deleted-title,
.event-soft-deleted-title a {
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-thickness: 2px;
}

.event-row-deletion-deleted td {
  background: color-mix(in srgb, var(--danger), var(--surface) 94%);
}

.event-row-deletion-pending td {
  background: color-mix(in srgb, #d8a948, var(--surface) 92%);
}

.empty-cell {
  color: var(--muted);
  text-align: center;
}

.empty-panel {
  border: 1px dashed var(--line);
  border-radius: var(--radius-system);
  padding: 18px;
  background: var(--surface-soft);
  color: var(--muted);
  line-height: 1.5;
}

.mode-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.mode-tabs a {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-system);
  padding: 6px 10px;
  background: var(--surface);
  color: var(--brand-blue);
  font-weight: 700;
  text-decoration: none;
}

.mode-tabs a.active,
.mode-tabs a:hover {
  border-color: var(--brand-blue);
  background: var(--brand-blue);
  color: #ffffff;
}

.theme-dark .mode-tabs a,
.theme-dark .table-action,
.theme-dark .dictionary-group-link,
.theme-dark .link-grid a {
  border-color: var(--line);
  background: var(--surface-raised);
  color: var(--brand-blue-strong);
}

.theme-dark .mode-tabs a.active,
.theme-dark .mode-tabs a:hover,
.theme-dark .table-action:hover,
.theme-dark .dictionary-group-link.active,
.theme-dark .dictionary-group-link:hover,
.theme-dark .link-grid a:hover {
  border-color: color-mix(in srgb, var(--brand-blue), var(--line) 32%);
  background: color-mix(in srgb, var(--brand-blue), var(--surface-soft) 86%);
  color: var(--brand-blue-strong);
}

.afisha-period-tabs {
  margin-bottom: 0;
}

.afisha-period-tabs a {
  border-color: var(--afisha-ghost-line);
  background: transparent;
  color: var(--afisha-ink);
}

.afisha-period-tabs a.active,
.afisha-period-tabs a:hover {
  border-color: var(--afisha-accent);
  background: var(--afisha-accent);
  color: #ffffff;
}

.filter-panel {
  padding: 14px;
}

.events-filter-form,
.calendar-filter-form,
.messages-history-filter-form,
.notifications-filter-form {
  display: grid;
  gap: 10px;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.filter-query-field {
  grid-column: span 2;
}

.filter-wide-field {
  grid-column: span 2;
}

.filter-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.mobile-filter-summary {
  display: none;
}

.events-advanced-filter-panel,
.calendar-advanced-filter-panel {
  min-width: 0;
}

.field-news-filter-panel {
  padding: 10px;
}

.field-news-filter-form {
  gap: 8px;
}

.field-news-quick-filter-grid {
  grid-template-columns: minmax(260px, 1fr);
}

.field-news-filter-panel .field {
  gap: 3px;
}

.field-news-filter-panel .field > span:not(.password-field-control),
.field-news-filter-panel .field > label {
  font-size: 12px;
  line-height: 1.2;
}

.field-news-filter-panel input,
.field-news-filter-panel select {
  min-height: 30px;
  padding: 5px 8px;
  font-size: 13px;
}

.field-news-period-actions {
  gap: 6px;
}

.field-news-period-actions .button {
  min-height: 28px;
  padding: 4px 8px;
  font-size: 12px;
}

.field-news-filter-panel .result-summary {
  font-size: 12px;
  line-height: 1.25;
}

.calendar-primary-filter-grid,
.calendar-advanced-filter-grid {
  margin-bottom: 0;
}

.messages-history-filter-panel,
.notifications-filter-panel {
  display: grid;
  gap: 10px;
}

.messages-history-filter-grid,
.notifications-filter-grid {
  align-items: end;
}

.theme-dark .filter-grid {
  gap: 12px 14px;
}

.theme-dark .filter-actions {
  border-top: 1px solid var(--line-soft);
  padding-top: 12px;
}

.system-search-panel {
  display: grid;
  gap: 10px;
}

.system-search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.system-search-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.system-search-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.system-search-summary span {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius-system);
  padding: 5px 9px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
}

.system-search-summary strong {
  color: var(--brand-blue-strong);
  font-size: 14px;
}

.system-search-section {
  min-width: 0;
  padding: 0;
  overflow: hidden;
}

.system-search-section h2 {
  margin: 0;
  border-bottom: 1px solid var(--line-soft);
  padding: 14px 16px 10px;
  color: var(--brand-blue-strong);
  font-size: 18px;
  line-height: 1.2;
}

.system-search-results {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.system-search-result {
  min-width: 0;
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 12px;
  border-bottom: 1px solid var(--line-soft);
  padding: 12px 14px;
}

.system-search-result:last-child {
  border-bottom: 0;
}

.system-search-result-kicker {
  color: var(--brand-gold);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
}

.system-search-result-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.system-search-result-title {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: baseline;
  color: var(--brand-blue-strong);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.25;
  text-decoration: none;
}

.system-search-result-title span:first-child {
  overflow-wrap: anywhere;
}

.system-search-result-title:hover {
  color: var(--brand-blue);
  text-decoration: underline;
}

.system-search-result-action {
  color: var(--brand-blue);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.system-search-result-copy small,
.system-search-result-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.system-search-empty {
  padding: 14px 16px 16px;
}

.theme-dark .system-search-section {
  border-top: 2px solid var(--ledger-line-soft);
  background: var(--surface-inset);
}

.theme-dark .system-search-summary span {
  border-color: var(--line-soft);
  background: var(--surface-raised);
}

.theme-dark .system-search-result:hover {
  background: color-mix(in srgb, var(--surface-raised), var(--brand-blue) 7%);
}

.dictionary-filter-grid {
  grid-template-columns: minmax(240px, 1fr) auto;
}

.result-summary {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.dictionary-workspace {
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.dictionary-groups {
  display: grid;
  gap: 6px;
}

.dictionary-group-link {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-system);
  padding: 9px 10px;
  background: var(--surface-soft);
  color: var(--brand-blue);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.dictionary-group-link span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.dictionary-group-link small {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.dictionary-group-link.active,
.dictionary-group-link:hover {
  border-color: var(--brand-blue);
  background: var(--table-soft);
  text-decoration: none;
}

.legal-document-layout {
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.legal-document-body {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-system);
  padding: 18px;
  background: var(--surface-soft);
  color: var(--text);
  font-size: 16px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.legal-document-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.legal-document-list li {
  min-width: 0;
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius-system);
  padding: 10px 12px;
  background: var(--surface-soft);
}

.legal-document-list strong {
  color: var(--brand-blue-strong);
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.legal-document-list span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.3;
}

.legal-consent-section {
  gap: 8px;
}

.legal-consent-field a {
  font-weight: 700;
  overflow-wrap: anywhere;
}

.legal-summary {
  display: grid;
  gap: 10px;
}

.theme-dark .legal-document-body,
.theme-dark .legal-document-list li {
  background: var(--surface-soft);
}

.dictionary-items {
  min-width: 0;
}

.dictionary-items-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.dictionary-items-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.dictionary-table-panel {
  margin-top: 0;
}

.dictionary-table {
  min-width: 780px;
}

.timeline-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline-item {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-system);
  padding: 9px 12px;
  background: var(--surface-soft);
}

.timeline-item time {
  color: var(--brand-blue-strong);
  font-weight: 700;
}

.timeline-item strong,
.timeline-item span {
  display: block;
}

.timeline-item div span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
}

.calendar-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px 16px;
  margin-bottom: 10px;
}

.calendar-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  margin-bottom: 0;
}

.calendar-toolbar strong {
  min-width: 150px;
  color: var(--brand-blue-strong);
  font-size: 17px;
  text-align: center;
  text-transform: uppercase;
}

.calendar-tab-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 6px 14px;
}

.calendar-tab-row .mode-tabs {
  margin-bottom: 0;
}

.calendar-filter-grid {
  margin: 0 0 12px;
}

.calendar-panel {
  overflow-x: auto;
}

.calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 4px 0 12px;
}

.calendar-legend-item {
  --status-color: var(--brand-blue);
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid color-mix(in srgb, var(--status-color), #ffffff 35%);
  border-left: 4px solid var(--status-color);
  border-radius: var(--radius-system);
  padding: 4px 8px;
  background: color-mix(in srgb, var(--status-color), #ffffff 88%);
  color: var(--brand-blue-strong);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.calendar-legend-item.active,
.calendar-legend-item:hover {
  border-color: var(--brand-blue);
  background: var(--table-soft);
}

.theme-dark .calendar-legend-item,
.theme-dark .calendar-event {
  border-color: var(--line);
  border-left-color: color-mix(in srgb, var(--status-color), #ffffff 8%);
  background: color-mix(in srgb, var(--status-color), var(--surface-raised) 90%);
}

.theme-dark .calendar-legend-item.active,
.theme-dark .calendar-legend-item:hover,
.theme-dark .calendar-event:hover {
  border-color: color-mix(in srgb, var(--brand-blue), var(--line) 30%);
  background: color-mix(in srgb, var(--brand-blue), var(--surface-soft) 90%);
}

.calendar-legend-empty {
  margin: 0 0 16px;
  color: var(--muted);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(140px, 1fr));
  gap: 6px;
  width: 100%;
  min-width: 980px;
}

.calendar-grid-week {
  grid-template-columns: repeat(7, minmax(150px, 1fr));
}

.calendar-grid-day {
  grid-template-columns: minmax(260px, 1fr);
  min-width: 0;
}

.calendar-weekday,
.calendar-cell {
  min-width: 0;
}

.calendar-weekday {
  border: 1px solid var(--line);
  border-radius: var(--radius-system);
  padding: 6px 8px;
  background: var(--table-head);
  color: var(--brand-blue-strong);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.calendar-cell {
  min-height: 118px;
  border: 1px solid var(--line);
  border-radius: var(--radius-system);
  padding: 6px;
  background: var(--surface);
}

.calendar-cell.muted-month {
  background: var(--surface-soft);
}

.calendar-cell header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 5px;
  color: var(--brand-blue-strong);
  font-size: 13px;
  font-weight: 700;
}

.calendar-cell header span {
  min-width: 24px;
  border-radius: var(--radius-compact);
  padding: 2px 6px;
  background: var(--table-soft);
  text-align: center;
}

.calendar-cell-add {
  display: inline-flex;
  margin-top: 6px;
  padding: 3px 6px;
  color: var(--muted);
  font-size: 12px;
  text-decoration: none;
}

.calendar-cell-add:hover {
  color: var(--brand-blue-strong);
}

.calendar-quick-create-panel {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-system);
  background: var(--surface-soft);
  overflow: clip;
}

.calendar-quick-create-panel > summary {
  display: flex;
  min-height: 52px;
  align-items: center;
  cursor: pointer;
  padding: 12px 16px;
  color: var(--brand-blue-strong);
}

.calendar-quick-create-panel > summary > span {
  display: grid;
  gap: 2px;
}

.calendar-quick-create-panel > summary small,
.calendar-quick-create-content > p {
  color: var(--muted);
}

.calendar-quick-create-content {
  border-top: 1px solid var(--line);
  padding: 16px;
  background: var(--surface);
}

.calendar-quick-create-content > p {
  margin: 0 0 14px;
}

.calendar-quick-create-form {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.calendar-cell.is-calendar-drop-target {
  border-color: var(--brand-blue);
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--brand-blue), transparent 55%);
  background: color-mix(in srgb, var(--brand-blue), var(--surface) 94%);
}

.calendar-event.is-calendar-dragging {
  opacity: .45;
}

.calendar-event-shell {
  display: grid;
  gap: 4px;
}

.calendar-move-button {
  justify-self: start;
  border: 0;
  padding: 2px 3px;
  background: transparent;
  color: var(--brand-blue-strong);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.calendar-move-button:hover,
.calendar-move-button:focus-visible {
  text-decoration: underline;
}

.calendar-event-long {
  border-left-width: 7px;
  padding-block: 3px;
}

.calendar-move-dialog {
  width: min(520px, calc(100vw - 24px));
  border: 0;
  border-radius: var(--radius-panel);
  padding: 0;
  background: transparent;
}

.calendar-move-dialog::backdrop {
  background: rgba(13, 29, 53, .55);
}

.calendar-move-dialog-card {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  padding: 22px;
  background: var(--surface);
  box-shadow: var(--shadow-panel);
}

.calendar-move-dialog-card h2,
.calendar-move-dialog-card p {
  margin: 0;
}

.calendar-move-dialog [hidden] {
  display: none !important;
}

.calendar-move-fields {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.recurrence-technical-settings {
  border: 1px solid var(--line);
  border-radius: var(--radius-system);
  padding: 12px;
}

.recurrence-technical-settings summary {
  cursor: pointer;
  color: var(--brand-blue-strong);
  font-weight: 700;
}

.calendar-event {
  --status-color: var(--brand-blue);
  display: grid;
  gap: 3px;
  margin-top: 5px;
  border: 1px solid color-mix(in srgb, var(--status-color), #ffffff 35%);
  border-left: 4px solid var(--status-color);
  border-radius: var(--radius-system);
  padding: 5px 7px;
  background: color-mix(in srgb, var(--status-color), #ffffff 88%);
  color: var(--text);
  text-decoration: none;
  overflow-wrap: anywhere;
}

.calendar-event:hover {
  border-color: var(--brand-blue);
  background: color-mix(in srgb, var(--status-color), #ffffff 78%);
}

.calendar-event strong,
.calendar-event span {
  min-width: 0;
}

.calendar-event strong {
  color: var(--text);
  font-size: 12px;
  line-height: 1.25;
}

.calendar-event span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}

.calendar-event .calendar-event-status {
  color: var(--brand-blue-strong);
  font-weight: 700;
}

.calendar-event-deletion-deleted {
  border-style: dashed;
  opacity: 0.82;
}

.calendar-event-deletion-deleted strong {
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-thickness: 2px;
}

.calendar-event-deletion-pending {
  border-style: dashed;
}

.calendar-event .calendar-event-deletion-label {
  color: var(--danger);
  font-weight: 800;
}

.afisha-public {
  --afisha-accent: var(--brand-blue);
  --afisha-accent-strong: var(--brand-blue-strong);
  --afisha-ink: var(--text);
  --afisha-copy: #465664;
  --afisha-muted: #647485;
  --afisha-line: var(--line);
  --afisha-ghost-line: #cbd8e3;
  --afisha-panel: #f4f8fc;
  --afisha-date-bg: #f8fbff;
  --afisha-surface: #ffffff;
  color: var(--afisha-ink);
}

.theme-dark .afisha-public {
  --afisha-accent: var(--brand-blue);
  --afisha-accent-strong: var(--brand-blue-strong);
  --afisha-ink: var(--text);
  --afisha-copy: var(--muted);
  --afisha-muted: color-mix(in srgb, var(--muted), var(--text) 8%);
  --afisha-line: var(--line);
  --afisha-ghost-line: var(--line);
  --afisha-panel: var(--surface-soft);
  --afisha-date-bg: var(--table-soft);
  --afisha-surface: var(--surface);
}

.public-home {
  display: grid;
  gap: 18px;
  margin-top: 12px;
}

.public-home-hero,
.public-home-principle,
.public-home-upcoming {
  border: 1px solid var(--line);
  border-radius: var(--radius-system);
  background: var(--surface);
}

.public-home-hero {
  display: grid;
  gap: 14px;
  padding: clamp(28px, 5vw, 64px);
  background:
    radial-gradient(circle at 88% 10%, color-mix(in srgb, var(--brand-blue) 18%, transparent), transparent 36%),
    var(--surface);
}

.public-home-kicker {
  margin: 0;
  color: var(--brand-blue);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.public-home-hero h1 {
  max-width: 760px;
  margin: 0;
  color: var(--text);
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.04;
}

.public-home-lead {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.45;
}

.public-home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}

.public-home-principle {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 22px;
  align-items: start;
  padding: 24px 28px;
}

.public-home-principle h2,
.public-home-upcoming h2 {
  margin: 6px 0 0;
  color: var(--text);
  font-size: 24px;
  line-height: 1.18;
}

.public-home-principle > p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}

.public-home-upcoming {
  padding: 24px 28px 28px;
}

.public-home-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.public-home-section-head > a {
  color: var(--brand-blue);
  font-weight: 800;
  text-decoration: none;
}

.public-home-section-head > a:hover {
  text-decoration: underline;
}

.public-home-events {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.public-home-event,
.public-home-empty {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-system);
  padding: 16px;
  background: var(--surface-soft);
}

.public-home-event {
  display: grid;
  align-content: start;
  gap: 8px;
}

.public-home-event p,
.public-home-event span,
.public-home-empty p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.public-home-event h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.24;
}

.public-home-event h3 a {
  color: var(--text);
  text-decoration: none;
}

.public-home-event h3 a:hover {
  color: var(--brand-blue);
}

.public-home-empty {
  grid-column: 1 / -1;
}

.public-home-empty strong {
  color: var(--text);
}

.afisha-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 560px);
  align-items: center;
  gap: 18px;
  margin-top: 12px;
  border: 1px solid var(--afisha-line);
  border-radius: var(--radius-system);
  padding: 18px 28px;
  background: var(--afisha-surface);
}

.afisha-hero h1 {
  color: var(--afisha-ink);
  font-size: 36px;
  line-height: 1;
  font-weight: 700;
}

.afisha-hero p,
.afisha-section-head p,
.afisha-empty p {
  max-width: 680px;
  margin: 8px 0 0;
  color: var(--afisha-copy);
  font-size: 15px;
  line-height: 1.36;
}

.afisha-hero-actions,
.afisha-event-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}

.afisha-month-panel {
  display: grid;
  gap: 8px;
  border: 1px solid var(--afisha-line);
  border-radius: var(--radius-system);
  padding: 10px;
  background: var(--afisha-panel);
}

.afisha-month-panel strong {
  display: block;
  color: var(--afisha-ink);
  font-size: 18px;
  line-height: 1.2;
}

.afisha-month-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.afisha-month-head .afisha-period-tabs {
  flex-wrap: nowrap;
  justify-content: flex-end;
}

.afisha-month-head .afisha-period-tabs a {
  min-height: 26px;
  padding: 4px 8px;
  font-size: 12px;
  line-height: 1.1;
  white-space: nowrap;
}

.month-panel-label {
  display: block;
  margin-bottom: 4px;
  color: var(--afisha-muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.afisha-month-panel p {
  margin: 0;
  color: var(--afisha-muted);
  line-height: 1.4;
}

.month-picker {
  display: grid;
  gap: 8px;
}

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

.month-year-title,
.month-year-value {
  font-size: 13px;
  font-weight: 700;
}

.month-year-controls {
  display: flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--afisha-ghost-line);
  border-radius: var(--radius-system);
  padding: 2px;
  background: var(--afisha-surface);
}

.month-chips {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
}

.month-chip {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--afisha-ghost-line);
  border-radius: var(--radius-system);
  background: var(--afisha-surface);
  color: var(--afisha-ink);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.month-year-arrow {
  width: 26px;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-compact);
  color: var(--afisha-accent);
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
}

.month-year-arrow:hover {
  background: var(--table-soft);
}

.month-year-value {
  min-width: 54px;
  color: var(--afisha-accent-strong);
  text-align: center;
}

.month-chip.is-active {
  border-color: var(--afisha-accent);
  background: var(--afisha-accent);
  color: #ffffff;
}

.month-input-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.afisha-program,
.afisha-event-section {
  border-right: 1px solid var(--afisha-line);
  border-bottom: 1px solid var(--afisha-line);
  border-left: 1px solid var(--afisha-line);
  padding: 18px 32px;
  background: var(--afisha-surface);
}

.afisha-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.afisha-section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.afisha-section-head h2,
.afisha-event-section h2 {
  color: var(--afisha-ink);
  font-size: 21px;
  line-height: 1.2;
}

.afisha-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  align-items: start;
  gap: 12px;
  margin-top: 0;
}

.afisha-card {
  min-width: 0;
  display: grid;
  grid-template-rows: auto 1fr;
  border: 1px solid var(--afisha-ghost-line);
  border-radius: var(--radius-system);
  background: transparent;
  overflow: hidden;
}

.afisha-card-poster-link {
  position: relative;
  display: block;
  color: inherit;
  text-decoration: none;
}

.afisha-poster {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 0;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border: 1px solid var(--afisha-ghost-line);
  border-radius: var(--radius-system);
  background: var(--afisha-surface);
}

.afisha-card .afisha-poster {
  aspect-ratio: 4 / 5;
}

.afisha-poster > img {
  width: 100%;
  height: 100%;
  min-height: 0;
  aspect-ratio: auto 2 / 3;
  display: block;
  object-fit: cover;
  background: transparent;
}

.afisha-poster-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  gap: 12px;
  padding: 26px;
  background: transparent;
  color: var(--afisha-copy);
  font-weight: 700;
  text-align: center;
}

.afisha-poster-fallback[hidden] {
  display: none !important;
}

.afisha-poster-fallback img {
  width: 72px;
  height: 72px;
  object-fit: contain;
}

.afisha-date-badge {
  position: absolute;
  top: 10px;
  left: 12px;
  z-index: 1;
  width: 44px;
  min-height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid var(--afisha-line);
  border-radius: var(--radius-system);
  padding: 7px 4px;
  background: var(--afisha-date-bg);
  color: var(--afisha-accent);
  text-align: center;
  text-transform: uppercase;
  box-shadow: 0 8px 22px rgba(4, 71, 149, 0.12);
}

.afisha-date-badge strong {
  display: block;
  font-size: 19px;
  line-height: 1;
}

.afisha-date-badge span {
  display: block;
  margin-top: 3px;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.1;
}

.afisha-card-body {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 14px;
}

.afisha-card-body h2 a {
  color: var(--afisha-ink);
  text-decoration: none;
}

.afisha-card-body h2 a:hover {
  color: var(--afisha-accent);
}

.afisha-card-body h2 {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  font-size: 17px;
  line-height: 1.2;
}

.afisha-card-meta,
.afisha-event-kicker {
  margin: 0;
  color: var(--afisha-accent);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
  text-transform: uppercase;
}

.afisha-card-place,
.afisha-card-synopsis {
  margin: 0;
  color: var(--afisha-copy);
  font-size: 14px;
  line-height: 1.38;
}

.afisha-card-synopsis {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.afisha-card-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 0;
}

.afisha-card-facts div {
  min-width: 0;
  border: 1px solid var(--afisha-ghost-line);
  border-radius: var(--radius-system);
  padding: 6px 8px;
  background: var(--afisha-panel);
}

.afisha-card-facts .is-wide {
  grid-column: 1 / -1;
}

.afisha-card-facts dt {
  margin: 0 0 4px;
  color: var(--afisha-muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.15;
  text-transform: uppercase;
}

.afisha-card-facts dd {
  margin: 0;
  color: var(--afisha-ink);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.afisha-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 4px 0 0;
}

.afisha-facts div {
  min-height: 78px;
  border-left: 3px solid var(--afisha-accent);
  padding: 14px 16px;
  background: var(--afisha-panel);
}

.afisha-facts dt {
  margin: 0 0 6px;
  color: var(--afisha-muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.afisha-facts dd {
  margin: 0;
  color: var(--afisha-ink);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.25;
}

.afisha-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.afisha-card-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid var(--afisha-ghost-line);
  border-radius: var(--radius-system);
  padding: 6px 10px;
  color: var(--afisha-ink);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.afisha-card-actions a:last-child {
  border-color: var(--afisha-accent);
  color: var(--afisha-accent);
}

.afisha-empty {
  grid-column: 1 / -1;
  border: 1px dashed var(--afisha-ghost-line);
  border-radius: var(--radius-system);
  padding: 32px;
  background: var(--afisha-panel);
}

.afisha-empty strong {
  color: var(--afisha-ink);
  font-size: 20px;
}

.afisha-event-hero {
  display: grid;
  grid-template-columns: minmax(260px, 410px) minmax(0, 1fr);
  align-items: start;
  gap: 42px;
  margin: 30px 58px;
  border: 1px solid var(--afisha-ghost-line);
  border-radius: var(--radius-system);
  padding: 24px;
  background: transparent;
}

.afisha-event-poster {
  min-height: 0;
  aspect-ratio: 2 / 3;
  border-color: var(--afisha-ghost-line);
  border-radius: var(--radius-system);
  background: transparent;
}

.afisha-event-poster > img {
  object-fit: contain;
}

.afisha-event-copy {
  min-width: 0;
  display: grid;
  gap: 20px;
}

.afisha-event-copy h1 {
  max-width: 900px;
  color: var(--afisha-ink);
  font-size: 46px;
  line-height: 1.04;
  font-weight: 700;
}

.afisha-event-section {
  display: grid;
  grid-template-columns: minmax(180px, 300px) minmax(0, 1fr);
  gap: 32px;
}

.afisha-event-details {
  display: block;
}

.afisha-event-section p {
  max-width: 880px;
  margin: 0;
  color: var(--afisha-copy);
  font-size: 17px;
  line-height: 1.58;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.event-form {
  align-items: start;
}

.form-section {
  min-width: 0;
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.form-section-wide {
  grid-column: 1 / -1;
}

.form-section h2 {
  color: var(--brand-blue-strong);
  font-size: 18px;
  line-height: 1.25;
}

.form-section-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.initial-session-section {
  margin-top: 4px;
  padding: 18px;
  border: 1px solid color-mix(in srgb, var(--brand-blue) 28%, var(--line));
  border-radius: var(--radius-system);
  background: color-mix(in srgb, var(--brand-blue) 4%, var(--surface));
}

.initial-session-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
}

.initial-session-heading p,
.event-session-subsection > p {
  margin: 4px 0 0;
  color: var(--muted);
}

.initial-session-heading .checkbox-field {
  flex: 0 1 430px;
}

.initial-session-fields {
  display: grid;
  gap: 18px;
  transition: opacity 160ms ease;
}

.initial-session-fields.is-disabled {
  opacity: 0.48;
}

.event-session-subsection {
  display: grid;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.event-session-subsection h3 {
  color: var(--brand-blue-strong);
  font-size: 16px;
}

.session-status-grid {
  align-items: start;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.session-status-grid > :nth-child(-n + 3) {
  grid-column: span 2;
}

.session-status-grid > :nth-child(4),
.session-status-grid > :nth-child(5) {
  grid-column: span 3;
}

.session-status-grid > .field-wide {
  grid-column: 1 / -1;
}

.event-status-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
}

.optional-form-details {
  border: 1px solid var(--line);
  border-radius: var(--radius-system);
  padding: 0;
  background: var(--surface-soft);
}

.optional-form-details > summary {
  padding: 12px 14px;
  color: var(--brand-blue-strong);
  font-weight: 700;
  cursor: pointer;
}

.optional-form-details[open] > summary {
  border-bottom: 1px solid var(--line);
}

.optional-form-details > .field {
  padding: 14px;
}

.optional-form-details > .quick-venue-fields {
  padding: 14px;
}

.session-attendance-facts {
  display: grid;
  gap: 3px;
}

.field {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.password-field-control {
  position: relative;
  min-width: 0;
  display: block;
  color: var(--text);
  font-weight: 400;
}

.password-field-control input {
  padding-right: 46px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 3px;
  transform: translateY(-50%);
  width: 34px;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--radius-compact);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.password-toggle:hover {
  background: var(--surface-soft);
  color: var(--brand-blue-strong);
}

.password-toggle:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 1px;
}

.password-toggle-icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.password-toggle::after {
  content: "";
  position: absolute;
  width: 2px;
  height: 22px;
  border-radius: var(--radius-pill);
  background: currentColor;
  opacity: 0;
  transform: rotate(45deg) scaleY(0.2);
  transition: opacity 0.12s ease, transform 0.12s ease;
}

.password-toggle.is-visible::after {
  opacity: 1;
  transform: rotate(45deg) scaleY(1);
}

.field-wide {
  grid-column: 1 / -1;
}

.quick-venue-box {
  min-width: 0;
  border: 1px dashed var(--brand-blue);
  border-radius: var(--radius-system);
  padding: 10px;
  background: var(--surface-soft);
}

.quick-venue-box summary {
  cursor: pointer;
  color: var(--brand-blue-strong);
  font-weight: 800;
}

.quick-venue-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.quick-venue-grid .field-wide {
  grid-column: 1 / -1;
}

.messages-compose-form {
  align-items: start;
}

.message-schedule-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.message-schedule-control {
  position: relative;
  min-width: 0;
}

.message-schedule-trigger {
  width: 100%;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-system);
  padding: 8px 10px;
  background: var(--surface-field);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  text-align: left;
}

.message-schedule-trigger span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-schedule-trigger::after {
  content: "";
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
}

.message-schedule-trigger[aria-expanded="true"]::after {
  transform: rotate(225deg) translateY(-1px);
}

.message-schedule-trigger:hover,
.message-schedule-trigger:focus-visible {
  border-color: color-mix(in srgb, var(--brand-blue), var(--line) 45%);
  outline: none;
}

.message-schedule-trigger:focus-visible {
  outline: 3px solid var(--focus);
}

.message-schedule-popover {
  position: absolute;
  z-index: 80;
  top: calc(100% + 6px);
  left: 0;
  width: min(340px, 92vw);
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-system);
  padding: 12px;
  background: var(--surface);
  box-shadow: 0 16px 34px var(--shadow-soft);
}

.message-schedule-popover[hidden] {
  display: none;
}

.message-schedule-time-popover {
  width: min(300px, 92vw);
}

.message-schedule-picker-head,
.message-schedule-picker-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.message-schedule-picker-head strong {
  color: var(--brand-blue-strong);
  font-size: 14px;
  text-transform: uppercase;
}

.message-schedule-picker-head button,
.message-schedule-picker-actions button {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius-compact);
  padding: 5px 8px;
  background: var(--surface-soft);
  color: var(--brand-blue-strong);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
}

.message-schedule-weekdays,
.message-schedule-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.message-schedule-weekdays span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
}

.message-schedule-day,
.message-schedule-time-option {
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: var(--radius-compact);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
}

.message-schedule-day:hover,
.message-schedule-time-option:hover {
  border-color: var(--line);
  background: var(--table-soft);
}

.message-schedule-day:focus-visible,
.message-schedule-time-option:focus-visible,
.message-schedule-picker-head button:focus-visible,
.message-schedule-picker-actions button:focus-visible {
  border-color: color-mix(in srgb, var(--brand-blue), var(--line) 20%);
  outline: 3px solid var(--focus);
  outline-offset: 1px;
}

.message-schedule-day.is-muted {
  color: var(--muted);
  opacity: 0.72;
}

.message-schedule-day.is-today {
  border-color: color-mix(in srgb, var(--brand-gold), var(--line) 42%);
}

.message-schedule-day.is-selected,
.message-schedule-time-option.is-selected {
  border-color: color-mix(in srgb, var(--brand-blue), var(--line) 22%);
  background: var(--button-bg);
  color: #ffffff;
}

.message-schedule-time-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}

.message-schedule-time-columns strong {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.message-schedule-time-list {
  max-height: 220px;
  display: grid;
  gap: 3px;
  overflow: auto;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-system);
  padding: 5px;
  background: var(--surface-soft);
}

.message-schedule-time-list::-webkit-scrollbar {
  width: 8px;
}

.message-schedule-time-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: color-mix(in srgb, var(--muted), transparent 48%);
}

.theme-dark .message-schedule-trigger,
.theme-dark .message-schedule-popover {
  border-color: var(--line);
  background: var(--surface-field);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035), 0 16px 34px rgba(0, 0, 0, 0.28);
}

.theme-dark .message-schedule-popover {
  background: #121922;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035), 0 18px 42px rgba(0, 0, 0, 0.46);
}

.theme-dark .message-schedule-picker-head button,
.theme-dark .message-schedule-picker-actions button,
.theme-dark .message-schedule-time-list {
  border-color: var(--line-soft);
  background: #090e15;
}

.theme-dark .message-schedule-day:hover,
.theme-dark .message-schedule-time-option:hover {
  background: color-mix(in srgb, var(--brand-blue), var(--surface-inset) 84%);
}

.message-event-preview {
  min-width: 0;
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  border: 1px solid color-mix(in srgb, var(--brand-blue), var(--line) 50%);
  border-left: 4px solid var(--brand-blue);
  border-radius: var(--radius-system);
  padding: 10px 12px;
  background: color-mix(in srgb, var(--brand-blue), var(--surface) 90%);
}

.theme-dark .message-event-preview {
  border-color: var(--line);
  border-left-color: color-mix(in srgb, var(--brand-blue), var(--line) 35%);
  background: var(--surface-soft);
}

.message-event-preview.is-empty {
  border-color: var(--line);
  border-left-color: var(--muted);
  background: var(--surface-soft);
}

.message-event-preview span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.message-event-preview strong {
  min-width: 0;
  color: var(--brand-blue-strong);
  font-size: 16px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.message-event-preview small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.message-event-preview dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px 12px;
  margin: 0;
}

.message-event-preview dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.message-event-preview dd {
  margin: 2px 0 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.message-event-preview .button {
  justify-self: start;
}

.message-detail-heading .lead {
  overflow-wrap: anywhere;
}

.message-detail-card,
.message-detail-event {
  display: grid;
  gap: 14px;
}

.message-detail-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.message-detail-card-head h2 {
  margin: 3px 0 0;
  color: var(--brand-blue-strong);
  font-size: 20px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.message-detail-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin: 0;
}

.message-detail-facts div {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 10px 12px;
  background: var(--surface-soft);
}

.message-detail-facts dd {
  font-size: 14px;
  line-height: 1.35;
}

.message-detail-body-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
  gap: 12px;
}

.message-detail-body-block {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 12px;
  background: var(--surface-soft);
}

.message-detail-body-block h3 {
  margin: 0 0 10px;
  color: var(--brand-blue-strong);
  font-size: 16px;
}

.message-detail-rich-text {
  display: grid;
  gap: 10px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.message-detail-rich-text p {
  margin: 0;
}

.message-detail-empty {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.message-detail-rule-list {
  margin: 0 0 10px;
  padding-left: 18px;
  color: var(--text);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.message-detail-rule-list:last-child {
  margin-bottom: 0;
}

.message-detail-event-body {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.messages-detail-card {
  display: grid;
  gap: 14px;
}

.messages-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.messages-detail-head-main {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.messages-detail-id {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.messages-detail-title {
  color: var(--brand-blue-strong);
  font-size: 24px;
  line-height: 1.18;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.messages-detail-chip-row,
.incoming-message-event-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.messages-detail-chip,
.incoming-message-event-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 10px;
  background: var(--surface-soft);
  color: var(--brand-blue-strong);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

.messages-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.85fr);
  gap: 12px;
}

.messages-detail-section,
.incoming-message-note-shell,
.incoming-message-event-shell {
  min-width: 0;
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 12px;
  background: var(--surface-soft);
}

.messages-detail-section-title {
  margin: 0;
  color: var(--brand-blue-strong);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.messages-detail-meta {
  display: grid;
  gap: 9px;
  margin: 0;
}

.messages-detail-meta dd {
  color: var(--text);
  font-size: 14px;
  line-height: 1.4;
  font-weight: 700;
}

.incoming-message-body-stack {
  display: grid;
  gap: 12px;
}

.incoming-message-note-shell {
  border-color: #e7bdc7;
  background: linear-gradient(180deg, #fff7f9 0%, #ffffff 100%);
}

.incoming-message-note-head,
.incoming-message-event-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.incoming-message-note-head {
  justify-content: flex-start;
}

.incoming-message-note-head-copy,
.incoming-message-event-head-main {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.incoming-message-note-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 5px 9px;
  background: #b6425d;
  color: #ffffff;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.incoming-message-note-kicker,
.incoming-message-event-kicker {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.incoming-message-note-title,
.incoming-message-event-title {
  color: var(--brand-blue-strong);
  font-size: 18px;
  line-height: 1.25;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.incoming-message-note-title {
  color: #7f1936;
}

.incoming-message-note-body,
.incoming-message-event-intro {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 12px;
  background: var(--surface);
}

.incoming-message-event-meta {
  color: var(--muted);
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.incoming-message-event-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
  margin: 0;
}

.incoming-message-event-facts div {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 10px;
  background: var(--surface);
}

.incoming-message-event-facts dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.incoming-message-event-facts dd {
  margin: 3px 0 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.35;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.message-detail-secondary {
  display: grid;
  gap: 12px;
}

.message-detail-secondary summary {
  cursor: pointer;
  color: var(--brand-blue-strong);
  font-size: 18px;
  font-weight: 800;
}

.message-detail-secondary-content {
  display: grid;
  gap: 12px;
}

.message-reply-panel,
.message-forward-panel,
.message-thread-panel {
  display: grid;
  gap: 14px;
}

.message-reply-head,
.message-forward-head,
.message-thread-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.message-reply-head h2,
.message-forward-head h2,
.message-thread-head h2 {
  margin: 0;
  color: var(--brand-blue-strong);
  font-size: 20px;
  line-height: 1.2;
}

.message-reply-reference {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 12px;
  background: var(--surface-soft);
}

.message-reply-reference-kicker {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.message-reply-reference dl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  margin: 0;
}

.message-reply-reference div {
  min-width: 0;
}

.message-reply-reference dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.message-reply-reference dd {
  margin: 3px 0 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.35;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.message-reply-reference small {
  color: var(--muted);
  font-weight: 700;
}

.message-reply-form {
  grid-template-columns: minmax(0, 1fr);
}

.message-forward-form {
  grid-template-columns: minmax(280px, 0.95fr) minmax(0, 1fr);
}

.message-forward-recipient-field {
  align-self: start;
}

.message-forward-picker {
  position: relative;
  min-width: 0;
  display: grid;
  gap: 8px;
}

.message-forward-picker.is-empty {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 10px;
  background: var(--surface-soft);
  color: var(--muted);
  font-weight: 700;
}

.message-forward-picker.is-empty p {
  margin: 0;
}

.message-forward-search-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.message-forward-search {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 10px 12px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 700;
}

.message-forward-search:focus {
  outline: 2px solid rgba(15, 79, 154, 0.22);
  border-color: var(--brand-blue);
}

.message-forward-recipient-list {
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 8px;
  background: var(--surface);
}

.message-forward-picker.is-enhanced .message-forward-recipient-list {
  position: absolute;
  z-index: 30;
  top: 66px;
  right: 0;
  left: 0;
  display: none;
  max-height: 320px;
  box-shadow: var(--shadow);
}

.message-forward-picker.is-enhanced.is-open .message-forward-recipient-list {
  display: grid;
}

.message-forward-empty {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 10px 12px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.message-forward-picker.is-enhanced .message-forward-empty {
  position: absolute;
  z-index: 31;
  top: 66px;
  right: 0;
  left: 0;
}

.message-forward-recipient {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 10px;
  background: var(--surface-soft);
  cursor: pointer;
}

.message-forward-recipient:has(input:checked) {
  border-color: var(--brand-blue);
  background: var(--surface);
}

.message-forward-recipient[hidden] {
  display: none;
}

.message-forward-recipient input {
  width: 16px;
  height: 16px;
  margin-top: 2px;
}

.message-forward-recipient-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.message-forward-recipient-copy strong {
  color: var(--brand-blue-strong);
  font-size: 14px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.message-forward-recipient-copy small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.message-forward-selected {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 28px;
}

.message-forward-selected-empty {
  align-self: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.message-forward-selected-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 9px;
  background: var(--surface-soft);
  color: var(--brand-blue-strong);
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.message-forward-selected-chip span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-forward-selected-chip:hover {
  border-color: var(--brand-blue);
  background: var(--surface);
}

.message-thread-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.message-thread-item,
.message-thread-empty {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 12px;
  background: var(--surface-soft);
}

.message-thread-item.is-current {
  border-color: var(--brand-blue);
  background: var(--surface);
}

.message-thread-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.message-thread-item h3 {
  margin: 8px 0;
  color: var(--brand-blue-strong);
  font-size: 16px;
  line-height: 1.25;
}

.message-thread-body {
  color: var(--text);
}

.notification-action-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.field > span:not(.password-field-control),
.field > label {
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}

.readonly-field {
  min-width: 0;
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: var(--radius-system);
  padding: 9px;
  background: var(--surface-soft);
}

.readonly-field span {
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}

.readonly-field strong {
  color: var(--brand-blue-strong);
  font-size: 15px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.delivery-channel-card {
  min-width: 0;
  display: grid;
  gap: 6px;
  grid-column: 1 / -1;
  border: 1px solid color-mix(in srgb, var(--brand-blue), var(--line) 55%);
  border-left: 4px solid var(--brand-blue);
  border-radius: var(--radius-system);
  padding: 10px 12px;
  background: color-mix(in srgb, var(--brand-blue), var(--surface) 92%);
}

.theme-dark .delivery-channel-card {
  border-color: var(--line);
  border-left-color: color-mix(in srgb, var(--brand-blue), var(--line) 35%);
  background: var(--surface-soft);
}

.theme-dark .incoming-message-note-shell {
  border-color: color-mix(in srgb, #b96f86, var(--line) 58%);
}

.theme-dark .incoming-message-note-title {
  color: color-mix(in srgb, #d9a6b5, var(--text) 24%);
}

.delivery-channel-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
}

.delivery-channel-card strong {
  color: var(--brand-blue-strong);
  font-size: 15px;
  line-height: 1.25;
}

.delivery-channel-card small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.checkbox-field {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-system);
  padding: 9px 10px;
  background: var(--surface-soft);
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}

.checkbox-field input {
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 1px 0 0;
  accent-color: var(--brand-blue);
}

.checkbox-field small {
  grid-column: 2;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.35;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.compact-checkbox {
  padding: 8px;
}

.event-form .checkbox-grid {
  gap: 6px;
}

.event-form .compact-checkbox {
  min-height: 36px;
  padding: 7px 9px;
}

.checkbox-field.is-disabled {
  opacity: 0.58;
}

.checkbox-field.is-disabled span {
  color: var(--muted);
}

.muted {
  margin: 0;
  color: var(--muted);
}

input,
select,
textarea {
  width: 100%;
  min-height: 34px;
  border: 1px solid #c7c7c7;
  border-radius: var(--radius-system);
  padding: 7px 9px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}

.theme-dark input,
.theme-dark select,
.theme-dark textarea,
.theme-dark .message-forward-search {
  border-color: var(--line);
  background: var(--surface-field);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.theme-dark input:hover,
.theme-dark select:hover,
.theme-dark textarea:hover,
.theme-dark .message-forward-search:hover {
  border-color: color-mix(in srgb, var(--brand-blue), var(--line) 45%);
}

.global-search input,
.theme-dark .global-search input,
.global-search input:hover,
.theme-dark .global-search input:hover {
  min-height: 40px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

textarea {
  min-height: 86px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand-blue);
  outline: 3px solid var(--focus);
}

.search-select {
  position: relative;
  z-index: 1;
  min-width: 0;
  display: block;
}

.search-select.is-open {
  z-index: 121;
}

.search-select-input {
  padding-right: 38px;
  font-weight: 700;
  text-overflow: ellipsis;
}

.search-select-toggle {
  position: absolute;
  top: 1px;
  right: 1px;
  width: 34px;
  min-height: 32px;
  height: calc(100% - 2px);
  display: grid;
  place-items: center;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0 var(--radius-system) var(--radius-system) 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.search-select-toggle span {
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
}

.search-select.is-open .search-select-toggle span {
  transform: rotate(225deg) translateY(-1px);
}

.search-select-toggle:hover,
.search-select.is-open .search-select-toggle {
  color: var(--brand-blue);
}

.search-select-list {
  position: absolute;
  z-index: 122;
  top: calc(100% + 4px);
  right: 0;
  left: 0;
  display: none;
  max-height: min(320px, 52vh);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-system);
  padding: 6px;
  background: var(--surface);
  box-shadow: 0 12px 28px var(--shadow-soft);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.search-select.is-open .search-select-list {
  display: grid;
  gap: 2px;
}

.search-select-option {
  width: 100%;
  min-height: 34px;
  display: block;
  border: 0;
  border-radius: var(--radius-compact);
  padding: 8px 10px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  text-align: left;
  overflow-wrap: anywhere;
}

.search-select-option:hover,
.search-select-option.is-active {
  background: var(--table-soft);
  color: var(--brand-blue-strong);
}

.search-select-option.is-selected {
  background: color-mix(in srgb, var(--brand-blue), var(--surface) 88%);
  color: var(--brand-blue-strong);
}

.search-select-option:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.search-select-empty {
  border-radius: var(--radius-compact);
  padding: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

select.search-select-native {
  position: absolute;
  width: 1px;
  min-height: 1px;
  height: 1px;
  margin: 0;
  border: 0;
  padding: 0;
  opacity: 0;
  pointer-events: none;
}

.theme-dark .search-select-list {
  border-color: var(--line);
  background: color-mix(in srgb, var(--surface), transparent 4%);
}

.theme-dark .search-select-option.is-selected {
  background: color-mix(in srgb, var(--brand-blue), var(--surface-soft) 78%);
}

.field small {
  color: var(--muted);
  line-height: 1.45;
}

.form-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.event-form-actions {
  align-items: center;
}

.event-form-action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.event-form-action-hint {
  max-width: 320px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.form-actions-top {
  position: sticky;
  top: 0;
  z-index: 20;
  margin-top: 0;
  margin-bottom: 2px;
  border: 1px solid var(--line);
  border-radius: var(--radius-system);
  padding: 12px;
  background: var(--surface-soft);
  box-shadow: 0 8px 18px var(--shadow-soft);
}

.event-view-heading {
  align-items: flex-start;
}

.event-view-actions {
  max-width: 680px;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.event-summary-strip .facts {
  margin-top: 0;
}

.event-afisha-panel {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.event-afisha-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.event-afisha-panel-head h2 {
  margin: 0 0 4px;
  color: var(--brand-blue-strong);
  font-size: 18px;
}

.event-afisha-panel-head p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.event-afisha-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.event-afisha-action-form,
.event-afisha-return-form {
  margin: 0;
}

.event-afisha-return-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  max-width: 820px;
}

.event-afisha-return-form .field {
  margin: 0;
}

.event-afisha-return-form textarea {
  min-height: 76px;
}

.event-deletion-panel {
  display: grid;
  gap: 14px;
  margin-top: 18px;
  border-left: 4px solid var(--danger);
}

.event-deletion-panel-collapsed:not(:target) {
  display: none;
}

.event-deletion-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.event-deletion-panel-head h2 {
  margin: 0 0 4px;
  color: var(--brand-blue-strong);
  font-size: 18px;
}

.event-deletion-panel-head p,
.event-deletion-details p {
  margin: 0;
  color: var(--muted);
}

.event-deletion-details {
  display: grid;
  gap: 6px;
}

.event-deletion-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  max-width: 820px;
}

.event-deletion-form .field {
  margin: 0;
}

.event-deletion-form textarea {
  min-height: 76px;
}

.event-detail-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.event-detail-section {
  min-width: 0;
  margin-top: 0;
}

.event-detail-section h2 {
  margin-bottom: 14px;
  color: var(--brand-blue-strong);
  font-size: 18px;
}

.filbox-sync-panel {
  margin-top: 18px;
}

.filbox-sync-panel .table-panel-heading {
  margin-bottom: 14px;
}

.filbox-sync-toggle {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  max-width: 420px;
}

.filbox-sync-toggle .checkbox-field {
  flex: 1 1 260px;
  margin: 0;
}

.filbox-sync-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}

.filbox-sync-actions .inline-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  font-size: 13px;
}

.filbox-sync-changes {
  min-width: 760px;
  margin-top: 8px;
}

.event-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.event-detail-grid div {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-system);
  padding: 12px;
  background: var(--surface-soft);
}

.event-detail-grid .event-detail-wide {
  grid-column: 1 / -1;
}

.event-detail-grid dd {
  margin-top: 6px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.4;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.event-detail-grid a {
  overflow-wrap: anywhere;
}

.event-history-section {
  margin-top: 18px;
}

.event-history-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.event-history-head h2 {
  margin: 0 0 4px;
  color: var(--brand-blue-strong);
  font-size: 18px;
}

.event-history-head p {
  margin: 0;
  color: var(--muted);
}

.event-history-list {
  display: grid;
  gap: 10px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.event-history-item,
.event-history-empty {
  border: 1px solid var(--line);
  border-radius: var(--radius-system);
  padding: 12px;
  background: var(--surface-soft);
}

.event-history-meta {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) auto auto;
  gap: 10px;
  align-items: baseline;
}

.event-history-meta strong {
  color: var(--brand-blue-strong);
}

.event-history-meta time,
.event-history-meta span,
.event-history-item small,
.event-history-empty {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.event-history-item p {
  margin: 8px 0 0;
  color: var(--text);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.auth-panel {
  max-width: 720px;
}

.auth-form {
  grid-template-columns: 1fr;
}

.alert,
.notice {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-system);
  padding: 14px 16px;
  background: var(--surface);
}

.alert {
  border-color: #f9c9ae;
  border-left: 4px solid var(--danger);
}

.alert strong {
  display: block;
  margin-bottom: 8px;
  color: var(--danger);
}

.alert ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.6;
}

.notice {
  border-left: 4px solid var(--brand-blue);
  color: var(--brand-blue-strong);
  font-weight: 700;
}

.notification-bell {
  position: fixed;
  z-index: 1200;
  top: var(--notification-bell-top, max(12px, env(safe-area-inset-top)));
  left: var(--notification-bell-left, calc(100vw - var(--notification-bell-size) - max(12px, env(safe-area-inset-right))));
  flex: 0 0 auto;
}

.notification-bell[open] {
  z-index: 1220;
}

.notification-bell > summary {
  position: relative;
  width: var(--notification-bell-size);
  height: var(--notification-bell-size);
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-system);
  background: var(--surface);
  color: var(--brand-blue);
  cursor: pointer;
  list-style: none;
  box-shadow: 0 8px 18px var(--shadow-soft);
}

.notification-bell > summary::-webkit-details-marker {
  display: none;
}

.notification-bell > summary:hover,
.notification-bell[open] > summary {
  border-color: var(--brand-blue);
  background: var(--table-soft);
}

.notification-bell-icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.notification-count {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--surface);
  border-radius: var(--radius-pill);
  padding: 0 5px;
  background: var(--accent-warm);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.theme-dark .notification-bell > summary {
  background: var(--surface-soft);
  color: var(--brand-blue-strong);
  box-shadow: 0 10px 26px var(--shadow-soft);
}

.theme-dark .notification-count {
  border-color: color-mix(in srgb, var(--surface), #000000 12%);
  background: color-mix(in srgb, var(--accent-warm), var(--surface-soft) 22%);
}

.theme-dark .notification-popover {
  background: #121820;
}

.notification-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 1230;
  width: min(420px, calc(100vw - 16px));
  max-height: min(640px, calc(100vh - 72px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  isolation: isolate;
  border: 1px solid var(--line);
  border-radius: var(--radius-system);
  padding: 12px;
  background: var(--surface);
  box-shadow: 0 18px 40px var(--shadow-elevated);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.notification-bell:not([open]) .notification-popover {
  display: none;
}

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

.notification-popover-head strong {
  color: var(--brand-blue-strong);
}

.notification-popover-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.notification-preview-list {
  display: grid;
  gap: 8px;
  max-height: min(460px, calc(100vh - 190px));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--brand-blue) var(--table-soft);
}

.notification-preview-list::-webkit-scrollbar {
  width: 10px;
}

.notification-preview-list::-webkit-scrollbar-track {
  border-radius: var(--radius-pill);
  background: var(--table-soft);
}

.notification-preview-list::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: var(--radius-pill);
  background: var(--brand-blue);
  background-clip: content-box;
}

.notification-preview-item {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--line);
  border-radius: var(--radius-system);
  padding: 10px;
  background: var(--surface-soft);
  color: var(--text);
  text-decoration: none;
}

.notification-preview-item.is-unread {
  border-left-color: var(--brand-blue);
  background: #f4f8fc;
}

.theme-dark .notification-preview-item.is-unread {
  background: color-mix(in srgb, var(--brand-blue), var(--surface-soft) 88%);
}

.notification-preview-item strong,
.notification-preview-item span,
.notification-preview-item small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.notification-preview-item strong {
  color: var(--text);
  font-size: 14px;
}

.notification-preview-item span,
.notification-preview-item small,
.notification-preview-empty {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.notification-preview-empty {
  margin: 0;
}

.notification-popover-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.notification-preview-form {
  margin: 0;
}

.notification-preview-form .button,
.notification-popover-actions > .button {
  width: 100%;
}

.notifications-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.notifications-toolbar .mode-tabs {
  margin-bottom: 0;
}

.settings-panel {
  display: grid;
  gap: 14px;
}

.settings-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.settings-panel-head .status {
  flex: 0 0 auto;
  align-self: flex-start;
}

.settings-form {
  align-items: start;
}

.settings-push-console {
  display: grid;
  gap: 14px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.settings-status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.settings-fact {
  min-width: 0;
  border: 1px solid var(--line);
  border-left: 4px solid var(--line);
  border-radius: var(--radius-system);
  padding: 10px;
  background: var(--surface-soft);
}

.settings-fact-ok {
  border-left-color: #2f7d4f;
}

.theme-dark .settings-fact,
.theme-dark .gateway-channel-card,
.theme-dark .gateway-profile-card,
.theme-dark .push-console-actions,
.theme-dark .push-diagnostics {
  background: var(--surface-soft);
}

.theme-dark .settings-fact-ok {
  border-left-color: #6f9578;
}

.settings-fact-muted {
  border-left-color: var(--muted);
}

.settings-fact-warning {
  border-left-color: #b9872c;
}

.theme-dark .settings-fact-warning {
  border-left-color: #d2a54a;
}

.settings-fact dt,
.settings-fact dd {
  min-width: 0;
  overflow-wrap: anywhere;
}

.settings-fact dd {
  font-size: 15px;
}

.gateway-settings-panel {
  gap: 16px;
}

.gateway-channel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.gateway-config-form {
  gap: 16px;
}

.gateway-profiles-section h3 {
  margin: 0;
  color: var(--brand-blue-strong);
  font-size: 18px;
}

.gateway-profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.gateway-profile-card {
  min-width: 0;
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-system);
  padding: 12px;
  background: var(--surface-soft);
}

.gateway-profile-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.gateway-profile-card-head h3 {
  margin: 0;
  font-size: 16px;
}

.gateway-channel-card {
  min-width: 0;
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--muted);
  border-radius: var(--radius-system);
  padding: 14px;
  background: var(--surface-soft);
}

.gateway-channel-ok {
  border-left-color: #2f7d4f;
}

.gateway-channel-warning {
  border-left-color: #b9872c;
}

.gateway-channel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.gateway-channel-head h2 {
  margin: 0;
  font-size: 20px;
}

.gateway-channel-facts {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
}

.gateway-missing-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
}

.gateway-ready-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.backup-action-grid,
.backup-evidence-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.backup-action-card,
.backup-evidence-card {
  min-width: 0;
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-system);
  padding: 14px;
  background: var(--surface-soft);
}

.backup-action-card h3,
.backup-evidence-card h3 {
  margin: 0;
  color: var(--brand-blue-strong);
  font-size: 16px;
}

.backup-action-card p,
.backup-evidence-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.backup-action-card .inline-form {
  margin: 0;
}

.backup-action-card .button {
  width: fit-content;
}

.backup-evidence-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.backup-evidence-missing {
  border-left: 4px solid #b9872c;
}

.backup-detail-list {
  display: grid;
  gap: 6px;
  margin: 0;
}

.backup-detail-list div {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(110px, 0.4fr) minmax(0, 1fr);
  gap: 10px;
}

.backup-detail-list dt {
  color: var(--muted);
  font-size: 12px;
}

.backup-detail-list dd {
  min-width: 0;
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.backup-blocker-list li {
  margin-bottom: 4px;
}

.gateway-status-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.push-console-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  gap: 12px;
  align-items: stretch;
}

.push-console-actions,
.push-diagnostics {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-system);
  padding: 12px;
  background: var(--surface-soft);
}

.push-console-actions {
  display: grid;
  gap: 10px;
}

.push-console-actions strong,
.push-diagnostics strong {
  color: var(--brand-blue-strong);
  font-size: 15px;
}

.push-console-actions p {
  min-height: 38px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.push-diagnostics ul {
  display: grid;
  gap: 6px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.push-diagnostics li {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
}

.push-diagnostics li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.push-diagnostics li strong {
  min-width: 0;
  color: var(--text);
  font-size: 13px;
  overflow-wrap: anywhere;
  text-align: right;
}

code {
  border: 1px solid var(--line);
  border-radius: var(--radius-compact);
  padding: 1px 5px;
  background: var(--surface-soft);
}

.max-auth-pairing-panel {
  display: grid;
  gap: 16px;
}

.max-auth-pairing-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
  gap: 18px;
  align-items: start;
}

.max-auth-code-card,
.max-auth-open-card {
  min-width: 0;
  display: grid;
  gap: 10px;
  align-content: start;
}

.max-auth-code-card .eyebrow,
.max-auth-open-card .eyebrow {
  margin: 0;
}

.max-auth-fallback-card {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.max-auth-code-field {
  gap: 8px;
  padding: 12px;
}

.max-auth-code-field strong {
  font-size: 24px;
  letter-spacing: 0;
  line-height: 1.15;
}

.max-auth-code-card h3,
.max-auth-open-card h3 {
  margin: 0;
  color: var(--text);
  font-size: 17px;
  line-height: 1.25;
}

.max-auth-open-card .muted {
  margin: 0;
  font-size: 13px;
  line-height: 1.35;
}

.max-auth-qr-card {
  display: grid;
  gap: 10px;
  justify-items: center;
}

.max-auth-qr {
  /* 53 SVG modules × 5 CSS pixels: dark QR modules stay sharp on screen. */
  width: min(100%, 265px);
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: var(--radius-compact);
  background: #fff;
}

.max-auth-qr-card small,
.max-auth-pairing-copy small,
.max-auth-code-field small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.max-auth-pairing-copy {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.max-auth-unavailable-status {
  min-width: 0;
  max-width: 320px;
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-left: 4px solid #b9872c;
  border-radius: var(--radius-system);
  padding: 9px 12px;
  background: var(--surface-soft);
  color: var(--text);
}

.max-auth-unavailable-status strong,
.max-auth-unavailable-status span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.max-auth-unavailable-status strong {
  color: var(--brand-blue-strong);
  font-size: 13px;
  line-height: 1.25;
}

.max-auth-unavailable-status span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.max-auth-refresh-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

@media (max-width: 900px) {
  .home-filter-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .home-filter-grid .filter-actions {
    grid-column: 1 / -1;
    border-top: 1px solid var(--line-soft);
    padding-top: 10px;
  }
}

@media (max-width: 760px) {
  .shell {
    width: min(100% - 12px, 1170px);
    padding-bottom: 18px;
  }

  .site-header {
    margin-bottom: 10px;
  }

  .site-header::after {
    display: none;
  }

  .topbar {
    justify-content: stretch;
    overflow: visible;
    padding: 3px;
  }

  .topbar::-webkit-scrollbar {
    display: none;
  }

  .masthead {
    align-items: stretch;
    flex-direction: column;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-heading > .button {
    width: auto;
    align-self: flex-start;
  }

  .masthead {
    min-height: 0;
    gap: 6px;
    padding: 8px 10px;
  }

  .global-search {
    width: 100%;
    max-width: none;
    flex-basis: auto;
    order: 2;
    gap: 5px;
  }

  .global-search-control {
    min-height: 46px;
    grid-template-columns: minmax(0, 1fr) 44px;
  }

  .global-search input,
  .global-search-submit {
    min-height: 44px;
  }

  .nav-search-slot {
    order: 20;
    flex: 1 0 100%;
    margin-left: 0;
    padding: 1px 0 0;
  }

  .nav-search-slot .global-search {
    width: 100%;
    gap: 0;
  }

  .nav-search-slot .global-search-control {
    min-height: 46px;
    grid-template-columns: minmax(0, 1fr) 44px;
  }

  .nav-search-slot .global-search input {
    padding: 0 10px;
    font-size: 16px;
  }

  .header-status {
    order: 3;
  }

  .header-status {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    justify-content: stretch;
    gap: 6px;
    padding-right: 46px;
  }

  .notification-bell {
    --notification-bell-size: 44px;
    position: fixed;
    grid-column: auto;
    grid-row: auto;
    justify-self: auto;
    align-self: auto;
  }

  .notification-bell > summary {
    box-shadow: 0 6px 14px var(--shadow-soft);
  }

  .notification-popover {
    position: fixed;
    top: var(--notification-popover-top, max(72px, calc(env(safe-area-inset-top) + 72px)));
    right: max(8px, env(safe-area-inset-right));
    left: max(8px, env(safe-area-inset-left));
    width: auto;
    max-height: var(--notification-popover-max-height, calc(100dvh - 68px));
  }

  .current-user-card {
    grid-column: 1;
    grid-row: 1;
    grid-template-columns: minmax(0, 1fr) auto;
    flex: 1 1 auto;
    max-width: none;
    gap: 6px;
    padding: 0;
  }

  .current-user {
    max-width: none;
    text-align: left;
  }

  .current-user-name-row {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .current-user-meta {
    flex-wrap: wrap;
    justify-content: flex-start;
    white-space: normal;
  }

  .current-user-media {
    gap: 4px;
  }

  .current-user-photo,
  .user-photo-placeholder {
    width: 44px;
    height: 44px;
  }

  .current-user-name {
    min-height: 0;
    display: -webkit-box;
    font-size: 13px;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    white-space: normal;
  }

  .current-user-meta {
    font-size: 12px;
    line-height: 1.14;
  }

  .current-user-meta span {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
  }

  .brand-kicker {
    display: -webkit-box;
    overflow: hidden;
    font-size: 9.5px;
    line-height: 1.1;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
  }

  .brand-title-mark {
    width: 22px;
    height: 22px;
  }

  .brand-title {
    gap: 6px;
    font-size: 15px;
  }

  .brand {
    gap: 8px;
  }

  .brand-mark {
    width: 34px;
    height: 39px;
  }

  .nav {
    width: 100%;
    min-width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 3px;
  }

  .nav > .nav-link,
  .nav-group {
    min-width: 0;
    flex: 1 1 calc(50% - 4px);
  }

  .nav-group[open] {
    min-width: 0;
    flex-basis: 100%;
  }

  .nav-link,
  .nav-group > summary {
    width: 100%;
    min-height: 44px;
    justify-content: center;
    gap: 5px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--radius-compact);
    padding: 7px 8px;
    font-size: 11px;
    line-height: 1.15;
    text-align: center;
    white-space: normal;
  }

  .nav-icon {
    width: 14px;
    height: 14px;
  }

  .nav-group-panel {
    position: static;
    width: 100%;
    min-width: 0;
    border-right: 0;
    border-left: 0;
    box-shadow: none;
    padding: 4px;
  }

  .nav-group-panel .nav-link {
    justify-content: flex-start;
    border-bottom: 0;
    min-height: 42px;
    padding: 9px 8px;
    font-size: 12px;
  }

  .profile-card {
    grid-template-columns: 1fr;
  }

  .profile-photo-frame {
    width: min(180px, 100%);
  }

  .profile-facts {
    grid-template-columns: 1fr;
  }

  .hero,
  .panel {
    padding: 16px;
  }

  .home-hero,
  .home-core-panel,
  .home-map-panel {
    padding: 12px;
  }

  .home-hero .eyebrow,
  .home-map-panel .eyebrow {
    margin-bottom: 4px;
    font-size: 11px;
  }

  .home-hero h1 {
    font-size: 28px;
    line-height: 1.08;
  }

  .home-hero .lead {
    margin-top: 6px;
    font-size: 14px;
    line-height: 1.3;
  }

  .home-hero .actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 12px;
  }

  .home-hero .button {
    width: 100%;
    min-height: 44px;
    padding: 9px 12px;
    font-size: 13px;
    line-height: 1.2;
  }

  .home-core-panel h2,
  .home-map-panel h2 {
    font-size: 20px;
    line-height: 1.16;
  }

  .home-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 10px;
  }

  .home-facts div {
    min-height: 0;
    padding: 8px 9px;
  }

  .home-facts dt {
    font-size: 11px;
    line-height: 1.2;
  }

  .home-facts dd {
    margin-top: 2px;
    font-size: 16px;
    line-height: 1.18;
  }

  .home-facts .home-fact-wide {
    grid-column: 1 / -1;
  }

  .analytics-facts-panel {
    padding: 12px;
  }

  .analytics-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    margin-top: 0;
  }

  .analytics-facts div {
    min-height: 0;
    padding: 7px 8px;
  }

  .analytics-facts dt {
    font-size: 10px;
    line-height: 1.15;
  }

  .analytics-facts dd {
    margin-top: 2px;
    font-size: 15px;
    line-height: 1.12;
  }

  .system-map {
    grid-template-columns: 1fr;
  }

  .home-map-panel .system-map {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 10px;
  }

  .home-dashboard-head {
    align-items: flex-start;
  }

  .home-dashboard-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .home-filter-panel {
    padding: 12px;
  }

  .home-filter-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .home-filter-grid .filter-actions {
    grid-column: 1 / -1;
    border-top: 1px solid var(--line-soft);
    padding-top: 10px;
  }

  .home-dashboard-primary-stack,
  .home-dashboard-summary-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 10px;
  }

  .home-new-events-scroll {
    max-height: 440px;
  }

  .home-new-events-panel .table-panel-heading,
  .home-upcoming-panel .table-panel-heading {
    min-width: 0;
    padding: 12px;
    flex-direction: column;
  }

  .home-new-events-panel td:first-child,
  .home-upcoming-panel td:first-child,
  .home-institutions-panel td:first-child {
    min-width: 0;
  }

  .home-status-panel h2,
  .home-institutions-panel h2 {
    padding: 12px;
  }

  .system-map-card {
    grid-template-columns: 38px minmax(0, 1fr);
    min-height: 86px;
    gap: 12px;
    padding: 11px;
  }

  .home-map-panel .system-map-card {
    grid-template-columns: 34px minmax(0, 1fr);
    min-height: 84px;
    gap: 10px;
    padding: 10px;
  }

  .system-map-icon-shell {
    width: 38px;
    height: 38px;
  }

  .home-map-panel .system-map-icon-shell {
    width: 34px;
    height: 34px;
  }

  .system-map-icon {
    width: 32px;
    height: 32px;
  }

  .home-map-panel .system-map-icon {
    width: 30px;
    height: 30px;
  }

  .home-map-panel .system-map-copy {
    gap: 4px;
  }

  .home-map-panel .system-map-copy strong {
    font-size: 14px;
    line-height: 1.2;
  }

  .home-map-panel .system-map-copy small {
    display: block;
    font-size: 12px;
    line-height: 1.28;
  }

  .home-map-panel .system-map-copy em {
    font-size: 10px;
    line-height: 1.2;
  }

  .button {
    min-height: 44px;
    padding: 9px 12px;
    font-size: 13px;
    line-height: 1.2;
  }

  .mode-tabs a {
    min-height: 44px;
    padding: 9px 12px;
    font-size: 13px;
    line-height: 1.2;
  }

  .message-detail-card-head {
    display: grid;
  }

  .message-detail-body-grid {
    grid-template-columns: 1fr;
  }

  .messages-detail-head,
  .incoming-message-note-head,
  .incoming-message-event-head {
    display: grid;
  }

  .messages-detail-grid {
    grid-template-columns: 1fr;
  }

  .message-forward-form {
    grid-template-columns: 1fr;
  }

  .table-panel-heading {
    min-width: 0;
    display: grid;
    padding: 16px 16px 0;
  }

  .table-panel > h2 {
    padding: 14px 12px 2px;
    font-size: 20px;
  }

  .table-panel {
    padding: 0;
    overflow: visible;
  }

  .messages-history-more {
    min-width: 0;
  }

  .messages-history-more > summary {
    padding: 12px;
  }

  .table-scroll-shell .table-top-scroll {
    display: none !important;
  }

  .table-sticky-head {
    display: none !important;
  }

  .table-panel table,
  .table-panel .compact-table,
  .table-panel .dictionary-table,
  .table-panel .events-table {
    min-width: 0;
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
  }

  .table-panel thead {
    display: none;
  }

  .table-panel tbody {
    display: grid;
    gap: 10px;
    padding: 0 10px 10px;
  }

  .table-panel tbody tr,
  .table-panel tbody tr:nth-child(2n + 1) {
    display: block;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-system);
    background: var(--surface);
  }

  .table-panel tbody tr.events-registry-group-heading,
  .table-panel tbody tr.events-registry-group-heading:nth-child(2n + 1) {
    border: 0;
    background: transparent;
  }

  .table-panel .events-registry-group-heading td {
    border-bottom: 0;
    padding: 8px 2px 2px;
  }

  .theme-dark .table-panel tbody tr,
  .theme-dark .table-panel tbody tr:nth-child(2n + 1) {
    background: var(--surface-raised);
  }

  .table-panel td {
    min-width: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 3px;
    align-items: start;
    border-bottom: 1px solid var(--line-soft);
    padding: 9px 10px;
    overflow-wrap: anywhere;
  }

  .table-panel td::before {
    content: attr(data-label);
    min-width: 0;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.25;
    text-transform: uppercase;
  }

  .table-panel td:last-child {
    border-bottom: 0;
  }

  .table-panel td.empty-cell {
    display: block;
    padding: 14px;
  }

  .table-panel td.empty-cell::before {
    content: none;
  }

  .table-panel .table-action,
  .table-panel td button.table-action {
    width: auto;
    max-width: 100%;
    justify-self: start;
    min-height: 44px;
    padding: 9px 12px;
    font-size: 13px;
    line-height: 1.2;
  }

  .table-panel td a[href]:not(.table-action) {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  .table-panel td form {
    width: auto;
    justify-self: start;
    display: inline-flex;
  }

  .table-panel .table-action,
  .table-panel td button.table-action {
    justify-content: center;
    white-space: normal;
    text-align: center;
  }

  h1 {
    font-size: 32px;
  }

  .lead {
    font-size: 16px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .message-event-preview dl {
    grid-template-columns: 1fr;
  }

  .message-schedule-grid,
  .form-section-grid {
    grid-template-columns: 1fr;
  }

  .event-status-grid {
    grid-template-columns: 1fr;
  }

  .session-status-grid {
    grid-template-columns: 1fr;
  }

  .session-status-grid > :nth-child(n) {
    grid-column: 1;
  }

  .initial-session-heading {
    flex-direction: column;
  }

  .initial-session-heading .checkbox-field {
    width: 100%;
    flex-basis: auto;
  }

  .message-schedule-popover {
    position: static;
    width: 100%;
    margin-top: 6px;
  }

  .messages-compose-form .checkbox-grid,
  .checkbox-grid {
    grid-template-columns: 1fr;
  }

  .compact-checkbox {
    min-height: 44px;
    padding: 10px;
  }

  .event-form .compact-checkbox {
    min-height: 44px;
    padding: 10px;
  }

  input,
  select,
  textarea {
    min-height: 44px;
  }

  .password-field-control input {
    padding-right: 52px;
  }

  .password-toggle {
    width: 44px;
    min-height: 44px;
  }

  .message-schedule-trigger,
  .message-forward-search,
  .recurrence-technical-settings > summary {
    min-height: 44px;
  }

  .search-select-toggle {
    top: 0;
    right: 0;
    width: 44px;
    min-height: 44px;
    height: 100%;
  }

  .quick-venue-grid {
    grid-template-columns: 1fr;
  }

  .filter-grid {
    grid-template-columns: 1fr;
  }

  .events-filter-form,
  .calendar-filter-form {
    gap: 8px;
  }

  .events-quick-filter-grid {
    margin-bottom: 0;
  }

  .mobile-filter-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius-system);
    background: var(--surface-soft);
    overflow: hidden;
  }

  .mobile-filter-panel[open] {
    overflow: visible;
  }

  .mobile-filter-summary {
    min-height: 46px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 12px;
    color: var(--text);
    cursor: pointer;
    font-weight: 800;
    list-style: none;
  }

  .mobile-filter-summary::-webkit-details-marker {
    display: none;
  }

  .mobile-filter-summary > span:first-child {
    min-width: 0;
  }

  .mobile-filter-summary > span:nth-child(2) {
    min-width: 0;
    margin-left: auto;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.25;
    text-align: right;
  }

  .mobile-filter-summary::after {
    content: "";
    width: 8px;
    height: 8px;
    flex: 0 0 auto;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
  }

  .mobile-filter-panel[open] > .mobile-filter-summary {
    border-bottom: 1px solid var(--line-soft);
  }

  .mobile-filter-panel[open] > .mobile-filter-summary::after {
    transform: rotate(225deg) translateY(-1px);
  }

  .home-mobile-filter-panel .home-filter-grid,
  .events-advanced-filter-grid,
  .calendar-advanced-filter-grid,
  .messages-history-filter-grid,
  .notifications-filter-grid {
    margin: 0;
    padding: 12px;
  }

  .field-news-filter-panel {
    padding: 8px;
  }

  .field-news-filter-form {
    gap: 6px;
  }

  .field-news-quick-filter-grid {
    grid-template-columns: 1fr;
  }

  .field-news-filter-panel input,
  .field-news-filter-panel select {
    min-height: 44px;
    padding: 9px 10px;
    font-size: 16px;
  }

  .field-news-advanced-filter-panel .mobile-filter-summary {
    min-height: 44px;
    padding: 10px 11px;
    font-size: 13px;
  }

  .field-news-advanced-filter-panel .events-advanced-filter-grid {
    gap: 8px;
    padding: 8px;
  }

  .field-news-main-actions,
  .field-news-period-actions {
    gap: 5px;
  }

  .field-news-main-actions .button,
  .field-news-period-actions .button {
    min-height: 44px;
    padding: 9px 10px;
    font-size: 12px;
  }

  .field-news-period-actions {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .field-news-period-actions .button {
    flex: 0 0 auto;
  }

  .field-news-main-actions .result-summary {
    flex-basis: 100%;
    font-size: 12px;
  }

  .filter-query-field {
    grid-column: 1;
  }

  .filter-wide-field {
    grid-column: 1;
  }

  .system-search-form,
  .system-search-grid,
  .system-search-result {
    grid-template-columns: 1fr;
  }

  .system-search-result {
    gap: 6px;
    padding: 12px;
  }

  .dictionary-filter-grid,
  .dictionary-workspace,
  .legal-document-layout {
    grid-template-columns: 1fr;
  }

  .dictionary-items-head {
    display: grid;
    grid-template-columns: 1fr;
  }

  .dictionary-items-head .button {
    width: auto;
    align-self: flex-start;
  }

  .event-view-actions,
  .event-afisha-panel-head,
  .event-deletion-panel-head,
  .settings-panel-head,
  .section-actions,
  .form-actions,
  .filter-actions,
  .notifications-toolbar {
    align-items: center;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
  }

  .event-view-actions {
    max-width: none;
  }

  .event-session-row-actions {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    gap: 8px;
  }

  .event-session-row-actions > .button,
  .event-session-row-actions .event-session-action-form,
  .event-session-row-actions .event-session-action-form > select:not(.search-select-native),
  .event-session-row-actions .event-session-action-form > input,
  .event-session-row-actions .event-session-action-form > .button {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .event-session-row-actions .event-session-action-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    gap: 8px;
  }

  select.search-select-native {
    width: 1px !important;
    min-width: 1px !important;
    max-width: 1px !important;
    min-height: 1px !important;
  }

  .event-session-row-actions .button,
  .table-panel td .inline-form .button,
  .table-action,
  .calendar-move-button,
  .search-select-input,
  .search-select-option,
  .checkbox-field {
    min-height: 44px;
  }

  .event-view-actions .button,
  .event-afisha-action-form .button,
  .event-afisha-return-form .button,
  .event-deletion-form .button,
  .max-auth-unavailable-status,
  .section-actions .button,
  .form-actions .button,
  .filter-actions .button,
  .notifications-toolbar .button {
    width: auto;
    flex: 0 1 auto;
  }

  .auth-form .form-actions {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }

  .auth-form .form-actions .button {
    width: 100%;
    flex: 1 1 auto;
  }

  .event-form-actions {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }

  .event-form-action-buttons {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .event-form-action-buttons .button {
    width: 100%;
  }

  .event-deletion-form {
    grid-template-columns: 1fr;
  }

  .event-form-action-hint {
    max-width: none;
    font-size: 12px;
  }

  .form-actions-top {
    position: static;
    top: 8px;
    padding: 10px;
  }

  .max-auth-refresh-panel {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
  }

  .event-afisha-actions,
  .event-afisha-return-form {
    display: grid;
    grid-template-columns: 1fr;
  }

  .filbox-sync-panel .table-scroll-shell {
    overflow: visible;
  }

  .filbox-sync-changes {
    min-width: 0;
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
  }

  .filbox-sync-changes thead {
    display: none;
  }

  .filbox-sync-changes tbody {
    display: grid;
    gap: 10px;
  }

  .filbox-sync-changes tbody tr {
    display: block;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-system);
    background: var(--surface);
  }

  .theme-dark .filbox-sync-changes tbody tr {
    background: var(--surface-raised);
  }

  .filbox-sync-changes td {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 3px;
    border-bottom: 1px solid var(--line-soft);
    padding: 9px 10px;
    overflow-wrap: anywhere;
  }

  .filbox-sync-changes td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.25;
    text-transform: uppercase;
  }

  .filbox-sync-changes td:last-child {
    border-bottom: 0;
  }

  .filbox-sync-changes td.empty-cell {
    display: block;
    padding: 14px;
  }

  .filbox-sync-changes td.empty-cell::before {
    content: none;
  }

  .event-afisha-panel-head .status {
    align-self: flex-start;
  }

  .notification-tabs {
    width: 100%;
  }

  .gateway-channel-grid,
  .gateway-profile-grid,
  .gateway-channel-facts,
  .backup-action-grid,
  .backup-evidence-grid,
  .settings-status-grid,
  .push-console-grid {
    grid-template-columns: 1fr;
  }

  .backup-detail-list div {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .push-diagnostics li {
    grid-template-columns: minmax(0, 1fr);
    gap: 3px;
  }

  .push-diagnostics li strong {
    text-align: left;
  }

  .notification-popover-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  .notification-preview-form {
    width: auto;
    display: inline-flex;
  }

  .notification-preview-form .button,
  .notification-popover-actions > .button {
    width: auto;
  }

  .result-summary {
    width: 100%;
  }

  .event-detail-layout,
  .event-detail-grid {
    grid-template-columns: 1fr;
  }

  .event-history-head,
  .event-history-meta {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .event-history-head {
    display: grid;
  }

  .message-detail-secondary summary {
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  .event-history-head .button {
    width: auto;
    align-self: flex-start;
  }

  .calendar-grid,
  .calendar-grid-week {
    grid-template-columns: 1fr;
    min-width: 0;
  }

  .calendar-quick-create-content {
    padding: 12px;
  }

  .calendar-quick-create-form {
    grid-template-columns: 1fr;
  }

  .calendar-quick-create-form .field-wide,
  .calendar-quick-create-form .form-actions {
    grid-column: 1;
  }

  .calendar-quick-create-panel > summary {
    min-height: 48px;
    padding: 12px;
  }

  .calendar-controls,
  .calendar-tab-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    justify-items: stretch;
  }

  .calendar-toolbar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px;
    justify-items: stretch;
  }

  .calendar-toolbar strong {
    min-width: 0;
    font-size: 15px;
    line-height: 1.2;
    text-align: center;
  }

  .calendar-toolbar .button {
    min-width: 64px;
    width: auto;
  }

  .calendar-filter-grid {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }

  .calendar-filter-grid .field {
    min-width: 0;
    max-width: 100%;
  }

  .calendar-filter-grid input[type="date"],
  .calendar-filter-grid input[type="month"] {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding-right: 12px;
    text-align: center;
    -webkit-appearance: none;
    appearance: none;
  }

  .calendar-filter-grid input[type="date"]::-webkit-calendar-picker-indicator,
  .calendar-filter-grid input[type="month"]::-webkit-calendar-picker-indicator {
    display: none;
    width: 0;
    opacity: 0;
  }

  .calendar-tab-row .mode-tabs,
  .calendar-tab-row .mode-tabs a {
    width: 100%;
  }

  .calendar-tab-row .mode-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .calendar-tab-row .mode-tabs a {
    justify-content: center;
  }

  .calendar-legend-item {
    min-height: 40px;
    padding: 8px 10px;
  }

  .calendar-grid-day {
    grid-template-columns: 1fr;
  }

  .calendar-weekday {
    display: none;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .afisha-hero,
  .afisha-event-hero {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 16px 12px;
  }

  .public-home-principle,
  .public-home-events {
    grid-template-columns: 1fr;
  }

  .afisha-hero h1,
  .afisha-event-copy h1 {
    font-size: 30px;
  }

  .afisha-hero-actions .button {
    width: auto;
  }

  .month-chips {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .afisha-month-head {
    display: grid;
    grid-template-columns: 1fr;
  }

  .afisha-month-head .afisha-period-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    justify-content: stretch;
  }

  .month-input-form {
    grid-template-columns: 1fr;
  }

  .afisha-program,
  .afisha-event-section {
    grid-template-columns: 1fr;
    padding: 16px 12px;
  }

  .afisha-section-head {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
  }

  .afisha-list {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .afisha-poster {
    min-height: 0;
  }

  .afisha-period-tabs,
  .afisha-period-tabs a,
  .afisha-card-facts {
    width: 100%;
  }

  .afisha-card-facts {
    grid-template-columns: 1fr;
  }

  .afisha-card-facts .is-wide {
    grid-column: auto;
  }

  .afisha-event-poster {
    min-height: 0;
  }

  .afisha-facts {
    grid-template-columns: 1fr;
  }

  .afisha-facts div {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .afisha-card-actions a,
  .afisha-event-actions .button {
    width: auto;
  }

  .public-home-hero,
  .public-home-principle,
  .public-home-upcoming {
    padding: 20px;
  }

  .public-home-section-head {
    align-items: start;
    flex-direction: column;
  }

  .max-auth-pairing-grid {
    grid-template-columns: 1fr;
  }

  .max-auth-qr {
    width: min(100%, 265px);
  }

  .event-sessions-panel .table-scroll {
    overflow: visible;
  }

  .event-sessions-panel table,
  .event-sessions-panel tbody,
  .event-sessions-panel tr,
  .event-sessions-panel td {
    display: block;
    width: 100%;
  }

  .event-sessions-panel thead {
    display: none;
  }

  .event-sessions-panel tr {
    margin-bottom: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-system);
    padding: 10px;
    background: var(--surface);
  }

  .event-sessions-panel td {
    border: 0;
    padding: 5px 0;
  }

  .event-sessions-panel td:last-child {
    padding-top: 10px;
  }

  .calendar-move-dialog-card {
    padding: 16px;
  }

  .calendar-move-fields {
    grid-template-columns: 1fr;
  }
}
.security-artifact-list {
  display: grid;
  gap: 0.75rem;
  list-style: none;
  margin: 1rem 0;
  padding: 0;
}

.security-artifact-row {
  align-items: center;
  border: 1px solid var(--border-color, rgba(127, 127, 127, 0.3));
  border-radius: 0.75rem;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: 0.9rem;
}

@media (max-width: 720px) {
  .security-artifact-row {
    align-items: stretch;
    flex-direction: column;
  }
}
