:root {
  --bg: #f7f8fb;
  --surface: #ffffff;
  --surface-soft: #f2f5f9;
  --line: #d9dee7;
  --line-strong: #c4cad6;
  --text: #1f2933;
  --muted: #667085;
  --blue: #2f67d8;
  --blue-soft: #e8efff;
  --blue-ring: rgba(47, 103, 216, 0.18);
  --green: #0f8a5f;
  --amber: #b86714;
  --red: #c33d3d;
  --shadow: 0 18px 60px rgba(22, 30, 46, 0.14);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
  transition:
    background-color 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    color 0.16s ease,
    transform 0.16s ease;
}

button:focus-visible {
  box-shadow: 0 0 0 3px var(--blue-ring);
  outline: none;
}

body.dragging-event,
body.dragging-event * {
  cursor: grabbing !important;
}

body.resizing-event,
body.resizing-event * {
  cursor: ns-resize !important;
}

.app-shell {
  height: 100vh;
  overflow: hidden;
}

.app-view {
  --workspace-rail-width: 80px;
  display: grid;
  grid-template-columns: var(--workspace-rail-width) minmax(720px, 1fr);
  grid-template-rows: 82px minmax(0, 1fr);
  height: 100vh;
  min-height: 0;
  overflow: hidden;
  transition: grid-template-columns 0.2s ease;
}

.app-view.workspace-rail-pinned,
.app-view.workspace-rail-hovered,
.app-view.calendar-menu-pinned,
.app-view.calendar-menu-hovered {
  --workspace-rail-width: 248px;
}

.app-view.table-mode .calendar-menu {
  display: none;
}

.app-view.table-mode .calendar-body {
  grid-column: 2;
}

.app-view.table-mode .calendar-workspace {
  margin-left: 0;
}

.app-view.inspector-open .sidebar,
.app-view.inspector-open .calendar-body {
  pointer-events: none;
}

.app-view.inspector-open .calendar-grid-shell {
  overflow: hidden;
}

.workspace-rail {
  align-self: start;
  background: radial-gradient(circle at 24px 26px, rgba(79, 108, 214, 0.12), transparent 42px), linear-gradient(180deg, #f7f9ff 0%, #ffffff 100%);
  border-color: var(--line);
  border-style: solid;
  border-width: 0 1px 1px 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 18px;
  grid-column: 1;
  grid-row: 1;
  height: 82px;
  min-height: 82px;
  overflow: hidden;
  padding: 18px 12px;
  transition: background 0.16s ease, box-shadow 0.16s ease, height 0.2s ease;
  z-index: 5;
}

.app-view.workspace-rail-pinned .workspace-rail,
.app-view.workspace-rail-hovered .workspace-rail {
  background: var(--surface);
  box-shadow: var(--shadow);
  height: 100vh;
}

.workspace-brand-row {
  align-items: center;
  color: var(--text);
  display: flex;
  gap: 14px;
  min-height: 46px;
  text-decoration: none;
}

.workspace-brand-copy,
.workspace-label,
.workspace-rail-footer {
  opacity: 0;
  overflow: hidden;
  transition: opacity 0.12s ease;
  white-space: nowrap;
}

.workspace-brand-copy {
  max-width: 0;
}

.app-view.workspace-rail-pinned .workspace-brand-copy,
.app-view.workspace-rail-pinned .workspace-label,
.app-view.workspace-rail-pinned .workspace-rail-footer,
.app-view.workspace-rail-hovered .workspace-brand-copy,
.app-view.workspace-rail-hovered .workspace-label,
.app-view.workspace-rail-hovered .workspace-rail-footer {
  opacity: 1;
}

.app-view.workspace-rail-pinned .workspace-brand-copy,
.app-view.workspace-rail-hovered .workspace-brand-copy {
  max-width: 180px;
}

.workspace-brand-copy h1 {
  font-size: 28px;
  line-height: 1;
  margin: 0;
}

.workspace-nav-list {
  display: grid;
  gap: 10px;
}

.workspace-nav-list a {
  align-items: center;
  border-radius: 8px;
  color: var(--muted);
  display: grid;
  font-weight: 800;
  gap: 14px;
  grid-template-columns: 48px 1fr;
  min-height: 48px;
  padding: 6px 8px;
  text-decoration: none;
}

.workspace-nav-list a.active,
.workspace-nav-list a:hover {
  background: #e9eefc;
  color: var(--primary-strong);
}

.workspace-icon {
  align-items: center;
  background: #f9fbff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--primary);
  display: inline-flex;
  font-weight: 900;
  height: 40px;
  justify-content: center;
  transition: color 0.12s ease;
  width: 40px;
}

.app-view:not(.workspace-rail-pinned):not(.workspace-rail-hovered) .workspace-rail .workspace-icon {
  color: transparent;
}

.workspace-rail-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  margin: auto 0 0;
  padding-top: 18px;
}

.calendar-area {
  display: contents;
}

.topbar {
  grid-column: 2;
  grid-row: 1;
}

.calendar-body {
  grid-column: 1 / 3;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  position: relative;
}

.sidebar,
.inspector {
  background: var(--bg);
  border-color: var(--line);
  border-style: solid;
}

.calendar-menu {
  background: radial-gradient(circle at 50% 8%, rgba(47, 103, 216, 0.18), transparent 34%), linear-gradient(180deg, #ffffff 0%, #f4f7ff 100%);
  border-width: 0 1px 0 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
  left: 0;
  min-height: 0;
  overflow: hidden;
  padding: 18px 14px;
  position: absolute;
  top: 0;
  transition: box-shadow 0.16s ease, width 0.2s ease;
  width: var(--workspace-rail-width);
  z-index: 4;
}

.app-view.calendar-menu-pinned .calendar-menu,
.app-view.calendar-menu-hovered .calendar-menu {
  background: var(--surface);
  box-shadow: var(--shadow);
}

.calendar-menu-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  min-width: 220px;
}

.calendar-menu-actions {
  border-top: 1px solid var(--line);
  margin-top: 18px;
  padding-top: 18px;
}

.calendar-menu-actions .create-button {
  width: 100%;
}

.calendar-menu .create-button,
.calendar-menu .calendar-menu-actions,
.calendar-menu .sidebar-section {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease;
}

.app-view.calendar-menu-pinned .calendar-menu .create-button,
.app-view.calendar-menu-pinned .calendar-menu .calendar-menu-actions,
.app-view.calendar-menu-pinned .calendar-menu .sidebar-section,
.app-view.calendar-menu-hovered .calendar-menu .create-button,
.app-view.calendar-menu-hovered .calendar-menu .calendar-menu-actions,
.app-view.calendar-menu-hovered .calendar-menu .sidebar-section {
  opacity: 1;
  pointer-events: auto;
}

.calendar-workspace {
  display: flex;
  flex-direction: column;
  height: 100%;
  margin-left: var(--workspace-rail-width);
  min-height: 0;
  min-width: 0;
  transition: margin-left 0.2s ease;
}

.app-view.calendar-menu-pinned .calendar-workspace,
.app-view.calendar-menu-hovered .calendar-workspace {
  margin-left: var(--workspace-rail-width);
}

.inspector {
  border-width: 0 0 0 1px;
  bottom: 0;
  box-sizing: border-box;
  box-shadow: var(--shadow);
  display: none;
  flex-direction: column;
  height: auto;
  max-height: none;
  overflow: hidden;
  padding: 0;
  position: fixed;
  right: 0;
  top: 82px;
  width: min(420px, calc(100vw - 32px));
  z-index: 70;
}

.inspector.open {
  display: flex;
}

.inspector.maximized {
  border-width: 0;
  bottom: 0;
  height: auto;
  left: 0;
  max-height: none;
  top: 0;
  width: 100vw;
  z-index: 90;
}

.inspector.maximized .inspector-header,
.inspector.maximized .inspector-content {
  margin-left: auto;
  margin-right: auto;
  max-width: 1120px;
  width: 100%;
}

.brand-row,
.date-controls,
.view-controls,
.inspector-header,
.section-header {
  align-items: center;
  display: flex;
}

.brand-row {
  gap: 10px;
  margin-bottom: 14px;
  min-height: 58px;
}

.brand-link {
  color: inherit;
  text-decoration: none;
}

.brand-link:focus-visible {
  border-radius: 8px;
  box-shadow: 0 0 0 3px var(--blue-ring);
  outline: none;
}

.sidebar-top-block {
  border-bottom: 1px solid var(--line);
  box-sizing: border-box;
  display: grid;
  gap: 8px;
  grid-template-rows: 48px 42px;
  height: 186px;
  padding: 17px 0 21px;
}

.sidebar-top-block .brand-row {
  align-self: center;
  margin-bottom: 0;
  min-height: 0;
  width: 100%;
}

.brand-row.compact {
  margin-bottom: 0;
}

.brand-mark {
  border-radius: 12px;
  display: block;
  height: 42px;
  object-fit: cover;
  width: 42px;
}

.eyebrow {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  margin: 0 0 4px;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: 26px;
  line-height: 1;
  margin-bottom: 0;
}

h2 {
  font-size: 18px;
  margin-bottom: 0;
}

h3 {
  font-size: 15px;
  margin-bottom: 8px;
}

.create-button,
.nav-button,
.ghost-button,
.view-button,
.icon-button,
.mini-action-button {
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: white;
  color: var(--text);
  display: inline-flex;
  justify-content: center;
  min-height: 38px;
}

.create-button:hover,
.ghost-button:hover,
.mini-action-button:hover {
  background: var(--surface-soft);
  border-color: #aeb7c8;
}

.create-button {
  background: var(--blue);
  border-color: var(--blue);
  color: white;
  font-weight: 700;
  gap: 8px;
  padding: 11px 14px;
  width: 100%;
}

.create-button:hover {
  background: #2559c6;
  border-color: #2559c6;
}

.compact-button {
  min-height: 36px;
  padding: 8px 12px;
  width: auto;
}

.nav-button {
  margin-top: 8px;
  padding: 10px 12px;
  text-align: left;
  width: 100%;
}

.sidebar-top-block .create-button {
  height: 42px;
  margin-top: 0;
  padding: 0 12px;
}

.ghost-button {
  padding: 9px 14px;
}

.icon-button {
  background: transparent;
  border-color: transparent;
  font-size: 22px;
  height: 40px;
  line-height: 1;
  padding: 0;
  width: 40px;
}

.icon-button:hover,
.mini-toggle-button:hover {
  background: var(--surface-soft);
  border-color: transparent;
}

.mini-action-button {
  background: transparent;
  border-color: transparent;
  font-size: 22px;
  height: 36px;
  line-height: 1;
  padding: 0;
  width: 36px;
}

.mini-action-button:hover {
  background: var(--surface-soft);
  border-color: transparent;
}

.calendar-toggle-all-button {
  color: var(--muted);
  width: 40px;
}

.calendar-toggle-all-button:hover {
  color: var(--text);
}

.visibility-icon {
  display: block;
  fill: none;
  height: 22px;
  pointer-events: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 22px;
}

.visibility-icon circle {
  fill: currentColor;
  stroke: none;
}

.visibility-icon-eye-off,
.calendar-toggle-all-hidden .visibility-icon-eye {
  display: none;
}

.calendar-toggle-all-hidden .visibility-icon-eye-off {
  display: block;
}

.calendar-toggle-all-visible .visibility-icon-eye {
  display: block;
}

.calendar-toggle-all-visible .visibility-icon-eye-off {
  display: none;
}
.mini-toggle-button {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  display: flex;
  font-size: 16px;
  font-weight: 700;
  height: 36px;
  justify-content: center;
  line-height: 1;
  padding: 0;
  width: 36px;
}

.view-button {
  background: transparent;
  border-color: transparent;
  border-radius: 0;
  font-weight: 600;
  min-width: 68px;
  padding: 9px 10px;
}

.view-button:first-child {
  border-radius: 8px;
}

.view-button:last-child {
  border-radius: 8px;
}

.view-button.active {
  background: rgba(47, 103, 216, 0.1);
  border-color: transparent;
  color: #184ca8;
  font-weight: 700;
  position: relative;
  z-index: 1;
}

.view-button:hover,
.library-view-button:hover {
  background: var(--surface-soft);
  border-color: transparent;
}

.sidebar-section {
  border-top: 1px solid var(--line);
  margin-top: 18px;
  padding-top: 14px;
}

.mini-calendar-section {
  border-top: 0;
  margin-top: 0;
}

.mini-calendar-section.collapsed .mini-calendar {
  display: none;
}

.calendars-section {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.calendar-side-toggle {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  grid-template-columns: 1fr 1fr;
  margin: 0 0 12px;
  padding: 4px;
}

.calendar-side-button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  display: flex;
  font-size: 13px;
  font-weight: 800;
  height: 32px;
  justify-content: center;
  padding: 0 8px;
}

.calendar-side-button.active {
  background: var(--surface);
  box-shadow: 0 1px 4px rgba(37, 46, 74, 0.12);
  color: var(--text);
}

.section-header {
  justify-content: space-between;
  margin-bottom: 14px;
}

.section-actions {
  align-items: center;
  display: inline-flex;
  gap: 4px;
}

.panel-actions {
  align-items: center;
  display: flex;
  gap: 8px;
}

.section-header span {
  color: var(--muted);
  font-size: 13px;
}

.mini-calendar {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(7, 1fr);
}

.mini-calendar span {
  align-items: center;
  border-radius: 8px;
  color: var(--muted);
  display: flex;
  font-size: 13px;
  height: 28px;
  justify-content: center;
}

.mini-calendar .active-day {
  background: var(--blue);
  color: white;
  font-weight: 700;
}

.calendar-list {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 4px;
}

.calendar-side-empty {
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  color: var(--muted);
  display: grid;
  gap: 4px;
  padding: 14px;
}

.calendar-side-empty strong {
  color: var(--text);
  font-size: 14px;
}

.calendar-side-empty span {
  font-size: 13px;
}

.calendar-row {
  align-items: center;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: 18px 22px 1fr auto;
  padding: 8px 6px;
  position: relative;
}

.calendar-row:hover {
  background: var(--surface-soft);
}

.calendar-row.calendar-row-dragging {
  opacity: 0.55;
}

.calendar-row.calendar-drag-over-before::before,
.calendar-row.calendar-drag-over-after::after {
  background: var(--blue);
  border-radius: 999px;
  content: "";
  height: 3px;
  left: 6px;
  position: absolute;
  right: 6px;
}

.calendar-row.calendar-drag-over-before::before {
  top: -5px;
}

.calendar-row.calendar-drag-over-after::after {
  bottom: -5px;
}

.calendar-row.personal-calendar-row {
  background: #eef3ff;
  border: 1px solid #c8d6ff;
}

.calendar-row.personal-calendar-row:hover,
.calendar-row.personal-calendar-row.menu-open {
  background: #e5edff;
}

.calendar-reorder-handle {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: #98a2b3;
  cursor: grab;
  display: flex;
  font-size: 14px;
  font-weight: 800;
  height: 26px;
  justify-content: center;
  letter-spacing: -5px;
  line-height: 1;
  opacity: 0;
  padding: 0;
  transition: opacity 0.14s ease, background-color 0.14s ease, color 0.14s ease;
  width: 18px;
}

.calendar-row:hover .calendar-reorder-handle,
.calendar-row:focus-within .calendar-reorder-handle,
.calendar-row.menu-open .calendar-reorder-handle {
  opacity: 1;
}

.calendar-reorder-handle:hover {
  background: #e9eef8;
  color: var(--text);
}

.calendar-reorder-handle:active {
  cursor: grabbing;
}

.calendar-visibility-button {
  background: transparent;
  border: 3px solid currentColor;
  border-radius: 6px;
  height: 22px;
  padding: 0;
  width: 22px;
}

.calendar-visibility-button.visible {
  background: currentColor;
}

.calendar-name {
  font-size: 15px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-main {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.calendar-assignment-summary {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.calendar-coverage-status {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  padding: 3px 7px;
  white-space: nowrap;
}

.calendar-coverage-status.covered {
  background: #e9f8f1;
  border-color: #b7e4cf;
  color: var(--green);
}

.calendar-coverage-status.under,
.calendar-coverage-status.over {
  background: #fff5df;
  border-color: #f0cf86;
  color: var(--amber);
}

.calendar-coverage-status.empty {
  background: var(--surface-soft);
  color: var(--muted);
}

.calendar-worker-chip-list {
  align-items: center;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
}

.calendar-worker-chip {
  align-items: center;
  background: var(--blue-soft);
  border: 1px solid #c8d6ff;
  border-radius: 999px;
  color: var(--blue);
  display: inline-flex;
  font-size: 10px;
  font-weight: 900;
  height: 22px;
  justify-content: center;
  min-width: 22px;
  padding: 0 6px;
}

.calendar-worker-chip.more {
  background: var(--surface);
  color: var(--muted);
}

.calendar-menu-button {
  background: white;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  font-size: 17px;
  height: 32px;
  line-height: 1;
  opacity: 0;
  padding: 0;
  pointer-events: none;
  transition: opacity 0.14s ease;
  width: 32px;
}

.calendar-row:hover .calendar-menu-button,
.calendar-row:focus-within .calendar-menu-button {
  opacity: 1;
  pointer-events: auto;
}

.calendar-menu-button:hover {
  background: var(--surface-soft);
  border-color: var(--line-strong);
  color: var(--text);
}

.calendar-row.menu-open {
  background: var(--surface-soft);
}

.calendar-row.menu-open .calendar-menu-button {
  opacity: 1;
  pointer-events: auto;
}

.calendar-quick-menu {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 4px;
  grid-column: 1 / -1;
  margin-top: 2px;
  padding: 6px;
  width: 100%;
  z-index: 5;
}

.calendar-quick-menu button {
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: var(--text);
  font: inherit;
  padding: 9px 10px;
  text-align: left;
}

.calendar-quick-menu button:hover {
  background: var(--blue-soft);
  color: var(--blue-dark);
}
.calendar-settings-overlay {
  align-items: center;
  background: rgba(31, 41, 51, 0.48);
  display: none;
  inset: 0;
  justify-content: center;
  padding: 32px;
  position: fixed;
  z-index: 120;
}

.calendar-settings-overlay.open {
  display: flex;
}

.calendar-settings-dialog {
  background: var(--surface);
  border-radius: 8px;
  box-shadow: var(--shadow);
  max-height: calc(100vh - 64px);
  max-width: 760px;
  overflow: auto;
  padding: 22px;
  width: min(760px, 100%);
}

.calendar-settings-form {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr 1fr;
}

.calendar-settings-form .full {
  grid-column: 1 / -1;
}

.calendar-typography-settings-panel {
  max-width: 920px;
}

.calendar-typography-card {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 16px;
  padding: 18px;
}

.calendar-typography-mode {
  background: #eef2f7;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 4px;
}

.calendar-typography-mode label {
  align-items: center;
  border-radius: 6px;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  font-size: 14px;
  font-weight: 900;
  justify-content: center;
  min-height: 42px;
}

.calendar-typography-mode label.active {
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(31, 41, 51, 0.14);
  color: var(--blue);
}

.calendar-typography-mode input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.calendar-typography-copy strong,
.calendar-typography-copy span {
  display: block;
}

.calendar-typography-copy span {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}

.calendar-typography-editor.is-disabled {
  opacity: 0.54;
}

.calendar-typography-control {
  margin-top: 0;
}

.calendar-typography-preview {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 14px;
}

.calendar-typography-preview strong,
.calendar-typography-preview span {
  display: block;
}

.calendar-personal-typography .month-event-pill,
.calendar-personal-typography .table-view tbody td,
.calendar-personal-typography .table-view tbody td span,
.calendar-personal-typography .table-view tbody td strong {
  color: var(--calendar-personal-text-color) !important;
  font-family: var(--calendar-personal-font-family) !important;
  font-size: var(--calendar-personal-font-size) !important;
  font-style: var(--calendar-personal-font-style) !important;
  font-weight: var(--calendar-personal-font-weight) !important;
}

.calendar-personal-typography .event-card-content,
.calendar-personal-typography .event-card-content strong,
.calendar-personal-typography .event-card-content span {
  color: var(--calendar-personal-text-color) !important;
  font-family: var(--calendar-personal-font-family) !important;
  font-size: var(--calendar-personal-card-font-size) !important;
  font-style: var(--calendar-personal-font-style) !important;
  font-weight: var(--calendar-personal-font-weight) !important;
}

.calendar-coverage-section {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 14px;
  padding: 16px;
}

.calendar-coverage-header {
  align-items: flex-start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.calendar-coverage-header strong,
.calendar-coverage-header span,
.calendar-coverage-card strong,
.calendar-coverage-card span {
  display: block;
}

.calendar-coverage-header > div > span,
.calendar-coverage-card span {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}

.calendar-coverage-chip {
  background: var(--blue-soft);
  border: 1px solid #c8d6ff;
  border-radius: 999px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  padding: 6px 10px;
  white-space: nowrap;
}

.calendar-coverage-list {
  display: grid;
  gap: 8px;
}

.calendar-rule-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.calendar-coverage-card {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 10px 12px;
}

.calendar-coverage-empty {
  color: var(--muted);
  margin: 0;
}

.calendar-access-label {
  color: var(--muted);
  display: block;
  font-size: 11px;
  font-weight: 800;
  margin-top: 2px;
  text-transform: uppercase;
}

.calendar-row.readonly .calendar-menu-button {
  color: var(--muted);
}

.calendar-access-grid,
.calendar-access-overrides,
.calendar-access-new-override {
  display: grid;
  gap: 10px;
}

.calendar-access-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.calendar-access-role-row,
.calendar-access-override-row {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 10px 12px;
}

.calendar-access-role-row {
  grid-template-columns: minmax(0, 1fr) 150px;
}

.calendar-access-role-row > span,
.calendar-access-overrides-header strong,
.calendar-access-override-row strong {
  font-weight: 900;
}

.calendar-access-overrides-header span,
.calendar-access-override-row span {
  color: var(--muted);
  display: block;
  font-size: 13px;
  margin-top: 3px;
}

.calendar-access-override-row {
  grid-template-columns: minmax(0, 1fr) 150px auto;
}

.calendar-access-new-override {
  grid-template-columns: minmax(0, 1fr) 150px;
}

.calendar-access-remove {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: 13px;
  font-weight: 800;
  gap: 6px;
}

.event-card.readonly {
  cursor: default;
}

.event-preview-readonly-badge {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  min-height: 34px;
  padding: 0 12px;
}

.calendar-coverage-form {
  display: grid;
  gap: 12px;
  grid-template-columns: 1.2fr 0.8fr 0.8fr;
}

.calendar-rule-inline-fields {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr;
}

.calendar-rule-day-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-rule-day {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 7px;
  justify-content: center;
  min-height: 40px;
  padding: 8px;
}

.calendar-rule-day span {
  font-size: 12px;
  font-weight: 900;
}

.calendar-coverage-date-fields {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr 1fr;
}

.calendar-coverage-actions {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.calendar-coverage-error {
  color: #b42318;
  font-size: 13px;
  font-weight: 800;
  margin: 0;
  min-height: 18px;
}

.calendar-coverage-date-fields[hidden] {
  display: none;
}

@media (max-width: 700px) {
  .calendar-settings-overlay {
    padding: 16px;
  }

  .calendar-settings-dialog {
    width: min(100%, calc(100vw - 32px));
  }

  .calendar-settings-form,
  .calendar-coverage-form,
  .calendar-coverage-date-fields,
  .calendar-access-grid,
  .calendar-access-role-row,
  .calendar-access-override-row,
  .calendar-access-new-override,
  .calendar-rule-day-grid {
    grid-template-columns: 1fr;
  }

  .calendar-coverage-header,
  .calendar-coverage-card,
  .calendar-coverage-actions {
    align-items: stretch;
    flex-direction: column;
  }
}

.calendar-danger-zone {
  align-items: center;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 4px;
  padding-top: 16px;
}

.calendar-danger-zone strong,
.calendar-danger-zone span,
.calendar-delete-confirmation strong,
.calendar-delete-confirmation p {
  display: block;
}

.calendar-danger-zone span,
.calendar-delete-confirmation p {
  color: var(--muted);
  font-size: 13px;
  margin: 4px 0 0;
}

.calendar-delete-confirmation {
  background: #fff5f5;
  border: 1px solid #efb0b0;
  border-radius: 8px;
  padding: 14px;
}

.calendar-delete-confirmation[hidden] {
  display: none;
}

.calendar-color-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(6, 34px);
}

.calendar-color-option input {
  opacity: 0;
  position: absolute;
  width: 0;
}

.calendar-color-option span {
  background: currentColor;
  border-radius: 999px;
  display: block;
  height: 30px;
  width: 30px;
}

.calendar-color-option input:checked + span {
  box-shadow:
    0 0 0 3px white,
    0 0 0 5px currentColor;
}

.custom-color-toggle {
  align-items: center;
  background: white;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--text);
  display: flex;
  font-size: 22px;
  height: 36px;
  justify-content: center;
  margin-top: 12px;
  width: 36px;
}

.custom-color-toggle:hover {
  background: var(--surface-soft);
  border-color: #aeb7c8;
}

.custom-color-panel {
  display: none;
  gap: 12px;
  grid-template-columns: 72px 1fr;
  margin-top: 12px;
}

.custom-color-panel.open {
  display: grid;
}

.calendar-color-picker {
  height: 44px;
  padding: 4px;
}

.field-label {
  color: var(--muted);
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 7px;
}

select,
input,
textarea {
  background: white;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--text);
  min-height: 40px;
  padding: 9px 11px;
  width: 100%;
}

textarea {
  min-height: 92px;
  resize: vertical;
}

.topbar {
  align-items: center;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  display: flex;
  height: 82px;
  justify-content: space-between;
  padding: 0 22px;
  position: relative;
  z-index: 20;
}

.date-controls {
  gap: 12px;
}

.topbar-actions {
  align-items: center;
  display: flex;
  gap: 12px;
}

.week-layout-toggle {
  background: #ffffff;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  min-height: 40px;
  padding: 0 12px;
  white-space: nowrap;
}

.week-layout-toggle:hover,
.week-layout-toggle:focus-visible {
  background: var(--surface-soft);
  border-color: #aeb7c8;
  outline: none;
}

.week-layout-toggle[aria-pressed="true"] {
  background: #eaf0ff;
  border-color: #b8c7f3;
  color: #2f54b7;
}

.calendar-tools-wrap {
  position: relative;
}

.calendar-tools-button.is-active,
.calendar-tools-button[aria-expanded="true"] {
  background: #eaf0ff;
  border-color: #b8c7f3;
  color: #2f54b7;
  font-weight: 800;
}

.calendar-tools-menu {
  background: #ffffff;
  border: 1px solid #d9e0ef;
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.16);
  display: grid;
  gap: 4px;
  min-width: 176px;
  padding: 7px;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 80;
}

.calendar-tools-menu[hidden] {
  display: none;
}

.calendar-tools-menu button {
  background: transparent;
  border: 0;
  border-radius: 7px;
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  min-height: 34px;
  padding: 8px 10px;
  text-align: left;
}

.calendar-tools-menu button:hover,
.calendar-tools-menu button:focus-visible {
  background: #eef4ff;
  color: #2f54b7;
  outline: none;
}

.calendar-tools-selection-count {
  color: #667085;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 10px 3px;
}

.calendar-event-select-mode .event-card,
.calendar-event-select-mode .month-event-pill,
.calendar-event-select-mode .table-view tbody tr[data-event-id] {
  cursor: pointer;
}
.header-create-event-button {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 28px;
  font-weight: 500;
  height: 40px;
  justify-content: center;
  line-height: 1;
  padding: 0;
  width: 40px;
}

.header-create-event-button:hover {
  background: var(--surface-soft);
  border-color: #aeb7c8;
}

body.calendar-inspector-open .granade-auth-pill {
  right: calc(min(420px, calc(100vw - 32px)) + 18px);
}

body.calendar-inspector-maximized .granade-auth-pill {
  display: none;
}
.settings-button {
  font-size: 20px;
}
.calendar-search-wrap {
  align-items: center;
  display: flex;
  justify-content: flex-end;
  min-width: 44px;
  position: relative;
}

.calendar-search-shell {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  display: grid;
  gap: 10px;
  grid-template-columns: 28px minmax(180px, 320px) auto auto;
  min-height: 46px;
  padding: 0 10px 0 16px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.calendar-search-shell[hidden] {
  display: none;
}

.calendar-search-shell:focus-within {
  border-color: #c8d2e4;
  box-shadow: 0 14px 38px rgba(15, 23, 42, 0.12);
}

.calendar-search-wrap.search-open .calendar-search-toggle {
  display: none;
}

.calendar-search-icon,
.calendar-search-action {
  align-items: center;
  color: var(--muted);
  display: inline-flex;
  font-size: 18px;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.calendar-search-action {
  background: transparent;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  padding: 0;
}

.calendar-search-action:hover {
  background: var(--surface-soft);
  color: var(--text);
}

.calendar-search-action.is-listening {
  background: var(--blue-soft);
  color: var(--blue);
}

.calendar-search-input {
  background: transparent;
  border: 0;
  color: var(--text);
  min-height: 44px;
  outline: 0;
  padding: 0;
  width: 100%;
}

.calendar-search-results {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.12);
  max-height: 320px;
  min-width: 360px;
  overflow: auto;
  padding: 8px;
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  z-index: 60;
}

.calendar-search-results[hidden] {
  display: none;
}

.calendar-search-result {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  display: grid;
  gap: 2px;
  grid-template-columns: 1fr auto;
  padding: 10px 12px;
  text-align: left;
  width: 100%;
}

.calendar-search-result:hover,
.calendar-search-result:focus-visible {
  background: var(--surface-soft);
  outline: 0;
}

.calendar-search-result strong {
  color: var(--text);
  font-size: 14px;
}

.calendar-search-result span {
  color: var(--muted);
  font-size: 12px;
}

.calendar-search-result .calendar-search-pill {
  background: var(--blue-soft);
  border-radius: 999px;
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
  padding: 4px 8px;
  text-transform: uppercase;
}

.calendar-search-empty {
  color: var(--muted);
  font-size: 13px;
  padding: 12px;
}

.date-controls h2 {
  font-size: 25px;
  margin-left: 10px;
}

.calendar-grid-shell {
  background: var(--surface);
  flex: 1 1 auto;
  height: auto;
  isolation: isolate;
  min-height: 0;
  overflow: auto;
  position: relative;
  scrollbar-gutter: stable;
}
.calendar-loading-state {
  align-items: center;
  background: linear-gradient(180deg, rgba(247, 248, 251, 0.96), rgba(255, 255, 255, 0.96));
  display: flex;
  inset: 0;
  justify-content: center;
  position: absolute;
  z-index: 45;
}

.calendar-loading-state[hidden] {
  display: none;
}

.calendar-loading-card {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px 26px;
  text-align: center;
}

.calendar-loading-card span:last-child {
  color: var(--muted);
  font-size: 14px;
}

.calendar-loading-spinner {
  animation: calendar-loading-spin 0.85s linear infinite;
  border: 3px solid var(--line);
  border-top-color: var(--blue);
  border-radius: 999px;
  height: 28px;
  width: 28px;
}

@keyframes calendar-loading-spin {
  to {
    transform: rotate(360deg);
  }
}

.week-grid {
  background: var(--surface);
  display: grid;
  grid-template-columns: 72px repeat(var(--calendar-week-day-count, 5), minmax(160px, 1fr));
  min-height: 920px;
}

.calendar-full-week .week-grid {
  min-width: 1192px;
}

.day-grid {
  background: var(--surface);
  display: grid;
  grid-template-columns: 72px minmax(420px, 1fr);
  min-height: 920px;
}

.month-grid {
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(7, minmax(120px, 1fr));
  min-height: calc(100vh - 82px);
  background: var(--line);
}

.table-grid {
  display: block;
  min-height: calc(100vh - 82px);
}

.workers-grid,
.availability-grid {
  background: var(--surface-soft);
  display: block;
  min-height: calc(100vh - 82px);
  padding: 20px;
}

.worker-schedule-view,
.availability-view {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.worker-planning-header {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  min-height: 72px;
  padding: 14px 18px;
}

.worker-planning-kicker {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.worker-planning-header h2 {
  font-size: 24px;
  line-height: 1.15;
  margin: 2px 0 0;
}

.worker-planning-count,
.availability-legend {
  align-items: center;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 13px;
  font-weight: 800;
  gap: 8px;
  justify-content: flex-end;
}

.availability-dot {
  border-radius: 999px;
  display: inline-block;
  height: 10px;
  width: 10px;
}

.availability-dot.available {
  background: #4f9a64;
}

.availability-dot.booked {
  background: #4d67d8;
}

.availability-dot.unavailable {
  background: #b2534c;
}

.worker-schedule-grid,
.availability-matrix {
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  grid-template-columns: minmax(180px, 240px) repeat(var(--worker-day-count), minmax(150px, 1fr));
  overflow: auto;
}

.worker-schedule-corner,
.worker-schedule-day-head,
.worker-schedule-worker,
.worker-schedule-cell,
.availability-cell,
.worker-planning-empty {
  background: var(--surface);
}

.worker-schedule-corner,
.worker-schedule-day-head {
  align-items: center;
  display: flex;
  min-height: 54px;
  padding: 12px 14px;
}

.worker-schedule-corner {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.worker-schedule-day-head {
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.worker-schedule-day-head strong {
  font-size: 13px;
}

.worker-schedule-day-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.worker-schedule-worker {
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 116px;
  padding: 14px;
}

.worker-schedule-worker strong {
  font-size: 15px;
}

.worker-schedule-worker span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  margin-top: 4px;
}

.worker-schedule-worker.unassigned strong {
  color: #9a4d44;
}

.worker-schedule-cell {
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 116px;
  padding: 10px;
}

.worker-schedule-quiet {
  align-items: center;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  color: var(--muted);
  display: flex;
  flex: 1;
  font-size: 12px;
  font-weight: 800;
  justify-content: center;
}

.worker-schedule-event {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--event-color, #4d67d8);
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-height: 68px;
  padding: 9px 10px;
  text-align: left;
  width: 100%;
}

.worker-schedule-event strong {
  font-size: 13px;
  line-height: 1.25;
}

.worker-schedule-event span,
.worker-schedule-event em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
  line-height: 1.25;
}

.worker-schedule-event:hover,
.availability-cell:hover {
  border-color: #9aa9d8;
  box-shadow: 0 10px 22px rgba(36, 48, 82, 0.08);
}

.availability-cell {
  border: 0;
  border-top: 1px solid var(--line);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 88px;
  padding: 12px;
  text-align: left;
}

.availability-cell strong {
  font-size: 14px;
  line-height: 1.3;
}

.availability-cell span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  margin-top: 2px;
}

.availability-cell.available {
  box-shadow: inset 4px 0 0 #4f9a64;
}

.availability-cell.booked {
  box-shadow: inset 4px 0 0 #4d67d8;
}

.availability-cell.unavailable,
.availability-cell.conflict {
  background: #fff8f7;
  box-shadow: inset 4px 0 0 #b2534c;
}

.availability-cell.conflict strong {
  color: #9a4d44;
}

.worker-planning-empty {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  padding: 28px;
  text-align: center;
}

.time-column,
.day-column {
  position: relative;
}

.day-column {
  border-left: 1px solid var(--line);
}

.day-header,
.time-header {
  align-items: center;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  display: flex;
  height: 104px;
  justify-content: center;
  position: sticky;
  top: 0;
  z-index: 30;
}

.time-header {
  z-index: 32;
}

.day-header {
  flex-direction: column;
  gap: 5px;
}

.calendar-day-share-actions {
  opacity: 0;
  pointer-events: none;
  position: absolute;
  right: 10px;
  top: 10px;
  transition: opacity 0.14s ease, transform 0.14s ease;
  transform: translateY(-2px);
  z-index: 34;
}

.day-header:hover .calendar-day-share-actions,
.day-header:focus-within .calendar-day-share-actions {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.calendar-day-share-trigger {
  align-items: center;
  display: inline-flex;
  justify-content: center;
  min-width: 30px;
}

.calendar-day-share-menu {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16);
  display: grid;
  gap: 4px;
  min-width: 96px;
  padding: 5px;
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 36;
}

.calendar-day-share-menu[hidden] {
  display: none !important;
}

.calendar-day-share-actions button {
  background: #eef2ff;
  border: 1px solid #dbe3f7;
  border-radius: 7px;
  color: #3153b3;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  padding: 6px 8px;
}

.calendar-day-share-menu button {
  text-align: left;
  width: 100%;
}

.calendar-day-share-actions button:hover,
.calendar-day-share-actions button:focus-visible {
  background: #dfe7ff;
  outline: none;
}

.day-header::after,
.time-header::after {
  background: var(--line);
  bottom: -1px;
  content: "";
  height: 1px;
  left: 0;
  position: absolute;
  right: 0;
}

.day-header strong {
  font-size: 24px;
}

.day-header span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.time-slot,
.grid-slot {
  border-bottom: 1px solid var(--line);
  height: 82px;
}

.grid-slot {
  background: transparent;
  border-left: 0;
  border-right: 0;
  border-top: 0;
  display: block;
  padding: 0;
  touch-action: none;
  width: 100%;
}

.grid-slot:hover {
  background: rgba(47, 103, 216, 0.06);
}

.time-slot {
  color: var(--muted);
  font-size: 12px;
  padding-right: 10px;
  text-align: right;
}

.selection-preview {
  align-items: flex-start;
  background: rgba(47, 103, 216, 0.18);
  border: 2px solid rgba(47, 103, 216, 0.62);
  border-radius: 8px;
  color: #174ea6;
  display: flex;
  font-size: 12px;
  font-weight: 700;
  left: 10px;
  overflow: hidden;
  padding: 8px 10px;
  pointer-events: none;
  position: absolute;
  right: 10px;
  z-index: 3;
}

.calendar-block-status {
  align-items: flex-start;
  background: color-mix(in srgb, var(--block-status-color) 18%, white);
  border: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--block-status-color) 28%, white);
  border-left: 5px solid var(--block-status-color);
  border-radius: 0;
  box-sizing: border-box;
  color: var(--text);
  display: flex;
  gap: 8px;
  justify-content: space-between;
  left: 0;
  overflow: hidden;
  padding: 8px 10px 14px;
  position: absolute;
  right: 0;
  z-index: 0;
}

.calendar-block-status::before {
  background-image: repeating-linear-gradient(
    to bottom,
    color-mix(in srgb, var(--block-status-color) 20%, var(--line)) 0 1px,
    transparent 1px var(--calendar-hour-height, 82px)
  );
  background-position-y: calc(var(--block-grid-offset, 0px) - var(--calendar-hour-height, 82px));
  bottom: 0;
  content: "";
  left: 0;
  pointer-events: none;
  position: absolute;
  right: 0;
  top: 0;
  z-index: 0;
}

.calendar-block-status > * {
  position: relative;
  z-index: 1;
}

.calendar-block-status strong,
.calendar-block-status span {
  display: block;
  line-height: 1.2;
}

.calendar-block-status strong {
  color: color-mix(in srgb, var(--block-status-color) 72%, #111827);
  font-size: 13px;
  font-weight: 900;
}

.calendar-block-status span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  margin-top: 2px;
}

.calendar-block-status-remove-button {
  align-items: center;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid color-mix(in srgb, var(--block-status-color) 28%, white);
  border-radius: 999px;
  color: var(--block-status-color);
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 16px;
  font-weight: 900;
  height: 24px;
  justify-content: center;
  line-height: 1;
  padding: 0;
  width: 24px;
}

.calendar-block-status-remove-button:hover {
  background: #ffffff;
}

.calendar-block-status-resize-handle {
  background: transparent;
  border: 0;
  cursor: ns-resize;
  height: 12px;
  left: 0;
  padding: 0;
  position: absolute;
  right: 0;
}

.calendar-block-status-resize-handle.is-top {
  top: 0;
}

.calendar-block-status-resize-handle.is-bottom {
  bottom: 0;
}

.calendar-block-status-resize-handle::after {
  background: var(--block-status-color);
  border-radius: 999px;
  content: "";
  height: 3px;
  left: 50%;
  opacity: 0;
  position: absolute;
  transform: translateX(-50%);
  transition: opacity 0.14s ease;
  width: 34px;
}

.calendar-block-status-resize-handle.is-top::after {
  top: 4px;
}

.calendar-block-status-resize-handle.is-bottom::after {
  bottom: 4px;
}

.calendar-block-status:hover .calendar-block-status-resize-handle::after,
.calendar-block-status.resizing .calendar-block-status-resize-handle::after {
  opacity: 0.58;
}

.calendar-block-status-menu {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.18);
  display: grid;
  min-width: 206px;
  overflow: hidden;
  padding: 6px;
  position: fixed;
  z-index: 120;
}

.calendar-block-status-menu[hidden] {
  display: none;
}

.calendar-block-status-menu-header {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 2px;
  padding: 8px 9px 10px;
}

.calendar-block-status-menu-header span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.calendar-block-status-menu-header strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
}

.calendar-block-status-menu button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: var(--text);
  cursor: pointer;
  display: grid;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  gap: 8px;
  grid-template-columns: 14px minmax(0, 1fr);
  min-height: 34px;
  padding: 7px 9px;
  text-align: left;
}

.calendar-block-status-menu button:hover,
.calendar-block-status-menu button.active {
  background: var(--surface-soft);
}

.calendar-block-status-menu button.active {
  color: #2546a6;
}

.calendar-block-status-menu button.danger {
  color: #b13f38;
}

.calendar-block-status-menu hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 5px 0;
}

.menu-status-dot {
  background: var(--block-status-color);
  border-radius: 999px;
  display: inline-block;
  height: 10px;
  justify-self: center;
  width: 10px;
}

.event-preview-popover {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.22);
  box-sizing: border-box;
  max-height: min(640px, calc(100vh - 32px));
  overflow: auto;
  padding: 0;
  position: fixed;
  width: min(470px, calc(100vw - 32px));
  z-index: 90;
}

.event-preview-popover[hidden] {
  display: none;
}

.event-preview-header {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--event-preview-color) 14%, #ffffff), #ffffff 58%),
    #ffffff;
  border-bottom: 1px solid color-mix(in srgb, var(--event-preview-color) 24%, var(--line));
  display: grid;
  gap: 12px;
  padding: 16px 18px 18px;
  position: relative;
}

.event-preview-header::before {
  background: var(--event-preview-spine-color, var(--event-preview-color));
  border-radius: 999px;
  content: "";
  height: calc(100% - 28px);
  left: 0;
  position: absolute;
  top: 14px;
  width: 5px;
}

.event-preview-actions {
  align-items: center;
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  justify-content: flex-end;
  padding-left: 12px;
  padding-right: 32px;
  position: relative;
}

.event-preview-status-control {
  align-items: center;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid color-mix(in srgb, var(--event-preview-color) 36%, var(--line-strong));
  border-radius: 999px;
  display: inline-flex;
  flex: 0 1 auto;
  min-width: 0;
  min-height: 36px;
  padding: 4px;
  position: relative;
  box-shadow: 0 10px 22px color-mix(in srgb, var(--event-preview-color) 10%, transparent);
}

.event-preview-status-picker {
  min-width: 0;
  position: relative;
}

.event-preview-status-trigger {
  align-items: center;
  background: color-mix(in srgb, var(--status-color, var(--event-preview-color)) 9%, #ffffff);
  border: 1px solid color-mix(in srgb, var(--status-color, var(--event-preview-color)) 34%, transparent);
  border-radius: 999px;
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  gap: 5px;
  min-height: 30px;
  min-width: 0;
  padding: 4px 8px;
}

.event-preview-status-trigger:hover,
.event-preview-status-trigger:focus-visible {
  background: color-mix(in srgb, var(--status-color, var(--event-preview-color)) 14%, #ffffff);
  border-color: color-mix(in srgb, var(--status-color, var(--event-preview-color)) 54%, transparent);
  outline: none;
}

.event-preview-status-trigger[aria-expanded="true"] {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--status-color, var(--event-preview-color)) 18%, transparent);
}

.event-preview-status-dot {
  background: var(--status-color, var(--event-preview-color));
  border-radius: 999px;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--status-color, var(--event-preview-color)) 16%, transparent);
  flex: 0 0 auto;
  height: 8px;
  width: 8px;
}

.event-preview-status-chevron {
  color: var(--muted);
  font-size: 13px;
  margin-left: auto;
}

.event-preview-status-menu {
  background: #ffffff;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.18);
  display: grid;
  gap: 4px;
  min-width: 190px;
  padding: 6px;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 30;
}

.event-preview-status-menu[hidden] {
  display: none;
}

.event-preview-status-option {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
  display: flex;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  gap: 9px;
  justify-content: flex-start;
  min-height: 34px;
  padding: 8px 10px;
  text-align: left;
  width: 100%;
}

.event-preview-status-option:hover,
.event-preview-status-option:focus-visible,
.event-preview-status-option[aria-selected="true"] {
  background: color-mix(in srgb, var(--status-color, var(--event-preview-color)) 11%, #ffffff);
  outline: none;
}

.event-preview-status-option[aria-selected="true"] {
  color: color-mix(in srgb, var(--status-color, var(--event-preview-color)) 76%, #111827);
}

.event-preview-title-row {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  min-width: 0;
  padding-right: 8px;
}

.event-preview-color {
  background: var(--event-preview-color);
  border: 3px solid #ffffff;
  border-radius: 999px;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--event-preview-color) 38%, var(--line));
  flex: 0 0 auto;
  height: 18px;
  margin-top: 31px;
  width: 18px;
}

.event-preview-kicker {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  margin: 0;
  text-transform: uppercase;
}

.event-preview-title-row h3 {
  color: var(--text);
  font-size: 24px;
  line-height: 1.15;
  margin: 2px 0 4px;
  overflow-wrap: anywhere;
}

.event-preview-time-row {
  align-items: center;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 14px;
  gap: 8px;
  margin: 0;
}

.event-preview-time-row span {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid color-mix(in srgb, var(--event-preview-color) 24%, var(--line));
  border-radius: 999px;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  padding: 5px 8px;
}

.event-preview-action-button {
  align-items: center;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 auto;
  font: inherit;
  font-size: 13px;
  font-weight: 850;
  justify-content: center;
  line-height: 1;
  min-height: 36px;
  padding: 7px 11px;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.event-preview-action-button:hover,
.event-preview-action-button:focus-visible {
  background: #ffffff;
  border-color: color-mix(in srgb, var(--event-preview-color) 35%, var(--line-strong));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--event-preview-color) 11%, transparent);
  outline: none;
}

.event-preview-action-edit {
  background: color-mix(in srgb, var(--event-preview-color) 12%, #ffffff);
  border-color: color-mix(in srgb, var(--event-preview-color) 34%, var(--line-strong));
  color: color-mix(in srgb, var(--event-preview-color) 70%, var(--text));
}

.event-preview-action-edit:hover,
.event-preview-action-edit:focus-visible {
  background: color-mix(in srgb, var(--event-preview-color) 18%, #ffffff);
  border-color: color-mix(in srgb, var(--event-preview-color) 48%, var(--line-strong));
}

.event-preview-action-duplicate {
  color: color-mix(in srgb, var(--text) 84%, var(--muted));
}

.event-preview-action-delete {
  background: rgba(255, 255, 255, 0.92);
  border-color: #f0b7b2;
  color: #b42318;
}

.event-preview-action-delete:hover,
.event-preview-action-delete:focus-visible {
  background: #fff5f4;
  border-color: #e68a82;
  box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.1);
}

.event-preview-action-button.icon-only {
  font-size: 22px;
  font-weight: 500;
  justify-content: center;
  padding: 0;
  width: 34px;
}

.event-preview-action-button.icon-only[data-event-preview-close] {
  background: transparent;
  border: 0;
  border-radius: 999px;
  box-shadow: none;
  color: color-mix(in srgb, var(--text) 84%, var(--muted));
  font-size: 28px;
  height: 34px;
  min-height: 34px;
  line-height: 1;
  position: absolute;
  right: 0;
  top: 1px;
  width: 34px;
}

.event-preview-action-button.icon-only[data-event-preview-close]:hover,
.event-preview-action-button.icon-only[data-event-preview-close]:focus-visible {
  background: color-mix(in srgb, var(--event-preview-color) 9%, #ffffff);
  border: 0;
  color: var(--text);
  outline: none;
}

.event-preview-body {
  --event-preview-field-height: 92px;
  background:
    linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
  display: grid;
  gap: 14px;
  padding: 18px 22px 24px;
}

.event-preview-summary-grid {
  display: grid;
  gap: 12px;
  grid-auto-rows: minmax(var(--event-preview-field-height), auto);
  grid-template-columns: minmax(0, 1fr);
}

.event-preview-summary-tile,
.event-preview-address-card,
.event-preview-detail-row {
  background:
    linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid color-mix(in srgb, var(--event-preview-color) 16%, var(--line));
  border-radius: 12px;
  box-sizing: border-box;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.event-preview-summary-tile {
  display: grid;
  gap: 8px;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100%;
  min-height: var(--event-preview-field-height);
  padding: 14px 16px;
}

.event-preview-summary-tile span,
.event-preview-address-card span,
.event-preview-detail-label {
  color: color-mix(in srgb, var(--event-preview-color) 28%, var(--muted));
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.2;
  text-transform: uppercase;
}

.event-preview-summary-tile strong,
.event-preview-address-card strong,
.event-preview-detail-row strong {
  align-self: start;
  color: var(--text);
  display: block;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.34;
  overflow-wrap: anywhere;
}

.event-preview-address-card {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--event-preview-color) 8%, #ffffff), #ffffff 64%),
    #ffffff;
  display: grid;
  gap: 12px;
  min-height: var(--event-preview-field-height);
  padding: 16px 18px;
}

.event-preview-address-heading {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  min-width: 0;
}

.event-preview-address-card strong {
  font-size: 16px;
  max-width: 100%;
}

.event-address-input-shell input {
  padding-right: 58px;
}

.event-address-map-button {
  align-items: center;
  background: color-mix(in srgb, var(--event-preview-color) 8%, #ffffff);
  border: 1px solid color-mix(in srgb, var(--event-preview-color) 28%, var(--line-strong));
  border-radius: 999px;
  color: color-mix(in srgb, var(--event-preview-color) 64%, var(--blue-strong));
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 850;
  justify-content: center;
  min-height: 30px;
  padding: 0 11px;
  transition: background-color 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease, transform 0.14s ease;
}

.event-address-input-shell .event-address-map-button {
  min-height: 28px;
  position: absolute;
  right: 8px;
  top: 8px;
  z-index: 2;
}

.event-address-map-button:hover,
.event-address-map-button:focus-visible {
  background: color-mix(in srgb, var(--event-preview-color) 22%, #ffffff);
  border-color: color-mix(in srgb, var(--event-preview-color) 54%, var(--line-strong));
  box-shadow: 0 8px 18px color-mix(in srgb, var(--event-preview-color) 18%, transparent);
  outline: none;
  transform: translateY(-1px);
}

.event-preview-detail-grid {
  display: grid;
  gap: 12px;
  grid-auto-rows: minmax(var(--event-preview-field-height), auto);
  grid-template-columns: minmax(0, 1fr);
}

.event-preview-detail-row {
  display: grid;
  gap: 9px;
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: 100%;
  min-height: var(--event-preview-field-height);
  overflow: hidden;
  padding: 14px 16px;
  position: relative;
}

.event-preview-detail-row::before {
  background: color-mix(in srgb, var(--event-preview-color) 58%, transparent);
  border-radius: 999px;
  content: "";
  height: calc(100% - 24px);
  left: 0;
  opacity: 0.42;
  position: absolute;
  top: 12px;
  width: 3px;
}

.event-preview-detail-row > * {
  position: relative;
}

.event-preview-progress {
  background: color-mix(in srgb, var(--event-preview-color) 10%, #e5e7eb);
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
  width: 100%;
}

.event-preview-field-value-with-adornments {
  align-items: center;
  display: inline-flex;
  gap: 7px;
  max-width: 100%;
  min-width: 0;
}

.event-preview-assigned-worker-list {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.event-preview-assigned-worker {
  align-items: center;
  display: inline-flex;
  min-width: 0;
}

.event-preview-detail-value-text {
  color: inherit;
  display: inline;
  font: inherit;
  font-weight: inherit;
  letter-spacing: 0;
  line-height: inherit;
  overflow-wrap: anywhere;
  text-transform: none;
}

.event-preview-attachment-row {
  grid-template-rows: auto minmax(0, 1fr);
}

.event-preview-attachment-row > strong {
  display: block;
  min-width: 0;
}

.event-preview-attachment-list {
  gap: 8px;
}

.event-preview-attachment-list .attachment-file-row {
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.02);
  grid-template-columns: 44px minmax(0, 1fr) auto;
  min-height: 56px;
}

.event-preview-attachment-list .attachment-file-row strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 850;
  line-height: 1.18;
}

.event-preview-attachment-list .attachment-file-row span {
  font-size: 12px;
  font-weight: 800;
  margin-top: 3px;
}

.event-preview-linked-rows {
  display: grid;
  gap: 8px;
}

.event-preview-linked-row {
  background: #ffffff;
  border: 1px solid color-mix(in srgb, var(--event-preview-color) 14%, var(--line));
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 10px 12px;
}

.event-preview-linked-row strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 850;
}

.event-preview-linked-row div {
  display: grid;
  gap: 6px;
}

.event-preview-linked-row span {
  align-items: baseline;
  color: var(--text);
  display: flex;
  font-size: 13px;
  font-weight: 800;
  gap: 8px;
  justify-content: space-between;
}

.event-preview-linked-row em {
  color: var(--muted);
  font-style: normal;
  font-weight: 800;
}

.event-preview-field-adornment {
  display: inline-block;
  flex: 0 0 auto;
}

.event-preview-field-adornment.is-dot {
  background: var(--field-adornment-color, var(--event-preview-color, #5274cf));
  border-radius: 999px;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--field-adornment-color, #5274cf) 28%, transparent);
  height: 8px;
  width: 8px;
}

.event-preview-field-adornment.is-text {
  color: color-mix(in srgb, var(--event-preview-color) 48%, var(--muted));
  font-size: 0.84em;
  font-weight: 850;
  letter-spacing: 0;
  line-height: inherit;
  text-transform: none;
}

.event-preview-progress span {
  background: var(--event-preview-color, var(--accent));
  display: block;
  height: 100%;
}

.event-preview-section-heading {
  color: color-mix(in srgb, var(--event-preview-color) 42%, var(--muted));
  font-size: 12px;
  font-weight: 900;
  grid-column: 1 / -1;
  letter-spacing: 0;
  margin: 10px 0 -2px;
  text-transform: uppercase;
}

@media (max-width: 560px) {
  .event-preview-summary-grid,
  .event-preview-detail-grid {
    grid-template-columns: 1fr;
  }
}

.sale-event-editor {
  display: grid;
  gap: 0;
}

.sale-event-editor-card {
  overflow: hidden;
}

.sale-event-editor-card .detail-card-header {
  align-items: flex-start;
  background: #fbfcfe;
  padding: 18px 18px 14px;
}

.sale-event-editor-card .detail-card-header h3 {
  font-size: 18px;
  line-height: 1.2;
}

.sale-event-editor-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr);
  padding: 16px 18px;
}

.sale-event-editor-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.sale-event-editor-field.full {
  grid-column: auto;
}

.sale-event-editor-field > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.sale-event-editor-field input,
.sale-event-editor-field select {
  box-sizing: border-box;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  min-height: 40px;
  min-width: 0;
  padding: 8px 10px;
  width: 100%;
}

.sale-event-locked-field {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
}

.sale-event-locked-field strong,
.sale-event-locked-field small {
  display: block;
}

.sale-event-locked-field strong {
  color: var(--text);
  font-size: 15px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.sale-event-locked-field small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.sale-event-editor-section {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 12px;
  padding-top: 14px;
}

.sale-event-editor-section-header {
  display: grid;
  gap: 2px;
}

.sale-event-editor-section-header strong {
  color: var(--text);
  font-size: 15px;
  font-weight: 800;
}

.sale-event-editor-section-grid {
  display: grid;
  gap: 12px;
}

.sale-event-worker-slots {
  display: grid;
  gap: 8px;
}

.sale-event-worker-slot {
  align-items: end;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) 40px;
}

.sale-event-worker-slot label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.sale-event-worker-slot label > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.sale-event-worker-slot select {
  min-height: 40px;
}

.sale-event-worker-slot .event-preview-action-button.icon-only {
  height: 40px;
  width: 40px;
}

.sale-event-editor-empty {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.sale-worker-add-button {
  justify-self: start;
  margin-top: 2px;
}

.sale-event-invite-status {
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  min-height: 18px;
}

.sale-event-invite-status.is-error {
  color: #b42318;
}

.sale-event-editor-actions {
  background: var(--surface);
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  padding: 14px 24px 20px;
}

.event-preview-action-button.primary {
  background: var(--blue);
  border-color: var(--blue);
  color: #ffffff;
}
.event-card {
  --event-card-font-scale: var(--calendar-card-font-scale, 1);
  background: color-mix(in srgb, var(--event-color) 14%, white);
  border: 1px solid color-mix(in srgb, var(--event-color) 34%, white);
  border-radius: 8px;
  box-shadow: 0 10px 22px rgba(31, 41, 51, 0.12);
  color: var(--text);
  cursor: grab;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  left: 10px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  right: 10px;
  transition:
    left 0.12s ease,
    right 0.12s ease,
    top 0.12s ease,
    width 0.12s ease,
    height 0.12s ease,
    opacity 0.12s ease,
    box-shadow 0.16s ease;
  z-index: 1;
}

.event-buffer-visual {
  align-items: center;
  background:
    repeating-linear-gradient(
      -45deg,
      color-mix(in srgb, var(--event-color) 18%, transparent) 0 6px,
      color-mix(in srgb, var(--event-color) 10%, transparent) 6px 12px
    ),
    color-mix(in srgb, var(--event-color) 10%, transparent);
  border: 1px dashed color-mix(in srgb, var(--event-color) 36%, transparent);
  border-radius: 8px;
  color: color-mix(in srgb, var(--event-color) 70%, #1f2933);
  display: flex;
  font-size: 10px;
  font-weight: 900;
  justify-content: center;
  letter-spacing: 0;
  opacity: 0.72;
  overflow: hidden;
  pointer-events: none;
  position: absolute;
  text-transform: uppercase;
  z-index: 0;
}

.event-buffer-visual span {
  display: none;
  padding: 0 6px;
  white-space: nowrap;
}

.event-buffer-visual.has-label span {
  display: block;
}

.event-buffer-visual.is-before {
  border-bottom-left-radius: 3px;
  border-bottom-right-radius: 3px;
}

.event-buffer-visual.is-after {
  border-top-left-radius: 3px;
  border-top-right-radius: 3px;
}

.event-card.is-selection-selected {
  box-shadow:
    0 0 0 3px rgba(47, 103, 216, 0.24),
    0 16px 34px rgba(31, 41, 51, 0.18);
  outline: 2px solid rgba(47, 103, 216, 0.72);
  outline-offset: 2px;
  z-index: 6;
}

.month-event-pill.is-selection-selected {
  box-shadow: inset 0 0 0 2px rgba(47, 103, 216, 0.78);
}

.table-view tbody tr.is-selection-selected {
  background: #eef4ff;
  box-shadow: inset 0 0 0 2px rgba(47, 103, 216, 0.72);
}

.event-resize-handle {
  background: transparent;
  border: 0;
  bottom: 0;
  cursor: ns-resize;
  height: 12px;
  left: 0;
  padding: 0;
  position: absolute;
  right: 0;
}

.event-resize-handle::after {
  background: currentColor;
  border-radius: 999px;
  bottom: 4px;
  content: "";
  height: 3px;
  left: 50%;
  opacity: 0;
  position: absolute;
  transform: translateX(-50%);
  transition: opacity 0.14s ease;
  width: 34px;
}

.event-card:hover .event-resize-handle::after,
.event-card.resizing .event-resize-handle::after {
  opacity: 0.5;
}

.event-card.dragging {
  cursor: grabbing;
  opacity: 0.38;
}

.event-card.resizing {
  box-shadow: 0 14px 32px rgba(31, 41, 51, 0.18);
  transition: none;
}

.event-card.is-overlapped {
  grid-template-columns: 20px minmax(0, 1fr);
}

.event-card.is-overlapped .event-card-content {
  padding: 8px 9px;
}

.event-card.is-overlapped .event-card-status-header {
  font-size: calc(12px * var(--event-card-font-scale));
}

.event-card.is-overlapped .event-card-title-row strong,
.event-card.is-overlapped .event-card-detail-line,
.event-card.is-overlapped .event-card-title-meta {
  font-size: calc(10px * var(--event-card-font-scale));
}

.event-drag-ghost {
  align-items: flex-start;
  background: rgba(47, 103, 216, 0.86);
  border-left: 5px solid #174ea6;
  border-radius: 8px;
  box-shadow: 0 14px 32px rgba(31, 41, 51, 0.22);
  color: white;
  cursor: grabbing;
  display: flex;
  font-size: 13px;
  font-weight: 700;
  overflow: hidden;
  padding: 10px 12px;
  pointer-events: none;
  position: fixed;
  z-index: 10;
}

.event-card.scheduled {
  background: color-mix(in srgb, var(--event-color) 10%, white);
  color: color-mix(in srgb, var(--event-color) 58%, black);
}

.event-card.pending {
  background: color-mix(in srgb, var(--event-color) 16%, white);
  color: var(--text);
}

.event-card.completed {
  background: color-mix(in srgb, var(--event-color) 86%, white);
  color: white;
}

.event-card.cancelled {
  background: #eef1f5;
  color: #596273;
  opacity: 0.82;
}

.event-card.late-cancel {
  background: color-mix(in srgb, var(--event-color) 76%, white);
  color: #ffffff;
}

.event-card.cancelled .event-card-template-spine {
  background: #8a94a6;
  color: #ffffff;
}

.event-card.late-cancel .event-card-template-spine {
  background: color-mix(in srgb, var(--event-color) 86%, #7c2d12);
  color: #ffffff;
}

.event-card.cancelled .event-card-title-row strong,
.event-card.late-cancel .event-card-title-row strong {
  text-decoration: line-through;
  text-decoration-thickness: 2px;
}

.event-card.cancelled .event-card-title-row strong {
  text-decoration-color: rgba(89, 98, 115, 0.58);
}

.event-card.late-cancel .event-card-title-row strong {
  text-decoration-color: rgba(255, 255, 255, 0.7);
}

.event-card strong,
.event-card span {
  display: block;
}

.event-card-template-label {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  overflow: hidden;
  text-transform: uppercase;
  white-space: nowrap;
}

.event-card-template-spine {
  align-items: center;
  align-self: stretch;
  background: color-mix(in srgb, var(--event-color) 82%, #111827);
  color: #ffffff;
  display: flex;
  justify-content: center;
  min-height: 0;
  padding: 7px 4px;
  text-align: center;
  text-overflow: clip;
  transform: rotate(180deg);
  writing-mode: vertical-rl;
}

.event-card-content {
  align-content: start;
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 10px 30px 10px 10px;
}

.event-card-font-controls {
  align-items: center;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.52);
  border-radius: 999px;
  box-shadow: 0 5px 16px rgba(15, 23, 42, 0.14);
  display: inline-flex;
  gap: 2px;
  opacity: 0;
  padding: 2px;
  pointer-events: none;
  position: absolute;
  right: 7px;
  top: 7px;
  transform: translateY(-2px);
  transition:
    opacity 0.14s ease,
    transform 0.14s ease;
  z-index: 4;
}

.event-card:hover .event-card-font-controls,
.event-card:focus-within .event-card-font-controls,
.event-card-font-controls:focus-within {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.event-card.compact .event-card-font-controls,
.event-card.is-overlapped .event-card-font-controls {
  display: none;
}

.event-card-font-button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 999px;
  color: #1f2933;
  cursor: pointer;
  display: inline-flex;
  font-size: 10px;
  font-weight: 900;
  height: 22px;
  justify-content: center;
  line-height: 1;
  min-width: 24px;
  padding: 0 6px;
}

.event-card-font-button:hover,
.event-card-font-button:focus-visible {
  background: rgba(82, 116, 207, 0.13);
  color: #3659ba;
  outline: none;
}

.event-card-font-button:disabled {
  color: #9aa4b2;
  cursor: default;
}

.event-card-font-scale {
  color: #596273;
  display: inline-flex;
  font-size: 10px;
  font-weight: 850;
  line-height: 1;
  padding: 0 4px;
  white-space: nowrap;
}

.event-card-share-actions {
  align-items: center;
  bottom: 7px;
  display: flex;
  gap: 4px;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  right: 7px;
  transition: opacity 0.14s ease;
  z-index: 4;
}

.event-card:hover .event-card-share-actions,
.event-card:focus-within .event-card-share-actions,
.event-card-share-actions:focus-within {
  opacity: 1;
  pointer-events: auto;
}

.event-card-share-button {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.58);
  border-radius: 7px;
  box-shadow: 0 5px 14px rgba(15, 23, 42, 0.14);
  color: #1f2937;
  cursor: pointer;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  padding: 6px 7px;
}

.event-card-share-button:hover,
.event-card-share-button:focus-visible {
  background: #ffffff;
  border-color: rgba(37, 99, 235, 0.54);
  color: #1d4ed8;
  outline: none;
}

.event-card.compact .event-card-share-actions,
.event-card.is-overlapped .event-card-share-actions {
  bottom: 5px;
  right: 5px;
}

.event-card.is-overlapped .event-card-share-button[data-event-share-action="image"] {
  display: none;
}

.calendar-share-status {
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  bottom: 24px;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.24);
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  opacity: 0;
  padding: 12px 14px;
  pointer-events: none;
  position: fixed;
  right: 24px;
  transform: translateY(10px);
  transition:
    opacity 0.16s ease,
    transform 0.16s ease;
  z-index: 1200;
}

.calendar-share-status.visible {
  opacity: 1;
  transform: translateY(0);
}

.calendar-share-status[data-tone="error"] {
  background: #991b1b;
}

.event-card-recurring-badge {
  align-items: center;
  color: color-mix(in srgb, var(--event-color) 72%, #111827);
  display: flex;
  filter: drop-shadow(0 1px 1px rgba(255, 255, 255, 0.62));
  height: 22px;
  justify-content: center;
  pointer-events: none;
  position: absolute;
  right: 8px;
  top: 8px;
  width: 22px;
  z-index: 2;
}

.event-card-recurring-badge svg {
  display: block;
  fill: currentColor;
  height: 18px;
  width: 18px;
}

.event-card.compact .event-card-recurring-badge,
.event-card.is-overlapped .event-card-recurring-badge {
  right: 8px;
}

.event-card:has(.event-card-recurring-badge) .event-card-font-controls {
  top: 32px;
}

.event-card-status-header {
  color: inherit;
  display: inline-flex;
  align-items: center;
  font-size: calc(14px * var(--event-card-font-scale));
  font-weight: 950;
  gap: 5px;
  line-height: 1.08;
  max-width: calc(100% - 32px);
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.event-card .event-card-status-value,
.event-card .event-card-field-value-with-adornments,
.event-card .event-card-title-meta-value,
.event-card .event-card-assigned-worker-value {
  align-items: center;
  display: inline-flex;
  gap: 5px;
  min-width: 0;
}

.event-card .event-card-title-meta-value,
.event-card .event-card-assigned-worker-value {
  max-width: 100%;
}

.event-card .event-card-field-adornment,
.event-card .event-card-assigned-worker-adornment {
  display: inline-block;
  flex: 0 0 auto;
}

.event-card .event-card-field-adornment.is-dot,
.event-card .event-card-assigned-worker-adornment.is-dot {
  background: var(--field-adornment-color, #5274cf);
  border-radius: 999px;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--field-adornment-color, #5274cf) 28%, transparent);
  height: 7px;
  width: 7px;
}

.event-card .event-card-field-adornment.is-text,
.event-card .event-card-assigned-worker-adornment.is-text {
  font-size: 0.86em;
  font-weight: 850;
  opacity: 0.82;
}

.event-card-title-section {
  display: grid;
  gap: 2px;
  margin-bottom: 3px;
  padding-right: 0;
}

.event-card-title-row {
  align-items: center;
  display: flex;
  gap: 6px;
  min-width: 0;
}

.event-card strong {
  font-size: calc(14px * var(--event-card-font-scale));
  font-weight: 950;
  line-height: 1.08;
  margin: 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-card-detail-line {
  font-size: calc(12px * var(--event-card-font-scale));
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-card-assigned-workers {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.event-card .event-card-assigned-worker {
  align-items: center;
  display: flex;
  min-height: 15px;
  min-width: 0;
}

.event-card .event-card-assigned-worker-name {
  display: block;
  font-size: calc(12px * var(--event-card-font-scale));
  font-weight: 850;
  line-height: 1.25;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-card .event-card-assigned-worker-value {
  align-self: center;
}

.event-card .event-card-title-meta {
  align-items: center;
  display: grid;
  gap: 2px;
  font-weight: 800;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}

.event-card .event-card-title-meta-part {
  align-items: center;
  display: inline-flex;
  gap: 5px;
  line-height: 1.1;
  min-width: 0;
}

.event-card .event-card-title-meta-part.is-contact {
  font-size: calc(13px * var(--event-card-font-scale));
  font-weight: 850;
}

.event-card .event-card-title-meta-separator {
  display: none;
}

.event-card .event-card-title-meta-text {
  display: inline-block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.event-card-worker-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 4px 0 5px;
  min-width: 0;
}

.event-card-worker-row > span:last-child {
  font-size: calc(11px * var(--event-card-font-scale));
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-card.scheduled .calendar-worker-chip {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.34);
  color: #ffffff;
}

.event-card .calendar-worker-chip-list {
  display: inline-flex;
}

.event-card .calendar-worker-chip {
  display: inline-flex;
}

.event-card .crm-linked-badge,
.crm-linked-badge {
  background: #34a853;
  border-radius: 999px;
  box-shadow: 0 0 0 2px rgba(52, 168, 83, 0.18);
  display: inline-block;
  flex: 0 0 auto;
  height: 9px;
  width: 9px;
}

.event-card-crm-indicator {
  margin-left: 0;
}

.event-card.crm-sale-event-card {
  background: color-mix(in srgb, var(--event-color) 84%, white);
  color: #ffffff;
  gap: 0;
  padding: 0;
}

.event-card-crm-grid {
  display: grid;
  gap: 4px;
  min-height: 0;
  margin-top: 2px;
}

.event-card-crm-row {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.event-card-crm-row span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.05;
  text-transform: uppercase;
}

.event-card-crm-row strong {
  color: #ffffff;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.12;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-card.compact.crm-sale-event-card {
  gap: 0;
  padding: 0;
}

.event-card.compact.crm-sale-event-card .event-card-crm-row:nth-child(n+4) {
  display: none;
}

.event-card.compact {
  grid-template-columns: 20px minmax(0, 1fr);
  position: relative;
  left: auto;
  right: auto;
  top: auto;
}

.event-card.compact .event-card-template-spine {
  font-size: 9px;
  padding: 6px 3px;
}

.event-card.compact .event-card-content {
  padding: 8px 9px;
}

.month-weekday {
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  padding: 12px;
  text-transform: uppercase;
}

.month-cell {
  background: var(--surface);
  border: 0;
  color: var(--text);
  min-height: 130px;
  padding: 10px;
  text-align: left;
}

.month-cell:hover {
  background: var(--surface-soft);
}

.month-cell:disabled {
  background: #eef1f5;
  cursor: default;
}

.month-event-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 8px;
}

.month-event-pill {
  background: color-mix(in srgb, var(--event-color) 82%, white);
  border-radius: 6px;
  color: white;
  display: block;
  font-size: 12px;
  overflow: hidden;
  padding: 5px 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.month-block-status-pill {
  background: var(--block-status-bg);
  color: color-mix(in srgb, var(--block-status-color) 72%, #111827);
  box-shadow: inset 4px 0 0 var(--block-status-color);
  font-weight: 900;
}

.table-view {
  background: var(--surface);
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 20px;
}

.table-scroll {
  flex: 1;
  max-width: 100%;
  min-height: 0;
  overflow: auto;
  scrollbar-gutter: stable;
}

.table-toolbar {
  align-items: center;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: flex-start;
  min-height: 32px;
  padding: 0 12px 10px;
}

.table-summary {
  color: var(--muted);
  display: inline-flex;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.table-load-more {
  align-items: center;
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  gap: 10px;
  justify-content: center;
  padding: 12px;
}

.table-load-more span {
  font-size: 13px;
  font-weight: 700;
}

.table-column-menu-cell {
  background: var(--surface);
  border-left: 1px solid var(--line);
  box-shadow: -8px 0 14px rgba(18, 25, 38, 0.06);
  min-width: 48px;
  padding-inline: 6px;
  position: sticky;
  right: 0;
  text-align: center;
  width: 48px;
  z-index: 4;
}

.table-filter-row .table-column-menu-cell,
.table-column-menu-body {
  box-shadow: -8px 0 14px rgba(18, 25, 38, 0.04);
}

.table-column-menu-body {
  background: inherit;
  cursor: pointer;
}

.table-manage-columns-button {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
  height: 34px;
  justify-content: center;
  padding: 0;
  width: 34px;
}

.table-manage-columns-button:hover,
.table-manage-columns-button:focus {
  background: var(--surface-soft);
  color: var(--text);
  outline: none;
}

.table-manage-columns-button span {
  background: currentColor;
  border-radius: 999px;
  display: block;
  height: 2px;
  position: relative;
  width: 16px;
}

.table-manage-columns-button span::after {
  background: var(--surface);
  border: 2px solid currentColor;
  border-radius: 999px;
  content: "";
  height: 4px;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
}

.table-manage-columns-button span:nth-child(1)::after,
.table-manage-columns-button span:nth-child(3)::after {
  left: 2px;
}

.table-manage-columns-button span:nth-child(2)::after {
  right: 2px;
}
.column-manager-overlay {
  align-items: center;
  background: rgba(31, 41, 51, 0.48);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 32px;
  position: fixed;
  z-index: 100;
}

.column-manager-dialog {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(18, 25, 38, 0.28);
  display: flex;
  flex-direction: column;
  max-height: min(720px, calc(100vh - 64px));
  padding: 24px;
  width: min(560px, calc(100vw - 48px));
}

.column-manager-header h2 {
  margin: 0 0 20px;
}

.column-manager-search {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.column-manager-search span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.column-manager-search input {
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  font: inherit;
  min-height: 44px;
  padding: 10px 12px;
}

.column-manager-search input:focus {
  border-color: #9bb7f4;
  outline: 2px solid rgba(90, 125, 240, 0.16);
}

.column-manager-list {
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
  display: grid;
  gap: 2px;
  margin-inline: -4px;
  max-height: 420px;
  overflow: auto;
  padding: 12px 4px;
}

.column-manager-option {
  align-items: center;
  border-radius: 6px;
  color: var(--text);
  display: flex;
  gap: 10px;
  min-height: 38px;
  padding: 6px 8px;
}

.column-manager-option:hover {
  background: var(--surface-soft);
}

.column-manager-option input {
  accent-color: #5a8fd8;
  height: 18px;
  width: 18px;
}

.column-manager-empty {
  color: var(--muted);
  margin: 12px 8px;
}

.column-manager-actions {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding-top: 20px;
}
.table-filter-row th {
  padding-top: 0;
  vertical-align: top;
}

.table-view th.table-column-date,
.table-view td.table-column-date {
  min-width: 232px;
}

.table-view th.table-column-time,
.table-view td.table-column-time {
  min-width: 164px;
}

.table-view th.table-column-title,
.table-view td.table-column-title {
  min-width: 184px;
}

.table-view th.table-column-select-filter,
.table-view td.table-column-select-filter {
  min-width: 172px;
}

.table-view th.table-column-text-filter,
.table-view td.table-column-text-filter {
  min-width: 148px;
}

.table-view col.table-column-date {
  width: 232px;
}

.table-view col.table-column-time {
  width: 190px;
}

.table-view col.table-column-title {
  width: 190px;
}

.table-view col.table-column-select-filter {
  width: 190px;
}

.table-view col.table-column-text-filter {
  width: 164px;
}

.table-view col.table-column-menu {
  width: 48px;
}

.table-filter-control {
  background: var(--surface-soft);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  box-sizing: border-box;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  min-height: 34px;
  min-width: 116px;
  padding: 7px 9px;
  width: 100%;
}

.table-date-range-filter {
  box-sizing: border-box;
  display: grid;
  gap: 6px;
  width: 100%;
}

.table-date-range-filter .table-filter-control {
  min-width: 0;
  padding-inline: 7px;
}
.table-filter-control:focus {
  border-color: #9bb7f4;
  outline: 2px solid rgba(90, 125, 240, 0.16);
}

.table-filter-control::placeholder {
  color: var(--muted);
}

.table-multi-filter {
  box-sizing: border-box;
  position: relative;
  width: 100%;
}

.table-multi-filter summary {
  align-items: center;
  background: var(--surface-soft);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  box-sizing: border-box;
  color: var(--text);
  cursor: pointer;
  display: flex;
  font-size: 13px;
  font-weight: 800;
  justify-content: space-between;
  list-style: none;
  min-height: 34px;
  min-width: 116px;
  padding: 7px 9px;
  width: 100%;
}

.table-multi-filter summary::-webkit-details-marker {
  display: none;
}

.table-multi-filter summary::after {
  color: var(--muted);
  content: "▾";
  font-size: 12px;
  margin-left: 10px;
}

.table-multi-filter[open] summary {
  border-color: #9bb7f4;
  outline: 2px solid rgba(90, 125, 240, 0.16);
}

.table-multi-filter-panel {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(18, 25, 38, 0.18);
  left: 0;
  min-width: max(210px, 100%);
  padding: 8px;
  position: absolute;
  top: calc(100% + 6px);
  z-index: 20;
}

.table-multi-filter-list {
  display: grid;
  gap: 2px;
  max-height: 260px;
  overflow: auto;
  padding-right: 2px;
}

.table-multi-filter-option {
  align-items: flex-start;
  border-radius: 6px;
  color: var(--text);
  cursor: pointer;
  display: flex;
  gap: 8px;
  line-height: 1.25;
  padding: 7px 8px;
  text-align: left;
}

.table-multi-filter-option:hover {
  background: var(--surface-soft);
}

.table-multi-filter-option input {
  accent-color: #4f6bd8;
  flex: 0 0 auto;
  height: 16px;
  margin-top: 1px;
  width: 16px;
}

.table-multi-filter-option span {
  overflow-wrap: anywhere;
}

.table-multi-filter-empty {
  color: var(--muted);
  display: block;
  font-size: 13px;
  padding: 10px 8px;
}

.table-multi-filter-clear {
  background: transparent;
  border: 0;
  border-top: 1px solid var(--line);
  color: #4f6bd8;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  margin-top: 8px;
  padding: 8px 4px 2px;
  text-align: left;
  text-transform: uppercase;
  width: 100%;
}

.table-multi-filter-clear:disabled {
  color: var(--muted);
  cursor: default;
  opacity: 0.65;
}

.empty-table-row td {
  color: var(--muted);
  cursor: default;
  padding: 28px 12px;
}

.empty-table-row:hover {
  background: transparent;
}
.table-view table {
  border-collapse: collapse;
  min-width: 100%;
  table-layout: auto;
  width: max-content;
}

.table-view th,
.table-view td {
  border-bottom: 1px solid var(--line);
  box-sizing: border-box;
  font-size: 14px;
  padding: 13px 12px;
  text-align: left;
}

.table-view th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.table-view tbody tr {
  cursor: pointer;
}

.table-view tbody tr.table-row-warning {
  background: #fff7ed;
}

.table-view tbody tr:hover {
  background: var(--surface-soft);
}

.table-view tbody tr.table-row-warning:hover {
  background: #ffedd5;
}

.table-view td.table-cell-warning {
  background: #fff1df;
  box-shadow: inset 4px 0 0 #d97706;
}

.table-warning-cell {
  display: grid;
  gap: 4px;
}

.table-warning-cell span {
  color: var(--text);
}

.table-warning-cell strong {
  background: #f97316;
  border-radius: 999px;
  color: #ffffff;
  display: inline-flex;
  font-size: 11px;
  font-weight: 900;
  justify-self: start;
  line-height: 1.2;
  padding: 4px 8px;
}

.inspector-header {
  border-bottom: 1px solid var(--line);
  flex: 0 0 auto;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 0;
  padding: 24px 24px 18px;
}

.inspector-actions {
  align-items: center;
  display: flex;
  gap: 8px;
}

.inspector-save-event-button,
.inspector-delete-event-button {
  flex: 0 0 auto;
  min-height: 38px;
  min-width: 76px;
  width: auto;
}

.inspector-save-event-button:not(.has-pending-changes) {
  background: #ffffff;
  border-color: var(--line-strong);
  color: var(--blue);
}

.inspector-save-event-button:not(.has-pending-changes):hover {
  background: #f6f8ff;
  border-color: #b9c7ff;
}

.inspector-content {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 20px;
  min-height: 0;
  min-width: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 20px 24px 140px;
}

.inspector .detail-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.inspector.maximized .detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.inspector.maximized .detail-item.full,
.inspector.maximized .event-color-editor,
.inspector.maximized .address-field,
.inspector.maximized .contact-field,
.inspector.maximized .workspace-link-field,
.inspector.maximized .formula-field {
  grid-column: 1 / -1;
}

.inspector .detail-item,
.inspector .detail-item.full {
  grid-column: auto;
  width: 100%;
}

.inspector .detail-item input,
.inspector .detail-item select,
.inspector .detail-item textarea {
  box-sizing: border-box;
  min-width: 0;
  width: 100%;
}

.inspector .readonly-detail {
  background: #ffffff;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 10px 14px;
}

.inspector .readonly-detail strong {
  color: var(--ink);
  display: block;
  font-size: 16px;
  font-weight: 600;
  margin-top: 6px;
}

.inspector .event-date-field {
  background: #ffffff;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  min-height: 72px;
  padding: 10px 14px;
  position: relative;
}

.inspector .event-date-field:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(79, 111, 220, 0.14);
}

.inspector .event-date-native-input {
  height: 1px;
  opacity: 0.01;
  pointer-events: none;
  position: absolute;
  right: 12px;
  top: 12px;
  width: 1px;
}

.inspector .event-date-button {
  align-items: flex-start;
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin: 0;
  padding: 0;
  text-align: left;
  width: 100%;
}

.inspector .event-date-field strong {
  color: var(--ink);
  display: block;
  font-size: 16px;
  font-weight: 600;
  margin-top: 6px;
}

.inspector .event-date-change-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  margin-top: 6px;
}

.detail-card-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.detail-card-header h3 {
  margin-bottom: 0;
}

.event-menu-section {
  overflow: visible;
}

.event-menu-section .detail-card-header {
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  min-height: 42px;
}
.event-menu-section .detail-card-body,
.event-menu-section .detail-grid {
  overflow: visible;
}

.event-menu-section.collapsed {
  overflow: visible;
}

.event-menu-section.collapsed .detail-card-header {
  margin-bottom: 0;
}
.event-menu-section.collapsed .detail-card-header h3 {
  line-height: 1.2;
  overflow: visible;
}

.event-menu-section.collapsed .event-menu-section-actions {
  align-self: center;
}

.event-menu-section-actions {
  align-items: center;
  display: inline-flex;
  flex-shrink: 0;
  gap: 8px;
}

.event-section-toggle-button {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: 16px;
  font-weight: 800;
  height: 38px;
  justify-content: center;
  line-height: 1;
  padding: 0;
  width: 38px;
}

.event-section-toggle-button:hover {
  background: var(--surface);
  border-color: #aeb7c8;
  color: var(--text);
}

.event-menu-section.collapsed .detail-card-body {
  display: none;
}
.delete-event-button {
  background: #fff5f5;
  border: 1px solid #efb0b0;
  border-radius: 8px;
  color: var(--red);
  font-weight: 700;
  min-height: 38px;
  padding: 8px 12px;
}

.delete-event-button:hover,
.delete-field-button:hover,
.model-trash-button:hover {
  background: #ffecec;
  border-color: #e28d8d;
}

.detail-card,
.field-editor {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-sizing: border-box;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
  padding: 16px;
}
.detail-card.event-menu-section {
  height: auto;
  max-height: none;
  overflow: visible;
}

.detail-card.event-menu-section .detail-card-body,
.detail-card.event-menu-section .detail-grid {
  height: auto;
  max-height: none;
  overflow: visible;
}

.detail-card.event-menu-section.collapsed {
  min-height: 74px;
  overflow: visible;
}


.event-template-selector-card {
  padding: 14px 16px;
}

.event-template-selector-card .detail-item {
  margin: 0;
}

.settings-view {
  display: none;
  height: 100vh;
  overflow: hidden;
}

.settings-view.open {
  display: flex;
  flex-direction: column;
}

.settings-topbar {
  align-items: center;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  min-height: 78px;
  padding: 14px 22px;
}

.settings-workspace {
  display: grid;
  flex: 1;
  gap: 18px;
  grid-template-columns: minmax(360px, 460px) minmax(520px, 1fr);
  min-height: 0;
  padding: 18px;
}

.settings-home-workspace {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 22px;
  min-height: 0;
  overflow: auto;
  padding: 24px;
}

.settings-home-workspace.hidden,
.settings-workspace.hidden {
  display: none;
}

#recurringEventsSettingsView {
  grid-template-columns: minmax(0, 1fr);
  overflow: auto;
}

.settings-home-intro {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
}

.settings-home-intro h2 {
  font-size: 28px;
  margin-bottom: 8px;
}

.settings-home-intro p:last-child {
  color: var(--muted);
  line-height: 1.45;
  margin-bottom: 0;
  max-width: 760px;
}

.settings-card-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
}

.settings-home-card {
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  display: grid;
  gap: 16px;
  grid-template-columns: 48px 1fr;
  min-height: 168px;
  padding: 18px;
  text-align: left;
}

.settings-home-card.active:hover {
  border-color: #9bb7f4;
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.settings-home-card:disabled {
  cursor: default;
  opacity: 0.68;
}

.settings-card-icon {
  align-items: center;
  background: var(--blue-soft);
  border: 1px solid #b9cff7;
  border-radius: 8px;
  color: #184ca8;
  display: flex;
  font-size: 20px;
  font-weight: 900;
  height: 44px;
  justify-content: center;
  width: 44px;
}

.settings-home-card h3 {
  font-size: 18px;
  margin-bottom: 6px;
}

.settings-home-card p {
  color: var(--muted);
  line-height: 1.45;
  margin-bottom: 16px;
}

.settings-home-card span {
  color: var(--blue);
  font-weight: 800;
}

.settings-section-copy {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
  margin-top: 5px;
  max-width: 680px;
}

.recurrence-settings-panel {
  max-width: none;
  min-width: 0;
  width: 100%;
}

.recurrence-settings-list {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.recurrence-frequency-header {
  align-items: end;
  color: var(--muted);
  display: grid;
  font-size: 11px;
  font-weight: 900;
  gap: 10px;
  grid-template-columns: 28px minmax(190px, 1fr) 82px 118px minmax(170px, 0.8fr) 56px 78px 40px;
  padding: 0 12px 2px;
  text-transform: uppercase;
}

.recurrence-frequency-row {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: 28px minmax(190px, 1fr) 82px 118px minmax(170px, 0.8fr) 56px 78px 40px;
  min-width: 0;
  padding: 10px 12px;
  position: relative;
}

.recurrence-frequency-row.frequency-row-dragging {
  opacity: 0.55;
}

.recurrence-frequency-row.frequency-drag-over-before::before,
.recurrence-frequency-row.frequency-drag-over-after::after {
  background: var(--brand);
  border-radius: 999px;
  content: "";
  height: 3px;
  left: 12px;
  pointer-events: none;
  position: absolute;
  right: 12px;
}

.recurrence-frequency-row.frequency-drag-over-before::before {
  top: -5px;
}

.recurrence-frequency-row.frequency-drag-over-after::after {
  bottom: -5px;
}

.recurrence-reorder-handle {
  align-items: center;
  align-self: stretch;
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  cursor: grab;
  display: inline-flex;
  font-size: 16px;
  font-weight: 900;
  justify-content: center;
  letter-spacing: -4px;
  line-height: 1;
  min-height: 38px;
  padding: 0;
  touch-action: none;
  width: 28px;
}

.recurrence-reorder-handle:hover,
.recurrence-reorder-handle:focus-visible {
  background: #eef2ff;
  color: var(--brand);
  outline: none;
}

.recurrence-reorder-handle:active {
  cursor: grabbing;
}

.recurrence-reorder-handle:disabled {
  background: transparent;
  color: #c7ceda;
  cursor: default;
}

.recurrence-frequency-row label {
  color: var(--muted);
  display: grid;
  font-size: 11px;
  font-weight: 900;
  gap: 6px;
  text-transform: uppercase;
}

.recurrence-frequency-row label > span {
  display: none;
}

.recurrence-frequency-row input[type="text"],
.recurrence-frequency-row input[type="number"],
.recurrence-frequency-row select {
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--text);
  min-height: 38px;
  padding: 0 12px;
  text-transform: none;
}

.recurrence-frequency-row input:disabled {
  background: #eef2f7;
  color: var(--muted);
}

.recurrence-template-field {
  color: var(--muted);
  display: grid;
  font-size: 11px;
  font-weight: 900;
  gap: 6px;
  min-width: 0;
  text-transform: uppercase;
}

.recurrence-template-field > span {
  display: none;
}

.recurrence-template-picker {
  min-width: 0;
  position: relative;
}

.recurrence-template-picker summary {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
  display: flex;
  font-size: 13px;
  font-weight: 800;
  gap: 8px;
  justify-content: space-between;
  list-style: none;
  min-height: 38px;
  overflow: hidden;
  padding: 0 12px;
  text-overflow: ellipsis;
  text-transform: none;
  white-space: nowrap;
}

.recurrence-template-picker summary::-webkit-details-marker {
  display: none;
}

.recurrence-template-picker summary::after {
  color: var(--muted);
  content: "v";
  flex: 0 0 auto;
  font-size: 14px;
}

.recurrence-template-picker[open] {
  z-index: 20;
}

.recurrence-template-picker[open] summary {
  border-color: #9bb7f4;
  box-shadow: 0 0 0 3px rgba(65, 107, 214, 0.12);
}

.recurrence-template-menu {
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.16);
  display: grid;
  gap: 8px;
  left: 0;
  margin-top: 6px;
  min-width: min(280px, 82vw);
  padding: 10px;
  position: absolute;
  top: 100%;
  z-index: 25;
}

.recurrence-template-options {
  display: grid;
  gap: 6px;
  max-height: 190px;
  overflow: auto;
}

.recurrence-template-option {
  align-items: center;
  color: var(--text);
  display: grid;
  font-size: 13px;
  font-weight: 800;
  gap: 8px;
  grid-template-columns: 16px minmax(0, 1fr);
  min-height: 28px;
  text-transform: none;
}

.recurrence-template-option input {
  height: 16px;
  width: 16px;
}

.recurrence-template-option span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recurrence-frequency-row .recurrence-template-option > span {
  display: block;
}

.recurrence-color-field {
  align-items: center;
  display: grid;
  grid-template-columns: 38px;
  justify-content: start;
}

.recurrence-color-field input[type="color"] {
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  cursor: pointer;
  height: 38px;
  padding: 4px;
  width: 38px;
}

.recurrence-toggle-field {
  align-items: center;
  display: flex;
  gap: 0;
  justify-content: flex-start;
  min-height: 38px;
  position: relative;
}

.recurrence-toggle-field input {
  opacity: 0;
  pointer-events: none;
  position: absolute;
}

.recurrence-switch {
  background: #cbd5e1;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
  display: inline-flex;
  height: 22px;
  position: relative;
  transition: background 0.16s ease, box-shadow 0.16s ease;
  width: 40px;
}

.recurrence-switch::after {
  background: #fff;
  border-radius: 999px;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.22);
  content: "";
  height: 18px;
  left: 2px;
  position: absolute;
  top: 2px;
  transition: transform 0.16s ease;
  width: 18px;
}

.recurrence-toggle-field input:checked + .recurrence-switch {
  background: var(--blue);
  box-shadow: inset 0 0 0 1px rgba(27, 75, 185, 0.18);
}

.recurrence-toggle-field input:checked + .recurrence-switch::after {
  transform: translateX(18px);
}

.recurrence-toggle-field:focus-within .recurrence-switch {
  box-shadow: 0 0 0 3px rgba(65, 107, 214, 0.16), inset 0 0 0 1px rgba(27, 75, 185, 0.18);
}

.recurrence-remove-button {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  font-size: 22px;
  font-weight: 800;
  height: 38px;
  justify-content: center;
  line-height: 1;
  transition: border-color 0.16s ease, color 0.16s ease, background 0.16s ease;
  width: 38px;
}

.recurrence-remove-button:hover:not(:disabled) {
  background: #fff5f5;
  border-color: #f0b8b5;
  color: var(--danger);
}

.recurrence-remove-button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.recurrence-settings-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
}

@media (max-width: 980px) {
  #recurringEventsSettingsView {
    overflow: auto;
  }

  .recurrence-frequency-header {
    display: none;
  }

  .recurrence-frequency-row {
    grid-template-columns: 28px minmax(0, 1fr);
    padding: 12px;
  }

  .recurrence-frequency-row > :not(.recurrence-reorder-handle) {
    grid-column: 2;
  }

  .recurrence-frequency-row label > span {
    display: block;
  }

  .recurrence-template-field > span {
    display: block;
  }

  .recurrence-template-menu {
    position: static;
  }

  .recurrence-toggle-field {
    justify-content: flex-start;
  }

  .recurrence-remove-button {
    width: 100%;
  }
}

.settings-form {
  display: grid;
  gap: 14px;
}

.settings-form label {
  color: var(--muted);
  display: grid;
  font-size: 12px;
  font-weight: 900;
  gap: 7px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.settings-form input,
.settings-form select {
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--text);
  min-height: 44px;
  padding: 0 12px;
  text-transform: none;
}

.primary-button {
  align-items: center;
  background: var(--blue);
  border: 1px solid var(--blue);
  border-radius: 8px;
  color: #fff;
  display: inline-flex;
  font-weight: 900;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
}

.primary-button:hover {
  background: #2559c6;
  border-color: #2559c6;
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.form-status {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  min-height: 18px;
}

.form-status.success {
  color: var(--green);
  font-weight: 900;
}

.form-status.error {
  color: var(--red);
  font-weight: 900;
}

.form-status.warning {
  color: var(--amber);
  font-weight: 900;
}

.settings-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.settings-subsection {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding-top: 18px;
}

.section-header.compact h2 {
  font-size: 18px;
}

.role-access-list,
.users-table {
  display: grid;
  gap: 10px;
  min-height: 0;
  overflow: auto;
}

.role-access-card,
.user-row {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.role-access-card strong,
.user-row strong {
  font-size: 14px;
}

.role-access-card p,
.user-row p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  margin: 0;
}

.role-permissions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.permission-pill,
.user-status-pill {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  padding: 5px 8px;
}

.user-row {
  align-items: center;
  grid-template-columns: minmax(180px, 1.1fr) minmax(170px, 1fr) minmax(120px, auto) minmax(120px, auto);
}

.user-status-pill.active {
  background: #e7f6ef;
  border-color: #b8dfc8;
  color: var(--green);
}

.user-status-pill.invited {
  background: #fff4dc;
  border-color: #efd39a;
  color: var(--amber);
}

.user-status-pill.disabled {
  background: #feeaea;
  border-color: #f4b9b9;
  color: var(--red);
}

.user-row-actions {
  display: flex;
  justify-content: flex-end;
}

.user-row-actions button {
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--text);
  font-weight: 900;
  min-height: 34px;
  padding: 0 10px;
}

.settings-workspace.library-collapsed {
  grid-template-columns: 58px minmax(0, 1fr);
}

.settings-panel,
.event-model-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  padding: 16px;
}

.settings-panel.library-collapsed {
  align-items: center;
  padding: 12px;
}

.settings-panel.library-collapsed .section-header {
  margin-bottom: 0;
}

.settings-panel.library-collapsed .section-header > div:first-child,
.settings-panel.library-collapsed #fieldCountLabel,
.settings-panel.library-collapsed .field-list {
  display: none;
}

.library-collapse-button {
  font-size: 18px;
}

.settings-panel.library-collapsed .library-collapse-button {
  transform: rotate(180deg);
}

.event-model-panel {
  min-height: 0;
}

.event-model-panel > .section-header {
  margin-bottom: 8px;
}

.event-model-panel > .section-header h2 {
  font-size: 22px;
  line-height: 1.15;
  margin-bottom: 0;
}

.event-model-panel > .section-header .eyebrow {
  margin-bottom: 2px;
}

.event-model-panel > .section-header .panel-actions {
  gap: 8px;
}

.event-model-panel > .section-header .ghost-button {
  min-height: 34px;
  padding: 7px 12px;
}

.event-template-library {
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
  padding-bottom: 8px;
  position: relative;
}

.event-template-toolbar {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.event-template-toolbar-main {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  min-width: 0;
}

.event-template-toolbar h3 {
  margin-bottom: 0;
}

.event-template-name-form {
  align-items: center;
  display: flex;
  gap: 10px;
  min-width: 0;
}

.event-template-name-form > .eyebrow {
  display: none;
}

.event-template-name-row {
  align-items: center;
  display: flex;
  gap: 8px;
  min-width: 0;
}

.event-template-buffer-form {
  align-items: end;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(112px, 1fr));
}

.event-template-buffer-form label {
  display: grid;
  gap: 4px;
}

.event-template-buffer-form input {
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  min-height: 36px;
  padding: 6px 8px;
  width: 100%;
}

.event-template-buffer-form input:focus {
  border-color: #9bb7f4;
  outline: 2px solid rgba(90, 125, 240, 0.16);
}

.event-template-name-input {
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--text);
  font-size: 16px;
  font-weight: 800;
  min-height: 36px;
  min-width: 220px;
  padding: 5px 8px;
}

.event-template-name-row .compact-button,
.event-template-menu-button {
  min-height: 34px;
  padding: 7px 11px;
  white-space: nowrap;
}

.event-template-name-input:focus {
  border-color: #9bb7f4;
  outline: 2px solid rgba(90, 125, 240, 0.16);
}

.event-template-menu-button {
  cursor: pointer;
}

.event-template-modal-overlay {
  align-items: center;
  background: rgba(15, 23, 42, 0.48);
  display: none;
  inset: 0;
  justify-content: center;
  padding: 32px;
  position: fixed;
  z-index: 80;
}

.event-template-modal-overlay.open {
  display: flex;
}

.event-template-modal {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(18, 25, 38, 0.28);
  display: flex;
  flex-direction: column;
  max-height: min(680px, calc(100vh - 64px));
  overflow: hidden;
  width: min(760px, calc(100vw - 48px));
}

.event-template-popover-header {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px;
}

.event-template-popover-header h3 {
  margin-bottom: 0;
}

.event-template-modal-actions {
  align-items: center;
  display: flex;
  gap: 10px;
}

.event-template-create-form {
  align-items: end;
  background: #f8fbff;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(260px, 1fr) auto;
  padding: 18px 24px;
}

.event-template-create-form input {
  width: 100%;
}

.event-template-list {
  display: grid;
  gap: 10px;
  overflow: auto;
  padding: 18px 24px 24px;
}

.event-template-row {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr auto;
  padding: 10px;
}

.event-template-row.active {
  background: var(--blue-soft);
  border-color: #9bb7f4;
}

.event-template-card {
  background: transparent;
  border: 0;
  color: var(--text);
  min-width: 0;
  padding: 10px;
  text-align: left;
}

.event-template-card:focus-visible {
  outline: 2px solid #9bb7f4;
  outline-offset: 2px;
}

.event-template-card strong,
.event-template-card span {
  display: block;
}

.event-template-card span {
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}

.event-model-canvas {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.event-model-main-dropzone {
  min-height: 100%;
}

.event-close-confirm-overlay {
  align-items: center;
  background: rgba(31, 41, 51, 0.48);
  display: none;
  inset: 0;
  justify-content: center;
  padding: 32px;
  position: fixed;
  z-index: 95;
}

.event-close-confirm-overlay.open {
  display: flex;
}

.event-close-confirm-dialog {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(18, 25, 38, 0.28);
  display: flex;
  flex-direction: column;
  gap: 22px;
  max-width: 520px;
  padding: 24px;
  width: min(520px, calc(100vw - 48px));
}

.event-close-confirm-dialog h2 {
  margin: 4px 0 8px;
}

.event-close-confirm-dialog p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}

.event-close-confirm-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.bulk-field-update-dialog {
  gap: 18px;
  max-height: min(720px, calc(100vh - 48px));
  max-width: 680px;
  overflow: auto;
  width: min(680px, calc(100vw - 48px));
}

.bulk-field-update-header {
  align-items: flex-start;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.bulk-field-update-body {
  display: grid;
  gap: 12px;
}

.bulk-field-update-rows {
  display: grid;
  gap: 10px;
}

.bulk-field-update-row {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(150px, 0.85fr) minmax(220px, 1.35fr) auto;
  padding: 12px;
}

.bulk-field-update-row label {
  color: var(--muted);
  display: grid;
  font-size: 11px;
  font-weight: 900;
  gap: 6px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.bulk-field-update-row select,
.bulk-field-update-row input,
.bulk-field-update-row textarea {
  background: #ffffff;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  min-height: 38px;
  padding: 8px 10px;
  width: 100%;
}

.bulk-field-update-row .contact-autocomplete,
.bulk-field-update-row .assigned-workers-picker,
.bulk-field-update-row .assigned-workers-search-row {
  min-width: 0;
  width: 100%;
}

.bulk-field-update-row .assigned-workers-chip-list {
  margin-bottom: 2px;
}

.bulk-field-update-row .assigned-worker-row-text strong,
.bulk-field-update-row .assigned-worker-row-text small {
  display: block;
  line-height: 1.15;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bulk-field-update-row .assigned-worker-row-text strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  margin: 0;
  text-transform: none;
}

.bulk-field-update-row .assigned-worker-row-text small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  margin: 0;
  text-transform: uppercase;
}

.bulk-field-update-row textarea {
  min-height: 78px;
  resize: vertical;
}

.bulk-field-update-row select[multiple] {
  min-height: 132px;
}

.bulk-field-update-remove {
  align-self: end;
}

.bulk-field-add-row-button {
  justify-self: start;
}

.bulk-field-update-status {
  margin: 0;
  min-height: 18px;
}

@media (max-width: 720px) {
  .bulk-field-update-row {
    grid-template-columns: 1fr;
  }

  .bulk-field-update-remove {
    justify-self: end;
  }
}

.recurring-delete-confirm-dialog,
.recurring-update-confirm-dialog {
  gap: 18px;
  max-width: 560px;
  width: min(560px, calc(100vw - 48px));
}

.recurring-delete-option-list {
  display: grid;
  gap: 6px;
  max-height: min(46vh, 360px);
  overflow-y: auto;
  padding-right: 2px;
}

.recurring-delete-option {
  align-items: center;
  background: #f7f9fc;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  min-height: 40px;
  padding: 8px 10px;
  width: 100%;
}

.recurring-delete-option:has(input:checked) {
  background: var(--blue-soft);
  border-color: var(--blue);
}

.recurring-delete-option input[type="radio"] {
  accent-color: var(--blue);
  appearance: auto;
  background: transparent;
  border: 0;
  border-radius: 50%;
  height: 16px;
  justify-self: center;
  margin: 0;
  min-height: 0;
  padding: 0;
  position: static;
  width: 16px;
}

.recurring-delete-option span {
  color: var(--ink);
  display: block;
  font-weight: 750;
  line-height: 1.25;
  min-width: 0;
  overflow-wrap: anywhere;
}

.recurring-delete-date-range {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.recurring-delete-date-range[hidden] {
  display: none !important;
}

.recurring-delete-date-range label {
  display: grid;
  gap: 6px;
}

.recurring-delete-date-range span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.recurring-delete-date-range input {
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  min-height: 42px;
  padding: 8px 10px;
}
.preview-overlay {
  align-items: center;
  background: rgba(31, 41, 51, 0.48);
  display: none;
  inset: 0;
  justify-content: center;
  padding: 32px;
  position: fixed;
  z-index: 20;
}

.preview-overlay.open {
  display: flex;
}

.preview-dialog {
  background: var(--surface);
  border-radius: 8px;
  box-shadow: var(--shadow);
  max-height: calc(100vh - 64px);
  max-width: 760px;
  overflow: auto;
  padding: 22px;
  width: min(760px, 100%);
}

.preview-header-actions {
  align-items: center;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.preview-save-button {
  min-width: 82px;
}

.preview-save-status {
  margin-top: 8px;
}

.preview-save-status.success {
  color: #2f7d4b;
}

.preview-save-status.error {
  color: var(--red);
}

.event-address-map-overlay {
  align-items: center;
  background: rgba(31, 41, 51, 0.5);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 24px;
  position: fixed;
  z-index: 120;
}

.event-address-map-overlay[hidden] {
  display: none;
}

.event-address-map-dialog {
  background: #ffffff;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  box-shadow: 0 28px 70px rgba(18, 25, 38, 0.28);
  max-height: calc(100vh - 48px);
  max-width: 1100px;
  overflow: hidden;
  width: min(1100px, 100%);
}

.event-address-map-dialog .modal-head {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 24px;
}

.event-address-map-dialog .modal-head h2 {
  font-size: 28px;
  line-height: 1.1;
  margin: 4px 0 0;
}

.event-address-map-dialog .button {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--text);
  display: inline-flex;
  font: inherit;
  font-weight: 800;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  text-decoration: none;
}

.event-address-map-dialog .button:hover,
.event-address-map-dialog .button:focus-visible {
  border-color: rgba(47, 103, 216, 0.45);
  box-shadow: 0 0 0 3px rgba(47, 103, 216, 0.12);
  outline: none;
}

.event-attachment-viewer-overlay {
  align-items: center;
  background: rgba(15, 23, 42, 0.62);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 24px;
  position: fixed;
  z-index: 130;
}

.event-attachment-viewer-overlay[hidden] {
  display: none;
}

.event-attachment-viewer-dialog {
  background: #ffffff;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.32);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  max-height: calc(100vh - 48px);
  max-width: 1120px;
  overflow: hidden;
  width: min(1120px, 100%);
}

.event-attachment-viewer-head {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 20px 22px;
}

.event-attachment-viewer-head h2 {
  font-size: 24px;
  line-height: 1.12;
  margin: 4px 0 0;
  max-width: min(680px, 64vw);
  overflow-wrap: anywhere;
}

.event-attachment-viewer-head p:not(.eyebrow) {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  margin: 6px 0 0;
}

.event-attachment-viewer-actions {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.event-attachment-viewer-dialog .button,
.event-attachment-viewer-fallback .button {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 850;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  text-decoration: none;
}

.event-attachment-viewer-dialog .button:hover,
.event-attachment-viewer-dialog .button:focus-visible,
.event-attachment-viewer-fallback .button:hover,
.event-attachment-viewer-fallback .button:focus-visible {
  border-color: rgba(47, 103, 216, 0.45);
  box-shadow: 0 0 0 3px rgba(47, 103, 216, 0.12);
  outline: none;
}

.event-attachment-viewer-body {
  align-items: center;
  background: #0f172a;
  display: flex;
  justify-content: center;
  min-height: min(680px, calc(100vh - 170px));
  overflow: hidden;
  padding: 18px;
  position: relative;
}

.event-attachment-viewer-stage {
  align-items: center;
  display: flex;
  height: 100%;
  justify-content: center;
  min-height: inherit;
  overflow: auto;
  width: 100%;
}

.event-attachment-viewer-nav {
  align-items: center;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(203, 213, 225, 0.95);
  border-radius: 999px;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.22);
  color: #0f172a;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: 30px;
  font-weight: 850;
  height: 52px;
  justify-content: center;
  line-height: 1;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  z-index: 2;
}

.event-attachment-viewer-nav[hidden] {
  display: none;
}

.event-attachment-viewer-nav:hover,
.event-attachment-viewer-nav:focus-visible {
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(47, 103, 216, 0.18), 0 18px 36px rgba(15, 23, 42, 0.24);
  outline: none;
}

.event-attachment-viewer-nav-prev {
  left: 20px;
}

.event-attachment-viewer-nav-next {
  right: 20px;
}

.event-attachment-viewer-loading {
  background: rgba(255, 255, 255, 0.96);
  border-radius: 10px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.18);
  color: var(--text);
  font-size: 15px;
  font-weight: 850;
  padding: 18px 22px;
}

.event-attachment-viewer-image {
  display: block;
  max-height: calc(100vh - 210px);
  max-width: 100%;
  object-fit: contain;
}

.event-attachment-viewer-frame {
  background: #ffffff;
  border: 0;
  border-radius: 8px;
  height: min(720px, calc(100vh - 210px));
  width: 100%;
}

.event-attachment-viewer-media {
  max-height: calc(100vh - 210px);
  max-width: 100%;
}

.event-attachment-viewer-audio,
.event-attachment-viewer-fallback {
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.18);
  color: var(--text);
  display: grid;
  gap: 12px;
  justify-items: center;
  max-width: 480px;
  padding: 28px;
  text-align: center;
}

.event-attachment-viewer-audio audio {
  width: min(420px, 72vw);
}

.event-attachment-viewer-fallback .attachment-file-icon {
  height: 52px;
  width: 62px;
}

.event-attachment-viewer-fallback strong {
  font-size: 18px;
  overflow-wrap: anywhere;
}

.event-attachment-viewer-fallback p {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  margin: 0;
}

@media (max-width: 720px) {
  .event-attachment-viewer-overlay {
    padding: 10px;
  }

  .event-attachment-viewer-dialog {
    max-height: calc(100vh - 20px);
  }

  .event-attachment-viewer-head {
    align-items: flex-start;
    flex-direction: column;
    padding: 16px;
  }

  .event-attachment-viewer-head h2 {
    font-size: 20px;
    max-width: 100%;
  }

  .event-attachment-viewer-actions {
    justify-content: stretch;
    width: 100%;
  }

  .event-attachment-viewer-actions .button {
    flex: 1 1 140px;
  }

  .event-attachment-viewer-body {
    min-height: min(620px, calc(100vh - 210px));
    padding: 10px;
  }

  .event-attachment-viewer-nav {
    font-size: 24px;
    height: 42px;
    width: 42px;
  }

  .event-attachment-viewer-nav-prev {
    left: 12px;
  }

  .event-attachment-viewer-nav-next {
    right: 12px;
  }
}

.address-map-modal {
  max-height: calc(100vh - 48px);
  max-width: 1100px;
  overflow: hidden;
  width: min(1100px, 100%);
}

.address-map-body {
  display: grid;
  gap: 18px;
  padding: 24px;
}

.address-map-summary {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  justify-content: space-between;
}

.address-map-original {
  display: grid;
  gap: 4px;
}

.address-map-original strong {
  color: var(--text);
  font-size: 15px;
  line-height: 1.4;
}

.address-map-original p {
  color: var(--muted);
  margin: 0;
}

.address-map-status {
  border-radius: 8px;
  display: inline-flex;
  font-weight: 800;
  padding: 8px 10px;
}

.address-map-status.loading {
  background: #eef2ff;
  color: #3348a3;
}

.address-map-status.ok {
  background: #e8f6ee;
  color: #2f7d4a;
}

.address-map-status.warn {
  background: #fff6db;
  color: #8a5d12;
}

.address-map-status.error {
  background: #fdecec;
  color: #a23a35;
}

.address-map-canvas-wrap {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 520px;
  overflow: hidden;
}

.address-map-canvas {
  height: 520px;
  width: 100%;
}

.address-map-empty {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-weight: 800;
  height: 100%;
  justify-content: center;
  min-height: 520px;
  padding: 24px;
  text-align: center;
}

.address-map-footer {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
}

.address-map-match {
  color: var(--muted);
  font-weight: 800;
  margin: 0;
}

.address-map-match strong {
  color: var(--text);
}

.address-map-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.address-map-actions [hidden] {
  display: none;
}

.address-map-modal .leaflet-container {
  font-family: inherit;
}

.preview-mode-toggle {
  background: #eef2f8;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  display: grid;
  gap: 3px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 16px 0;
  padding: 3px;
}

.preview-mode-toggle button {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  min-height: 36px;
  padding: 7px 10px;
}

.preview-mode-toggle button.active {
  background: var(--surface);
  border-color: var(--line);
  box-shadow: 0 8px 22px rgba(18, 25, 38, 0.08);
  color: var(--blue-strong);
}

.preview-mode-toggle button:focus-visible {
  outline: 2px solid rgba(90, 125, 240, 0.35);
  outline-offset: 2px;
}

.mock-event-shell {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
}

.mock-event-title-row {
  align-items: flex-start;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 14px;
  margin-bottom: 20px;
  padding-bottom: 18px;
}

.mock-event-title-row p {
  color: var(--muted);
  margin-bottom: 0;
}

.mock-color-dot {
  background: var(--blue);
  border-radius: 7px;
  display: block;
  height: 28px;
  margin-top: 2px;
  width: 28px;
}

#settingsPreviewContent.inspector-content {
  gap: 0;
  overflow: visible;
  padding: 0;
}

.settings-card-preview-shell {
  display: grid;
  gap: 12px;
  position: relative;
}

.settings-preview-field-popover {
  background: #ffffff;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  box-sizing: border-box;
  box-shadow: 0 20px 50px rgba(18, 25, 38, 0.22);
  display: grid;
  gap: 10px;
  max-height: min(680px, calc(100vh - 24px));
  overflow: auto;
  padding: 12px;
  position: fixed;
  width: min(390px, calc(100vw - 24px));
  z-index: 90;
}

.settings-preview-field-popover[hidden] {
  display: none;
}

.settings-preview-field-popover-header {
  align-items: flex-start;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.settings-preview-field-popover-header h3 {
  font-size: 16px;
  line-height: 1.15;
  margin: 0;
}

.settings-preview-field-popover-header > span {
  align-self: start;
  background: #eef3ff;
  border: 1px solid #c8d8fb;
  border-radius: 999px;
  color: #4168cf;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 9px;
  white-space: nowrap;
}

.compact-icon-button {
  height: 30px;
  min-height: 30px;
  padding: 0;
  width: 30px;
}

.settings-preview-field-popover .model-typography-panel {
  background: #f8fbff;
}

.settings-preview-field-popover .model-typography-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.settings-preview-field-popover .model-typography-grid label,
.settings-preview-field-popover .settings-preview-adornment-row label {
  min-width: 0;
}

.settings-preview-field-popover .model-typography-grid select,
.settings-preview-field-popover .model-typography-grid input,
.settings-preview-field-popover .settings-preview-adornment-row select,
.settings-preview-field-popover .settings-preview-adornment-row input {
  min-width: 0;
  width: 100%;
}

.settings-preview-field-popover .model-typography-style-buttons {
  align-self: end;
}

.settings-preview-field-popover .model-typography-reset {
  align-self: end;
}

.settings-preview-adornment-control {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 10px;
}

.settings-preview-adornment-heading {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.settings-preview-adornment-row {
  align-items: end;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.settings-preview-adornment-row label {
  display: grid;
  gap: 5px;
}

.settings-preview-adornment-row label > span,
.settings-preview-line-spacing-row label > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.settings-preview-adornment-row input,
.settings-preview-adornment-row select,
.settings-preview-line-spacing-row input {
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--text);
  min-height: 36px;
  padding: 7px 9px;
}

.settings-preview-line-spacing-control {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 8px;
  padding-top: 10px;
}

.settings-preview-line-spacing-row {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.settings-preview-line-spacing-row label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.settings-preview-line-spacing-row input {
  width: 100%;
}

.settings-preview-typography-panel {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 26px rgba(18, 25, 38, 0.06);
  display: grid;
  gap: 10px;
  padding: 14px;
}

.settings-preview-typography-header {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.settings-preview-typography-header h3 {
  font-size: 16px;
  line-height: 1.2;
  margin: 0;
}

.settings-preview-typography-header > span {
  background: #eef3ff;
  border: 1px solid #c8d8fb;
  border-radius: 999px;
  color: #4168cf;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 9px;
  white-space: nowrap;
}

.settings-preview-typography-panel > p {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  margin: 0;
}

.settings-preview-typography-panel .model-typography-panel {
  background: #f8fbff;
}

.settings-preview-typography-panel .model-typography-grid {
  grid-template-columns: minmax(160px, 1fr) 96px 96px auto auto;
}

.settings-preview-editable-field {
  border-radius: 6px;
  cursor: pointer;
  outline: 1px dashed transparent;
  outline-offset: 3px;
  transition: background-color 0.14s ease, outline-color 0.14s ease, box-shadow 0.14s ease;
}

.settings-preview-editable-field:hover,
[data-settings-preview-field-id]:hover {
  outline-color: rgba(77, 107, 216, 0.32);
}

.settings-preview-selected-field,
[data-settings-preview-field-id].settings-preview-selected-field {
  background: rgba(77, 107, 216, 0.08);
  box-shadow: 0 0 0 4px rgba(77, 107, 216, 0.08);
  outline-color: rgba(77, 107, 216, 0.7);
}

.settings-card-preview-canvas {
  align-items: center;
  background:
    linear-gradient(#d9e0ea 1px, transparent 1px),
    linear-gradient(90deg, #d9e0ea 1px, transparent 1px),
    #f8fbff;
  background-size: 100% 88px, 180px 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  justify-content: center;
  min-height: 300px;
  overflow: hidden;
  padding: 28px;
}

.settings-preview-event-card {
  box-shadow: 0 18px 42px rgba(18, 25, 38, 0.16);
  cursor: default;
  max-width: 360px;
  min-height: 56px;
  pointer-events: auto;
  position: relative;
  width: min(360px, 100%);
}

.settings-preview-card-resize-handle {
  background: transparent;
  border: 0;
  bottom: 0;
  cursor: ns-resize;
  height: 18px;
  left: 0;
  padding: 0;
  position: absolute;
  right: 0;
  width: 100%;
  z-index: 4;
}

.settings-preview-card-resize-handle::after {
  background: currentColor;
  border-radius: 999px;
  bottom: 6px;
  content: "";
  height: 3px;
  left: 50%;
  opacity: 0.45;
  position: absolute;
  transform: translateX(-50%);
  transition: opacity 0.14s ease, width 0.14s ease;
  width: 42px;
}

.settings-preview-card-resize-handle:hover::after,
.settings-preview-event-card.resizing .settings-preview-card-resize-handle::after {
  opacity: 0.78;
  width: 54px;
}

.settings-opened-preview-shell {
  background: #f3f6fb;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 16px 34px rgba(18, 25, 38, 0.08);
  display: flex;
  flex-direction: column;
  max-width: 460px;
  min-height: 560px;
  overflow: hidden;
}

.settings-opened-preview-shell + .settings-preview-typography-panel {
  margin-top: 12px;
  max-width: 460px;
}

.settings-preview-inspector-header {
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  flex: 0 0 auto;
  gap: 14px;
  margin: 0;
  padding: 18px 18px 14px;
}

.settings-preview-inspector-header h2 {
  font-size: 24px;
  line-height: 1.05;
  margin: 0;
}

.settings-preview-inspector-header .inspector-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.settings-preview-inspector-content {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-height: 680px;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 18px 18px 96px;
}

.settings-opened-preview-shell .detail-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.settings-opened-preview-shell .detail-item,
.settings-opened-preview-shell .detail-item.full {
  grid-column: auto;
  width: 100%;
}

.settings-opened-preview-shell .detail-item input,
.settings-opened-preview-shell .detail-item select,
.settings-opened-preview-shell .detail-item textarea {
  box-sizing: border-box;
  min-width: 0;
  width: 100%;
}

.settings-opened-preview-shell .event-date-field {
  background: #ffffff;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  min-height: 72px;
  padding: 10px 14px;
  position: relative;
}

.settings-opened-preview-shell .event-date-native-input {
  height: 1px;
  opacity: 0.01;
  pointer-events: none;
  position: absolute;
  right: 12px;
  top: 12px;
  width: 1px;
}

.settings-opened-preview-shell .event-date-button {
  align-items: flex-start;
  background: transparent;
  border: 0;
  color: inherit;
  cursor: default;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin: 0;
  padding: 0;
  text-align: left;
  width: 100%;
}

.settings-opened-preview-shell .event-date-field strong {
  color: var(--ink);
  display: block;
  font-size: 16px;
  font-weight: 600;
  margin-top: 6px;
}

.settings-opened-preview-shell .event-date-change-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  margin-top: 6px;
}

.detail-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.detail-item {
  min-width: 0;
}

.detail-item.full {
  grid-column: 1 / -1;
}
.detail-card .recurrence-dependent[hidden],
.detail-card .recurrence-custom-field[hidden],
.detail-card .recurrence-preset-field[hidden],
.detail-card .recurrence-weekdays[hidden],
.detail-card .recurrence-end-on[hidden],
.detail-card .recurrence-end-after[hidden] {
  display: none !important;
}

.recurrence-mode-field {
  display: grid;
  gap: 6px;
}

.recurrence-mode-toggle {
  background: #eef2f8;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  display: grid;
  gap: 3px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-height: 42px;
  padding: 3px;
}

.recurrence-mode-option {
  cursor: pointer;
  min-width: 0;
  position: relative;
}

.recurrence-mode-option input {
  opacity: 0;
  pointer-events: none;
  position: absolute;
}

.recurrence-mode-option span {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #667085;
  display: flex;
  font-size: 14px;
  font-weight: 750;
  height: 34px;
  justify-content: center;
  margin: 0;
  text-transform: none;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.recurrence-mode-option.is-selected span {
  background: #fff;
  border-color: #c8d4ea;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.1);
  color: var(--blue-dark);
}

.recurrence-weekday-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.recurrence-weekday-option {
  display: block;
  min-width: 0;
}

.recurrence-weekday-option input {
  opacity: 0;
  position: absolute;
  pointer-events: none;
}

.recurrence-weekday-option span {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--muted);
  display: flex;
  font-size: 11px;
  font-weight: 800;
  height: 34px;
  justify-content: center;
  margin: 0;
  text-transform: uppercase;
}

.recurrence-weekday-option input:checked + span {
  background: var(--blue-soft);
  border-color: var(--blue);
  color: var(--blue-dark);
}

.event-color-editor {
  display: grid;
  gap: 10px;
}

.address-autocomplete,
.contact-autocomplete,
.workspace-link-autocomplete,
.assigned-workers-picker {
  position: relative;
}

.contact-autocomplete input,
.workspace-link-autocomplete input,
.assigned-workers-picker input {
  padding-right: 30px;
}

.contact-crm-indicator,
.workspace-link-indicator {
  background: #34a853;
  border-radius: 999px;
  box-shadow: 0 0 0 2px rgba(52, 168, 83, 0.18);
  height: 9px;
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 9px;
  z-index: 2;
}

.workspace-link-indicator {
  background: var(--blue);
  box-shadow: 0 0 0 2px rgba(77, 111, 216, 0.18);
}

.contact-crm-indicator[hidden],
.workspace-link-indicator[hidden] {
  display: none;
}

.address-suggestion-list,
.contact-suggestion-list,
.workspace-link-suggestion-list,
.assigned-workers-suggestion-list {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  box-shadow: 0 18px 44px rgba(18, 25, 38, 0.22);
  display: grid;
  gap: 4px;
  left: auto;
  max-height: 240px;
  overflow: auto;
  padding: 6px;
  position: fixed;
  right: auto;
  top: auto;
  z-index: 80;
}

.address-suggestion-list[hidden],
.contact-suggestion-list[hidden],
.workspace-link-suggestion-list[hidden],
.assigned-workers-suggestion-list[hidden] {
  display: none;
}

.contact-suggestion-list.field-anchored-suggestion-list,
.assigned-workers-suggestion-list.field-anchored-suggestion-list {
  left: 0;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  width: auto;
  z-index: 95;
}

.contact-suggestion-list.field-anchored-suggestion-list.open-above,
.assigned-workers-suggestion-list.field-anchored-suggestion-list.open-above {
  bottom: calc(100% + 6px);
  top: auto;
}

.address-suggestion-list {
  left: 0;
  max-height: 220px;
  position: absolute;
  top: calc(100% + 6px);
  width: 100%;
  z-index: 90;
}

.address-suggestion,
.contact-suggestion,
.workspace-link-suggestion,
.assigned-workers-suggestion {
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: var(--text);
  display: block;
  padding: 10px;
  text-align: left;
  width: 100%;
}

.address-suggestion:hover,
.address-suggestion:focus,
.contact-suggestion:hover,
.contact-suggestion:focus,
.workspace-link-suggestion:hover,
.workspace-link-suggestion:focus,
.assigned-workers-suggestion:hover,
.assigned-workers-suggestion:focus {
  background: var(--blue-soft);
  outline: none;
}

.address-suggestion strong,
.address-suggestion span,
.contact-suggestion strong,
.contact-suggestion span,
.workspace-link-suggestion strong,
.workspace-link-suggestion span,
.assigned-workers-suggestion strong,
.assigned-workers-suggestion span {
  display: block;
}

.assigned-workers-suggestion em {
  background: rgba(77, 111, 216, 0.12);
  border-radius: 999px;
  color: var(--blue-strong);
  display: inline-flex;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  margin-top: 7px;
  padding: 4px 8px;
}

.assigned-workers-suggestion em.linked-account {
  background: #edf7f0;
  color: #2f7d4a;
}

.assigned-workers-suggestion em.data-only-profile {
  background: rgba(102, 112, 133, 0.12);
  color: #667085;
}

.address-suggestion span,
.contact-suggestion span,
.workspace-link-suggestion span,
.assigned-workers-suggestion span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  margin-top: 2px;
  text-transform: none;
}

.assigned-workers-suggestion .assigned-workers-account-detail {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  margin-top: 5px;
  text-transform: uppercase;
}

.assigned-workers-suggestion.disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.assigned-workers-suggestion.disabled:hover,
.assigned-workers-suggestion.disabled:focus {
  background: transparent;
}

.assigned-workers-field {
  grid-column: 1 / -1;
}

.assigned-workers-picker {
  display: grid;
  gap: 8px;
}

.assigned-workers-chip-list {
  display: grid;
  gap: 8px;
  min-height: 28px;
}

.assigned-workers-empty {
  align-items: center;
  color: var(--muted);
  display: inline-flex;
  font-size: 13px;
  font-weight: 600;
  min-height: 28px;
  text-transform: none;
}

.assigned-worker-row {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--text);
  display: grid;
  gap: 10px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  min-height: 42px;
  padding: 8px 9px;
  text-transform: none;
}

.assigned-worker-row.account-backed {
  border-color: rgba(77, 111, 216, 0.3);
}

.assigned-worker-row.data-only {
  background: rgba(102, 112, 133, 0.05);
}

.assigned-worker-status-dot {
  background: var(--blue);
  border-radius: 999px;
  box-shadow: 0 0 0 2px rgba(77, 111, 216, 0.18);
  display: block;
  height: 9px;
  margin-top: 2px;
  width: 9px;
}

.assigned-worker-row.data-only .assigned-worker-status-dot {
  background: #667085;
  box-shadow: 0 0 0 2px rgba(102, 112, 133, 0.16);
}

.assigned-worker-row-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.detail-item .assigned-worker-row-text strong,
.detail-item .assigned-worker-row-text small {
  display: block;
  line-height: 1.15;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-item .assigned-worker-row-text strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  margin: 0;
  text-transform: none;
}

.detail-item .assigned-worker-row-text small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  margin: 0;
  text-transform: uppercase;
}

.assigned-worker-row button,
.assigned-workers-add-button {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  font-size: 18px;
  font-weight: 800;
  height: 32px;
  justify-content: center;
  line-height: 1;
  padding: 0;
  width: 32px;
}

.assigned-worker-row button {
  background: rgba(77, 111, 216, 0.08);
  border-color: transparent;
  border-radius: 999px;
  color: var(--blue-strong);
  font-size: 13px;
  height: 22px;
  width: 22px;
}

.assigned-worker-row button:hover,
.assigned-worker-row button:focus,
.assigned-workers-add-button:hover,
.assigned-workers-add-button:focus {
  background: var(--blue-soft);
  border-color: rgba(77, 111, 216, 0.28);
  color: var(--blue-strong);
  outline: none;
}

.assigned-workers-search-row {
  display: grid;
  position: relative;
}

.assigned-workers-search-row[hidden],
.assigned-workers-add-button[hidden] {
  display: none;
}
.address-verification-status {
  margin-top: 8px;
}

.verified-badge,
.unverified-badge {
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 9px;
}

.verified-badge {
  background: #e8f6ee;
  color: #2f7d4a;
}

.unverified-badge {
  background: #fff7e6;
  color: #9a6218;
}

.detail-item span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.detail-item .calendar-color-option span {
  color: inherit;
  margin-bottom: 0;
}

.detail-item strong,
.detail-item p {
  font-size: 14px;
  line-height: 1.35;
  margin-bottom: 0;
}

.field-list {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 18px;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.field-builder-section {
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
}

.compact-section-header {
  margin-bottom: 0;
}

.library-view-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.library-view-button {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--text);
  min-height: 40px;
  padding: 9px 12px;
}

.library-view-button:first-child {
  border-radius: 8px;
}

.library-view-button:last-child {
  border-radius: 8px;
}

.library-view-button.active {
  background: rgba(47, 103, 216, 0.1);
  border-color: transparent;
  color: #184ca8;
  font-weight: 700;
  position: relative;
  z-index: 1;
}

.library-section-list,
.library-field-list,
.event-model-field-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.library-section-list {
  border-bottom: 0;
  padding-bottom: 0;
}

.library-section-list.hidden,
.library-field-list.hidden {
  display: none;
}

.new-field-template {
  background: #f8fbff;
  border: 1px solid #b9cff7;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 130px;
  padding: 14px;
}

.new-field-template .full,
.new-field-template .template-actions,
.new-field-template .field-editor-header {
  grid-column: 1 / -1;
}

.template-actions {
  display: flex;
  gap: 8px;
}

.dropdown-options-editor {
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.formula-config-editor,
.workspace-link-config-editor,
.linked-rows-config-editor {
  background: #f8fbff;
  border: 1px solid #b9cff7;
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 12px;
}

.formula-config-editor > div,
.workspace-link-config-editor > div,
.linked-rows-config-editor > div {
  grid-column: 1 / -1;
}

.formula-config-editor h3,
.workspace-link-config-editor h3,
.linked-rows-config-editor h3 {
  font-size: 15px;
  margin-bottom: 0;
}

.dropdown-options-editor.hidden,
.formula-config-editor.hidden,
.workspace-link-config-editor.hidden,
.linked-rows-config-editor.hidden {
  display: none;
}

.dropdown-options-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.dropdown-option-list {
  display: grid;
  gap: 8px;
}

.dropdown-option-row {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 34px;
}

.dropdown-option-remove {
  height: 34px;
  min-height: 34px;
  width: 34px;
}

.linked-row-column-config-list {
  display: grid;
  gap: 8px;
}

.linked-row-column-config-row {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(150px, 1fr) 132px minmax(150px, 1fr) 34px;
}

.linked-row-column-remove {
  height: 34px;
  min-height: 34px;
  width: 34px;
}

.library-field-card {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  padding: 12px;
}

.library-field-card h3,
.library-field-card p {
  margin-bottom: 2px;
}

.library-field-card span {
  color: var(--muted);
  font-size: 13px;
}

.library-field-card:not(.in-model) {
  cursor: grab;
}

.library-field-card.in-model {
  opacity: 0.56;
}

.library-section-card {
  background: #f8fbff;
  border-color: #b9cff7;
}

.event-model-dropzone {
  border-style: dashed;
  padding-bottom: 34px;
  padding-top: 34px;
}

.event-model-main-dropzone {
  gap: 18px;
}

.event-model-dropzone.drag-over {
  background: var(--blue-soft);
  border-color: #7da2ee;
}

.event-model-field-list {
  min-height: 56px;
  transition: min-height 0.12s ease;
}

.event-model-field-list.drag-over:empty {
  min-height: 108px;
}

.root-model-field-list {
  min-height: 0;
}

.event-model-container.drag-over,
.event-model-canvas.drag-over {
  outline: 2px dashed #7da2ee;
  outline-offset: 6px;
  background: rgba(232, 239, 255, 0.64);
  border-radius: 8px;
}

.event-model-container {
  background: #eef1f5;
  border: 1px solid #c8cfda;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 176px;
  padding: 0 20px 20px;
}

.event-model-container .field-editor {
  background: #eef5ff;
  border-color: #b9cff7;
}

.event-model-container .native-field-editor {
  background: #e7f1ff;
  border-color: #b9cff7;
}

.event-model-container .event-model-field-list {
  background: transparent;
  border: 0;
  padding: 0;
}

.event-model-container-header {
  align-items: center;
  background: #e1e6ee;
  border-bottom: 1px solid #c8cfda;
  border-radius: 8px 8px 0 0;
  display: flex;
  justify-content: space-between;
  margin: 0 -20px;
  min-height: 58px;
  padding: 0 20px;
}

.field-editor {
  align-items: stretch;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  min-height: 74px;
  padding: 10px 12px;
  position: relative;
}

.field-editor select,
.field-editor input {
  min-height: 34px;
  padding: 7px 9px;
}

.field-editor .field-label {
  font-size: 12px;
  margin-bottom: 4px;
}

.field-editor .field-editor-header {
  flex: 1;
  min-width: 0;
}

.model-field-meta {
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 12px;
  gap: 6px;
  margin-top: 4px;
}

.model-field-meta span {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(157, 174, 205, 0.55);
  border-radius: 999px;
  padding: 3px 8px;
}

.model-field-controls {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  gap: 12px;
  margin-left: auto;
}

.model-placeholder-control {
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(157, 174, 205, 0.5);
  border-radius: 8px;
  display: grid;
  flex: 1 0 100%;
  gap: 6px;
  padding: 10px 12px;
}

.model-placeholder-control > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.model-placeholder-control input {
  background: #fff;
  border: 1px solid #c6cfdd;
  border-radius: 8px;
  color: var(--ink);
  width: 100%;
}

.model-placeholder-control small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.model-typography-panel {
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(157, 174, 205, 0.5);
  border-radius: 8px;
  flex: 1 0 100%;
  overflow: hidden;
}

.model-typography-panel summary {
  align-items: center;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  font-size: 12px;
  font-weight: 800;
  justify-content: space-between;
  letter-spacing: 0;
  list-style: none;
  min-height: 36px;
  padding: 0 12px;
  text-transform: uppercase;
}

.model-typography-panel summary::-webkit-details-marker {
  display: none;
}

.model-typography-panel summary span:last-child {
  background: #eef3ff;
  border: 1px solid #c8d8fb;
  border-radius: 999px;
  color: #4168cf;
  font-size: 11px;
  padding: 3px 8px;
  text-transform: none;
}

.model-typography-grid {
  border-top: 1px solid rgba(157, 174, 205, 0.35);
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(150px, 1fr) 94px 96px auto auto;
  padding: 12px;
}

.model-typography-grid label {
  display: grid;
  gap: 5px;
}

.model-typography-grid label > span,
.model-typography-style-buttons::before {
  color: var(--muted);
  content: "Style";
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.model-typography-grid input[type="color"] {
  height: 36px;
  min-height: 36px;
  padding: 4px;
  width: 56px;
}

.model-typography-style-buttons {
  align-self: end;
  display: grid;
  gap: 5px;
  grid-template-columns: repeat(2, 36px);
}

.model-typography-style-buttons::before {
  grid-column: 1 / -1;
}

.model-typography-style-option {
  display: block;
  position: relative;
}

.model-typography-style-option input {
  opacity: 0;
  position: absolute;
}

.model-typography-style-option span {
  align-items: center;
  background: #fff;
  border: 1px solid #c8cfda;
  border-radius: 8px;
  color: #1f2933;
  display: flex;
  font-size: 14px;
  font-weight: 900;
  height: 36px;
  justify-content: center;
  width: 36px;
}

.model-typography-style-option:last-child span {
  font-style: italic;
}

.model-typography-style-option input:checked + span {
  background: #4d6bd8;
  border-color: #4d6bd8;
  color: #fff;
}

.model-typography-reset {
  align-self: end;
  background: #fff;
  border: 1px solid #c8cfda;
  border-radius: 8px;
  color: #4f5b6d;
  font-weight: 800;
  min-height: 36px;
  padding: 0 12px;
}

.model-insert-placeholder {
  background: rgba(47, 103, 216, 0.14);
  border: 2px dashed #7da2ee;
  border-radius: 8px;
  flex: 0 0 64px;
  min-height: 64px;
  pointer-events: none;
}

.section-insert-placeholder {
  background: rgba(47, 103, 216, 0.12);
  border: 2px dashed #7da2ee;
  border-radius: 8px;
  flex: 0 0 86px;
  min-height: 86px;
  pointer-events: none;
}

.native-field-editor {
  background: #eef5ff;
  border-color: #b9cff7;
}

.field-editor-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.model-field-title {
  align-items: center;
  display: flex;
  gap: 10px;
  min-width: 0;
}

.model-field-title > div {
  min-width: 0;
}

.drag-handle {
  color: var(--muted);
  cursor: grab;
  font-weight: 700;
  letter-spacing: 0;
}

.field-editor.dragging-model-field,
.event-model-container.dragging-model-field {
  opacity: 0.42;
}

.delete-field-button {
  border: 1px solid #efb0b0;
  border-radius: 8px;
  background: #fff5f5;
  color: var(--red);
  min-height: 36px;
  padding: 8px 10px;
}

.model-trash-button {
  align-items: center;
  background: #fff5f5;
  border: 1px solid #efb0b0;
  border-radius: 8px;
  color: var(--red);
  display: flex;
  font-size: 15px;
  height: 36px;
  justify-content: center;
  padding: 0;
  width: 36px;
}

.locked-field-badge {
  background: #dbeafe;
  border: 1px solid #a9c4f5;
  border-radius: 999px;
  color: #174ea6;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 9px;
}

.field-editor .full {
  grid-column: 1 / -1;
}

.checkbox-row {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: 13px;
  gap: 8px;
}

.checkbox-row input {
  min-height: 0;
  width: auto;
}

@media (max-width: 1100px) {
  .app-view,
  .app-view.table-mode,
  .settings-workspace {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .workspace-rail,
  .sidebar {
    display: none;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    grid-column: 1;
    grid-row: 1;
    height: auto;
    padding: 16px;
  }

  .calendar-body,
  .app-view.table-mode .calendar-body {
    grid-column: 1;
    grid-row: 2;
  }

  .calendar-workspace,
  .app-view.table-mode .calendar-workspace {
    margin-left: 0;
  }

  .inspector {
    background: var(--surface);
    bottom: 0;
    height: auto;
    left: 0;
    max-height: 82vh;
    position: fixed;
    right: 0;
    top: auto;
    width: auto;
  }

  .week-grid {
    grid-template-columns: 58px repeat(var(--calendar-week-day-count, 5), minmax(150px, 1fr));
    min-width: 820px;
  }

  .calendar-full-week .week-grid {
    min-width: 1108px;
  }

  .settings-topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }
}







.formula-readonly-value {
  background: #f8fbff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.35;
  padding: 12px 14px;
}

.formula-field small,
.formula-help {
  color: var(--muted);
  display: block;
  font-size: 12px;
  line-height: 1.35;
  margin-top: 6px;
}

.attachment-dropzone {
  background: #f8fbff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.attachment-file-list {
  display: grid;
  gap: 8px;
}

.attachment-empty {
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  padding: 12px;
}

.attachment-file-row {
  align-items: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: 44px minmax(0, 1fr) auto 34px;
  min-height: 58px;
  padding: 8px 10px;
}

.attachment-file-icon {
  align-items: center;
  background: var(--blue-soft);
  border: 1px solid #b9cff7;
  border-radius: 8px;
  color: var(--blue-dark);
  display: flex;
  font-size: 10px;
  font-weight: 800;
  height: 36px;
  justify-content: center;
  overflow: hidden;
  padding: 0 4px;
  text-transform: uppercase;
  white-space: nowrap;
}

.attachment-file-row strong,
.attachment-file-row span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-file-row span {
  color: var(--muted);
  font-size: 12px;
}

.attachment-remove-button {
  color: var(--red);
  font-size: 16px;
  height: 34px;
  width: 34px;
}

.attachment-open-button {
  background: white;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--blue-dark);
  font-size: 12px;
  font-weight: 800;
  min-height: 32px;
  padding: 6px 10px;
}

.attachment-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.attachment-add-button {
  background: white;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--text);
  font-weight: 800;
  min-height: 38px;
  padding: 8px 12px;
}

.attachment-actions small {
  color: var(--muted);
  flex: 1 1 220px;
  font-size: 12px;
  line-height: 1.35;
}

.attachment-error {
  color: var(--red);
  font-size: 12px;
  font-weight: 800;
  margin: 0;
}

.checklist-control {
  background: #f8fbff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.linked-rows-control {
  background: #f8fbff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.linked-rows-empty {
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  padding: 12px;
}

.linked-row-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.linked-row-card > strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 850;
}

.linked-row-column-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.linked-row-column-grid label {
  display: grid;
  gap: 6px;
}

.linked-row-column-grid label span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.checklist-progress {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.checklist-item-list {
  display: grid;
  gap: 8px;
}

.checklist-empty {
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  padding: 12px;
}

.checklist-item-row {
  align-items: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  display: grid;
  gap: 8px;
  grid-template-columns: 28px 18px minmax(0, 1fr) auto;
  min-height: 44px;
  padding: 8px 10px;
}

.checklist-control.unordered .checklist-marker {
  background: var(--blue);
  border-radius: 999px;
  height: 7px;
  justify-self: center;
  width: 7px;
}

.checklist-control.ordered .checklist-marker {
  align-items: center;
  background: var(--blue-soft);
  border: 1px solid #b9cff7;
  border-radius: 8px;
  color: var(--blue-dark);
  display: flex;
  font-size: 12px;
  font-weight: 800;
  height: 26px;
  justify-content: center;
  width: 26px;
}

.checklist-item-row input[type="checkbox"] {
  min-height: 0;
  width: 18px;
}

.checklist-item-row > span:last-of-type {
  overflow-wrap: anywhere;
}

.checklist-item-row.checked > span:last-of-type {
  color: var(--muted);
  text-decoration: line-through;
}

.checklist-remove-button {
  color: var(--red);
  font-size: 16px;
  height: 30px;
  width: 30px;
}

.checklist-add-row {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.checklist-add-row input {
  min-width: 0;
}

.checklist-config-editor {
  background: #f8fbff;
  border: 1px solid #b9cff7;
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 12px;
}

.checklist-config-editor.hidden {
  display: none;
}

.checklist-template-list {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.checklist-template-row {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 34px;
}

.checklist-template-remove {
  height: 34px;
  min-height: 34px;
  width: 34px;
}
/* Calendar workspace rail alignment: mirrors the CRM rail without changing CRM. */
.workspace-rail {
  background:
    radial-gradient(circle at 20% 12%, rgba(47, 103, 216, 0.16), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, #f5f7ff 100%);
  border-bottom: 1px solid var(--line);
  border-left: 0;
  border-right: 1px solid var(--line);
  border-top: 0;
}

.workspace-brand-row {
  gap: 12px;
  justify-content: center;
  min-width: 0;
  width: 100%;
}

.app-view.workspace-rail-pinned .workspace-brand-row,
.app-view.workspace-rail-hovered .workspace-brand-row,
.app-view.calendar-menu-pinned .workspace-brand-row,
.app-view.calendar-menu-hovered .workspace-brand-row {
  justify-content: flex-start;
  min-width: 224px;
}

.workspace-nav-list a {
  min-width: 56px;
}

.app-view.workspace-rail-pinned .workspace-nav-list a,
.app-view.workspace-rail-hovered .workspace-nav-list a,
.app-view.calendar-menu-pinned .workspace-nav-list a,
.app-view.calendar-menu-hovered .workspace-nav-list a {
  min-width: 224px;
}

.workspace-rail:has(.granade-auth-pill.in-workspace-rail) .workspace-rail-footer {
  display: none;
}

.workspace-rail .granade-auth-pill.in-workspace-rail {
  flex-shrink: 0;
  margin-top: auto;
}

.mobile-workspace-view {
  background: #f4f6fb;
  color: var(--text);
  min-height: 0;
}

.mobile-workspace-main {
  display: grid;
  grid-column: 2;
  grid-row: 1 / -1;
  grid-template-rows: auto auto minmax(0, 1fr);
  height: 100%;
  min-height: 0;
  overflow: hidden;
  padding: 28px 28px 0;
}

.mobile-workspace-header {
  align-items: center;
  border-bottom: 1px solid #d9dee7;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  padding-bottom: 22px;
}

.mobile-workspace-header h1 {
  color: #17202e;
  font-size: 34px;
  line-height: 1.05;
  margin: 2px 0 0;
}

.mobile-workspace-actions {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.mobile-company-select-wrap {
  color: #667085;
  display: grid;
  font-size: 11px;
  font-weight: 900;
  gap: 6px;
  letter-spacing: 0;
  min-width: 220px;
  text-transform: uppercase;
}

.mobile-company-select-wrap select,
.mobile-slot-row select {
  appearance: none;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  color: #17202e;
  font: inherit;
  min-height: 42px;
  padding: 8px 34px 8px 12px;
}

.mobile-workspace-tabs {
  align-items: center;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 16px 0 0;
}

.mobile-workspace-tabs button {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #475467;
  cursor: pointer;
  flex: 0 0 auto;
  font: inherit;
  font-size: 15px;
  font-weight: 900;
  min-height: 40px;
  padding: 8px 16px;
}

.mobile-workspace-tabs button:hover,
.mobile-workspace-tabs button.active {
  background: #e9eefc;
  border-color: #d7def7;
  color: #2949a8;
}

.mobile-workspace-layout {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(260px, 330px) minmax(0, 1fr);
  height: 100%;
  min-height: 0;
  overflow: hidden;
  padding-top: 22px;
}

.mobile-workspace-panel[hidden] {
  display: none;
}

.mobile-template-panel,
.mobile-mapping-panel {
  background: #fff;
  border: 1px solid #d9dee7;
  border-radius: 8px;
  box-shadow: 0 18px 45px rgba(22, 30, 46, 0.08);
  min-height: 0;
}

.mobile-template-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.mobile-mapping-panel {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
}

.mobile-panel-heading {
  align-items: flex-start;
  border-bottom: 1px solid #e1e6ef;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 18px;
}

.mobile-panel-heading h2 {
  color: #17202e;
  font-size: 22px;
  line-height: 1.1;
  margin: 3px 0 0;
}

.mobile-template-list,
.mobile-slot-list {
  display: grid;
  gap: 10px;
  min-height: 0;
  overflow: auto;
  padding: 14px;
}

.mobile-slot-header {
  align-items: center;
  color: #667085;
  display: grid;
  font-size: 11px;
  font-weight: 900;
  gap: 14px;
  grid-template-columns: minmax(180px, 1fr) 28px minmax(220px, 360px);
  letter-spacing: 0;
  padding: 0 14px 2px;
  text-transform: uppercase;
}

.mobile-template-button {
  align-items: center;
  background: #fff;
  border: 1px solid #d9dee7;
  border-radius: 8px;
  color: #17202e;
  cursor: pointer;
  display: grid;
  font: inherit;
  gap: 12px;
  grid-template-columns: 18px 1fr;
  min-height: 68px;
  padding: 12px;
  text-align: left;
}

.mobile-template-button:hover,
.mobile-template-button.active {
  background: #eef3ff;
  border-color: #bdc9f8;
}

.mobile-template-color {
  background: var(--template-color, #4f6bd8);
  border-radius: 6px;
  display: inline-block;
  height: 34px;
  width: 8px;
}

.mobile-template-button strong,
.mobile-slot-row strong {
  display: block;
  font-size: 15px;
  font-weight: 900;
}

.mobile-template-button small,
.mobile-slot-row small {
  color: #667085;
  display: block;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  margin-top: 4px;
}

.mobile-mapping-help {
  background: #f8fafc;
  border-bottom: 1px solid #e1e6ef;
  color: #667085;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
  padding: 14px 18px;
}

.mobile-slot-row {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #d9dee7;
  border-radius: 8px;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(180px, 1fr) 28px minmax(220px, 360px);
  padding: 14px;
}

.mobile-slot-mobile-field,
.mobile-slot-web-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.mobile-slot-column-label {
  color: #667085;
  display: none;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.mobile-slot-map-arrow {
  align-items: center;
  background: #eef3ff;
  border: 1px solid #d7def7;
  border-radius: 999px;
  color: #4f6bd8;
  display: inline-flex;
  font-size: 15px;
  font-weight: 900;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.mobile-save-status {
  color: #667085;
  font-size: 13px;
  font-weight: 900;
  margin: 0;
  min-height: 18px;
  text-align: right;
}

.mobile-save-status[data-tone="success"] {
  color: #217a4b;
}

.mobile-save-status[data-tone="error"] {
  color: #b8463f;
}

.mobile-save-status[data-tone="warning"] {
  color: #b86714;
}

.mobile-empty-state {
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  color: #667085;
  font-weight: 800;
  padding: 18px;
  text-align: center;
}

.mobile-app-pages-panel {
  align-self: stretch;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(500px, 0.95fr) minmax(0, 1.05fr);
  grid-template-rows: minmax(0, 1fr);
  height: auto;
  min-height: 0;
  overflow: hidden;
  padding-top: 22px;
}

.mobile-pages-editor,
.mobile-phone-preview {
  background: #fff;
  border: 1px solid #d9dee7;
  border-radius: 8px;
  box-shadow: 0 18px 45px rgba(22, 30, 46, 0.08);
  align-self: stretch;
  height: auto;
  min-height: 0;
}

.mobile-pages-editor {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  overflow: hidden;
}

.mobile-page-list {
  display: grid;
  gap: 10px;
  min-height: 0;
  overflow: auto;
  padding: 14px;
}

.mobile-page-row {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #d9dee7;
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: 40px 92px 78px minmax(220px, 1fr) minmax(140px, 190px);
  padding: 12px;
}

.mobile-page-row[draggable="true"] {
  cursor: grab;
}

.mobile-page-row[draggable="true"]:active {
  cursor: grabbing;
}

.mobile-page-row.disabled {
  background: #f3f5f9;
  color: #8a93a3;
}

.mobile-page-row.selected {
  background: #eef3ff;
  border-color: #aebfff;
  box-shadow: inset 4px 0 0 #4f6bd8;
}

.mobile-page-reorder {
  display: grid;
  gap: 6px;
}

.mobile-page-reorder button {
  align-items: center;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  color: #4f6bd8;
  display: inline-flex;
  font-size: 13px;
  font-weight: 900;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.mobile-page-reorder button:disabled {
  color: #a7b0c0;
  cursor: default;
  opacity: 0.55;
}

.mobile-page-toggle,
.mobile-page-icon-field,
.mobile-page-label-field,
.mobile-page-role-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.mobile-page-toggle {
  align-items: center;
  color: #475467;
  font-size: 13px;
  font-weight: 900;
  grid-template-columns: 18px 1fr;
}

.mobile-page-icon-field span,
.mobile-page-label-field span,
.mobile-page-role-field span {
  color: #667085;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.mobile-page-icon-field input,
.mobile-page-label-field input,
.mobile-page-role-field select {
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  color: #17202e;
  min-height: 38px;
  padding: 8px 10px;
}

.mobile-page-icon-field input {
  font-weight: 900;
  text-align: center;
}

.mobile-page-label-field small {
  color: #667085;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-phone-preview {
  align-items: center;
  display: flex;
  justify-content: center;
  overflow: hidden;
  padding: 18px;
  position: relative;
}

.mobile-phone-expand-button {
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(22, 30, 46, 0.08);
  color: #2949a8;
  font-size: 13px;
  font-weight: 900;
  min-height: 34px;
  padding: 7px 12px;
  position: absolute;
  right: 14px;
  top: 14px;
  z-index: 2;
}

.mobile-phone-expand-button:hover {
  background: #eef3ff;
  border-color: #bdc9f8;
}

.mobile-phone-shell {
  aspect-ratio: 9 / 19.5;
  background: #17202e;
  border: 1px solid #111827;
  border-radius: 34px;
  box-shadow: 0 22px 60px rgba(22, 30, 46, 0.2);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: min(100%, 860px);
  max-width: min(100%, 420px);
  min-height: 0;
  padding: 14px;
  width: auto;
}

.mobile-preview-overlay {
  --preview-zoom: 1.5;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  inset: 0;
  padding: 16px;
  position: fixed;
  z-index: 100;
}

.mobile-preview-overlay[hidden] {
  display: none;
}

.mobile-preview-overlay-backdrop {
  background: rgba(15, 23, 42, 0.82);
  inset: 0;
  position: absolute;
}

.mobile-preview-toolbar {
  align-items: center;
  background: #293346;
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  padding: 12px;
  position: relative;
  z-index: 2;
}

.mobile-preview-overlay-label {
  color: #fff;
}

.mobile-preview-overlay-label .eyebrow {
  color: rgba(255, 255, 255, 0.72);
}

.mobile-preview-overlay-label h2 {
  font-size: 24px;
  line-height: 1.1;
  margin: 3px 0 0;
}

.mobile-preview-controls {
  align-items: center;
  display: flex;
  gap: 8px;
}

.mobile-preview-controls output {
  color: #fff;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  min-width: 48px;
  text-align: center;
}

.mobile-preview-controls button {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  color: #17202e;
  font-weight: 900;
  min-height: 38px;
  min-width: 38px;
  padding: 8px 14px;
}

.mobile-preview-controls button:hover {
  background: #fff;
  border-color: #fff;
}

.mobile-preview-controls button:disabled {
  opacity: 0.45;
}

.mobile-preview-overlay-body {
  height: 100%;
  min-height: 0;
  min-width: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 24px;
  position: relative;
  scrollbar-gutter: stable;
  z-index: 1;
}

.mobile-preview-canvas {
  height: calc(910px * var(--preview-zoom));
  margin: 0 auto;
  position: relative;
  width: calc(420px * var(--preview-zoom));
}

.mobile-phone-shell-expanded {
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.3);
  height: 910px;
  max-height: none;
  max-width: none;
  transform: scale(var(--preview-zoom));
  transform-origin: top left;
  width: 420px;
}

.mobile-phone-status {
  background: #020617;
  border-radius: 999px;
  height: 18px;
  margin: 0 auto 10px;
  width: 96px;
}

.mobile-phone-screen {
  background: #f6f8fc;
  border-radius: 22px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.mobile-phone-header {
  background: #fff;
  border-bottom: 1px solid #e1e6ef;
  display: grid;
  gap: 4px;
  padding: 14px 16px;
}

.mobile-phone-header span {
  color: #667085;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.mobile-phone-header strong {
  color: #17202e;
  font-size: 22px;
  font-weight: 900;
}

.mobile-phone-card-list {
  align-content: start;
  display: grid;
  gap: 10px;
  overflow: auto;
  padding: 16px;
}

.mobile-phone-card {
  align-items: center;
  background: #fff;
  border: 1px solid #d9dee7;
  border-radius: 8px;
  display: grid;
  gap: 2px 10px;
  grid-template-columns: 38px 1fr;
  min-height: 68px;
  padding: 10px;
}

.mobile-builder-grid {
  background:
    linear-gradient(to right, rgba(203, 213, 225, 0.78) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(203, 213, 225, 0.78) 1px, transparent 1px),
    #f8fafc;
  background-size: calc(100% / var(--builder-columns, 8)) calc(100% / var(--builder-rows, 16));
  background-origin: content-box;
  background-clip: content-box;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  display: grid;
  grid-template-columns: repeat(var(--builder-columns, 8), minmax(0, 1fr));
  grid-template-rows: repeat(var(--builder-rows, 16), minmax(24px, 1fr));
  min-height: 450px;
  padding: 10px;
  position: relative;
}

.mobile-builder-grid::before {
  align-items: center;
  border: 1px dashed #b8c3d5;
  border-radius: 8px;
  color: #667085;
  content: "Drop pages here";
  display: flex;
  font-size: 14px;
  font-weight: 900;
  grid-column: 1 / -1;
  grid-row: 1 / -1;
  justify-content: center;
  opacity: 0.34;
  pointer-events: none;
}

.mobile-builder-grid.has-selection::before {
  opacity: 0;
}

.mobile-builder-tile {
  align-self: stretch;
  box-shadow: 0 12px 24px rgba(22, 30, 46, 0.08);
  cursor: grab;
  grid-column: var(--grid-x) / span var(--grid-w);
  grid-row: var(--grid-y) / span var(--grid-h);
  justify-self: stretch;
  margin: 3px;
  min-height: 68px;
  min-width: 0;
  border-radius: 8px;
  position: relative;
  text-align: left;
  z-index: 1;
}

.mobile-builder-button {
  cursor: grab;
  grid-template-columns: 38px minmax(0, 1fr);
  height: 100%;
  overflow-wrap: anywhere;
  text-align: left;
  width: 100%;
}

.mobile-builder-resize-handle {
  background: transparent;
  border: 0;
  height: 20px;
  min-height: 0;
  padding: 0;
  position: absolute;
  touch-action: none;
  user-select: none;
  width: 20px;
  z-index: 4;
}

.mobile-builder-resize-handle::after {
  background: #fff;
  border: 2px solid #2f67d8;
  border-radius: 2px;
  content: "";
  inset: 4px;
  position: absolute;
}

.mobile-builder-resize-handle:focus-visible::after,
.mobile-builder-resize-handle.is-resizing::after {
  background: #2f67d8;
  outline: 2px solid #fff;
}

.mobile-builder-resize-handle.resize-nw { cursor: nwse-resize; left: -8px; top: -8px; }
.mobile-builder-resize-handle.resize-ne { cursor: nesw-resize; right: -8px; top: -8px; }
.mobile-builder-resize-handle.resize-sw { bottom: -8px; cursor: nesw-resize; left: -8px; }
.mobile-builder-resize-handle.resize-se { bottom: -8px; cursor: nwse-resize; right: -8px; }

.mobile-builder-tile:active {
  cursor: grabbing;
}

.mobile-builder-tile.is-dragging {
  opacity: 0.45;
}

.mobile-builder-drop-preview {
  align-self: stretch;
  background: rgba(47, 103, 216, 0.18);
  border: 2px solid #2f67d8;
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.65);
  grid-column: var(--drop-x) / span var(--drop-w);
  grid-row: var(--drop-y) / span var(--drop-h);
  justify-self: stretch;
  margin: 3px;
  min-height: 68px;
  pointer-events: none;
  position: relative;
  z-index: 2;
}

.mobile-builder-drop-preview[hidden] {
  display: none;
}

.mobile-phone-card > span {
  align-items: center;
  background: #e9eefc;
  border-radius: 8px;
  color: #2f67d8;
  display: inline-flex;
  font-size: 16px;
  font-weight: 900;
  grid-row: span 2;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.mobile-phone-card strong {
  color: #17202e;
  font-size: 15px;
  font-weight: 900;
  min-width: 0;
}

.mobile-phone-card small {
  color: #667085;
  font-size: 11px;
  font-weight: 800;
}

.mobile-phone-empty {
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  color: #667085;
  font-weight: 900;
  padding: 18px;
  text-align: center;
}

.mobile-phone-nav {
  background: #fff;
  border-top: 1px solid #e1e6ef;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  min-height: 68px;
}

.mobile-phone-nav button {
  align-items: center;
  background: transparent;
  border: 0;
  color: #667085;
  cursor: pointer;
  display: grid;
  font-style: normal;
  gap: 3px;
  justify-items: center;
  min-width: 0;
  padding: 8px 4px;
}

.mobile-phone-nav span {
  align-items: center;
  background: #f1f4fb;
  border-radius: 8px;
  display: inline-flex;
  font-size: 12px;
  height: 26px;
  justify-content: center;
  width: 26px;
}

.mobile-phone-nav em {
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  max-width: 58px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-phone-nav button.active {
  color: #2949a8;
}

.mobile-phone-nav button.active span {
  background: #dfe7ff;
}

.mobile-placeholder-panel {
  background: #fff;
  border: 1px solid #d9dee7;
  border-radius: 8px;
  box-shadow: 0 18px 45px rgba(22, 30, 46, 0.08);
  margin-top: 22px;
  min-height: 0;
  overflow: auto;
}

.mobile-placeholder-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 18px;
}

.mobile-placeholder-grid article {
  background: #f8fafc;
  border: 1px solid #d9dee7;
  border-radius: 8px;
  min-height: 96px;
  padding: 16px;
}

.mobile-placeholder-grid strong {
  color: #17202e;
  display: block;
  font-size: 16px;
  font-weight: 900;
}

.mobile-placeholder-grid span {
  color: #667085;
  display: block;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
  margin-top: 8px;
}

@media (max-width: 980px) {
  .mobile-workspace-main {
    height: auto;
    overflow: auto;
  }

  .mobile-workspace-header,
  .mobile-workspace-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .mobile-workspace-layout,
  .mobile-app-pages-panel,
  .mobile-slot-row,
  .mobile-placeholder-grid {
    grid-template-columns: 1fr;
  }

  .mobile-app-pages-panel {
    height: auto;
    min-height: 0;
  }

  .mobile-phone-preview > .mobile-phone-shell {
    height: auto;
    width: min(100%, 420px);
  }

  .mobile-page-row {
    align-items: stretch;
    grid-template-columns: 36px 1fr;
  }

  .mobile-page-label-field,
  .mobile-page-icon-field,
  .mobile-page-role-field {
    grid-column: 1 / -1;
  }

  .mobile-slot-header {
    display: none;
  }

  .mobile-slot-column-label {
    display: block;
  }

  .mobile-slot-map-arrow {
    justify-self: start;
    transform: rotate(90deg);
  }
}
