:root {
  color-scheme: light;
  --bg: #f5f7fa;
  --surface: #ffffff;
  --surface-muted: #f0f4f7;
  --line: #d7e0e7;
  --text: #1d2733;
  --muted: #647386;
  --primary: #0f766e;
  --primary-strong: #115e59;
  --danger: #b42318;
  --warning: #a16207;
  --block: #6d5dfc;
  --radius: 8px;
  --app-topbar-height: 72px;
  --slot-height: 19px;
  font-family: "Segoe UI", Arial, sans-serif;
}

:root[data-density="2"] {
  --slot-height: 23px;
}

:root[data-density="3"] {
  --slot-height: 28px;
}

:root[data-density="4"] {
  --slot-height: 34px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
  font-size: 13px;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(135deg, #e8f2ef 0%, #f6f8fb 42%, #eef3f8 100%);
}

.login-panel {
  width: min(100%, 360px);
  display: grid;
  gap: 14px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 18px 45px rgba(29, 39, 51, 0.12);
}

.login-panel h1,
.login-panel p {
  margin: 0;
}

.login-panel h1 {
  font-size: 22px;
}

.login-panel p {
  color: var(--muted);
  font-size: 13px;
}

.login-panel label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.login-panel input {
  min-height: 38px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  color: var(--text);
  background: var(--surface);
}

.app-shell {
  height: 100vh;
  min-height: 0;
  display: grid;
  grid-template-columns: 154px minmax(0, 1fr) minmax(320px, 360px);
  overflow: hidden;
}

.big-calendar-pane,
.big-workspace-panel {
  min-width: 0;
  min-height: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface);
}

.big-calendar-pane,
.big-workspace-panel {
  grid-column: 2;
}

.big-workspace-panel {
  border-right: 1px solid var(--line);
}

.content-shell {
  min-width: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.main-nav {
  min-width: 0;
  height: 100vh;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
  padding: 14px 10px;
  border-right: 1px solid var(--line);
  background: var(--surface);
}

.c-topbar,
.w-topbar {
  flex: 0 0 auto;
  height: var(--app-topbar-height);
  min-height: var(--app-topbar-height);
  display: grid;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.c-topbar {
  grid-template-columns: auto minmax(0, 1fr) auto;
  justify-content: stretch;
}

.priority-toolbar {
  min-width: 0;
}

.w-topbar {
  grid-template-columns: minmax(0, 1fr);
}

.topbar {
  min-height: 72px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.pane-title {
  min-width: 0;
}

.brand {
  min-width: 0;
}

.brand h1,
.pane-title h2,
.side-head h2,
.panel-head h2,
.dialog h2,
.brand p,
.pane-title p,
.side-head p,
.panel-head p,
.dialog p {
  margin: 0;
}

.brand h1 {
  font-size: 18px;
  line-height: 1.1;
}

.pane-title h2 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 17px;
  line-height: 1.15;
}

.brand p,
.pane-title p,
.side-head p,
.panel-head p,
.dialog p,
.muted {
  color: var(--muted);
  font-size: 13px;
}

.display-controls,
.date-nav,
.topbar-right,
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  flex-wrap: nowrap;
}

.display-controls {
  justify-content: flex-start;
  flex-wrap: wrap;
  justify-self: start;
}

.c-topbar .display-controls,
.c-topbar .date-nav,
.c-topbar .topbar-actions {
  flex-wrap: nowrap;
}

.date-nav {
  justify-content: center;
  justify-self: center;
  transform: translateX(var(--calendar-date-nav-shift, 0px));
}

.topbar-right,
.topbar-actions {
  justify-content: flex-end;
  justify-self: end;
}

.account-box.topbar-account,
.account-box.nav-account {
  display: none;
  justify-self: end;
}

.module-tabs {
  display: grid;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
  max-width: 100%;
}

.module-tabs button {
  min-height: 42px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  border-radius: 6px;
  padding: 0 10px;
  color: var(--muted);
  text-align: left;
  background: var(--surface-muted);
}

.module-tabs button span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.module-tabs button.is-active {
  color: #ffffff;
  background: var(--primary);
}

.nav-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: transparent;
  font-size: 12px;
  font-weight: 600;
}

.account-box {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin-left: 0;
  white-space: nowrap;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.account-box span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-account span {
  max-width: 230px;
}

.icon-button,
.text-button,
.primary-button,
.secondary-button {
  min-height: 36px;
  border-radius: 6px;
  padding: 0 12px;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 36px;
  padding: 0;
  font-size: 24px;
  line-height: 1;
  color: var(--text);
  background: var(--surface-muted);
}

.text-button,
.secondary-button {
  color: var(--text);
  background: var(--surface-muted);
}

.today-icon {
  display: inline-grid;
}

.today-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.primary-button {
  color: #ffffff;
  background: var(--primary);
}

.primary-button:hover {
  background: var(--primary-strong);
}

.action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
}

.calendar-action-button {
  min-width: 138px;
}

.button-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.button-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border-radius: 0;
  color: inherit;
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
}

.svg-icon svg,
.button-icon svg {
  display: block;
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.icon-button .button-icon,
.icon-action-button .button-icon {
  background: transparent;
  margin: 0;
}

.account-logout-button .svg-icon svg {
  width: 17px;
  height: 17px;
}

.secondary-button .button-icon {
  background: transparent;
}

.secondary-button.icon-action-button .button-icon,
.secondary-button.account-logout-button .button-icon {
  background: transparent;
}

.icon-action-button {
  width: 40px;
  min-width: 40px;
  padding: 0;
}

.logout-button {
  min-width: 40px;
}

.segmented {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-muted);
}

.segmented button {
  display: inline-grid;
  place-items: center;
  min-width: 38px;
  min-height: 30px;
  border-radius: 6px;
  padding: 0 8px;
  color: var(--muted);
  background: transparent;
  font-size: 13px;
  line-height: 1;
}

.segmented button.is-active {
  color: #ffffff;
  background: var(--primary);
}

.range-bars,
.density-lines {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 18px;
  color: currentColor;
  vertical-align: middle;
}

.range-bars {
  gap: 2px;
  align-items: flex-end;
}

.range-bars span {
  display: block;
  width: 2px;
  min-height: 8px;
  border-radius: 999px;
  background: currentColor;
}

.range-bars span:nth-child(2n) {
  min-height: 13px;
}

.range-bars span:nth-child(3n) {
  min-height: 16px;
}

.density-lines {
  flex-direction: column;
  gap: 2px;
}

.density-lines span {
  display: block;
  width: 19px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.density-lines-1 {
  gap: 5px;
}

.density-lines-4 {
  gap: 1px;
}

.new-request-indicator {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 34px;
  min-width: 34px;
  height: 34px;
  border: 1px solid rgba(37, 99, 235, 0.28);
  border-radius: 999px;
  color: #1d4ed8;
  background: #eff6ff;
}

.new-request-indicator[hidden] {
  display: none;
}

.new-request-indicator::after {
  content: '';
  position: absolute;
  top: 5px;
  right: 5px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.14);
}

.new-request-indicator.is-active {
  animation: new-request-pulse 1.7s ease-in-out infinite;
}

.mobile-display-menu,
.mobile-queue-button,
.mobile-filter-toggle {
  display: none;
}

.mobile-display-menu {
  position: relative;
}

.mobile-display-menu summary {
  min-width: 34px;
  min-height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 6px;
  color: var(--text);
  background: var(--surface-muted);
  list-style: none;
}

.mobile-display-menu summary::-webkit-details-marker {
  display: none;
}

.mobile-display-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 60;
  display: grid;
  gap: 8px;
  width: max-content;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 36px rgba(29, 39, 51, 0.16);
}

.mobile-display-panel .segmented {
  justify-content: center;
}

@keyframes new-request-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
  }

  50% {
    box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.12);
  }
}

.workspace {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 14px;
  padding: 14px;
}

.calendar-pane,
.workspace-panel,
.side-pane {
  min-width: 0;
  background: var(--surface);
}

.calendar-pane {
  flex: 1 1 auto;
  min-height: 0;
  padding: 10px;
  overflow: hidden;
  border: 0;
}

#calendar {
  height: 100%;
  min-height: 0;
}

.workspace-panel {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  border: 0;
}

.panel-head {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.panel-head h2 {
  font-size: 18px;
}

.main-list {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 12px;
  container: main-list / inline-size;
}

.main-list > .filter-bar {
  position: sticky;
  top: 0;
  z-index: 5;
  margin-top: 0;
  box-shadow: 0 8px 14px rgba(245, 247, 250, 0.86);
}

.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  min-height: 38px;
  margin-bottom: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  background: var(--surface-muted);
  font-size: 13px;
}

.audit-filter-bar,
.list-filter-bar {
  justify-content: flex-start;
}

.audit-filter-bar label,
.list-filter-bar label {
  display: grid;
  gap: 4px;
  flex: 1 1 160px;
  min-width: 150px;
  max-width: 100%;
  color: var(--muted);
  font-size: 12px;
}

.audit-filter-bar select,
.audit-filter-bar input,
.list-filter-bar select,
.list-filter-bar input {
  min-height: 32px;
  padding: 5px 8px;
  font-size: 13px;
}

.audit-filter-bar .search-field,
.list-filter-bar .search-field {
  position: relative;
}

.audit-filter-bar .search-field input,
.list-filter-bar .search-field input {
  padding-right: 34px;
}

.audit-filter-bar .search-field::after,
.list-filter-bar .search-field::after {
  content: "";
  position: absolute;
  right: 10px;
  bottom: 9px;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(82, 107, 146, 0.22);
  border-top-color: #2f6feb;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
}

.audit-filter-bar .search-field.is-searching::after,
.list-filter-bar .search-field.is-searching::after {
  opacity: 1;
  animation: request-client-search-spin 720ms linear infinite;
}

.list-filter-bar .search-field {
  min-width: min(240px, 100%);
}

.list-filter-bar .request-filter-id.search-field,
.list-filter-bar .appointment-filter-id.search-field {
  min-width: 150px;
}

.filter-summary {
  margin-left: auto;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.audit-sort-button,
.list-sort-button,
.list-reset-button {
  min-height: 32px;
  align-self: end;
  white-space: nowrap;
}

.side-pane {
  grid-column: 3;
  height: 100vh;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  border-left: 1px solid var(--line);
}

.side-account {
  flex: 0 0 auto;
  height: var(--app-topbar-height);
  min-height: var(--app-topbar-height);
  display: flex;
  align-items: center;
  padding: 8px 16px;
  border-bottom: 1px solid var(--line);
}

.side-account .account-box {
  width: 100%;
  justify-content: space-between;
}

.side-account .logout-button {
  flex: 0 0 auto;
}

.side-head {
  flex: 0 0 auto;
  height: var(--app-topbar-height);
  min-height: var(--app-topbar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px;
  border-bottom: 1px solid var(--line);
}

.side-head h2 {
  font-size: 17px;
}

.appointment-list {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 10px;
  container: side-list / inline-size;
}

.request-empty-achievement {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 10px;
  width: min(100%, 260px);
  min-height: 360px;
  margin: 10px auto 0;
  padding: 24px 2px 2px;
  color: #8ea4bc;
  text-align: center;
  user-select: none;
}

.request-empty-achievement-symbol {
  width: 120px;
  height: 120px;
  color: currentColor;
  opacity: 0.26;
}

.request-empty-achievement-symbol svg,
.request-empty-achievement-symbol img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.request-empty-achievement h3,
.request-empty-achievement p,
.request-empty-achievement span {
  max-width: 220px;
  margin: 0;
  color: inherit;
}

.request-empty-achievement h3 {
  font-size: 24px;
  line-height: 1.12;
  font-weight: 400 !important;
  letter-spacing: 0;
  opacity: 0.68;
}

.request-empty-achievement p,
.request-empty-achievement span {
  font-size: 20px;
  line-height: 1.35;
  font-weight: 200 !important;
  opacity: 0.78;
}

.request-empty-achievement-change {
  min-height: 22px;
  margin-top: 2px;
  padding: 2px 4px;
  border: 0;
  color: currentColor;
  background: transparent;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 400;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  opacity: 0.64;
}

.request-empty-achievement-change:hover,
.request-empty-achievement-change:focus-visible {
  opacity: 1;
}

.appointment-card,
.client-card,
.audit-card {
  display: grid;
  gap: 5px;
  min-width: 0;
  container: record-card / inline-size;
  padding: 10px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--primary);
  border-radius: 6px;
  background: #ffffff;
  cursor: pointer;
}

.appointment-card + .appointment-card,
.client-card + .client-card,
.audit-card + .audit-card,
.list-command + .client-card {
  margin-top: 8px;
}

.appointment-card:hover,
.appointment-card:focus-visible,
.client-card:hover,
.client-card:focus-visible {
  border-color: #9ab0c2;
  outline: 0;
}

.appointment-card.is-block {
  border-left-color: var(--block);
}

.appointment-time {
  min-width: 0;
}

.appointment-title {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 14px;
}

.appointment-title.with-status-icon {
  display: flex;
  align-items: center;
  gap: 6px;
}

.appointment-title.with-status-icon span:last-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.status-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: #ffffff;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
}

.status-icon.status-scheduled {
  border-color: #99f6e4;
  color: var(--primary);
  background: #ecfdf5;
}

.status-icon.status-completed {
  border-color: #86efac;
  color: #166534;
  background: #f0fdf4;
}

.status-icon.status-cancelled,
.status-icon.status-no-show {
  border-color: #fecaca;
  color: var(--danger);
  background: #fef2f2;
}

.status-icon.status-needs-review {
  border-color: #fde68a;
  color: var(--warning);
  background: #fffbeb;
}

.status-icon.status-block {
  border-color: #c4b5fd;
  color: var(--block);
  background: #f5f3ff;
}

.appointment-meta {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 12px;
}

.client-link-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: fit-content;
  max-width: 100%;
  color: var(--muted);
  font-size: 12px;
}

.client-link-badge svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.client-link-badge.is-linked {
  color: #0f766e;
}

.client-link-badge.is-unlinked {
  color: #b42318;
}

.audit-action {
  justify-self: start;
  min-height: 30px;
  margin-top: 2px;
  padding: 0 10px;
  font-size: 13px;
}

.notice {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 12000;
  --notice-alpha-top: 0.72;
  --notice-alpha-mid: 0.84;
  --notice-alpha-bottom: 0.95;
  --notice-border-color: rgba(255, 255, 255, 0.012);
  --notice-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.014),
    0 0 18px 4px rgba(4, 10, 20, 0.34),
    0 0 72px 14px rgba(4, 10, 20, 0.28);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  width: min(var(--notice-width, 350px), calc(100vw - 36px));
  min-height: 48px;
  padding: 10px 11px 15px 12px;
  overflow: hidden;
  border: 1px solid var(--notice-border-color);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.94);
  background:
    linear-gradient(
      180deg,
      rgba(18, 24, 34, var(--notice-alpha-top)) 0%,
      rgba(18, 24, 34, var(--notice-alpha-mid)) 64%,
      rgba(7, 10, 16, var(--notice-alpha-bottom)) 100%
    );
  box-shadow: var(--notice-shadow);
  backdrop-filter: blur(0.6px) saturate(1.04);
  -webkit-backdrop-filter: blur(0.6px) saturate(1.04);
  font-size: 14px;
  line-height: 1.16;
  font-weight: 400;
}

.notice.is-error {
  --notice-border-color: rgba(255, 138, 138, 0.16);
}

.notice.has-action {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.notice-message {
  min-width: 0;
  color: rgba(255, 255, 255, 0.94);
  font-size: 14px;
  line-height: 1.16;
  font-weight: 400;
  overflow-wrap: anywhere;
}

.notice-undo-button {
  justify-self: end;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.91);
  background: rgba(255, 255, 255, 0.105);
  font: inherit;
  font-size: 12px;
  font-weight: 400;
  white-space: nowrap;
  cursor: pointer;
}

.notice-undo-button:hover,
.notice-undo-button:focus-visible {
  outline: 0;
  background: rgba(255, 255, 255, 0.2);
}

.notice-undo-button:disabled {
  cursor: default;
  opacity: 0.62;
}

.notice-timer {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 1px;
  z-index: 1;
  height: 1px;
  overflow: hidden;
  border-radius: 999px;
  background: transparent;
}

.notice-timer-bar {
  position: absolute;
  inset: 0 0 0 auto;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: #4bd1ff;
  box-shadow: 0 0 8px rgba(75, 209, 255, 0.96);
}

.notice.is-error .notice-timer-bar {
  background: #ff8a8a;
  box-shadow: 0 0 8px rgba(255, 138, 138, 0.9);
}

.background-refresh-indicator {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 11990;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid rgba(191, 219, 254, 0.72);
  border-radius: 50%;
  color: #0f4f9a;
  background: rgba(239, 246, 255, 0.86);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.12);
  opacity: 0;
  pointer-events: none;
}

.background-refresh-indicator .svg-icon {
  width: 15px;
  height: 15px;
}

.background-refresh-indicator.is-visible {
  animation: background-refresh-indicator 1200ms ease-out forwards;
}

.background-refresh-indicator.is-visible .svg-icon {
  animation: background-refresh-spin 720ms ease-out 1;
}

@keyframes background-refresh-indicator {
  0% {
    opacity: 0;
    transform: translateY(4px) scale(0.92);
  }

  14% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  72% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  100% {
    opacity: 0;
    transform: translateY(2px) scale(0.96);
  }
}

@keyframes background-refresh-spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.side-tabs {
  flex: 0 0 auto;
  display: flex;
  gap: 4px;
  padding: 10px 10px 0;
}

.side-tabs button {
  min-height: 34px;
  flex: 1;
  border-radius: 6px;
  color: var(--muted);
  background: var(--surface-muted);
}

.side-tabs button.is-active {
  color: #ffffff;
  background: var(--primary);
}

.request-card {
  position: relative;
  display: grid;
  gap: 5px;
  min-width: 0;
  container: request-card / inline-size;
  padding: 10px 34px 10px 10px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--warning);
  border-radius: 6px;
  background: #ffffff;
  cursor: pointer;
}

.request-card.source-site {
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.10), rgba(255, 255, 255, 0.98) 48%);
}

.request-card.source-vkbot {
  background:
    linear-gradient(160deg, rgba(37, 99, 235, 0.12) 0%, rgba(239, 246, 255, 0.92) 50%, rgba(255, 255, 255, 0.98) 100%);
}

.request-card.source-telegram {
  background:
    radial-gradient(circle at 90% 12%, rgba(14, 165, 233, 0.16), rgba(14, 165, 233, 0) 30%),
    linear-gradient(135deg, rgba(224, 242, 254, 0.72), rgba(255, 255, 255, 0.98) 58%);
}

.request-card.source-historical {
  background:
    radial-gradient(circle at 90% 12%, rgba(37, 99, 235, 0.12), rgba(37, 99, 235, 0) 30%),
    linear-gradient(135deg, rgba(237, 245, 255, 0.88), rgba(255, 255, 255, 0.98) 58%);
}

.request-source-corner {
  position: absolute;
  top: 8px;
  right: 8px;
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  color: #0f766e;
  pointer-events: none;
}

.request-source-icon svg {
  display: block;
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.request-source-icon-text {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0;
}

.request-source-corner.source-vkbot {
  color: #2563eb;
}

.request-source-corner.source-telegram {
  color: #0284c7;
}

.request-source-corner.source-historical {
  color: #073b91;
}

.request-card + .request-card {
  margin-top: 8px;
}

.request-card:hover,
.request-card:focus-visible {
  border-color: #9ab0c2;
  outline: 0;
}

.request-card[data-request-draggable="true"] {
  cursor: grab;
}

.request-card[data-request-draggable="true"]:active {
  cursor: grabbing;
}

.request-card.is-review {
  border-left-color: var(--danger);
}

.request-card.is-scheduled {
  border-left-color: #2563eb;
}

.request-card.is-final {
  border-left-color: #647386;
}

.request-attention-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
}

.request-attention-list span,
.dialog-attention {
  border-radius: 999px;
  background: #fff7ed;
  color: #9a3412;
  font-size: 12px;
  line-height: 1.3;
}

.request-attention-list span {
  padding: 3px 7px;
}

.dialog-attention {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  margin-top: 6px !important;
  padding: 5px 8px;
}

.request-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
  margin-top: 4px;
}

.request-quick-actions button {
  min-height: 30px;
  padding: 0 8px;
  font-size: 12px;
}

.request-action-button {
  gap: 5px;
}

.request-action-button .button-icon {
  width: 15px;
  height: 15px;
  background: transparent;
}

.request-action-button .button-icon svg {
  width: 15px;
  height: 15px;
}

.request-action-caret {
  margin-left: -2px;
}

.request-card-details {
  display: none;
}

.request-lifecycle-line {
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
}

.request-lifecycle-snapshot {
  margin-top: 8px;
}

.request-lifecycle-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
}

.request-lifecycle-chips.is-compact {
  margin-top: 2px;
}

.request-lifecycle-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  min-height: 24px;
  padding: 3px 7px;
  border: 1px solid #d9e2ec;
  border-radius: 999px;
  color: #334155;
  background: #f8fafc;
  font-size: 11px;
  line-height: 1.2;
}

.request-lifecycle-chip-label {
  color: #647386;
  font-weight: 600;
}

.request-lifecycle-chip-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.request-lifecycle-chip.is-active,
.request-lifecycle-chip.is-flow {
  border-color: #c7d2fe;
  color: #3730a3;
  background: #eef2ff;
}

.request-lifecycle-chip.is-positive {
  border-color: #bbf7d0;
  color: #166534;
  background: #f0fdf4;
}

.request-lifecycle-chip.is-warning {
  border-color: #fed7aa;
  color: #9a3412;
  background: #fff7ed;
}

.request-lifecycle-chip.is-danger {
  border-color: #fecdd3;
  color: #9f1239;
  background: #fff1f2;
}

.request-lifecycle-chip.is-final {
  border-color: #cbd5e1;
  color: #475569;
  background: #f1f5f9;
}

.request-lifecycle-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 6px;
  align-items: stretch;
}

.request-lifecycle-actions button {
  justify-content: flex-start;
  min-width: 0;
  min-height: 34px;
  padding: 0 9px;
  font-size: 12px;
}

.request-appointment-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-muted);
}

.request-appointment-panel label {
  font-size: 12px;
}

.request-appointment-panel fieldset.wide {
  grid-column: 1 / -1;
}

.request-appointment-panel input,
.request-appointment-panel select {
  min-height: 32px;
  padding: 5px 8px;
  font-size: 13px;
}

.request-appointment-actions {
  grid-column: 1 / -1;
}

.request-appointment-actions {
  display: flex;
  justify-content: flex-end;
}

@container main-list (max-width: 620px) {
  .filter-bar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: flex-start;
    gap: 8px;
  }

  .audit-filter-bar label,
  .list-filter-bar label {
    flex: 0 0 auto;
    min-width: 0;
    width: 100%;
  }

  .list-filter-bar .search-field {
    grid-column: 1 / -1;
    min-width: 0;
  }

  .filter-summary {
    grid-column: 1 / -1;
    margin-left: 0;
  }

  .list-sort-button,
  .list-reset-button {
    width: 100%;
  }
}

@container main-list (max-width: 330px) {
  .filter-bar {
    grid-template-columns: 1fr;
  }
}

@container side-list (max-width: 420px) {
  .appointment-card,
  .request-card {
    font-size: 12px;
  }

  .appointment-title {
    font-size: 13px;
  }

  .request-quick-actions {
    gap: 4px;
  }

  .request-action-button {
    min-height: 28px;
    padding: 0 6px;
    font-size: 11px;
  }
}

@container request-card (max-width: 260px) {
  .request-quick-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .request-action-button {
    justify-content: center;
  }

  .request-action-button span:not(.button-icon) {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .request-attention-list {
    gap: 3px;
  }
}

@container record-card (max-width: 300px) {
  .appointment-time {
    font-size: 12px;
  }

  .appointment-title {
    font-size: 13px;
  }

  .appointment-meta {
    font-size: 11px;
  }

  .audit-action {
    width: 100%;
    justify-self: stretch;
  }
}

.client-card {
  border-left-color: #0f766e;
}

.audit-card {
  border-left-color: #647386;
  cursor: default;
}

.list-command {
  width: 100%;
  margin-bottom: 8px;
}

.integration-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 8px;
}

.integration-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-muted);
}

.integration-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
  min-height: 0;
}

.log-section {
  min-width: 0;
  min-height: 0;
}

.log-section h3 {
  margin: 0 0 8px;
  font-size: 14px;
}

.log-list {
  max-height: calc(100vh - 290px);
  overflow: auto;
  display: grid;
  gap: 8px;
  padding-right: 4px;
}

.modal-layer {
  position: fixed;
  inset: 0;
  z-index: 1000;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  overscroll-behavior: contain;
  padding: 24px 12px;
  background: rgba(29, 39, 51, 0.32);
}

.modal-layer::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.modal-scroll {
  min-height: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.modal-layer[data-active-dialog="request"][data-request-appointment-panel="closed"] .modal-scroll {
  align-items: center;
}

.modal-layer[data-active-dialog="request"][data-request-appointment-panel="open"] .modal-scroll {
  align-items: flex-start;
}

.modal-layer[data-active-dialog="appointment"] .modal-scroll {
  align-items: center;
}

body.has-modal-open {
  overflow: hidden;
}

dialog.dialog,
.dialog {
  position: relative;
  inset: auto !important;
  top: auto !important;
  left: auto !important;
  z-index: 1001;
  width: min(720px, calc(100vw - 24px));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin: 0 auto 24px;
  padding: 0;
  max-height: none !important;
  height: auto !important;
  overflow: visible !important;
  overflow-y: visible !important;
  transform: none !important;
}

dialog.client-dialog,
.client-dialog {
  width: min(1120px, calc(100vw - 24px)) !important;
}

.dialog::backdrop {
  background: transparent;
}

.dialog form {
  margin: 0;
  max-height: none !important;
  overflow: visible !important;
  overflow-y: visible !important;
}

.dialog-head {
  position: relative;
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 60px 16px 16px;
  border-bottom: 1px solid var(--line);
}

.dialog-close-button {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
}

.dialog-meta {
  min-width: 0;
  margin-top: 4px;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 12px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.dialog label {
  gap: 4px;
  font-size: 12px;
}

.form-grid > .wide {
  grid-column: 1 / -1;
}

.history-panel {
  display: grid;
  gap: 8px;
  max-height: min(52vh, 520px);
  overflow: auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-muted);
}

.dialog .history-panel {
  max-height: none;
  overflow: visible;
}

.history-panel h3 {
  margin: 0;
  color: var(--text);
  font-size: 14px;
}

.history-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(230px, 1fr));
  gap: 6px;
  min-width: 720px;
}

.history-grid-head {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.history-row {
  display: contents;
}

.history-cell {
  display: grid;
  gap: 3px;
  min-height: 76px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
}

.history-cell.is-clickable {
  cursor: pointer;
}

.history-cell.is-clickable:hover,
.history-cell.is-clickable:focus-visible {
  border-color: #9ab0c2;
  outline: 0;
  background: #f8fafc;
}

.history-cell.is-empty {
  place-items: center;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.62);
  font-size: 12px;
}

.client-picker-field {
  position: relative;
}

.client-picker-field input[name="client_search"] {
  padding-right: 34px;
}

.client-picker-field::after {
  content: "";
  position: absolute;
  top: 31px;
  right: 10px;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(82, 107, 146, 0.22);
  border-top-color: #2f6feb;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
}

.client-picker-field.is-searching::after {
  opacity: 1;
  animation: request-client-search-spin 720ms linear infinite;
}

.client-picker-selected {
  min-height: 30px;
  margin-top: 6px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
}

.client-picker-selected.has-client {
  color: var(--text);
  background: #ffffff;
}

.client-picker-results {
  display: grid;
  gap: 4px;
  margin-top: 6px;
}

.client-picker-option {
  justify-content: flex-start;
  min-height: 34px;
  padding: 6px 8px;
  text-align: left;
}

.client-picker-empty {
  color: var(--muted);
  font-size: 12px;
}

.appointment-service-controls {
  display: block;
  min-width: 0;
  margin: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.appointment-service-controls legend {
  padding: 0 4px;
  color: var(--muted);
  font-size: 12px;
}

.service-toggle-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(96px, 1fr));
  gap: 8px;
}

.service-toggle-card {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.service-flag-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.service-toggle-button {
  display: grid;
  justify-items: center;
  gap: 3px;
  min-width: 0;
  min-height: 72px;
  width: 100%;
  padding: 8px 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #6b7280;
  background: #f8fafc;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.service-toggle-button:hover,
.service-toggle-button:focus-visible {
  border-color: #5eead4;
  outline: none;
}

.service-toggle-card.is-active .service-toggle-button {
  border-color: #14b8a6;
  color: #08766f;
  background: linear-gradient(180deg, #ecfdf5 0%, #ffffff 100%);
  box-shadow: 0 0 0 1px rgba(20, 184, 166, 0.28), 0 0 18px rgba(20, 184, 166, 0.14);
}

.service-toggle-card.needs-material-source .service-toggle-button {
  border-color: #f59e0b;
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.24);
}

.service-toggle-title {
  color: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.1;
}

.service-toggle-state {
  max-width: 100%;
  color: inherit;
  font-size: 11px;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.material-source-toggle {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
}

.material-source-toggle button {
  min-width: 0;
  min-height: 28px;
  padding: 4px 5px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  background: #ffffff;
  font-size: 12px;
  cursor: pointer;
}

.material-source-toggle button:disabled {
  color: #a8b3bf;
  background: #f7f9fb;
  cursor: default;
}

.material-source-toggle button.is-active {
  border-color: #22c55e;
  color: #166534;
  background: #ecfdf3;
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.2);
}

.service-flag-icon svg {
  display: block;
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.appointment-color-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.appointment-color-controls legend {
  padding: 0 4px;
  color: var(--muted);
  font-size: 12px;
}

.manager-color-options {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 30px;
}

.manager-color-option {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  cursor: pointer;
  border: 0;
  border-radius: 999px;
  background: transparent;
}

.appointment-color-dot {
  display: block;
  width: 18px;
  height: 18px;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: var(--manager-color, #0f766e);
  box-shadow: 0 0 0 1px var(--line);
}

.manager-color-option.is-active .appointment-color-dot {
  box-shadow: 0 0 0 2px #0f172a, 0 0 14px rgba(15, 23, 42, 0.18);
}

.manager-color-option.has-matching-color .appointment-color-dot {
  box-shadow: 0 0 0 2px #647386;
}

.manager-color-option:focus-visible .appointment-color-dot {
  outline: 2px solid #0f172a;
  outline-offset: 3px;
}

.manager-confirm-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(15, 23, 42, 0.28);
}

.manager-confirm-overlay[hidden] {
  display: none;
}

.manager-confirm-box {
  width: min(360px, 100%);
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.manager-confirm-box h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

.manager-confirm-box p {
  margin: 0 0 12px;
}

.manager-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

.request-action-overlay {
  position: fixed;
  inset: 0;
  z-index: 12;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.20);
}

.request-action-overlay[hidden] {
  display: none;
}

.request-action-box {
  display: grid;
  gap: 12px;
  width: min(520px, 100%);
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.request-action-box h3,
.request-action-box h4,
.request-action-box p {
  margin: 0;
}

.request-action-box h3 {
  font-size: 16px;
  font-weight: 600;
}

.request-action-box h4 {
  font-size: 13px;
  font-weight: 600;
}

.request-action-text {
  color: #40536a;
  font-size: 13px;
  line-height: 1.45;
}

.request-action-input-label,
.request-action-manager-section {
  display: grid;
  gap: 6px;
}

.request-action-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.request-sort-reference-row {
  grid-template-columns: minmax(78px, 0.32fr) minmax(190px, 0.9fr) minmax(140px, 0.58fr) minmax(260px, 1.28fr) minmax(220px, 1fr);
}

.settings-section {
  display: grid;
  gap: 12px;
}

.settings-list {
  display: grid;
  align-content: start;
  gap: 24px;
}

.settings-section + .settings-section {
  margin-top: 4px;
}

.settings-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.settings-section-head h3 {
  margin: 0 0 4px;
  font-size: 18px;
}

.manager-create-form,
.manager-settings-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto auto auto auto;
  align-items: center;
  gap: 8px;
}

.manager-create-form {
  align-items: end;
}

.manager-create-form .action-button {
  min-height: 36px;
  height: 36px;
  align-self: end;
}

.manager-settings-row .secondary-button {
  min-height: 36px;
  height: 36px;
  align-self: center;
}

.manager-create-form label,
.manager-settings-row label {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.settings-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-muted);
}

.settings-tab-button {
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
}

.settings-tab-button.is-active {
  border-color: #c8d7e3;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 4px rgba(29, 39, 51, 0.08);
}

.settings-tab-panels {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.fine-settings-section {
  max-width: 1180px;
}

.fine-settings-list {
  display: grid;
  overflow: hidden;
  border: 1px solid #d8e3ee;
  border-radius: 8px;
  background: #fff;
}

.fine-settings-row {
  display: grid;
  grid-template-columns: auto minmax(40px, 1fr) minmax(160px, auto);
  align-items: center;
  gap: 14px;
  min-height: 54px;
  padding: 10px 12px;
  border-top: 1px solid #edf3f9;
}

.fine-settings-row:first-child {
  border-top: 0;
}

.fine-setting-control {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-width: 0;
}

.fine-setting-line {
  display: block;
  height: 1px;
  min-width: 24px;
  background: linear-gradient(90deg, rgba(135, 157, 181, 0.12), rgba(135, 157, 181, 0.34), rgba(135, 157, 181, 0.12));
}

.fine-setting-text {
  justify-self: end;
  color: #24364d;
  font-size: 14px;
  line-height: 1.25;
  font-weight: 600;
  text-align: right;
}

.fine-tri-toggle {
  --fine-toggle-index: 0;
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  width: 138px;
  min-width: 138px;
  min-height: 34px;
  padding: 3px;
  border: 1px solid #b8c9da;
  border-radius: 8px;
  background: #eef5fb;
  color: #6d8098;
  font-size: 11px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0;
}

.fine-tri-toggle::before {
  content: "";
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: calc((100% - 6px) / 3);
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(29, 39, 51, 0.14);
  transform: translateX(calc(var(--fine-toggle-index) * 100%));
  transition: transform 140ms ease;
}

.fine-tri-toggle[data-mode="all"],
.fine-tri-toggle[data-mode="ctrl"] {
  --fine-toggle-index: 1;
}

.fine-tri-toggle[data-mode="day"],
.fine-tri-toggle[data-mode="on"] {
  --fine-toggle-index: 2;
}

.fine-tri-toggle span {
  position: relative;
  z-index: 1;
  text-align: center;
}

.fine-tri-toggle[data-mode="off"] [data-toggle-segment="off"],
.fine-tri-toggle[data-mode="all"] [data-toggle-segment="all"],
.fine-tri-toggle[data-mode="day"] [data-toggle-segment="day"],
.fine-tri-toggle[data-mode="ctrl"] [data-toggle-segment="ctrl"],
.fine-tri-toggle[data-mode="on"] [data-toggle-segment="on"] {
  color: #174ea6;
}

.fine-setting-status {
  min-width: 34px;
  color: #174ea6;
  font-size: 12px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0;
  text-align: left;
}

.manager-color-input-label input,
.manager-settings-row input[type="color"] {
  width: 44px;
  min-width: 44px;
  height: 42px;
  padding: 4px;
}

.manager-settings-list {
  display: grid;
  gap: 6px;
}

.sla-settings-section {
  display: grid;
  gap: 12px;
}

.sla-reference-table {
  display: grid;
  overflow: hidden;
  border: 1px solid #d8e3ee;
  border-radius: 8px;
  background: #fff;
}

.sla-reference-row {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(120px, 0.45fr) minmax(260px, 1.65fr);
  gap: 14px;
  align-items: start;
  padding: 9px 12px;
  border-top: 1px solid #e6eef6;
  color: #24364d;
  font-size: 13px;
  line-height: 1.35;
}

.sla-reference-row > * {
  min-width: 0;
  overflow-wrap: anywhere;
}

.sla-reference-row:first-child {
  border-top: 0;
}

.sla-reference-row.is-head {
  color: #60738d;
  background: #f6f9fc;
  font-size: 12px;
}

.sla-reference-row code {
  color: #123b77;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
  white-space: nowrap;
}

.recognition-settings-section {
  padding-bottom: 4px;
}

.recognition-filter-label {
  display: grid;
  gap: 4px;
  min-width: min(100%, 240px);
  color: #60738d;
  font-size: 12px;
  font-weight: 600;
}

.recognition-filter-label select {
  min-height: 36px;
}

.recognition-events-list {
  display: grid;
  gap: 8px;
  max-height: 340px;
  min-height: 72px;
  overflow: auto;
  padding-right: 4px;
}

.recognition-event-card {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid #d8e3ee;
  border-left: 4px solid #647386;
  border-radius: 6px;
  background: #ffffff;
}

.recognition-event-head,
.recognition-event-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  color: #60738d;
  font-size: 12px;
  font-weight: 600;
}

.recognition-event-head span:first-child {
  color: #132238;
}

.recognition-event-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.recognition-event-fields div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.recognition-event-fields dt {
  color: #60738d;
  font-size: 12px;
  font-weight: 600;
}

.recognition-event-fields dd {
  min-width: 0;
  margin: 0;
  color: #24364d;
  overflow-wrap: anywhere;
}

@media (max-width: 720px) {
  .recognition-event-fields {
    grid-template-columns: 1fr;
  }
}

.work-now-list {
  display: grid;
  align-content: start;
}

.feature-board-section {
  min-width: 0;
}

.feature-board-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 10px;
  min-width: 0;
  min-height: 384px;
  align-items: stretch;
}

.feature-board-column {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 8px;
  min-width: 0;
  min-height: 384px;
  padding: 10px;
  border: 1px solid #d8e3ee;
  border-radius: 8px;
  background: #f8fbfe;
}

.feature-board-column[data-status-key="ideas"] {
  background: linear-gradient(180deg, #f3f8fd 0%, #ffffff 64%);
}

.feature-board-column[data-status-key="planned"] {
  background: linear-gradient(180deg, #fbf7ed 0%, #ffffff 64%);
}

.feature-board-column[data-status-key="in_work"] {
  background: linear-gradient(180deg, #eef9f8 0%, #ffffff 64%);
}

.feature-board-column[data-status-key="done"] {
  background: linear-gradient(180deg, #eff8f1 0%, #ffffff 64%);
}

.feature-board-column header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.feature-board-column h4,
.feature-board-detail h4 {
  margin: 0;
  color: #132238;
  font-size: 14px;
  font-weight: 700;
}

.feature-board-column header span {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  border: 1px solid #d8e3ee;
  border-radius: 999px;
  background: #fff;
  color: #60738d;
  font-size: 12px;
  font-weight: 700;
}

.feature-board-column-items {
  display: grid;
  align-content: start;
  gap: 7px;
  min-width: 0;
  min-height: 100%;
  padding: 2px;
  border: 1px dashed transparent;
  border-radius: 7px;
}

.feature-board-column-items.is-drag-over {
  border-color: #77a8d8;
  background: rgba(255, 255, 255, 0.72);
}

.feature-board-card {
  display: grid;
  grid-template-columns: 18px auto minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  width: 100%;
  min-height: 40px;
  padding: 8px 9px;
  border: 1px solid #d8e3ee;
  border-radius: 6px;
  background: #fff;
  color: #24364d;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
  text-align: left;
  box-shadow: 0 1px 3px rgba(29, 39, 51, 0.05);
  cursor: grab;
}

.feature-board-card:hover,
.feature-board-card:focus-visible {
  border-color: #9db8d3;
  color: #123b77;
}

.feature-board-card.is-selected {
  border-color: #0f67c8;
  box-shadow: 0 0 0 2px rgba(15, 103, 200, 0.12);
}

.feature-board-card.is-dragging {
  opacity: 0.55;
}

.feature-board-card-icon,
.feature-board-detail-icon {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  color: #2e5f9f;
}

.feature-board-card-icon svg,
.feature-board-detail-icon svg,
.feature-board-icon-preview svg,
.feature-board-icon-option svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.feature-board-card-icon svg *,
.feature-board-detail-icon svg *,
.feature-board-icon-preview svg *,
.feature-board-icon-option svg * {
  fill: none;
}

.feature-board-card-number {
  color: #60738d;
  font-size: 12px;
  font-weight: 400;
  white-space: nowrap;
}

.feature-board-card-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feature-board-detail,
.feature-board-create-form {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid #d8e3ee;
  border-radius: 8px;
  background: #fff;
}

.feature-board-detail.is-empty {
  min-height: 60px;
  align-content: center;
}

.feature-board-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.feature-board-detail-head p,
.feature-board-detail-head h4,
.feature-board-detail.is-empty p {
  margin: 0;
}

.feature-board-detail-title {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.feature-board-detail-number {
  color: #60738d;
  font-size: 13px;
  font-weight: 400;
  white-space: nowrap;
}

.feature-board-detail-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.feature-board-description {
  margin: 0;
  color: #24364d;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.feature-board-create-fields,
.feature-board-dialog-fields {
  display: grid;
  gap: 10px;
}

.feature-board-create-fields {
  grid-template-columns: 1fr;
}

.feature-board-create-main-row,
.feature-board-card-edit-row {
  display: grid;
  grid-template-columns: minmax(156px, 1fr) minmax(156px, 1fr) minmax(220px, 1fr);
  align-items: end;
  gap: 10px;
}

.feature-board-create-fields label,
.feature-board-dialog-fields label {
  position: relative;
  display: grid;
  gap: 5px;
  min-width: 0;
  color: #60738d;
  font-size: 12px;
  font-weight: 700;
}

.feature-board-create-fields input,
.feature-board-create-fields textarea,
.feature-board-dialog-fields input,
.feature-board-dialog-fields select,
.feature-board-dialog-fields textarea,
.feature-board-icon-trigger {
  min-height: 40px;
}

.feature-board-create-fields textarea {
  resize: vertical;
}

.feature-board-description-field {
  width: 100%;
}

.feature-board-create-actions {
  display: flex;
  justify-content: flex-end;
}

.feature-board-create-submit {
  min-height: 40px;
  white-space: nowrap;
}

.feature-board-create-form .form-message {
  margin: 0;
  min-height: 18px;
}

.feature-board-dialog {
  width: min(720px, calc(100vw - 32px));
  border-color: #d8e3ee !important;
  border-radius: 10px !important;
  background: #ffffff;
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.18);
}

.modal-layer[data-active-dialog="feature-board"] .modal-scroll {
  align-items: center;
}

#featureBoardDialog .dialog-head {
  min-height: 58px;
  display: flex;
  align-items: center;
  padding: 14px 58px 12px 18px;
  border-bottom: 1px solid #d8e3ee;
  background: #ffffff;
}

#featureBoardDialog .dialog-head h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 600;
}

#featureBoardDialog .dialog-head p {
  margin: 4px 0 0;
  color: #60738d;
  font-size: 13px;
  line-height: 1.25;
}

#featureBoardDialog .dialog-close-button {
  top: 12px;
  right: 14px;
  width: 36px;
  min-width: 36px;
  min-height: 36px;
  border: 1px solid #d8e3ee;
  border-radius: 8px;
  color: #40536a;
  background: #f8fbfe;
}

#featureBoardDialog .dialog-close-button:hover,
#featureBoardDialog .dialog-close-button:focus-visible {
  border-color: #9db8d3;
  color: #123b77;
  background: #eef6ff;
}

#featureBoardDialog .dialog-close-button svg {
  width: 18px;
  height: 18px;
}

#featureBoardDialog .feature-board-dialog-fields {
  padding: 16px 18px 12px;
}

#featureBoardDialog .form-message {
  min-height: 18px;
  margin: 0;
  padding: 0 18px;
}

#featureBoardDialog .dialog-actions {
  min-height: 58px;
  padding: 12px 18px 16px;
  border-top: 1px solid #d8e3ee;
  background: #ffffff;
}

.feature-board-dialog-fields textarea {
  resize: vertical;
}

.feature-board-icon-trigger {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 10px;
  border: 1px solid #c9d7e6;
  border-radius: 6px;
  background: #fff;
  color: #24364d;
  font: inherit;
  font-size: 13px;
  font-weight: 400;
  text-align: left;
}

.feature-board-dialog-fields input,
.feature-board-dialog-fields select,
.feature-board-dialog-fields textarea {
  font-weight: 400;
}

.feature-board-dialog-fields label {
  font-weight: 600;
}

.feature-board-icon-preview svg {
  stroke-width: 1.75;
}

.feature-board-icon-trigger:hover,
.feature-board-icon-trigger:focus-visible {
  border-color: #8fb1d3;
  color: #123b77;
}

.feature-board-icon-preview,
.feature-board-icon-trigger .svg-icon {
  display: inline-grid;
  place-items: center;
}

.feature-board-icon-popover {
  position: absolute;
  z-index: 50;
  top: auto;
  bottom: calc(100% + 6px);
  left: 0;
  width: max-content;
  max-width: min(620px, calc(100vw - 48px));
  padding: 10px;
  overflow-x: auto;
  border: 1px solid #c9d7e6;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 34px rgba(20, 32, 50, 0.18);
}

.feature-board-icon-grid {
  display: grid;
  grid-template-columns: repeat(18, 28px);
  gap: 4px;
}

.feature-board-icon-option {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: #f8fbfe;
  color: #315174;
}

.feature-board-icon-option:hover,
.feature-board-icon-option:focus-visible {
  border-color: #9db8d3;
  background: #eef6ff;
}

.feature-board-icon-option.is-selected {
  border-color: #0f67c8;
  background: #e8f2ff;
  color: #0a55b8;
}

.feature-board-confirm p {
  margin: 0;
}

.feature-board-confirm {
  display: grid;
  gap: 8px;
}

@media (max-width: 1180px) {
  .feature-board-board {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }
}

@media (max-width: 720px) {
  .fine-settings-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .fine-setting-control {
    flex-wrap: wrap;
  }

  .fine-setting-line {
    display: none;
  }

  .fine-setting-text {
    justify-self: start;
    text-align: left;
  }

  .feature-board-board,
  .feature-board-create-main-row,
  .feature-board-card-edit-row {
    grid-template-columns: 1fr;
  }

  .feature-board-board,
  .feature-board-column {
    min-height: 288px;
  }

  .feature-board-detail-head {
    align-items: stretch;
    flex-direction: column;
  }

  .feature-board-create-submit {
    justify-content: center;
    width: 100%;
  }

  .feature-board-icon-popover {
    max-width: calc(100vw - 36px);
  }

  .feature-board-detail-actions {
    justify-content: flex-start;
  }
}

.request-sort-reference-row {
  grid-template-columns: minmax(78px, 0.32fr) minmax(190px, 0.9fr) minmax(140px, 0.58fr) minmax(260px, 1.28fr) minmax(220px, 1fr);
}

.request-priority-color-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.request-priority-swatch {
  display: inline-block;
  flex: 0 0 auto;
  width: 22px;
  height: 12px;
  border: 1px solid rgba(12, 32, 57, 0.16);
  border-radius: 999px;
  background: var(--request-priority-color);
}

.manager-settings-row {
  grid-template-columns: auto minmax(160px, 1fr) auto auto auto;
  min-height: 44px;
  padding: 3px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.manager-settings-swatch {
  align-self: center;
  width: 22px;
  height: 22px;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: var(--manager-color, #0f766e);
  box-shadow: 0 0 0 1px var(--line);
}

.danger-button {
  border-color: #fecaca;
  color: #991b1b;
  background: #fff7f7;
}

.color-teal {
  background: #0f766e;
}

.color-blue {
  background: #2563eb;
}

.color-green {
  background: #15803d;
}

.color-amber {
  background: #a16207;
}

.color-rose {
  background: #be123c;
}

.color-violet {
  background: #7c3aed;
}

@media (max-width: 760px) {
  .service-toggle-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .appointment-color-controls {
    flex-wrap: wrap;
  }

  .manager-create-form,
  .manager-settings-row {
    grid-template-columns: 1fr auto;
  }

  .manager-settings-swatch {
    grid-row: span 2;
  }
}

input,
select,
textarea {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  color: var(--text);
  background: #ffffff;
}

.dialog input,
.dialog select,
.dialog textarea {
  min-height: 34px;
  padding: 6px 8px;
  font-size: 13px;
}

.constrained-time-field {
  position: relative;
}

.constrained-time-input {
  font-variant-numeric: tabular-nums;
}

.constrained-time-picker {
  position: absolute;
  z-index: 3200;
  top: calc(100% + 4px);
  left: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  width: 190px;
  max-width: min(190px, calc(100vw - 32px));
  padding: 5px;
  border: 1px solid #b9c7d8;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.18);
}

.constrained-time-picker[hidden] {
  display: none !important;
}

.constrained-time-picker-column {
  display: grid;
  gap: 2px;
  max-height: 226px;
  overflow-y: auto;
  padding-right: 2px;
}

.constrained-time-picker-option {
  display: inline-grid;
  place-items: center;
  min-height: 28px;
  padding: 0 8px;
  border: 0;
  border-radius: 6px;
  color: #061b45;
  background: transparent;
  font-size: 15px;
  font-weight: 450;
  line-height: 1;
  cursor: pointer;
}

.constrained-time-picker-option:hover,
.constrained-time-picker-option:focus-visible {
  background: #dbeafe;
  outline: 0;
}

.constrained-time-picker-option.is-active {
  color: #ffffff;
  background: #0b7cff;
  font-weight: 650;
}

textarea {
  resize: vertical;
}

.dialog-actions {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
}

.dialog-actions div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.form-message {
  color: var(--danger);
  font-size: 13px;
}

.fc {
  height: 100%;
  min-height: 0;
  font-size: 13px;
}

.fc .fc-view-harness,
.fc .fc-view-harness-active {
  min-height: 0;
}

.fc .fc-scroller {
  overscroll-behavior: contain;
}

.fc .fc-scrollgrid-section-header .fc-scroller,
.fc .fc-timegrid-header .fc-scroller {
  overflow: hidden !important;
}

.calendar-day-name {
  text-transform: lowercase;
}

.fc .fc-toolbar-title {
  font-size: 18px;
}

.fc .fc-timegrid-slot {
  height: var(--slot-height);
}

.fc-event {
  border: 0;
  border-radius: 5px;
  padding: 2px 4px;
}

.calendar-event-content {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.calendar-event-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-status-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.24);
  font-size: 9px;
  font-weight: 600;
  line-height: 1;
}

.calendar-status-icon.status-scheduled {
  background: rgba(255, 255, 255, 0.28);
}

.calendar-status-icon.status-completed {
  background: #15803d;
}

.calendar-status-icon.status-cancelled,
.calendar-status-icon.status-no-show {
  background: #991b1b;
}

.calendar-status-icon.status-needs-review {
  background: #92400e;
}

.calendar-status-icon.status-block {
  background: rgba(255, 255, 255, 0.32);
}

.fc-event.service-event {
  background: var(--primary);
}

.fc-event.block-event {
  background: var(--block);
}

@media (max-width: 960px) {
  .app-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .app-shell[data-main-view="calendar"] {
    grid-template-rows: auto minmax(0, 1fr) minmax(220px, 34vh);
  }

  .main-nav {
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .big-calendar-pane,
  .big-workspace-panel {
    grid-column: 1;
    grid-row: 2;
    height: auto;
    min-height: 0;
  }

  .module-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .c-topbar {
    height: auto;
    min-height: var(--app-topbar-height);
    grid-template-areas:
      "display actions"
      "date date";
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    align-items: center;
    gap: 8px;
    overflow: visible;
    padding: 8px;
  }

  .c-topbar .display-controls {
    grid-area: display;
  }

  .c-topbar .date-nav {
    grid-area: date;
    justify-self: center;
    transform: none;
  }

  .c-topbar .topbar-actions {
    grid-area: actions;
  }

  .w-topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    height: 54px;
    min-height: 54px;
  }

  .account-box {
    margin-left: 0;
  }

  .date-nav,
  .topbar-right,
  .topbar-actions {
    justify-content: flex-start;
  }

  .topbar-right,
  .topbar-actions {
    width: auto;
  }

  .account-box.nav-account {
    display: flex;
    justify-content: space-between;
  }

  .account-box.topbar-account,
  .side-account {
    display: none;
  }

  .workspace {
    grid-template-columns: 1fr;
  }

  .workspace-panel {
    min-height: 54vh;
  }

  .side-pane {
    grid-column: 1;
    grid-row: 3;
    height: auto;
    max-height: none;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .app-shell[data-side-pane-mode="hidden"] .side-pane {
    display: none;
  }

  .app-shell[data-side-pane-mode="calendar-request-queue"] .side-tabs {
    display: none;
  }

  .app-shell[data-side-pane-mode="calendar-request-queue"] #requestList {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    align-content: start;
  }

  .app-shell[data-side-pane-mode="calendar-request-queue"] #requestList .request-card {
    margin-top: 0;
    padding: 8px;
    font-size: 12px;
  }

  .app-shell[data-side-pane-mode="calendar-request-queue"] #requestList .appointment-title {
    font-size: 13px;
  }

  .app-shell[data-side-pane-mode="calendar-request-queue"] #requestList .request-quick-actions {
    gap: 4px;
  }

  .app-shell[data-side-pane-mode="calendar-request-queue"] #requestList .request-action-button {
    min-height: 28px;
    padding: 0 6px;
    font-size: 11px;
  }

  .app-shell[data-side-pane-mode="calendar-request-queue"] #appointmentList {
    display: none !important;
  }
}

@media (max-width: 560px) {
  .app-shell[data-main-view="calendar"] {
    grid-template-rows: auto minmax(0, 1fr);
  }

  .main-nav {
    gap: 8px;
    padding: 8px;
  }

  .brand p {
    display: none;
  }

  .calendar-pane {
    padding: 8px;
  }

  .module-tabs {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 6px;
  }

  .module-tabs button {
    min-height: 42px;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 0;
    padding: 0;
  }

  .nav-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
  }

  .module-tabs button span:last-child {
    display: none;
  }

  .c-topbar {
    grid-template-columns: auto auto auto;
    gap: 4px;
    padding: 6px 4px;
  }

  .w-topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
  }

  .mobile-filter-toggle {
    display: inline-grid;
    place-items: center;
    justify-self: end;
    width: 28px;
    min-width: 28px;
    min-height: 28px;
    padding: 0;
  }

  .app-shell[data-main-view="calendar"] .mobile-filter-toggle {
    display: none;
  }

  .app-shell:not([data-mobile-filters-open="true"]) .big-workspace-panel .filter-bar {
    display: none;
  }

  .c-topbar[data-priority-toolbar-mode="mobile-calendar-priority"] {
    height: auto;
    min-height: 0;
    grid-template-areas:
      "date actions";
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto;
    align-content: center;
    align-items: center;
    column-gap: 4px;
    overflow: visible;
    padding: 6px;
  }

  .c-topbar[data-priority-toolbar-mode="mobile-calendar-priority"] .display-controls {
    display: none;
  }

  .c-topbar[data-priority-toolbar-mode="mobile-calendar-priority"] .mobile-display-menu,
  .c-topbar[data-priority-toolbar-mode="mobile-calendar-priority"] .mobile-queue-button {
    display: inline-grid;
  }

  .c-topbar[data-priority-toolbar-mode="mobile-calendar-priority"] .date-nav {
    grid-area: date;
    justify-self: start;
    transform: none;
  }

  .c-topbar[data-priority-toolbar-mode="mobile-calendar-priority"] .topbar-actions {
    grid-area: actions;
    justify-self: end;
  }

  .display-controls {
    gap: 3px;
  }

  .segmented {
    gap: 1px;
    padding: 1px;
  }

  .segmented button {
    min-width: 24px;
    min-height: 28px;
    padding: 0 4px;
    font-size: 12px;
  }

  .icon-button,
  .text-button,
  .primary-button,
  .secondary-button {
    min-height: 32px;
  }

  .icon-button,
  .icon-action-button,
  .calendar-action-button {
    width: 28px;
    min-width: 28px;
  }

  .calendar-action-button {
    padding: 0;
  }

  .calendar-action-button .button-label {
    display: none;
  }

  .today-button {
    width: 28px;
    min-width: 28px;
    padding: 0;
  }

  .today-label {
    display: none;
  }

  .today-icon {
    display: inline-grid;
  }

  .date-nav {
    gap: 2px;
  }

  .topbar-actions {
    gap: 2px;
  }

  .mobile-display-menu summary,
  .mobile-queue-button {
    width: 28px;
    min-width: 28px;
    min-height: 28px;
    padding: 0;
  }

  .mobile-display-panel {
    right: -30px;
  }

  .app-shell[data-side-pane-mode="calendar-request-queue"] .side-pane {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    height: auto;
    max-height: calc(100vh - 92px);
    display: flex;
    border-top: 1px solid var(--line);
    border-left: 0;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 -18px 45px rgba(29, 39, 51, 0.18);
    transform: translateY(calc(100% + 12px));
    transition: transform 160ms ease, visibility 160ms ease;
    visibility: hidden;
    pointer-events: none;
  }

  .app-shell[data-side-pane-mode="calendar-request-queue"][data-mobile-queue-open="true"] .side-pane {
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
  }

  .app-shell[data-side-pane-mode="calendar-request-queue"] #requestList {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: 244px;
    overflow: auto;
  }

  .topbar-account span {
    max-width: 145px;
  }

  .account-box {
    font-size: 12px;
  }

  .audit-filter-bar select,
  .list-filter-bar select,
  .list-filter-bar input {
    min-height: 34px;
  }

  .request-appointment-panel {
    grid-template-columns: 1fr;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .integration-actions,
  .integration-summary,
  .integration-grid {
    grid-template-columns: 1fr;
  }

  .log-list {
    max-height: 260px;
  }

  .dialog-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .dialog-actions div {
    justify-content: flex-end;
  }
}

/* UI design code implementation layer, 2026-06-19. */
:root {
  --font-ui: Inter, "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --bg: #f3f7fa;
  --surface: #ffffff;
  --surface-muted: #f5f8fb;
  --line: #d8e3ee;
  --text: #132238;
  --muted: #66758a;
  --primary: #0f8f86;
  --primary-strong: #08766f;
  --danger: #b42318;
  --warning: #b45309;
  --block: #647386;
  --nav-bg: #0d1726;
  --nav-bg-soft: #132238;
  --nav-text: #d6e1ee;
  --nav-muted: #8fa1b7;
  --calendar-bg: #fbfdff;
  --side-bg: #f6f9fc;
  --grid-line: #e6edf4;
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow-soft: 0 8px 22px rgba(15, 23, 42, 0.08);
  --shadow-card: 0 2px 8px rgba(15, 23, 42, 0.10);
  --shadow-dialog: 0 24px 60px rgba(15, 23, 42, 0.22);
  --shadow: var(--shadow-soft);
  --app-topbar-height: 78px;
  font-family: var(--font-ui);
}

:root[data-density="3"] {
  --slot-height: 24px;
}

:root[data-density="4"] {
  --slot-height: 30px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
}

button,
input,
select,
textarea {
  font-family: var(--font-ui);
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid rgba(15, 143, 134, 0.45);
  outline-offset: 2px;
}

.app-shell {
  grid-template-columns: minmax(236px, 280px) minmax(640px, 1fr) minmax(380px, 460px);
  background: var(--bg);
}

.big-calendar-pane,
.big-workspace-panel {
  background: var(--calendar-bg);
}

.main-nav {
  gap: 18px;
  padding: 22px 16px;
  border-right: 0;
  background:
    radial-gradient(circle at 22px 26px, rgba(20, 184, 166, 0.20), transparent 120px),
    linear-gradient(180deg, #111d2f 0%, #0b1422 100%);
  color: var(--nav-text);
}

.brand {
  position: relative;
  min-height: 56px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding-left: 58px;
}

.brand::before {
  content: "SD";
  position: absolute;
  left: 0;
  top: 2px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  color: #ffffff;
  background: linear-gradient(135deg, #14b8a6, #1f6f84);
  box-shadow: 0 12px 28px rgba(20, 184, 166, 0.22);
  font-size: 14px;
  font-weight: 600;
}

.brand h1 {
  color: #f8fafc;
  font-size: 20px;
  font-weight: 600;
}

.brand p {
  color: var(--nav-muted);
  font-size: 13px;
}

.module-tabs {
  gap: 8px;
}

.module-tabs button {
  min-height: 56px;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 0 14px;
  color: var(--nav-muted);
  background: transparent;
  font-size: 14px;
  transition: color 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.module-tabs button:hover {
  color: #eef6ff;
  background: rgba(255, 255, 255, 0.055);
}

.module-tabs button.is-active {
  color: #f8fafc;
  border-color: rgba(20, 184, 166, 0.18);
  background: linear-gradient(90deg, rgba(20, 184, 166, 0.22), rgba(20, 184, 166, 0.08));
  box-shadow: inset 4px 0 0 #14b8a6;
}

.nav-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  color: currentColor;
  background: rgba(255, 255, 255, 0.055);
}

.module-tabs button.is-active .nav-icon {
  color: #5eead4;
  background: rgba(20, 184, 166, 0.18);
}

.account-box.nav-account {
  margin-top: auto;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 12px;
  color: var(--nav-text);
  background: rgba(255, 255, 255, 0.045);
}

.c-topbar,
.w-topbar {
  min-height: var(--app-topbar-height);
  height: var(--app-topbar-height);
  padding: 14px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(12px);
}

.c-topbar {
  grid-template-columns: auto minmax(260px, 1fr) auto;
}

.display-controls,
.date-nav,
.topbar-actions {
  gap: 10px;
}

.segmented {
  gap: 3px;
  padding: 4px;
  border-color: #dce7f1;
  border-radius: 10px;
  background: #f7fafc;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.58);
}

.segmented button {
  min-width: 42px;
  min-height: 34px;
  border-radius: 8px;
  color: #4e6077;
}

.segmented button.is-active {
  color: #ffffff;
  background: linear-gradient(180deg, #0f9c91, #08766f);
  box-shadow: 0 8px 18px rgba(15, 143, 134, 0.22);
}

.icon-button,
.text-button,
.primary-button,
.secondary-button {
  min-height: 42px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: transform 0.12s ease, background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.icon-button {
  width: 42px;
  color: #26364a;
  border: 1px solid #dfe8f1;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.text-button,
.secondary-button {
  border: 1px solid #dfe8f1;
  color: #26364a;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.primary-button {
  border: 1px solid #08766f;
  background: linear-gradient(180deg, #0f9c91, #08766f);
  box-shadow: 0 12px 24px rgba(15, 143, 134, 0.22);
}

.primary-button:hover {
  background: linear-gradient(180deg, #0b8f85, #07645e);
}

.secondary-button:hover,
.icon-button:hover,
.text-button:hover {
  border-color: #c9d6e4;
  background: #f8fbfd;
}

.calendar-action-button {
  min-width: 150px;
}

.calendar-pane {
  padding: 16px 18px 18px;
  background: var(--calendar-bg);
}

#calendar {
  overflow: hidden;
  border: 1px solid #dfe8f1;
  border-radius: 14px;
  background: var(--calendar-bg);
  box-shadow: var(--shadow-soft);
}

.side-pane {
  border-left: 1px solid #dfe8f1;
  background: var(--side-bg);
}

.side-account,
.side-head {
  border-bottom-color: #dfe8f1;
  background: rgba(255, 255, 255, 0.68);
}

.side-head {
  padding: 14px 18px;
}

.side-head h2 {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0;
}

.side-tabs {
  gap: 10px;
  padding: 12px 18px 4px;
}

.side-tabs button {
  min-height: 44px;
  border: 1px solid #dfe8f1;
  border-radius: 10px;
  color: #4e6077;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.side-tabs button.is-active {
  color: #ffffff;
  border-color: #08766f;
  background: linear-gradient(180deg, #0f9c91, #08766f);
}

.appointment-list {
  padding: 14px 18px 18px;
}

.workspace-panel {
  background: var(--calendar-bg);
}

.main-list {
  padding: 18px;
}

.filter-bar {
  min-height: 54px;
  padding: 12px;
  border-color: #dfe8f1;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-soft);
}

input,
select,
textarea {
  min-height: 44px;
  border-color: #d8e3ee;
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  color: var(--text);
  background: #ffffff;
  box-shadow: inset 0 1px 0 rgba(15, 23, 42, 0.02);
}

input::placeholder,
textarea::placeholder {
  color: #9aa8b8;
}

select {
  cursor: pointer;
}

label {
  color: #5d6d82;
  font-weight: 600;
}

.dialog input,
.dialog select,
.dialog textarea {
  min-height: 44px;
  padding: 9px 12px;
  font-size: 14px;
}

.form-message {
  color: var(--danger);
  font-weight: 600;
}

.fc {
  color: var(--text);
  font-size: 13px;
}

.fc-theme-standard .fc-scrollgrid,
.fc-theme-standard td,
.fc-theme-standard th {
  border-color: var(--grid-line);
}

.fc .fc-col-header-cell {
  background: rgba(255, 255, 255, 0.74);
}

.fc .fc-col-header-cell-cushion {
  padding: 10px 4px;
  color: #17233a;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.fc .fc-timegrid-axis,
.fc .fc-timegrid-slot-label {
  color: #62728a;
}

.fc .fc-timegrid-slot {
  height: var(--slot-height);
  border-color: var(--grid-line);
}

.fc .fc-timegrid-slot-lane {
  position: relative;
  background: rgba(255, 255, 255, 0.24);
  transition: background 0.12s ease;
}

.fc .fc-timegrid-slot-lane[data-slot-start]::after {
  content: attr(data-slot-start);
  position: absolute;
  top: 50%;
  left: 10px;
  z-index: 1;
  pointer-events: none;
  transform: translateY(-50%);
  color: rgba(6, 27, 69, 0.48);
  font-size: 11px;
  font-weight: 520;
  line-height: 1;
  opacity: 0;
  transition: opacity 0.12s ease;
}

.fc .fc-timegrid-slot-lane[data-slot-start]:hover,
.fc .fc-timegrid-slot-lane[data-slot-start].is-hovered-slot {
  background: rgba(221, 235, 255, 0.40);
}

.fc .fc-timegrid-slot-lane[data-slot-start]:hover::after,
.fc .fc-timegrid-slot-lane[data-slot-start].is-hovered-slot::after {
  opacity: 0.46;
}

.fc .fc-highlight {
  position: relative;
  background:
    linear-gradient(135deg, rgba(14, 116, 144, 0.24), rgba(45, 212, 191, 0.12)),
    rgba(236, 254, 255, 0.42) !important;
}

.fc .fc-highlight[data-selection-label]::after,
.fc .fc-event.fc-event-mirror[data-selection-label]::before,
.fc .fc-timegrid-event.fc-event-mirror[data-selection-label]::before {
  content: attr(data-selection-label);
  position: absolute;
  top: -24px;
  left: 8px;
  z-index: 10;
  transform: none;
  max-width: max-content;
  padding: 3px 6px;
  border: 1px solid rgba(20, 184, 166, 0.28);
  border-radius: 6px;
  color: #075e59;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 6px 14px rgba(6, 27, 69, 0.08);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.16;
  white-space: nowrap;
  pointer-events: none;
}

.fc .fc-highlight[data-selection-label]::after {
  top: 6px;
  z-index: 3;
}

.fc .fc-event.fc-event-mirror,
.fc .fc-timegrid-event.fc-event-mirror {
  box-sizing: border-box;
  overflow: visible !important;
  border: 1px solid rgba(14, 116, 144, 0.72) !important;
  border-radius: 6px !important;
  color: #075e59 !important;
  background:
    linear-gradient(135deg, rgba(14, 116, 144, 0.24), rgba(45, 212, 191, 0.12)),
    rgba(236, 254, 255, 0.42) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.60), 0 8px 18px rgba(14, 116, 144, 0.16) !important;
}

.fc .fc-event.fc-event-mirror .fc-event-main,
.fc .fc-timegrid-event.fc-event-mirror .fc-event-main {
  color: #075e59 !important;
  background: transparent !important;
}

.fc .fc-event.fc-event-mirror .calendar-event-content,
.fc .fc-event.fc-event-mirror .calendar-event-body,
.fc .fc-timegrid-event.fc-event-mirror .calendar-event-content,
.fc .fc-timegrid-event.fc-event-mirror .calendar-event-body {
  display: none !important;
}

.fc .fc-day-today {
  background: rgba(255, 248, 224, 0.42) !important;
}

.fc-event {
  overflow: hidden;
  border-width: 1px !important;
  border-style: solid !important;
  border-radius: 8px;
  padding: 6px 8px;
  color: var(--text) !important;
  box-shadow: var(--shadow-card);
}

.fc-event.service-event {
  background: #e3f7f0;
}

.fc-event.block-event {
  background: #eef2f7;
  color: #334155 !important;
}

.calendar-event-content {
  display: grid;
  gap: 3px;
  min-width: 0;
  color: #132238;
}

.calendar-event-title-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: baseline;
  column-gap: 5px;
  min-width: 0;
}

.calendar-event-start-time {
  display: block;
  color: rgba(6, 27, 69, 0.70);
  font-size: 10px;
  font-weight: 450;
  line-height: 1.2;
  white-space: nowrap;
}

.calendar-event-title {
  color: #132238;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
}

.calendar-event-car {
  overflow: hidden;
  color: #40536a;
  font-size: 11px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-event-meta {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
  min-width: 0;
}

.calendar-new-badge {
  min-height: 18px;
  padding: 2px 6px;
  border: 1px solid rgba(15, 143, 134, 0.35);
  border-radius: 999px;
  color: #08766f;
  background: rgba(236, 253, 245, 0.8);
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
}

.calendar-status-icon {
  width: 18px;
  height: 18px;
  border: 1px solid rgba(15, 23, 42, 0.10);
  color: var(--appointment-accent, var(--primary));
  background: rgba(255, 255, 255, 0.72);
}

.appointment-service-icons {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
}

.appointment-service-icons.is-compact {
  flex-wrap: nowrap;
  overflow: hidden;
  gap: 4px;
  min-height: 20px;
}

.calendar-event-meta .appointment-service-icons {
  flex: 1 1 auto;
}

.calendar-event-meta .calendar-status-icon {
  margin-left: auto;
}

.service-mini-icon {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 1px solid rgba(15, 23, 42, 0.10);
  border-radius: 6px;
  color: #203247;
  background: rgba(255, 255, 255, 0.74);
}

.service-mini-icon.work-engine_oil_change {
  color: #08766f;
  background: #dff7ed;
  border-color: #a7ead3;
}

.service-mini-icon.work-gearbox_oil_change {
  color: #2854a3;
  background: #e6f0ff;
  border-color: #bfd4ff;
}

.service-mini-icon.work-filter_change {
  color: #6d4bc6;
  background: #f0eaff;
  border-color: #d7c8ff;
}

.service-mini-icon.work-other_service {
  color: #945f12;
  background: #fff1d6;
  border-color: #ffd79b;
}

.service-mini-icon.source-customer::after,
.service-mini-icon.source-shop::after {
  content: "";
  position: absolute;
  right: 3px;
  bottom: 3px;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 0 1px #ffffff;
}

.service-mini-icon {
  position: relative;
}

.service-mini-icon svg {
  width: 13px;
  height: 13px;
}

.appointment-card,
.client-card,
.audit-card {
  gap: 7px;
  padding: 12px;
  border-color: #d8e3ee;
  border-left-color: var(--appointment-accent, var(--primary));
  border-radius: 10px;
  background: linear-gradient(135deg, var(--appointment-soft, #ffffff), #ffffff 72%);
  box-shadow: var(--shadow-card);
}

.appointment-card-topline,
.request-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.appointment-time {
  color: #40536a;
  font-size: 12px;
  font-weight: 600;
}

.appointment-title {
  color: #132238;
  font-size: 15px;
  font-weight: 600;
}

.appointment-card-car,
.request-contact-line {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
  color: #526173;
  font-size: 13px;
  white-space: nowrap;
}

.appointment-card-car svg,
.request-contact-line svg {
  width: 14px;
  height: 14px;
}

.request-contact-line span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.request-contact-phone {
  flex: 0 0 auto;
}

.request-contact-car,
.request-contact-empty {
  flex: 1 1 auto;
  overflow: hidden;
}

.request-contact-text {
  overflow: hidden;
  font-size: inherit;
  font-weight: inherit;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.appointment-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.appointment-status-pill,
.request-reaction-badge,
.request-source-badge,
.client-link-badge,
.request-attention-list span,
.dialog-attention,
.request-lifecycle-chip {
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.appointment-status-pill {
  max-width: 148px;
  min-height: 24px;
  padding: 4px 8px;
  overflow: hidden;
  color: #4e6077;
  background: #f5f8fb;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.appointment-status-pill.status-completed,
.appointment-status-pill.status-scheduled {
  color: #08766f;
  background: #e9fbf5;
}

.appointment-status-pill.status-needs-review {
  color: #b45309;
  background: #fff7ed;
}

.appointment-status-pill.status-cancelled,
.appointment-status-pill.status-no-show {
  color: #b42318;
  background: #fef2f2;
}

.client-link-badge {
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid #d8e3ee;
  background: #ffffff;
}

.client-link-badge.is-linked {
  border-color: #b7eadf;
  color: #08766f;
  background: #ecfdf5;
}

.client-link-badge.is-unlinked {
  border-color: #fecaca;
  color: #b42318;
  background: #fff7f7;
}

.request-card {
  gap: 9px;
  padding: 14px 16px;
  border-color: #d8e3ee;
  border-left-width: 5px;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: var(--shadow-card);
}

.request-card.source-site {
  border-left-color: #0f8f86;
  background: linear-gradient(135deg, rgba(236, 253, 245, 0.82), #ffffff 54%);
}

.request-card.source-vkbot {
  border-left-color: #3b82f6;
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.92), #ffffff 58%);
}

.request-card.source-telegram {
  border-left-color: #0ea5e9;
  background: linear-gradient(135deg, rgba(224, 242, 254, 0.92), #ffffff 58%);
}

.request-card.source-historical {
  border-left-color: #267ddf;
  background: linear-gradient(135deg, rgba(237, 245, 255, 0.92), #ffffff 58%);
}

.request-source-corner {
  opacity: 0.42;
}

.request-source-badge,
.request-reaction-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  max-width: 100%;
  padding: 5px 9px;
  border: 1px solid #d8e3ee;
  color: #40536a;
  background: rgba(255, 255, 255, 0.78);
}

.request-source-badge svg {
  width: 15px;
  height: 15px;
}

.request-source-badge.source-site {
  border-color: #b7eadf;
  color: #08766f;
  background: #ecfdf5;
}

.request-source-badge.source-vkbot {
  border-color: #bfdbfe;
  color: #1d4ed8;
  background: #eff6ff;
}

.request-source-badge.source-telegram {
  border-color: #bae6fd;
  color: #0369a1;
  background: #f0f9ff;
}

.request-source-badge.source-historical {
  border-color: #b9d4fb;
  color: #073b91;
  background: #edf5ff;
}

.request-reaction-badge.is-attention {
  border-color: #fed7aa;
  color: #c2410c;
  background: #fff7ed;
}

.request-reaction-badge.is-positive {
  border-color: #bbf7d0;
  color: #166534;
  background: #f0fdf4;
}

.request-reaction-badge.is-final {
  border-color: #cbd5e1;
  color: #475569;
  background: #f1f5f9;
}

.request-card-title {
  font-size: 16px;
  font-weight: 600;
}

.request-attention-list span,
.dialog-attention {
  border: 1px solid #fed7aa;
  color: #c2410c;
  background: #fff7ed;
}

.request-lifecycle-chip {
  min-height: 27px;
  padding: 4px 9px;
  border-color: #d8e3ee;
  background: rgba(255, 255, 255, 0.72);
}

.request-quick-actions {
  gap: 8px;
  margin-top: 6px;
}

.request-action-button,
.request-lifecycle-actions button {
  border-radius: 9px;
  box-shadow: none;
}

.request-action-button[data-request-action="in_work"],
.request-lifecycle-actions [data-request-lifecycle-action="in_work"] {
  border-color: #99f6e4;
  color: #08766f;
  background: #effdfa;
}

.request-action-button[data-request-action="callback"],
.request-lifecycle-actions [data-request-lifecycle-action="callback"],
.request-lifecycle-actions [data-request-lifecycle-action="callback_later"] {
  border-color: #bfdbfe;
  color: #1d4ed8;
  background: #eff6ff;
}

.request-action-button[data-request-action="needs_data"],
.request-lifecycle-actions [data-request-lifecycle-action="needs_data"] {
  border-color: #ddd6fe;
  color: #6d28d9;
  background: #f5f3ff;
}

.request-action-button[data-request-action="make_estimate"],
.request-lifecycle-actions [data-request-lifecycle-action="make_estimate"] {
  border-color: #bfdbfe;
  color: #1d4ed8;
  background: #eff6ff;
}

.request-action-button[data-request-action="ready_to_schedule"],
.request-lifecycle-actions [data-request-lifecycle-action="data_received"],
.request-lifecycle-actions [data-request-lifecycle-action="part_arrived"] {
  border-color: #bbf7d0;
  color: #166534;
  background: #f0fdf4;
}

.request-lifecycle-actions [data-request-lifecycle-action="part_price_requested"],
.request-lifecycle-actions [data-request-lifecycle-action="part_price_ready"],
.request-lifecycle-actions [data-request-lifecycle-action="part_agreed"],
.request-lifecycle-actions [data-request-lifecycle-action="part_ordered"],
.request-lifecycle-actions [data-request-lifecycle-action="expired"] {
  border-color: #fed7aa;
  color: #c2410c;
  background: #fff7ed;
}

.request-lifecycle-actions [data-request-lifecycle-action="cancelled"] {
  border-color: #fecaca;
  color: #b42318;
  background: #fef2f2;
}

.modal-layer {
  padding: 32px 18px;
  overflow-x: hidden;
  background: rgba(15, 23, 42, 0.38);
  backdrop-filter: blur(4px);
}

.modal-scroll {
  min-width: 0;
  overflow-x: hidden;
}

dialog.dialog,
.dialog {
  border-color: rgba(216, 227, 238, 0.9);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-dialog);
}

#appointmentDialog.dialog {
  width: min(1040px, calc(100vw - 36px));
}

#requestDialog.dialog {
  width: min(1120px, calc(100vw - 36px));
}

.dialog-head {
  min-height: 96px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  justify-content: stretch;
  padding: 22px 82px 18px 30px;
  border-bottom-color: #dfe8f1;
  background:
    radial-gradient(circle at 88% 0%, rgba(15, 143, 134, 0.08), transparent 210px),
    #ffffff;
}

.dialog-entity-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border: 1px solid #c9eef0;
  border-radius: 14px;
  color: #08766f;
  background: linear-gradient(180deg, #ecfeff, #ffffff);
  box-shadow: var(--shadow-soft);
}

.dialog-entity-icon svg {
  width: 30px;
  height: 30px;
}

.request-dialog-icon {
  border-color: #fed7aa;
  color: #c2410c;
  background: linear-gradient(180deg, #fff7ed, #ffffff);
}

.client-dialog-icon {
  border-color: #bfdbfe;
  color: #1d4ed8;
  background: linear-gradient(180deg, #eff6ff, #ffffff);
}

.dialog-head h2 {
  color: #0f172a;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: 0;
}

.dialog-head p {
  font-size: 15px;
}

.dialog-close-button {
  top: 28px;
  right: 28px;
  width: 48px;
  min-width: 48px;
  min-height: 48px;
  border-radius: 12px;
}

.form-grid {
  gap: 14px 24px;
  padding: 20px 30px;
}

#appointmentDialog .form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#requestDialog .form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.appointment-service-controls,
.appointment-color-controls,
.request-appointment-panel,
.history-panel {
  border-color: #dfe8f1;
  border-radius: 14px;
  background: #fbfdff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.appointment-service-controls {
  padding: 14px 16px;
}

.appointment-service-controls legend,
.appointment-color-controls legend {
  color: #40536a;
  font-size: 15px;
  font-weight: 600;
}

.service-toggle-grid {
  grid-template-columns: repeat(4, minmax(136px, 1fr));
  gap: 12px;
}

.service-toggle-button {
  min-height: 106px;
  gap: 8px;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #f7fbfd);
}

.service-flag-icon svg {
  width: 32px;
  height: 32px;
}

.service-toggle-title {
  font-size: 17px;
}

.service-toggle-state {
  min-height: 28px;
  padding: 6px 14px;
  border: 1px solid #d8e3ee;
  border-radius: 999px;
  background: #ffffff;
  font-size: 13px;
  font-weight: 600;
}

.service-toggle-card.is-active .service-toggle-button {
  border-color: #14b8a6;
  color: #08766f;
  background: linear-gradient(180deg, #ecfdf5, #ffffff);
  box-shadow: 0 0 0 1px rgba(20, 184, 166, 0.28), 0 14px 34px rgba(20, 184, 166, 0.12);
}

.appointment-color-controls {
  align-items: center;
  gap: 18px;
  padding: 16px 18px;
}

.manager-color-options {
  gap: 18px;
}

.manager-color-option {
  width: 58px;
  height: 58px;
}

.appointment-color-dot {
  width: 44px;
  height: 44px;
  border-width: 4px;
  box-shadow: 0 0 0 1px #d8e3ee, 0 12px 24px rgba(15, 23, 42, 0.12);
}

.manager-color-option.is-active .appointment-color-dot {
  box-shadow: 0 0 0 3px #ffffff, 0 0 0 6px #14b8a6, 0 14px 30px rgba(15, 143, 134, 0.24);
}

.dialog-actions {
  min-height: 74px;
  padding: 14px 30px 18px;
  border-top-color: #dfe8f1;
  background: #ffffff;
}

#requestDialog .dialog-head {
  min-height: 162px;
}

#requestDialog .dialog-head h2 {
  font-size: 34px;
}

#requestDialog .dialog-meta {
  margin-top: 6px;
  color: #526173;
  font-size: 15px;
}

#requestDialog .dialog-attention {
  width: min(100%, 960px);
  margin-top: 16px !important;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 15px;
}

#requestLifecycleSnapshot {
  margin-top: 14px;
}

.request-lifecycle-actions {
  grid-template-columns: repeat(4, minmax(142px, 1fr));
  gap: 12px;
  min-width: 0;
  min-inline-size: 0;
  margin: 0;
  padding: 16px;
  border: 1px solid #dfe8f1;
  border-radius: 14px;
  background: #fbfdff;
}

.request-lifecycle-actions::before {
  display: none;
  content: none;
}

.request-lifecycle-actions legend {
  padding: 0 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.request-lifecycle-actions button {
  min-height: 58px;
  justify-content: flex-start;
  padding: 0 14px;
  font-size: 14px;
}

.request-lifecycle-actions .button-icon {
  width: 24px;
  height: 24px;
}

.request-lifecycle-actions .button-icon svg {
  width: 20px;
  height: 20px;
}

.request-appointment-panel {
  gap: 14px;
  padding: 18px;
}

@media (min-width: 2200px) {
  .app-shell {
    grid-template-columns: 280px minmax(900px, 1fr) 500px;
  }

  .side-pane {
    max-width: 520px;
  }

  #calendar {
    max-width: none;
  }

  #appointmentDialog.dialog,
  #requestDialog.dialog {
    max-width: 1180px;
  }
}

@media (min-width: 3000px) {
  .app-shell {
    grid-template-columns: 300px minmax(1200px, 1fr) 540px;
  }

  .calendar-pane {
    padding-left: 24px;
    padding-right: 24px;
  }
}

@media (max-width: 1240px) {
  .app-shell {
    grid-template-columns: 236px minmax(560px, 1fr) minmax(340px, 400px);
  }

  .service-toggle-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .request-lifecycle-actions {
    grid-template-columns: repeat(3, minmax(132px, 1fr));
  }
}

@media (max-width: 960px) {
  .app-shell,
  .app-shell[data-main-view="calendar"] {
    grid-template-columns: 1fr;
  }

  .main-nav {
    padding: 10px 12px;
    border-bottom: 0;
    background: var(--nav-bg);
  }

  .brand {
    min-height: 44px;
    padding-left: 50px;
  }

  .brand::before {
    width: 38px;
    height: 38px;
  }

  .module-tabs button {
    min-height: 44px;
  }

  .c-topbar,
  .w-topbar {
    padding: 8px 10px;
  }

  .side-pane {
    border-left: 0;
  }

  .dialog-head {
    padding: 22px 70px 18px 22px;
  }

  .form-grid,
  #appointmentDialog .form-grid,
  #requestDialog .form-grid {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .request-lifecycle-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .module-tabs button {
    box-shadow: none;
  }

  .calendar-pane {
    padding: 8px;
  }

  #calendar {
    border-radius: 10px;
  }

  .fc-event {
    padding: 4px 5px;
  }

  .calendar-event-car,
  .calendar-new-badge,
  .calendar-event-meta {
    display: none;
  }

  .appointment-list,
  .main-list {
    padding: 10px;
  }

  .request-card {
    padding: 12px;
  }

  .request-card-head {
    align-items: flex-start;
    flex-direction: column;
  }

  #requestDialog .dialog-head h2,
  .dialog-head h2 {
    font-size: 24px;
  }

  #requestDialog .dialog-head {
    min-height: 150px;
  }

  .service-toggle-grid,
  .request-lifecycle-actions {
    grid-template-columns: 1fr;
  }

  .service-toggle-button {
    min-height: 92px;
  }

  .manager-color-option {
    width: 48px;
    height: 48px;
  }

  .appointment-color-dot {
    width: 36px;
    height: 36px;
  }
}

/* Reference palette override, 2026-06-19. */
:root {
  --primary: #0b4ea2;
  --primary-strong: #062f75;
  --bg: #f4f8ff;
  --surface: #ffffff;
  --surface-soft: #f6f9fe;
  --text: #061b45;
  --muted: #526b92;
  --line: #d9e5f4;
  --nav-bg: #001845;
  --nav-bg-soft: #063c96;
  --nav-text: #ffffff;
  --nav-muted: rgba(255, 255, 255, 0.70);
  --calendar-bg: #fbfdff;
  --side-bg: #eef4fb;
  --grid-line: #e4edf8;
  --shadow-soft: 0 10px 24px rgba(6, 27, 69, 0.08);
  --shadow-card: 0 3px 9px rgba(6, 27, 69, 0.10);
  --shadow-dialog: 0 24px 62px rgba(6, 27, 69, 0.24);
  --shadow: var(--shadow-soft);
}

body {
  background:
    linear-gradient(180deg, #f7fbff 0%, #eef5ff 100%);
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline-color: rgba(11, 78, 162, 0.46);
}

.app-shell {
  grid-template-columns: minmax(280px, 300px) minmax(620px, 1fr) minmax(380px, 460px);
  background: #f4f8ff;
}

.big-calendar-pane,
.big-workspace-panel,
.calendar-pane {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.68), rgba(244, 248, 255, 0.92)),
    var(--calendar-bg);
}

.main-nav {
  position: relative;
  overflow: hidden;
  gap: 26px;
  padding: 34px 24px;
  border-right: 0;
  background:
    linear-gradient(145deg, rgba(0, 80, 196, 0.58) 0%, rgba(0, 34, 91, 0.86) 38%, rgba(0, 18, 58, 1) 100%),
    linear-gradient(180deg, #063c96 0%, #001b55 56%, #001238 100%);
  color: #ffffff;
}

.main-nav::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.10), transparent 33%),
    radial-gradient(ellipse at 82% 18%, rgba(26, 120, 255, 0.22), transparent 46%);
  pointer-events: none;
}

.main-nav::after {
  content: "";
  position: absolute;
  right: -12px;
  bottom: 20px;
  width: 210px;
  height: 240px;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.18) 1px, transparent 1.8px);
  background-size: 14px 14px;
  mask-image: linear-gradient(135deg, transparent 0%, #000 36%, #000 82%, transparent 100%);
  opacity: 0.55;
  pointer-events: none;
}

.main-nav > * {
  position: relative;
  z-index: 1;
}

.brand {
  min-height: 70px;
  padding-left: 76px;
}

.brand::before {
  top: 0;
  width: 58px;
  height: 58px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 14px;
  color: #073b91;
  background: linear-gradient(180deg, #ffffff, #f2f7ff);
  box-shadow: 0 18px 36px rgba(0, 18, 58, 0.28);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0;
}

.brand h1 {
  color: #ffffff;
  font-size: 22px;
  font-weight: 600;
}

.brand p {
  color: rgba(221, 232, 255, 0.76);
  font-size: 15px;
}

.module-tabs {
  gap: 14px;
}

.module-tabs button {
  position: relative;
  min-height: 72px;
  grid-template-columns: 50px minmax(0, 1fr) 24px;
  gap: 14px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 14px;
  color: rgba(255, 255, 255, 0.74);
  background: transparent;
  font-size: 17px;
  font-weight: 500;
}

.module-tabs button:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.075);
}

.module-tabs button.is-active {
  color: #ffffff;
  border-color: rgba(72, 153, 255, 0.36);
  background: linear-gradient(90deg, rgba(0, 124, 255, 0.42), rgba(9, 56, 146, 0.24));
  box-shadow: inset 5px 0 0 #0797ff, 0 18px 34px rgba(0, 16, 54, 0.25);
}

.module-tabs button[data-main-view="calendar"].is-active::after {
  content: "+";
  color: rgba(255, 255, 255, 0.88);
  font-size: 34px;
  font-weight: 300;
  line-height: 1;
}

.nav-icon {
  width: 42px;
  height: 42px;
  border-radius: 0;
  color: currentColor;
  background: transparent;
}

.nav-icon svg {
  width: 34px;
  height: 34px;
  stroke-width: 1.8;
}

.module-tabs button.is-active .nav-icon {
  color: #ffffff;
  background: transparent;
}

.account-box.nav-account {
  border-color: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.07);
}

.c-topbar,
.w-topbar {
  border-bottom-color: #dce7f6;
  background: rgba(255, 255, 255, 0.88);
}

.segmented {
  border-color: #d3e0f2;
  background: #f8fbff;
}

.segmented button {
  color: #0a2d68;
}

.segmented button.is-active,
.side-tabs button.is-active {
  color: #ffffff;
  border-color: #0b4ea2;
  background: linear-gradient(180deg, #0e5fc2, #073b91);
  box-shadow: 0 10px 22px rgba(7, 59, 145, 0.24);
}

.range-bars span,
.density-lines span {
  background: currentColor;
}

.icon-button,
.text-button,
.secondary-button {
  border-color: #d7e3f2;
  color: #0a2d68;
  background: #ffffff;
}

.primary-button {
  border-color: #073b91;
  background: linear-gradient(180deg, #0e5fc2, #073b91);
  box-shadow: 0 14px 28px rgba(7, 59, 145, 0.24);
}

.primary-button:hover {
  background: linear-gradient(180deg, #0b57b4, #062f75);
}

#calendar {
  border-color: #d9e5f4;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(248, 251, 255, 0.96)),
    var(--calendar-bg);
}

.fc-theme-standard .fc-scrollgrid,
.fc-theme-standard td,
.fc-theme-standard th,
.fc .fc-timegrid-slot {
  border-color: var(--grid-line);
}

.fc .fc-col-header-cell {
  background: rgba(248, 251, 255, 0.86);
}

.fc .fc-col-header-cell-cushion,
.calendar-event-title,
.appointment-title,
.request-card-title {
  color: #061b45;
}

.fc .fc-timegrid-axis,
.fc .fc-timegrid-slot-label,
.calendar-event-car,
.appointment-card-car,
.request-contact-line {
  color: #526b92;
}

.fc .fc-day-today {
  background: rgba(234, 242, 255, 0.72) !important;
}

.fc-event.service-event {
  background: #e9f3ff;
}

.calendar-new-badge,
.appointment-status-pill.status-completed,
.appointment-status-pill.status-scheduled,
.client-link-badge.is-linked,
.request-source-badge.source-site,
.request-action-button[data-request-action="in_work"],
.request-lifecycle-actions [data-request-lifecycle-action="in_work"] {
  border-color: #b9d4fb;
  color: #073b91;
  background: #edf5ff;
}

.service-mini-icon.work-engine_oil_change {
  color: #073b91;
  background: #e5f0ff;
  border-color: #bad4fb;
}

.service-mini-icon.work-gearbox_oil_change {
  color: #0b4ea2;
  background: #eaf3ff;
  border-color: #c2dcff;
}

.service-mini-icon.work-filter_change {
  color: #5b4bd1;
  background: #f0edff;
  border-color: #d8d0ff;
}

.request-card.source-site {
  border-left-color: #0b4ea2;
  background: linear-gradient(135deg, rgba(237, 245, 255, 0.92), #ffffff 56%);
}

.request-card.source-vkbot {
  border-left-color: #0e5fc2;
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.96), #ffffff 58%);
}

.request-card.source-telegram {
  border-left-color: #267ddf;
  background: linear-gradient(135deg, rgba(231, 243, 255, 0.94), #ffffff 58%);
}

.request-source-badge.source-vkbot,
.request-source-badge.source-telegram,
.request-source-badge.source-historical {
  border-color: #b9d4fb;
  color: #073b91;
  background: #edf5ff;
}

.request-lifecycle-actions::before,
.dialog-entity-icon,
.request-lifecycle-chip.is-active {
  color: #073b91;
}

.dialog-head {
  background:
    linear-gradient(120deg, rgba(232, 241, 255, 0.88), rgba(255, 255, 255, 0.96)),
    #ffffff;
}

.dialog-entity-icon {
  border-color: #bed6fb;
  background: linear-gradient(180deg, #eef6ff, #ffffff);
}

.appointment-dialog-icon,
.client-dialog-icon {
  border-color: #bed6fb;
  color: #073b91;
  background: linear-gradient(180deg, #eef6ff, #ffffff);
}

.service-toggle-button:hover,
.service-toggle-button:focus-visible {
  border-color: #5e9cf0;
}

.service-toggle-card.is-active .service-toggle-button {
  border-color: #0e5fc2;
  color: #073b91;
  background: linear-gradient(180deg, #edf5ff, #ffffff);
  box-shadow: 0 0 0 1px rgba(11, 78, 162, 0.20), 0 14px 34px rgba(7, 59, 145, 0.11);
}

.material-source-toggle button.is-active {
  border-color: #0e5fc2;
  color: #073b91;
  background: #edf5ff;
  box-shadow: inset 0 0 0 1px rgba(11, 78, 162, 0.15);
}

.manager-color-option.is-active .appointment-color-dot {
  box-shadow: 0 0 0 3px #ffffff, 0 0 0 6px #0b4ea2, 0 14px 30px rgba(7, 59, 145, 0.22);
}

.color-teal {
  background: #0b4ea2;
}

@media (max-width: 960px) {
  .app-shell,
  .app-shell[data-main-view="calendar"] {
    grid-template-columns: 1fr;
  }

  .main-nav {
    background:
      linear-gradient(145deg, rgba(0, 80, 196, 0.58) 0%, rgba(0, 34, 91, 0.86) 38%, rgba(0, 18, 58, 1) 100%),
      linear-gradient(180deg, #063c96 0%, #001b55 56%, #001238 100%);
  }

  .brand {
    padding-left: 58px;
  }

  .brand::before {
    width: 44px;
    height: 44px;
    font-size: 16px;
  }
}

@media (max-width: 1500px) {
  .calendar-action-button {
    min-width: 42px;
    width: 42px;
    padding-left: 0;
    padding-right: 0;
  }

  .calendar-action-button .button-label {
    display: none;
  }

  .c-topbar {
    column-gap: 8px;
  }

  .c-topbar .date-nav {
    transform: none;
  }

  .display-controls,
  .date-nav,
  .topbar-actions {
    gap: 8px;
  }
}

@media (min-width: 2200px) {
  .app-shell {
    grid-template-columns: 320px minmax(900px, 1fr) 500px;
  }
}

/* Reference compact scale pass, 2026-06-19. */
:root {
  --field-border: #b8c9df;
  --field-border-strong: #7fa7dc;
}

input,
select,
textarea,
.dialog input,
.dialog select,
.dialog textarea,
.audit-filter-bar select,
.list-filter-bar select,
.list-filter-bar input,
.request-appointment-panel input,
.request-appointment-panel select {
  min-height: 40px;
  border-color: var(--field-border);
  border-width: 1px;
  color: #061b45;
  font-size: 14px;
  font-weight: 450;
}

input:hover,
select:hover,
textarea:hover,
.dialog input:hover,
.dialog select:hover,
.dialog textarea:hover {
  border-color: #97afd0;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  border-color: var(--field-border-strong);
  box-shadow: 0 0 0 3px rgba(11, 78, 162, 0.10);
}

label {
  font-weight: 520;
}

.main-nav {
  gap: 20px;
  padding: 28px 22px;
}

.brand {
  min-height: 58px;
  padding-left: 64px;
}

.brand::before {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  font-size: 19px;
  font-weight: 600;
}

.brand h1 {
  font-size: 21px;
  font-weight: 600;
}

.brand p {
  font-size: 13px;
  font-weight: 420;
}

.module-tabs {
  gap: 9px;
}

.module-tabs button {
  min-height: 58px;
  grid-template-columns: 40px minmax(0, 1fr) 20px;
  gap: 13px;
  padding: 0 16px;
  border-radius: 13px;
  font-size: 16px;
  font-weight: 420;
}

.module-tabs button.is-active {
  box-shadow: inset 4px 0 0 #0797ff, 0 14px 26px rgba(0, 16, 54, 0.20);
}

.module-tabs button[data-main-view="calendar"].is-active::after {
  font-size: 29px;
  font-weight: 260;
}

.nav-icon {
  width: 34px;
  height: 34px;
}

.nav-icon svg {
  width: 27px;
  height: 27px;
  stroke-width: 2.2;
}

.segmented button svg,
.icon-button svg,
.text-button svg,
.primary-button svg,
.secondary-button svg,
.dialog-entity-icon svg,
.service-flag-icon svg {
  stroke-width: 2.25;
}

.c-topbar,
.w-topbar {
  min-height: 66px;
  height: 66px;
  padding: 10px 18px;
}

.segmented {
  padding: 3px;
}

.segmented button {
  min-width: 38px;
  min-height: 32px;
}

.icon-button,
.text-button,
.primary-button,
.secondary-button {
  min-height: 40px;
  font-size: 14px;
  font-weight: 560;
}

.dialog {
  max-height: calc(100vh - 34px);
}

.dialog-head {
  min-height: 78px;
  padding: 18px 72px 16px 28px;
}

#requestDialog .dialog-head {
  min-height: 118px;
}

.dialog-entity-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
}

.dialog-entity-icon svg {
  width: 24px;
  height: 24px;
}

.dialog-head h2,
#requestDialog .dialog-head h2 {
  font-size: 28px;
  font-weight: 600;
  line-height: 1.05;
}

.dialog-head p,
#requestDialog .dialog-meta {
  font-size: 13px;
  font-weight: 430;
}

.form-grid,
#appointmentDialog .form-grid,
#requestDialog .form-grid {
  gap: 13px 18px;
  padding: 18px 28px;
}

.form-grid label {
  gap: 5px;
  font-size: 12px;
}

.dialog textarea {
  min-height: 72px;
}

.appointment-service-controls {
  padding: 12px 14px;
}

.appointment-service-controls legend,
.appointment-color-controls legend {
  font-size: 14px;
  font-weight: 600;
}

.service-toggle-grid {
  grid-template-columns: repeat(4, minmax(118px, 1fr));
  gap: 10px;
}

.service-toggle-button {
  min-height: 82px;
  gap: 5px;
  border-radius: 12px;
}

.service-flag-icon svg {
  width: 25px;
  height: 25px;
}

.service-toggle-title {
  font-size: 15px;
  font-weight: 600;
}

.service-toggle-state {
  min-height: 24px;
  padding: 4px 11px;
  font-size: 12px;
  font-weight: 600;
}

.material-source-toggle button {
  min-height: 26px;
  font-size: 11px;
  border-color: var(--field-border);
}

.appointment-color-controls {
  gap: 14px;
  padding: 12px 14px;
}

.manager-color-options {
  gap: 14px;
}

.manager-color-option {
  width: 48px;
  height: 48px;
}

.appointment-color-dot {
  width: 36px;
  height: 36px;
}

.request-lifecycle-actions {
  gap: 10px;
  padding: 13px;
}

.request-lifecycle-actions::before {
  font-size: 14px;
  font-weight: 600;
}

.request-lifecycle-actions button {
  min-height: 48px;
  font-size: 13px;
  font-weight: 600;
}

.request-appointment-panel {
  padding: 14px;
}

.dialog-actions {
  min-height: 60px;
  padding: 10px 28px 12px;
}

@media (max-width: 960px) {
  .main-nav {
    gap: 14px;
    padding: 20px 22px;
  }

  .brand {
    min-height: 48px;
    padding-left: 58px;
  }

  .module-tabs button {
    min-height: 50px;
  }

  .dialog-head {
    padding: 16px 64px 14px 20px;
  }

  .form-grid,
  #appointmentDialog .form-grid,
  #requestDialog .form-grid {
    padding: 16px 18px;
  }

  .service-toggle-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .module-tabs button {
    min-height: 42px;
    padding: 0;
  }

  .nav-icon {
    width: 30px;
    height: 30px;
  }

  .nav-icon svg {
    width: 24px;
    height: 24px;
  }

  .dialog-head h2,
  #requestDialog .dialog-head h2 {
    font-size: 22px;
  }

  .dialog-entity-icon {
    width: 40px;
    height: 40px;
  }

  .service-toggle-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .service-toggle-button {
    min-height: 76px;
  }
}

/* Extra compact reference pass, 2026-06-19. */
:root {
  --app-topbar-height: 56px;
}

.app-shell {
  grid-template-columns: minmax(232px, 250px) minmax(620px, 1fr) minmax(360px, 440px);
}

.main-nav {
  gap: 14px;
  padding: 20px 18px;
}

.brand {
  min-height: 48px;
  padding-left: 52px;
}

.brand::before {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  font-size: 17px;
  font-weight: 600;
}

.brand h1 {
  font-size: 19px;
  font-weight: 600;
}

.brand p {
  font-size: 12px;
  font-weight: 390;
}

.module-tabs {
  gap: 6px;
}

.module-tabs button {
  min-height: 48px;
  grid-template-columns: 32px minmax(0, 1fr) 18px;
  gap: 10px;
  padding: 0 14px;
  border-radius: 11px;
  font-size: 14px;
  font-weight: 390;
}

.module-tabs button.is-active {
  box-shadow: inset 4px 0 0 #0797ff, 0 10px 20px rgba(0, 16, 54, 0.18);
}

.module-tabs button[data-main-view="calendar"].is-active::after {
  font-size: 25px;
  font-weight: 240;
}

.nav-icon {
  width: 28px;
  height: 28px;
}

.nav-icon svg {
  width: 23px;
  height: 23px;
  stroke-width: 2.35;
}

.c-topbar,
.w-topbar {
  min-height: 56px;
  height: 56px;
  padding: 8px 18px;
}

.segmented {
  padding: 2px;
  border-radius: 9px;
}

.segmented button {
  min-width: 34px;
  min-height: 28px;
  padding: 0 7px;
}

.range-bars,
.density-lines {
  width: 19px;
  height: 16px;
}

.icon-button,
.text-button,
.primary-button,
.secondary-button {
  min-height: 34px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 520;
}

.icon-button {
  width: 34px;
}

.calendar-action-button {
  min-width: 128px;
}

input,
select,
textarea,
.dialog input,
.dialog select,
.dialog textarea,
.audit-filter-bar select,
.list-filter-bar select,
.list-filter-bar input,
.request-appointment-panel input,
.request-appointment-panel select {
  min-height: 34px;
  border-color: #a9bfdc;
  font-size: 13px;
  font-weight: 420;
}

.dialog {
  max-height: calc(100vh - 24px);
}

#appointmentDialog.dialog {
  width: min(960px, calc(100vw - 28px));
}

#requestDialog.dialog {
  width: min(1040px, calc(100vw - 28px));
}

.dialog-head {
  min-height: 62px;
  padding: 12px 64px 11px 24px;
}

#requestDialog .dialog-head {
  min-height: 92px;
}

.dialog-entity-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.dialog-entity-icon svg {
  width: 20px;
  height: 20px;
}

.dialog-head h2,
#requestDialog .dialog-head h2 {
  font-size: 24px;
  font-weight: 600;
  line-height: 1.04;
}

.dialog-head p,
#requestDialog .dialog-meta {
  font-size: 12px;
  font-weight: 390;
}

#requestDialog .dialog-attention {
  margin-top: 9px !important;
  padding: 8px 12px;
  font-size: 13px;
}

#requestLifecycleSnapshot {
  margin-top: 9px;
}

.form-grid,
#appointmentDialog .form-grid,
#requestDialog .form-grid {
  gap: 9px 14px;
  padding: 12px 24px;
}

.form-grid label {
  gap: 4px;
  font-size: 11px;
  font-weight: 520;
}

.dialog textarea {
  min-height: 58px;
}

.client-picker-selected {
  min-height: 28px;
  font-size: 12px;
}

.appointment-service-controls {
  padding: 9px 12px;
}

.appointment-service-controls legend,
.appointment-color-controls legend {
  font-size: 13px;
  font-weight: 600;
}

.service-toggle-grid {
  grid-template-columns: repeat(4, minmax(96px, 1fr));
  gap: 8px;
}

.service-toggle-button {
  min-height: 64px;
  gap: 3px;
  border-radius: 10px;
}

.service-flag-icon svg {
  width: 20px;
  height: 20px;
  stroke-width: 2.35;
}

.service-toggle-title {
  font-size: 13px;
  font-weight: 600;
}

.service-toggle-state {
  min-height: 20px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 600;
}

.material-source-toggle {
  gap: 3px;
}

.material-source-toggle button {
  min-height: 22px;
  padding: 2px 4px;
  font-size: 10px;
}

.appointment-color-controls {
  gap: 10px;
  padding: 9px 12px;
}

.manager-color-options {
  gap: 10px;
}

.manager-color-option {
  width: 40px;
  height: 40px;
}

.appointment-color-dot {
  width: 30px;
  height: 30px;
  border-width: 3px;
}

.request-lifecycle-actions {
  grid-template-columns: repeat(4, minmax(118px, 1fr));
  gap: 8px;
  padding: 10px;
}

.request-lifecycle-actions::before {
  font-size: 13px;
  font-weight: 600;
}

.request-lifecycle-actions button {
  min-height: 38px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 560;
}

.request-lifecycle-actions .button-icon {
  width: 20px;
  height: 20px;
}

.request-lifecycle-actions .button-icon svg {
  width: 17px;
  height: 17px;
}

.request-appointment-panel {
  gap: 10px;
  padding: 10px;
}

.dialog-actions {
  min-height: 48px;
  padding: 8px 24px 10px;
}

@media (max-width: 1500px) {
  .calendar-action-button {
    min-width: 34px;
    width: 34px;
  }
}

@media (min-width: 2200px) {
  .app-shell {
    grid-template-columns: 272px minmax(900px, 1fr) 500px;
  }
}

@media (max-width: 960px) {
  .app-shell,
  .app-shell[data-main-view="calendar"] {
    grid-template-columns: 1fr;
  }

  .main-nav {
    gap: 10px;
    padding: 16px 18px;
  }

  .brand {
    min-height: 42px;
    padding-left: 50px;
  }

  .brand::before {
    width: 38px;
    height: 38px;
    font-size: 15px;
  }

  .module-tabs button {
    min-height: 44px;
  }

  .dialog-head {
    padding: 12px 58px 11px 18px;
  }

  .form-grid,
  #appointmentDialog .form-grid,
  #requestDialog .form-grid {
    padding: 12px 16px;
  }

  .service-toggle-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .brand h1 {
    font-size: 17px;
  }

  .module-tabs button {
    min-height: 38px;
  }

  .nav-icon {
    width: 27px;
    height: 27px;
  }

  .nav-icon svg {
    width: 22px;
    height: 22px;
  }

  .dialog-head h2,
  #requestDialog .dialog-head h2 {
    font-size: 20px;
  }

  .dialog-entity-icon {
    width: 34px;
    height: 34px;
  }

  .service-toggle-grid {
    gap: 7px;
  }

  .service-toggle-button {
    min-height: 62px;
  }
}

/* Extra narrow navigation pass, 2026-06-19. */
.app-shell {
  grid-template-columns: minmax(188px, 210px) minmax(620px, 1fr) minmax(360px, 430px);
}

.main-nav {
  padding: 16px 12px;
}

.brand {
  min-height: 40px;
  padding-left: 44px;
}

.brand::before {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  font-size: 14px;
}

.brand h1 {
  font-size: 17px;
  font-weight: 600;
}

.brand p {
  font-size: 11px;
}

.module-tabs button {
  min-height: 43px;
  grid-template-columns: 28px minmax(0, 1fr) 16px;
  gap: 8px;
  padding: 0 11px;
  font-size: 13px;
  border-radius: 10px;
}

.module-tabs button[data-main-view="calendar"].is-active::after {
  font-size: 22px;
}

.nav-icon {
  width: 25px;
  height: 25px;
}

.nav-icon svg {
  width: 21px;
  height: 21px;
}

.account-box.nav-account {
  padding: 8px;
  font-size: 12px;
}

@media (min-width: 2200px) {
  .app-shell {
    grid-template-columns: 224px minmax(900px, 1fr) 500px;
  }
}

@media (max-width: 960px) {
  .app-shell,
  .app-shell[data-main-view="calendar"] {
    grid-template-columns: 1fr;
  }
}

/* Button spacing and icon stroke pass, 2026-06-19. */
.main-nav {
  gap: 10px;
}

.module-tabs {
  gap: 3px;
}

.module-tabs button {
  gap: 6px;
}

.display-controls,
.date-nav,
.topbar-actions {
  gap: 5px;
}

.c-topbar {
  column-gap: 6px;
}

.segmented {
  gap: 1px;
}

.request-quick-actions,
.request-lifecycle-actions {
  gap: 5px;
}

.service-toggle-grid {
  gap: 5px;
}

.material-source-toggle {
  gap: 2px;
}

.manager-color-options {
  gap: 8px;
}

.svg-icon svg,
.button-icon svg {
  stroke-width: 1.2;
}

.nav-icon svg {
  stroke-width: 1.2;
}

.segmented button svg,
.icon-button svg,
.text-button svg,
.primary-button svg,
.secondary-button svg,
.dialog-entity-icon svg,
.service-flag-icon svg {
  stroke-width: 1.2;
}

.request-lifecycle-actions .button-icon svg {
  stroke-width: 1.2;
}

/* Density scale remap, 2026-06-19: previous level 4 is now level 2. */
:root,
:root[data-density="1"] {
  --slot-height: 24px;
}

:root[data-density="2"] {
  --slot-height: 30px;
}

:root[data-density="3"] {
  --slot-height: 37px;
}

:root[data-density="4"] {
  --slot-height: 44px;
}

/* Calendar appointment tile refinement, 2026-06-19. */
.fc-event .fc-event-main {
  height: 100%;
  width: 100%;
  min-width: 0;
  text-align: left;
}

.fc-event .fc-event-main-frame,
.fc-event .fc-event-title-container,
.fc-event .fc-event-title {
  width: 100%;
  min-width: 0;
  text-align: left;
}

.fc-event.service-event {
  position: relative;
  padding: 6px 8px;
}

.fc-event.service-event .fc-event-main,
.fc-event.service-event .fc-event-main-frame,
.fc-event.service-event .fc-event-title-container,
.fc-event.service-event .fc-event-title {
  position: static;
  height: 100%;
}

.calendar-event-content {
  position: static;
  display: flex;
  width: 100%;
  min-height: 100%;
  height: 100%;
  padding-bottom: 28px;
  flex-direction: column;
  gap: 2px;
  text-align: left;
}

.fc-event.service-event .calendar-event-content {
  height: 100%;
  min-height: 100%;
}

.calendar-event-title-row {
  display: flex;
  width: 100%;
  min-width: 0;
  align-items: baseline;
  gap: 5px;
  line-height: 1.2;
}

.calendar-event-title-row .calendar-event-start-time {
  flex: 0 0 auto;
  line-height: 1.2;
}

.calendar-event-title {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  line-height: 1.2;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-event-car {
  display: block;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  color: #36527a;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-event-meta {
  position: absolute;
  bottom: 0;
  left: 0;
  width: min(116px, 66%);
  display: flex;
  min-height: 32px;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  padding: 4px 12px 4px 10px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-bottom: 0;
  border-left: 0;
  border-radius: 0 8px 0 8px;
  color: #092b68;
  background: rgba(255, 255, 255, 0.72);
  clip-path: polygon(0 0, calc(100% - 15px) 0, 100% 100%, 0 100%);
  box-shadow: none;
  filter: none;
  backdrop-filter: none;
}

.calendar-status-dot {
  box-sizing: border-box;
  display: inline-block;
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border: 1.4px solid var(--appointment-accent, #0b63ce);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.52);
}

.calendar-status-dot.status-scheduled,
.calendar-status-dot.status-unknown {
  border-color: #0d6ee8;
  background: rgba(255, 255, 255, 0.26);
}

.calendar-status-dot.status-completed {
  width: 11px;
  height: 11px;
  border: 0;
  background: #2f8256;
  box-shadow: none;
  opacity: 0.86;
}

.calendar-status-dot.status-needs-review {
  width: 12px;
  height: 12px;
  border: 0;
  background: #d82020;
  box-shadow: 0 0 0 2px rgba(216, 32, 32, 0.14);
}

.calendar-status-dot.status-cancelled,
.calendar-status-dot.status-no-show {
  width: 10px;
  height: 10px;
  border: 0;
  background: #9f1f2f;
  opacity: 0.82;
}

.calendar-status-dot.status-block {
  width: 9px;
  height: 9px;
  border: 0;
  background: #526b92;
  opacity: 0.72;
}

.calendar-event-meta .appointment-service-icons {
  display: inline-flex;
  flex: 0 1 auto;
  min-height: 22px;
  max-width: calc(100% - 18px);
  align-items: center;
  gap: 4px;
}

.calendar-event-meta .service-mini-icon {
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 0;
  color: #092b68;
  background: transparent;
  box-shadow: none;
}

.calendar-event-meta .service-mini-icon.work-engine_oil_change,
.calendar-event-meta .service-mini-icon.work-gearbox_oil_change,
.calendar-event-meta .service-mini-icon.work-filter_change,
.calendar-event-meta .service-mini-icon.work-other_service {
  color: #092b68;
  background: transparent;
  border-color: transparent;
}

.calendar-event-meta .service-mini-icon.source-customer::after,
.calendar-event-meta .service-mini-icon.source-shop::after {
  display: none;
}

.calendar-event-meta .service-mini-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 1.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

@media (max-width: 760px) {
  .fc-event.service-event {
    padding: 4px 5px;
  }

  .calendar-event-content {
    padding-bottom: 26px;
  }

  .calendar-event-meta .service-mini-icon {
    width: 16px;
    height: 16px;
  }

  .calendar-event-meta .service-mini-icon svg {
    width: 15px;
    height: 15px;
  }
}

/* Phase 3 logo, service icons and error report page, 2026-06-22. */
.brand::before {
  content: none;
  display: none;
}

.brand-logo,
.login-brand-mark {
  display: grid;
  place-items: center;
  color: #ffffff;
}

.brand-logo {
  position: absolute;
  left: 0;
  top: 2px;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.20);
  border-radius: 9px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.035)),
    rgba(5, 44, 110, 0.30);
  box-shadow: 0 10px 24px rgba(0, 18, 54, 0.22);
}

.brand-logo svg {
  width: 23px;
  height: 23px;
  stroke-width: 1.55;
}

.login-brand-mark {
  width: 48px;
  height: 48px;
  border: 1px solid #c7d7ee;
  border-radius: 13px;
  color: #0a3f92;
  background: linear-gradient(145deg, #ffffff, #edf5ff);
  box-shadow: 0 12px 30px rgba(10, 63, 146, 0.12);
}

.login-brand-mark svg {
  width: 30px;
  height: 30px;
  stroke-width: 1.7;
}

.module-tabs button > span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.module-tabs button[data-main-view="errorReport"] {
  grid-template-columns: 28px minmax(0, 1fr);
  padding-right: 8px;
  font-size: 12px;
}

.module-tabs button[data-main-view="errorReport"] > span:last-child {
  overflow: visible;
  text-overflow: clip;
}

.service-toggle-button .service-flag-icon {
  width: 42px;
  height: 38px;
}

.service-toggle-button .service-flag-icon svg {
  width: 38px;
  height: 38px;
  stroke-width: 1.2;
}

.calendar-event-meta .service-mini-icon svg {
  width: 17px;
  height: 17px;
  stroke-width: 1.2;
}

.error-report-list {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 16px;
}

.error-report-section {
  width: min(100%, 860px);
  max-width: 860px;
}

.error-report-section .settings-section-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.error-report-form {
  display: grid;
  gap: 12px;
}

.error-report-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.error-report-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.error-report-grid .wide,
.error-report-dropzone {
  grid-column: 1 / -1;
}

.error-report-grid select,
.error-report-grid textarea {
  width: 100%;
  border: 1px solid #c5d2e1;
  border-radius: 8px;
  color: var(--text);
  background: #ffffff;
  box-shadow: inset 0 1px 0 rgba(15, 35, 65, 0.03);
}

.error-report-grid select {
  min-height: 38px;
  padding: 7px 10px;
}

.error-report-grid textarea {
  min-height: 96px;
  padding: 9px 10px;
  resize: vertical;
  font-size: 12px;
  font-weight: 450;
  line-height: 1.45;
}

.error-report-dropzone {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 88px;
  padding: 12px;
  border: 1px dashed #b8c8dc;
  border-radius: 8px;
  color: #27425f;
  background: #f7fbff;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.error-report-dropzone.is-dragover,
.error-report-dropzone:focus-visible {
  border-color: #0a55b8;
  background: #eef6ff;
  box-shadow: 0 0 0 3px rgba(10, 85, 184, 0.10);
  outline: none;
}

.error-report-dropzone .button-icon {
  width: 28px;
  height: 28px;
  color: #0a3f92;
}

.error-report-dropzone strong {
  display: block;
  color: var(--text);
  font-size: 13px;
  line-height: 1.25;
}

.error-report-dropzone p {
  margin: 2px 0 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

#errorReportFileStatus {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: #31577e;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.error-report-file-actions {
  display: flex;
  gap: 6px;
}

.error-report-file-actions .action-button,
.error-report-actions .action-button {
  min-height: 36px;
  height: 36px;
}

.error-report-progress {
  display: grid;
  gap: 5px;
  margin-top: -2px;
}

.error-report-progress[hidden] {
  display: none;
}

.error-report-progress-head {
  display: flex;
  min-height: 16px;
  color: #31577e;
  font-size: 11px;
  line-height: 1.3;
}

.error-report-progress-track {
  position: relative;
  overflow: hidden;
  height: 4px;
  border-radius: 999px;
  background: #dbe8f6;
}

.error-report-progress-track span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  border-radius: inherit;
  background: #0a55b8;
  transition: width 0.2s ease;
}

.error-report-progress.is-indeterminate .error-report-progress-track span {
  width: 38%;
  animation: error-report-progress-sweep 1.05s ease-in-out infinite;
}

.error-report-progress.is-error .error-report-progress-head {
  color: #8f1d1d;
}

.error-report-progress.is-error .error-report-progress-track span {
  background: #dc2626;
}

.error-report-progress.is-success .error-report-progress-head {
  color: #14532d;
}

.error-report-progress.is-success .error-report-progress-track span {
  background: #16a34a;
}

.error-report-actions {
  justify-content: flex-start;
}

@keyframes error-report-progress-sweep {
  0% {
    transform: translateX(-115%);
  }

  100% {
    transform: translateX(265%);
  }
}

.form-message.is-error {
  color: #8f1d1d;
}

.form-message.is-success {
  color: #14532d;
}

@media (max-width: 760px) {
  .error-report-list {
    padding: 10px;
  }

  .error-report-grid {
    grid-template-columns: 1fr;
  }

  .error-report-dropzone {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .error-report-file-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

/* Phase 3 details toggle, distinct tile logo and appointment hover tooltip, 2026-06-22. */
.login-panel {
  width: min(100%, 460px);
  gap: 16px;
  padding: 26px;
}

.login-brand-row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.login-brand-row > div:last-child {
  min-width: 0;
}

.login-brand-row h1,
.login-brand-row p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand {
  min-height: 46px;
  padding-left: 48px;
}

.brand-logo,
.login-brand-mark {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.brand-logo {
  top: 3px;
  width: 36px;
  height: 36px;
}

.brand-logo svg {
  width: 36px;
  height: 36px;
}

.login-brand-mark {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  color: #0a3f92;
}

.login-brand-mark svg {
  width: 40px;
  height: 40px;
}

.brand-logo svg rect,
.login-brand-mark svg rect {
  transform-box: fill-box;
  transform-origin: center;
  will-change: fill, filter, opacity, transform;
}

.module-tabs button[data-main-view="errorReport"] {
  margin-top: 8px;
}

.nav-detail-controls {
  display: grid;
  gap: 6px;
  margin-top: auto;
  padding: 4px 2px;
  border: 0;
  border-radius: 0;
  color: rgba(255, 255, 255, 0.82);
  background: transparent;
  font-size: 12px;
  font-weight: 520;
}

.nav-ultra-hint {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  margin: 0 0 2px;
  color: rgba(255, 255, 255, 0.54);
  font-size: 10px;
  font-weight: 300;
  line-height: 1.25;
  text-align: right;
  cursor: help;
}

.nav-detail-control {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.nav-detail-control > span {
  min-width: 0;
  overflow: hidden;
  font-size: 11px;
  font-weight: 300;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-toggle {
  position: relative;
  flex: 0 0 auto;
  width: 36px;
  height: 19px;
  min-height: 19px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: inset 0 1px 2px rgba(3, 22, 58, 0.18);
  transition: background 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}

.detail-toggle span {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 13px;
  height: 13px;
  border-radius: 999px;
  background: #073b91;
  box-shadow: 0 1px 4px rgba(0, 18, 54, 0.24);
  transition: transform 0.14s ease, background 0.14s ease;
}

.detail-toggle.is-active {
  border-color: rgba(113, 231, 161, 0.88);
  background: #35b86f;
  box-shadow: 0 8px 18px rgba(0, 18, 54, 0.20), inset 0 1px 2px rgba(255, 255, 255, 0.18);
}

.detail-toggle.is-active span {
  transform: translateX(17px);
  background: #ffffff;
}

.detail-toggle.is-temporary {
  outline: 2px solid rgba(255, 255, 255, 0.40);
  outline-offset: 2px;
}

:root[data-calendar-details-mode="off"] .calendar-event-content {
  padding-bottom: 0;
}

:root[data-calendar-details-mode="off"]:not([data-calendar-status-mode="on"]) .calendar-event-meta {
  display: none;
}

:root[data-calendar-details-mode="on"] .calendar-event-content {
  padding-bottom: 28px;
}

:root[data-calendar-details-mode="on"] .calendar-event-meta {
  right: auto;
  bottom: 0;
  left: 0;
  display: inline-flex;
  width: min(116px, 66%);
  max-width: calc(100% - 1px);
  min-height: 32px;
  padding: 4px 12px 4px 10px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-bottom: 0;
  border-left: 0;
  border-radius: 0 8px 0 8px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: none;
  filter: none;
  backdrop-filter: none;
  clip-path: polygon(0 0, calc(100% - 15px) 0, 100% 100%, 0 100%);
}

:root[data-calendar-details-mode="on"] .calendar-event-meta .appointment-service-icons {
  min-height: 22px;
  max-width: calc(100% - 18px);
  gap: 4px;
}

:root[data-calendar-details-mode="on"] .calendar-event-meta .service-mini-icon {
  width: 22px;
  height: 22px;
}

:root[data-calendar-details-mode="on"] .calendar-event-meta .service-mini-icon svg {
  width: 20px;
  height: 20px;
  stroke-width: 1.2;
}

:root[data-calendar-details-mode="on"] .calendar-status-dot {
  width: 7px;
  height: 7px;
}

:root[data-calendar-details-mode="on"] .calendar-status-dot.status-completed {
  width: 9px;
  height: 9px;
}

:root[data-calendar-details-mode="on"] .calendar-status-dot.status-needs-review {
  width: 10px;
  height: 10px;
}

.fc-event.service-event {
  transition: filter 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}

.fc-event.service-event:hover {
  z-index: 5;
  filter: saturate(1.08) contrast(1.04) brightness(0.985);
  box-shadow: 0 8px 18px rgba(6, 27, 69, 0.17), inset 0 0 0 1px rgba(6, 27, 69, 0.08);
}

.fc-event.service-event:hover .calendar-event-title {
  color: #031a44;
}

.fc-event.service-event:hover .calendar-event-car {
  color: #1f3d64;
}

.appointment-hover-tooltip {
  position: fixed;
  z-index: 10000;
  width: min(330px, calc(100vw - 24px));
  padding: 10px 12px;
  border: 1px solid rgba(171, 198, 231, 0.36);
  border-radius: 10px;
  color: #eef6ff;
  background: rgba(4, 23, 58, 0.95);
  box-shadow: 0 18px 46px rgba(0, 18, 54, 0.28);
  font-size: 12px;
  font-weight: 430;
  line-height: 1.35;
  pointer-events: none;
  white-space: normal;
}

.appointment-hover-tooltip-time {
  margin-bottom: 4px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
}

.appointment-hover-tooltip-comment {
  margin-top: 5px;
  color: #c9daf2;
}

.appointment-hover-tooltip-spacer {
  height: 7px;
}

@media (max-width: 960px) {
  .brand {
    min-height: 40px;
    padding-left: 44px;
  }

  .brand-logo {
    width: 32px;
    height: 32px;
  }

  .brand-logo svg {
    width: 32px;
    height: 32px;
  }

  .nav-detail-control {
    margin-top: 8px;
  }
}

@media (max-width: 560px) {
  .login-panel {
    width: min(100%, 430px);
    padding: 20px;
  }

  .login-brand-mark {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
  }

  .login-brand-mark svg {
    width: 34px;
    height: 34px;
  }
}

/* Phase 4.1 request model applied to the live local DEV UI. */
#requestDialog .request-dialog-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(190px, 260px);
  align-items: stretch;
  gap: 18px;
  min-height: 126px;
  padding-right: 28px;
}

.request-dialog-title-block {
  grid-column: 2;
  flex: 1 1 auto;
  min-width: 0;
}

.request-dialog-head-tools {
  grid-column: 3;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  flex: 0 0 min(260px, 28%);
  align-items: flex-end;
  justify-content: space-between;
  min-width: 180px;
  padding: 0 0 2px;
}

#requestDialog .dialog-close-button {
  position: static;
  width: 40px;
  min-width: 40px;
  min-height: 40px;
}

.request-dialog-utility-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-height: 40px;
  max-width: 100%;
  margin-top: 0;
}

.request-advanced-toggle {
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid #b9d4fb;
  border-radius: 8px;
  color: #073b91;
  background: #edf5ff;
  font-size: 13px;
  font-weight: 600;
}

.request-advanced-toggle.is-active {
  color: #ffffff;
  background: #073b91;
}

.request-client-stats-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  border: 1px solid #b9d4fb;
  border-radius: 8px;
  color: #073b91;
  background: #edf5ff;
  font-size: 17px;
  font-weight: 700;
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1;
  cursor: help;
}

.request-client-stats-link:hover,
.request-client-stats-link:focus-visible {
  color: #052f73;
  background: #dcebff;
  outline: 0;
}

.request-client-stats-link.is-empty {
  color: #64748b;
  border-color: #d8e3ef;
  background: #f8fafc;
}

.request-virtual-marker-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  max-width: 100%;
  padding: 7px 13px;
  border: 1px solid #d8e3ee;
  border-radius: 999px;
  color: #40536a;
  background: #ffffff;
  box-shadow: 0 10px 22px rgba(6, 27, 69, 0.08);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.15;
  text-align: center;
}

.request-working-status {
  margin: 7px 0 0;
  color: #132238;
  font-size: 13px;
  font-weight: 600;
}

.request-virtual-marker-badge.is-attention,
.request-reaction-badge.is-attention {
  border-color: #fed7aa;
  color: #c2410c;
  background: #fff7ed;
}

.request-virtual-marker-badge.is-warning,
.request-reaction-badge.is-warning {
  border-color: #fde68a;
  color: #92400e;
  background: #fffbeb;
}

.request-virtual-marker-badge.is-danger,
.request-reaction-badge.is-danger {
  border-color: #fecaca;
  color: #b42318;
  background: #fef2f2;
}

.request-virtual-marker-badge.is-positive,
.request-reaction-badge.is-positive {
  border-color: #bbf7d0;
  color: #166534;
  background: #f0fdf4;
}

.request-reaction-badge.is-unlinked-client {
  border-color: #bfdbfe;
  color: #075985;
  background: #eff6ff;
}

.request-client-state-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 32px;
  max-width: 100%;
  padding: 6px 10px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  color: #075985;
  background: #eff6ff;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.1;
  white-space: nowrap;
}

.request-client-state-badge svg {
  width: 15px;
  height: 15px;
  stroke-width: 1.9;
}

.request-client-state-badge.is-compact {
  min-height: 24px;
  padding: 3px 7px;
  gap: 4px;
  font-size: 11px;
}

.request-client-state-badge.is-compact svg {
  width: 13px;
  height: 13px;
}

.request-virtual-marker-badge.is-final,
.request-reaction-badge.is-final {
  border-color: #cbd5e1;
  color: #475569;
  background: #f1f5f9;
}

#requestDialog .request-client-db-field input,
#requestDialog .request-phone-field input,
#requestDialog input[name="raw_car"] {
  min-height: 44px;
  font-size: 15px;
}

#requestDialog .request-client-db-field input[readonly] {
  color: #132238;
  background: #fbfdff;
}

.request-client-presented {
  min-height: 18px;
  color: #132238;
  font-size: 12px;
  font-weight: 500;
}

.request-last-visit-hint {
  display: block;
  min-height: 22px;
  margin: 0 0 10px;
  margin-top: 0px;
  color: #40536a;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.25;
}

.request-last-visit-hint.is-empty {
  color: transparent;
}

.request-last-visit-hint.is-muted {
  color: #64748b;
  font-weight: 400;
}

.request-last-visit-hint.is-error {
  color: #991b1b;
}

.request-advanced-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
  padding: 12px;
  border: 1px solid #dfe8f1;
  border-radius: 12px;
  background: #fbfdff;
}

.request-advanced-panel[hidden] {
  display: none;
}

.request-main-field {
  min-width: 0;
}

.request-car-field {
  grid-column: 1;
}

.request-client-db-field {
  grid-column: 2;
}

.request-phone-field {
  grid-column: 2;
}

.request-comment-field textarea {
  min-height: 108px;
}

#requestDialog .dialog-actions div {
  align-items: center;
}

#requestDialog #createAppointmentFromRequestButton {
  order: 3;
}

#requestDialog #saveRequestButton {
  order: 1;
}

#requestDialog #cancelRequestDialogButton {
  order: 2;
}

.list-layout-button {
  min-height: 32px;
  align-self: end;
  white-space: nowrap;
}

#allRequestList > .filter-bar {
  position: static;
  min-height: 132px;
  align-content: flex-start;
  align-items: flex-end;
  box-shadow: none;
}

#allRequestList .filter-summary {
  flex-basis: 100%;
  margin-left: 0;
}

#allRequestList[data-request-layout="two"] {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 10px;
}

#allRequestList[data-request-layout="two"] > .filter-bar,
#allRequestList[data-request-layout="two"] > .muted,
#allRequestList[data-request-layout="two"] > .list-command {
  grid-column: 1 / -1;
}

#allRequestList[data-request-layout="two"] .request-card + .request-card {
  margin-top: 0;
}

.request-card-list-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.request-card-side-source {
  position: absolute;
  top: 14px;
  right: 14px;
  max-width: 46%;
}

.request-card-side-client-state {
  position: absolute;
  top: 44px;
  right: 14px;
  max-width: 52%;
}

.request-card-side-source .request-source-badge {
  min-height: 26px;
  padding: 4px 8px;
  font-size: 12px;
}

#requestList .request-card {
  padding-right: 124px;
}

.request-card-detail-slot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 30px;
  min-width: 0;
  margin-top: 2px;
}

.request-card-detail-slot .request-source-badge,
.request-card-detail-slot .request-reaction-badge {
  min-height: 26px;
  padding: 4px 8px;
  font-size: 12px;
}

:root[data-request-details-mode="off"] #requestList .request-card-detail-slot > * {
  visibility: hidden;
}

:root[data-request-details-mode="off"] #requestList .request-card-side-source {
  visibility: hidden;
}

:root[data-request-details-mode="off"] #requestList .request-card-side-client-state {
  visibility: hidden;
}

#requestList .request-card-head,
#requestList .client-link-badge,
#requestList .request-lifecycle-chips,
#requestList .request-attention-list,
#requestList .request-quick-actions {
  display: none;
}

#requestList .request-card-created {
  color: #40536a;
}

.request-history-compact {
  margin-top: 4px;
}

@media (max-width: 1240px) {
  #allRequestList[data-request-layout="two"] {
    grid-template-columns: 1fr;
  }
}

/* P4.1 local DEV fixes, 2026-06-23. */
.brand {
  position: relative;
  display: grid;
  align-content: center;
  min-height: 42px;
  padding-left: 48px;
}

.brand h1,
.brand p {
  display: flex;
  align-items: center;
  min-height: 18px;
  line-height: 1.05;
}

.brand h1 {
  align-self: end;
  font-weight: 600;
}

.brand p {
  align-self: start;
}

.fc .fc-col-header,
.fc .fc-col-header *,
.fc th {
  font-weight: 600 !important;
}

body :where(h1, h2, h3, h4, h5, h6, strong, b) {
  font-weight: 600 !important;
}

.nav-menu-separator {
  display: block;
  height: 1px;
  margin: 6px 10px 0;
  background: rgba(255, 255, 255, 0.20);
}

.module-tabs button.nav-debug-item {
  min-height: 42px;
  margin-top: 0;
  opacity: 0.86;
}

.module-tabs button[data-main-view="calendar"]::after {
  content: none;
  display: none;
}

.nav-calendar-plus {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  color: currentColor;
  font-size: 26px;
  font-weight: 300;
  line-height: 1;
  align-self: center;
  justify-self: center;
}

.module-tabs button[data-main-view="calendar"].is-active .nav-calendar-plus {
  color: rgba(255, 255, 255, 0.92);
}

.today-split-control {
  position: relative;
  display: inline-flex;
  align-items: stretch;
  min-height: 36px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--surface-muted);
}

.today-split-control .text-button {
  min-height: 36px;
  border-radius: 0;
  background: transparent;
}

.today-picker-button {
  width: 42px;
  padding: 0;
  border-right: 1px solid rgba(82, 107, 146, 0.24);
}

.today-button {
  min-width: 84px;
  padding: 0 14px;
}

.today-icon,
.today-label {
  display: inline-grid;
  place-items: center;
  min-height: 20px;
  line-height: 1;
}

.today-picker-input {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.range-bars,
.density-lines {
  display: inline-flex;
  align-content: center;
  align-items: center;
  justify-content: center;
  width: 22px;
  min-width: 22px;
  height: 18px;
  gap: 2px;
}

.range-bars {
  align-items: flex-end;
}

.density-lines {
  flex-direction: column;
}

.range-bars > span,
.density-lines > span {
  display: block;
  border-radius: 999px;
  background: currentColor;
  transform: none;
}

.range-bars > span {
  width: 2px !important;
  min-width: 2px !important;
  max-width: 2px !important;
  height: 12px;
}

.range-bars > span:nth-child(2n) {
  height: 14px;
}

.range-bars > span:nth-child(3n) {
  height: 16px;
}

.density-lines > span {
  width: 16px;
  height: 2px !important;
  min-height: 2px !important;
  max-height: 2px !important;
}

.range-bars-3 > span { height: 12px; }
.range-bars-5 > span { height: 13px; }
.range-bars-7 > span { height: 14px; }
.week-range-icon {
  display: inline-grid;
  place-items: center;
  position: relative;
  width: 18px;
  min-width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  border-radius: 4px;
  color: currentColor;
  font-size: 10px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0;
}

.week-range-icon > span {
  transform: translateY(0);
}
.density-lines-1 { gap: 5px; }
.density-lines-2 { gap: 4px; }
.density-lines-3 { gap: 3px; }
.density-lines-4 { gap: 2px; }

.clarification-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.clarification-table {
  display: grid;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  font-size: 13px;
}

.clarification-table-row {
  display: grid;
  grid-template-columns:
    minmax(0, 0.74fr)
    minmax(0, 0.5fr)
    minmax(0, 0.82fr)
    minmax(0, 0.72fr)
    minmax(0, 0.72fr)
    minmax(0, 0.72fr)
    minmax(0, 1fr)
    minmax(0, 0.82fr);
  gap: 10px;
  align-items: start;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  color: #24364d;
  line-height: 1.35;
}

.clarification-table-row:first-child {
  border-top: 0;
}

.clarification-table-row > span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.clarification-table-row.is-head {
  color: #40536a;
  background: #f6f9fe;
  font-weight: 600;
}

.clarification-table-row.is-empty > span {
  grid-column: 1 / -1;
  color: var(--muted);
}

.resizable-table.is-resized .sla-reference-row,
.resizable-table.is-resized .clarification-table-row {
  grid-template-columns: var(--table-columns) !important;
}

.resizable-table [role="columnheader"] {
  position: relative;
  min-width: 0;
  padding-right: 10px;
}

.table-resize-handle {
  position: absolute;
  z-index: 2;
  top: 0;
  right: -7px;
  width: 14px;
  height: 100%;
  cursor: col-resize;
}

.table-resize-handle::after {
  content: "";
  position: absolute;
  top: 18%;
  bottom: 18%;
  left: 6px;
  width: 1px;
  background: #9fb4d1;
  opacity: 0.72;
}

@media (max-width: 980px) {
  .resizable-table.is-resized .sla-reference-row,
  .resizable-table.is-resized .clarification-table-row {
    grid-template-columns: 1fr !important;
  }

  .table-resize-handle {
    display: none;
  }

  .clarification-table {
    min-width: 0;
  }

  .clarification-table-row {
    grid-template-columns: 1fr;
  }
}

.request-client-db-field {
  position: relative;
  --request-client-picker-presented-offset: 23px;
}

.request-client-presented {
  display: block;
  min-height: 18px;
  color: #111827;
  font-size: 12px;
  line-height: 1.35;
}

.request-client-picker-results {
  position: absolute;
  z-index: 30;
  top: calc(100% + var(--request-client-picker-presented-offset));
  left: 0;
  right: 0;
  display: grid;
  gap: 1px;
  max-height: 150px;
  margin-top: 0;
  overflow-y: auto;
  padding: 1px;
  border: 1px solid #7fa9df;
  border-radius: 6px;
  background: #ffffff;
  outline: 1px solid #bfdbfe;
  box-shadow: 0 10px 20px rgba(40, 83, 135, 0.15);
}

.request-client-picker-results.is-single {
  max-height: none;
}

#requestDialog .request-client-picker-results .client-picker-option {
  justify-content: flex-start;
  min-height: 22px;
  padding: 1px 9px;
  border: 1px solid transparent;
  border-radius: 5px;
  color: #082a5f;
  background: #ffffff;
  box-shadow: none;
  font-size: 13px;
  font-weight: 650;
  line-height: 18px;
  text-align: left;
}

#requestDialog .request-client-picker-results .client-picker-option:hover,
#requestDialog .request-client-picker-results .client-picker-option:focus-visible {
  border-color: #3b82f6;
  background: #f8fbff;
}

#requestDialog .request-client-picker-results .client-picker-empty {
  min-height: 22px;
  padding: 2px 8px;
  border: 1px solid transparent;
  border-radius: 5px;
  color: #526173;
  background: #ffffff;
  font-size: 12px;
  line-height: 16px;
}

.request-client-picker-results[hidden] {
  display: none !important;
}

#requestDialog .request-client-control {
  z-index: 20;
}

.request-work-list-field input,
.request-car-field input {
  min-height: 40px;
}

.request-danger-zone {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #fecaca;
  border-radius: 12px;
  background: #fff7f7;
}

.request-danger-zone-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.request-danger-zone h3,
.request-danger-zone p {
  margin: 0;
}

.request-danger-zone h3 {
  color: #991b1b;
  font-size: 15px;
  font-weight: 600;
}

.request-danger-zone p {
  color: #7f1d1d;
  font-size: 12px;
}

.request-danger-reason-field {
  display: grid;
  gap: 5px;
}

.request-danger-reason-field textarea {
  min-height: 58px;
}

.request-danger-confirm-field {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: #7f1d1d;
  font-size: 12px;
}

.request-danger-confirm-field input {
  min-height: auto;
  margin-top: 2px;
}

.request-danger-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.request-danger-actions .danger-button {
  min-height: 38px;
  border: 1px solid #fecaca;
  color: #b42318;
  background: #ffffff;
}

.request-danger-actions .danger-button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.app-shell[data-side-pane-mode="calendar-request-queue"] .side-tabs,
#requestList {
  background: transparent;
}

/* P4.1 owner follow-up, 2026-06-23. */
.brand {
  min-height: 40px;
  height: 40px;
  align-content: center;
  grid-template-rows: 19px 19px;
  row-gap: 2px;
  padding-left: 50px;
}

.brand-logo {
  width: 40px !important;
  height: 40px !important;
}

.brand-logo svg {
  width: 40px !important;
  height: 40px !important;
}

.brand h1,
.brand p {
  min-height: 0;
  height: 19px;
  line-height: 1;
}

.brand h1 {
  font-size: 18px;
  line-height: 19px;
}

.brand p {
  font-size: 12px;
  line-height: 19px;
}

.display-controls .segmented[aria-label="Диапазон дней"] button {
  width: 28px;
  min-width: 28px;
  height: 28px;
  min-height: 28px;
  padding: 0;
  border-radius: 6px;
}

.display-controls .segmented[aria-label="Диапазон дней"] .range-bars {
  width: 18px;
  min-width: 18px;
  height: 16px;
  gap: 2px;
}

.display-controls .segmented[aria-label="Диапазон дней"] .range-bars > span {
  width: 2px !important;
  min-width: 2px !important;
  max-width: 2px !important;
  height: 13px;
}

.display-controls .segmented[aria-label="Диапазон дней"] .range-bars-3 > span {
  height: 12px;
}

.display-controls .segmented[aria-label="Диапазон дней"] .range-bars-5 > span {
  height: 14px;
}

.display-controls .segmented[aria-label="Диапазон дней"] .range-bars-7 > span {
  height: 16px;
}

.today-split-control {
  min-height: 42px;
  border: 1px solid #dfe8f1;
  border-radius: var(--radius-sm);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.today-split-control .text-button {
  min-height: 40px;
  border: 0;
  border-radius: 0;
  color: #26364a;
  background: #ffffff;
  box-shadow: none;
  transform: none;
}

.today-split-control .text-button:hover {
  color: #26364a;
  background: #f8fbfd;
}

.today-split-control .text-button:focus-visible {
  outline: 2px solid rgba(47, 111, 235, 0.28);
  outline-offset: -2px;
}

.today-split-control .today-picker-button {
  width: 42px;
  min-width: 42px;
  border-top-left-radius: calc(var(--radius-sm) - 1px);
  border-bottom-left-radius: calc(var(--radius-sm) - 1px);
  border-right: 1px solid #dfe8f1;
}

.today-split-control .today-button {
  min-width: 104px;
  border-top-right-radius: calc(var(--radius-sm) - 1px);
  border-bottom-right-radius: calc(var(--radius-sm) - 1px);
}

.request-danger-zone {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.request-danger-zone-head,
.request-danger-reason-field {
  grid-column: 1 / -1;
}

.request-danger-confirm-field {
  grid-column: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  margin: 0;
  color: #7f1d1d;
  line-height: 1.25;
  cursor: pointer;
}

.request-danger-confirm-field input[type="checkbox"] {
  appearance: auto;
  flex: 0 0 16px;
  width: 16px;
  min-width: 16px;
  height: 16px;
  min-height: 16px;
  margin: 0;
  padding: 0;
  cursor: pointer;
}

.request-danger-actions {
  grid-column: 2;
  justify-content: flex-end;
}

/* P4.1 owner correction lock, 2026-06-23. Keep these sizes exact. */
.brand {
  position: relative;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  grid-template-rows: 20px 20px;
  column-gap: 10px;
  row-gap: 0;
  align-items: center;
  align-content: center;
  min-height: 40px !important;
  height: 40px !important;
  padding-left: 0 !important;
}

.brand-logo {
  position: static !important;
  grid-column: 1;
  grid-row: 1 / span 2;
  align-self: center;
  justify-self: center;
  width: 40px !important;
  height: 40px !important;
}

.brand-logo svg {
  display: block;
  width: 40px !important;
  height: 40px !important;
}

.brand h1,
.brand p {
  grid-column: 2;
  display: block;
  min-height: 20px !important;
  height: 20px !important;
  line-height: 20px !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand h1 {
  grid-row: 1;
  font-size: 18px;
}

.brand p {
  grid-row: 2;
  font-size: 12px;
}

.module-tabs {
  gap: 6px;
}

.module-tabs button,
.module-tabs button.nav-debug-item,
.module-tabs button[data-main-view="errorReport"] {
  width: 100%;
  min-height: 43px !important;
  height: 43px !important;
  margin-top: 0 !important;
  padding: 0 10px !important;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  font-size: 13px;
}

.module-tabs button[data-main-view="errorReport"] > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
}

.display-controls .segmented[aria-label="Диапазон дней"] button,
.display-controls .segmented[aria-label="Плотность календаря"] button,
.mobile-display-panel .segmented[aria-label="Диапазон дней"] button,
.mobile-display-panel .segmented[aria-label="Плотность календаря"] button {
  width: 28px !important;
  min-width: 28px !important;
  max-width: 28px !important;
  height: 28px !important;
  min-height: 28px !important;
  max-height: 28px !important;
  padding: 0 !important;
  flex: 0 0 28px;
  border-radius: 6px;
}

.display-controls .segmented[aria-label="Плотность календаря"] .density-lines,
.mobile-display-panel .segmented[aria-label="Плотность календаря"] .density-lines {
  width: 18px;
  min-width: 18px;
  height: 16px;
}

.display-controls .segmented[aria-label="Плотность календаря"] .density-lines > span,
.mobile-display-panel .segmented[aria-label="Плотность календаря"] .density-lines > span {
  width: 16px;
  height: 2px !important;
  min-height: 2px !important;
  max-height: 2px !important;
}

.side-pane,
.side-pane .side-head,
.side-tabs,
#requestList {
  background: transparent;
}

.side-pane .side-head {
  border: 0;
  box-shadow: none;
}

/* P4.1 request modal correction lock, 2026-06-23. */
.nav-calendar-plus {
  display: inline-grid !important;
  place-items: center !important;
  align-self: center !important;
  justify-self: center !important;
  width: 24px !important;
  height: 24px !important;
  min-width: 24px !important;
  min-height: 24px !important;
  padding: 0 !important;
  line-height: 1 !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transition: opacity 120ms ease, color 120ms ease, background 120ms ease;
}

.module-tabs button[data-main-view="calendar"]:hover .nav-calendar-plus,
.module-tabs button[data-main-view="calendar"]:focus-within .nav-calendar-plus,
.module-tabs button[data-main-view="calendar"] .nav-calendar-plus:hover,
.module-tabs button[data-main-view="calendar"] .nav-calendar-plus:focus-visible {
  opacity: 1 !important;
  pointer-events: auto !important;
}

.nav-calendar-plus svg {
  display: block;
  width: 16px !important;
  height: 16px !important;
  stroke-width: 2;
}

.brand-logo svg {
  overflow: visible;
}

#requestDialog .request-dialog-head {
  min-height: 112px;
  gap: 14px;
  padding-top: 18px;
  padding-bottom: 16px;
  grid-template-columns: auto minmax(0, 1fr) minmax(310px, 340px);
}

#requestDialogTitle {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0;
  margin: 0;
  color: #102033;
  font-size: 21px;
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: 0;
}

.request-title-separator {
  margin: 0 8px;
  color: #7a8b9f;
  font-weight: 400;
}

.request-title-copy {
  width: auto;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  line-height: inherit;
  cursor: copy;
  text-decoration: none;
}

.request-title-copy:hover,
.request-title-copy:focus-visible {
  color: #073b91;
  outline: 0;
  text-decoration: none;
}

.request-copy-token {
  width: auto;
  min-height: 0;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  line-height: inherit;
  cursor: copy;
}

.appointment-manager-controls.has-manager-warning {
  border-color: rgba(185, 28, 28, 0.42) !important;
  box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.08);
}

.appointment-manager-warning {
  margin: 4px 0 0;
  padding: 8px 10px;
  border: 1px solid rgba(185, 28, 28, 0.22);
  border-radius: 6px;
  color: #b91c1c !important;
  background: #fff1f2;
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 1.28;
}

.appointment-manager-warning[hidden] {
  display: none !important;
}

.request-copy-token:hover,
.request-copy-token:focus-visible {
  outline: 0;
}

.request-copy-field-control {
  position: relative;
  display: block;
  min-width: 0;
}

#requestDialog .request-copy-field-control input {
  padding-right: 44px;
}

#requestDialog .request-copy-field-control textarea {
  padding-right: 44px;
}

#requestDialog .request-recognition-field-control input {
  padding-right: 112px;
}

#requestDialog .request-recognition-field-control.has-recognition-wide-actions input {
  padding-right: 146px;
}

.request-field-copy-button,
.request-field-normalize-button,
.request-field-error-button,
.request-field-clear-button {
  position: absolute;
  top: 50%;
  display: inline-grid;
  width: 24px;
  min-width: 24px;
  height: 24px;
  min-height: 24px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 6px;
  color: #526b92;
  background: transparent;
  transform: translateY(-50%);
}

.request-field-copy-button {
  right: 9px;
  cursor: copy;
}

.request-field-normalize-button {
  right: 43px;
  cursor: pointer;
}

.request-field-error-button {
  right: 77px;
  cursor: pointer;
}

.request-field-clear-button {
  right: 77px;
  cursor: pointer;
}

.request-field-clear-button.is-after-error {
  right: 111px;
  cursor: pointer;
}

.request-field-normalize-button:disabled {
  color: #9aa8b8;
  cursor: default;
}

.request-copy-field-control-textarea .request-field-copy-button {
  top: 9px;
  transform: none;
}

.request-field-clear-button[hidden],
.request-field-error-button[hidden] {
  display: none !important;
}

.request-field-copy-button svg,
.request-field-normalize-button svg,
.request-field-error-button svg,
.request-field-clear-button svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.request-field-copy-button:hover,
.request-field-copy-button:focus-visible,
.request-field-normalize-button:not(:disabled):hover,
.request-field-normalize-button:not(:disabled):focus-visible,
.request-field-error-button:hover,
.request-field-error-button:focus-visible,
.request-field-clear-button:hover,
.request-field-clear-button:focus-visible {
  outline: 0;
  color: #1f4f8f;
  background: transparent;
}

.copy-toast {
  position: fixed;
  right: 18px;
  bottom: 78px;
  z-index: 12010;
  min-width: 108px;
  min-height: 30px;
  padding: 6px 11px 7px;
  border: 1px solid rgba(255, 255, 255, 0.018);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.86);
  background:
    linear-gradient(
      180deg,
      rgba(18, 24, 34, 0.72) 0%,
      rgba(18, 24, 34, 0.84) 64%,
      rgba(7, 10, 16, 0.95) 100%
    );
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.014),
    0 0 18px 4px rgba(4, 10, 20, 0.34),
    0 0 72px 14px rgba(4, 10, 20, 0.28);
  backdrop-filter: blur(0.6px) saturate(1.04);
  -webkit-backdrop-filter: blur(0.6px) saturate(1.04);
  font-size: 12px;
  line-height: 1.15;
  font-weight: 400;
}

.secret-tool-overlay {
  position: fixed;
  inset: 0;
  z-index: 12020;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.34);
}

.secret-tool-dialog {
  width: min(900px, calc(100vw - 40px));
  max-height: min(760px, calc(100vh - 40px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid #dbe6f5;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
}

.secret-tool-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px 14px;
  border-bottom: 1px solid #dbe6f5;
}

.secret-tool-head .secret-tool-close-button {
  position: static;
  top: auto;
  right: auto;
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  border-radius: 6px;
}

.secret-tool-head h3,
.secret-tool-section h4 {
  margin: 0;
  color: #10213a;
}

.secret-tool-head h3 {
  font-size: 20px;
}

.secret-tool-head p {
  margin: 4px 0 0;
  color: #66758c;
  font-size: 13px;
}

.secret-tool-body {
  min-height: 0;
  overflow: auto;
  padding: 16px 18px;
  scrollbar-width: none;
}

.secret-tool-body::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.secret-tool-section + .secret-tool-section {
  margin-top: 18px;
}

.secret-tool-section h4 {
  margin-bottom: 10px;
  font-size: 15px;
}

.secret-field-table,
.secret-relations-list {
  display: grid;
  gap: 6px;
}

.secret-link-grid {
  display: grid;
  gap: 8px;
}

.secret-link-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  align-items: end;
  gap: 8px;
  padding: 10px;
  border: 1px solid #dbe6f5;
  border-radius: 6px;
  background: #f8fafc;
}

.secret-link-form label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: #66758c;
  font-size: 13px;
}

.secret-link-form input {
  width: 100%;
  min-height: 36px;
  border: 1px solid #cbd7e4;
  border-radius: 6px;
  padding: 7px 9px;
  background: #ffffff;
  color: #10213a;
}

.secret-link-form .form-message {
  grid-column: 1 / -1;
  min-height: 18px;
  margin: 0;
}

.secret-field-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.9fr) minmax(170px, 1fr) minmax(220px, 1.4fr);
  gap: 10px;
  align-items: start;
  padding: 8px 10px;
  border: 1px solid #dbe6f5;
  border-radius: 6px;
  background: #f8fafc;
  font-size: 13px;
}

.secret-field-name {
  color: #10213a;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  overflow-wrap: anywhere;
}

.secret-field-label {
  color: #66758c;
}

.secret-field-value {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: start;
  color: #10213a;
  overflow-wrap: anywhere;
}

.secret-copy-button {
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #2457a6;
  cursor: copy;
}

.secret-copy-button svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.secret-copy-button:hover,
.secret-copy-button:focus-visible {
  background: #eff6ff;
  outline: none;
}

.secret-relation-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(260px, 1.2fr);
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid #dbe6f5;
  border-radius: 6px;
  background: #f8fafc;
  font-size: 13px;
}

.secret-relation-row p {
  margin: 3px 0 0;
  color: #66758c;
}

.secret-relation-row span {
  color: #66758c;
}

.secret-delete-warning {
  padding: 12px 14px;
  border: 1px solid #fecaca;
  border-radius: 6px;
  background: #fff1f2;
  color: #991b1b;
}

.secret-delete-warning p {
  margin: 0;
}

.secret-delete-warning p + p {
  margin-top: 6px;
}

.secret-tool-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 18px 16px;
  border-top: 1px solid #dbe6f5;
}

.secret-tool-actions[hidden] {
  display: none;
}

@media (max-width: 760px) {
  .secret-link-form,
  .secret-field-row,
  .secret-relation-row {
    grid-template-columns: 1fr;
  }
}

#requestDialogSubtitle,
#requestDialogMeta {
  margin-top: 5px;
  line-height: 1.35;
}

.request-working-status {
  margin-top: 6px;
  line-height: 1.35;
}

.request-client-control {
  position: relative;
  display: block;
  min-width: 0;
}

#requestDialog .request-client-control input {
  padding-right: 58px;
}

#requestDialog .request-client-control.has-create-action input {
  padding-right: 104px;
}

.request-client-control::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 34px;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  border: 2px solid rgba(82, 107, 146, 0.22);
  border-top-color: #2f6feb;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
}

.request-client-control.is-searching::after {
  opacity: 1;
  animation: request-client-search-spin 720ms linear infinite;
}

.request-client-control.has-create-action::after {
  right: 88px;
}

@keyframes request-client-search-spin {
  from {
    transform: translateY(-50%) rotate(0deg);
  }

  to {
    transform: translateY(-50%) rotate(360deg);
  }
}

.request-client-clear-button {
  position: absolute;
  top: 50%;
  right: 5px;
  display: inline-grid;
  place-items: center;
  width: 24px;
  min-width: 24px;
  height: 24px;
  min-height: 24px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  color: #526b92;
  background: transparent;
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
  transform: translateY(-50%);
}

.request-client-clear-button:hover,
.request-client-clear-button:focus-visible {
  color: #073b91;
  background: #edf5ff;
  outline: 0;
}

.request-client-create-button {
  position: absolute;
  top: 50%;
  right: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 24px;
  min-height: 24px;
  padding: 0 10px;
  border: 1px solid #b8c7dd;
  border-radius: 7px;
  color: #073b91;
  background: #f5f9ff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  transform: translateY(-50%);
}

.request-client-create-button:hover,
.request-client-create-button:focus-visible {
  border-color: #073b91;
  background: #edf5ff;
  outline: 0;
}

.request-client-clear-button[hidden],
.request-client-create-button[hidden] {
  display: none !important;
}

#requestDialog .request-client-db-field input,
#requestDialog input[name="raw_car"],
#requestDialog input[name="raw_work_list"] {
  min-height: 34px !important;
  font-size: 13px !important;
}

#requestDialog .request-work-list-field {
  grid-column: 1 / -1;
}

#requestDialog .request-comment-field textarea {
  min-height: 88px !important;
}

.request-final-toggle-button {
  grid-column: 1 / -1;
  justify-self: end;
  width: auto;
  min-width: 132px;
  border-color: #cbd5e1;
  color: #334155;
  background: #f8fafc;
}

.request-final-toggle-button.is-active {
  border-color: #fecaca;
  color: #991b1b;
  background: #fff7f7;
}

.request-danger-zone[hidden] {
  display: none !important;
}

.request-danger-reason-field input {
  min-height: 34px;
}

/* P4.1 owner corrections: request list cards and request modal, 2026-06-23. */
#allRequestList .request-card-head {
  justify-content: flex-end;
}

#allRequestList .request-card-head > span:first-child {
  display: none;
}

.request-card-head-badges {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
  margin-left: auto;
}

#allRequestList .request-card-list-badges,
#allRequestList .request-attention-list {
  display: none !important;
}

#requestDialog .form-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  align-items: start;
  gap: 14px 28px;
}

#requestDialog.dialog {
  overflow: hidden !important;
  overflow-y: hidden !important;
  border: 1px solid rgba(216, 227, 238, 0.95);
  background: #ffffff;
}

#requestDialog .request-car-field,
#requestDialog .request-client-comment-field {
  grid-column: 1;
}

#requestDialog .request-client-db-field,
#requestDialog .request-manager-note-field {
  grid-column: 2;
}

#requestDialog .request-car-field,
#requestDialog .request-work-list-field,
#requestDialog .request-client-db-field,
#requestDialog .request-client-comment-field,
#requestDialog .request-manager-note-field {
  align-self: start;
}

#requestDialog .request-car-field,
#requestDialog .request-client-db-field {
  grid-row: 1;
}

#requestDialog .request-work-list-field {
  grid-column: 1 / -1;
  grid-row: 2;
  gap: 4px;
  line-height: inherit;
  margin-top: -24px;
  margin-bottom: 0;
}

#requestDialog .request-client-comment-field,
#requestDialog .request-manager-note-field {
  grid-row: 3;
}

#requestDialog .request-client-control {
  height: 34px;
}

#requestDialog .request-client-control input,
#requestDialog input[name="raw_car"],
#requestDialog input[name="raw_work_list"],
#requestDialog input[name="supplier_part_info"] {
  height: 34px !important;
  min-height: 34px !important;
  max-height: 34px;
  padding-top: 5px;
  padding-bottom: 5px;
  line-height: 20px;
}

#requestDialog .request-client-db-field input {
  padding-right: 34px;
}

#requestDialog .request-comment-field textarea {
  height: 88px;
  min-height: 88px !important;
  resize: vertical;
}

#requestDialog .request-advanced-panel {
  grid-column: 1 / -1;
  border-color: #c7d4e6;
  background: #e8eef6;
}

#requestDialog .dialog-close-button {
  width: 38px;
  min-width: 38px;
  height: 38px;
  min-height: 38px;
  border-radius: 8px;
}

#requestDialog .request-advanced-toggle {
  height: 38px;
  min-height: 38px;
  padding: 0 12px;
}

#requestDialog .request-lifecycle-actions {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  align-items: stretch;
}

#requestDialog .request-lifecycle-actions button {
  position: relative;
  min-height: 48px;
  justify-content: flex-start;
  gap: 8px;
  padding-right: 30px;
}

#requestDialog .request-lifecycle-actions [data-request-lifecycle-action="in_work"] {
  order: 1;
}

#requestDialog .request-lifecycle-actions [data-request-lifecycle-action="callback"] {
  order: 2;
}

#requestDialog .request-lifecycle-actions [data-request-lifecycle-action="callback_later"] {
  order: 3;
}

#requestDialog .request-lifecycle-actions [data-request-lifecycle-action="make_estimate"] {
  order: 4;
}

#requestDialog .request-lifecycle-actions [data-request-lifecycle-action="needs_data"] {
  order: 5;
}

#requestDialog .request-lifecycle-actions [data-request-lifecycle-action="data_received"] {
  order: 6;
}

#requestDialog .request-lifecycle-actions [data-request-lifecycle-action="data_missing"] {
  order: 7;
}

#requestDialog .request-lifecycle-actions [data-request-lifecycle-action="needs_attention"] {
  order: 8;
}

#requestDialog .request-lifecycle-actions [data-request-lifecycle-action="part_price_requested"] {
  order: 9;
}

#requestDialog .request-lifecycle-actions [data-request-lifecycle-action="part_price_ready"] {
  order: 10;
}

#requestDialog .request-lifecycle-actions [data-request-lifecycle-action="part_agreed"] {
  order: 11;
}

#requestDialog .request-lifecycle-actions [data-request-lifecycle-action="part_ordered"] {
  order: 12;
}

#requestDialog .request-lifecycle-actions [data-request-lifecycle-action="part_arrived"] {
  order: 13;
}

#requestDialog .request-final-toggle-button {
  grid-column: auto;
  justify-self: stretch;
  order: 14;
  min-width: 0;
}

#requestDialog .request-lifecycle-actions [data-request-lifecycle-action="in_work"],
#requestDialog .request-lifecycle-actions [data-request-lifecycle-action="callback"],
#requestDialog .request-lifecycle-actions [data-request-lifecycle-action="callback_later"],
#requestDialog .request-lifecycle-actions [data-request-lifecycle-action="make_estimate"] {
  border-color: #bfdbfe;
  color: #1d4ed8;
  background: #eff6ff;
}

#requestDialog .request-lifecycle-actions [data-request-lifecycle-action="needs_data"],
#requestDialog .request-lifecycle-actions [data-request-lifecycle-action="data_received"],
#requestDialog .request-lifecycle-actions [data-request-lifecycle-action="data_missing"] {
  border-color: #ddd6fe;
  color: #6d28d9;
  background: #f5f3ff;
}

#requestDialog .request-lifecycle-actions [data-request-lifecycle-action="part_price_requested"],
#requestDialog .request-lifecycle-actions [data-request-lifecycle-action="part_price_ready"],
#requestDialog .request-lifecycle-actions [data-request-lifecycle-action="part_agreed"],
#requestDialog .request-lifecycle-actions [data-request-lifecycle-action="part_ordered"],
#requestDialog .request-lifecycle-actions [data-request-lifecycle-action="part_arrived"] {
  border-color: #fed7aa;
  color: #c2410c;
  background: #fff7ed;
}

#requestDialog .request-lifecycle-actions [data-request-lifecycle-action="needs_attention"],
#requestDialog .request-final-toggle-button,
#requestDialog .request-final-toggle-button.is-active {
  border-color: #fecaca;
  color: #991b1b;
  background: #fff1f2;
}

.request-action-mark {
  position: absolute;
  top: 50%;
  right: 10px;
  width: 10px;
  height: 22px;
  border-radius: 999px;
  transform: translateY(-50%);
}

.request-action-mark.is-positive {
  background: #16a34a;
}

.request-action-mark.is-negative {
  background: #dc2626;
}

:root[data-modal-ctrl-preview="on"] .modal-layer[data-active-dialog="request"],
:root[data-modal-ctrl-preview="on"] .modal-layer[data-active-dialog="appointment"] {
  background: transparent;
  backdrop-filter: none;
  pointer-events: auto;
}

:root[data-modal-ctrl-preview="on"] #requestDialog.dialog,
:root[data-modal-ctrl-preview="on"] #appointmentDialog.dialog {
  opacity: 0 !important;
  pointer-events: none;
  transition: none !important;
}

#requestDialog.dialog,
#appointmentDialog.dialog {
  transition: opacity 120ms ease;
}

:root[data-calendar-ctrl-preview="on"] {
  --slot-height: clamp(6px, calc((100vh - 330px) / 60), 10px);
}

:root[data-calendar-ctrl-preview="on"] .fc .fc-timegrid-slot {
  height: var(--slot-height) !important;
}

:root[data-calendar-ctrl-preview="on"] .fc .fc-scroller,
:root[data-calendar-ctrl-preview="on"] .fc .fc-scroller-liquid-absolute {
  overflow: hidden !important;
}

:root[data-calendar-ctrl-preview="on"] .fc .fc-timegrid-slot-lane,
:root[data-calendar-ctrl-preview="on"] .fc .fc-timegrid-slot-label {
  height: var(--slot-height) !important;
  min-height: var(--slot-height) !important;
  line-height: 1 !important;
}

:root[data-calendar-ctrl-preview="on"] .fc .fc-timegrid-slot-label-frame {
  min-height: 0 !important;
  line-height: 1 !important;
}

:root[data-calendar-ctrl-preview="on"] .fc-event.calendar-busy-preview-event {
  padding: 0 !important;
  border: 0 !important;
  border-radius: 3px;
  box-shadow: none !important;
  filter: none !important;
  opacity: 0.82;
}

:root[data-calendar-ctrl-preview="on"] .fc-event.calendar-busy-preview-event:hover {
  box-shadow: none !important;
  filter: none !important;
}

:root[data-calendar-ctrl-preview="on"] .fc-event.calendar-busy-preview-event .fc-event-main,
:root[data-calendar-ctrl-preview="on"] .fc-event.calendar-busy-preview-event .fc-event-main-frame,
:root[data-calendar-ctrl-preview="on"] .fc-event.calendar-busy-preview-event .fc-event-title-container,
:root[data-calendar-ctrl-preview="on"] .fc-event.calendar-busy-preview-event .fc-event-title {
  width: 100%;
  height: 100%;
  min-height: 100%;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden;
}

:root[data-calendar-ctrl-preview="on"] .calendar-event-busy-preview {
  display: block;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  min-height: 100%;
  padding: 0 !important;
  border-radius: inherit;
  background: var(--appointment-accent) !important;
}

/* P4.1 owner compactness correction, 2026-06-23.
   Calendar meta and side request badges must not compete with card text. */
.fc-event.service-event {
  overflow: hidden;
}

.calendar-event-content {
  padding-bottom: 18px;
}

.calendar-event-meta,
:root[data-calendar-details-mode="on"] .calendar-event-meta {
  right: auto;
  bottom: 0;
  left: 0;
  display: inline-flex;
  width: auto;
  max-width: min(82px, 52%);
  min-height: 18px;
  height: 18px;
  align-items: center;
  gap: 3px;
  padding: 2px 7px 2px 5px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-bottom: 0;
  border-left: 0;
  border-radius: 0 6px 0 7px;
  background: rgba(255, 255, 255, 0.70);
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 100%, 0 100%);
  box-shadow: none;
  filter: none;
  backdrop-filter: none;
}

:root[data-calendar-details-mode="on"] .calendar-event-content {
  padding-bottom: 18px;
}

.calendar-status-dot,
:root[data-calendar-details-mode="on"] .calendar-status-dot {
  width: 6px;
  height: 6px;
  border-width: 1px;
  box-shadow: none;
}

.calendar-status-dot.status-completed,
.calendar-status-dot.status-needs-review,
.calendar-status-dot.status-cancelled,
.calendar-status-dot.status-no-show,
.calendar-status-dot.status-block,
:root[data-calendar-details-mode="on"] .calendar-status-dot.status-completed,
:root[data-calendar-details-mode="on"] .calendar-status-dot.status-needs-review {
  width: 7px;
  height: 7px;
  box-shadow: none;
}

.calendar-event-meta .appointment-service-icons,
:root[data-calendar-details-mode="on"] .calendar-event-meta .appointment-service-icons {
  flex: 0 1 auto;
  min-height: 14px;
  max-width: calc(100% - 10px);
  gap: 2px;
  overflow: hidden;
}

.calendar-event-meta .service-mini-icon,
:root[data-calendar-details-mode="on"] .calendar-event-meta .service-mini-icon {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  border-radius: 0;
}

.calendar-event-meta .service-mini-icon svg,
:root[data-calendar-details-mode="on"] .calendar-event-meta .service-mini-icon svg {
  width: 12px;
  height: 12px;
  stroke-width: 1.35;
}

#requestDialog .request-dialog-head-tools {
  display: grid;
  grid-template-columns: auto auto;
  grid-template-rows: 40px minmax(0, auto);
  align-content: start;
  align-items: center;
  justify-content: end;
  gap: 8px;
  min-width: 310px;
}

#requestDialog .request-dialog-utility-row {
  grid-column: 1 / -1;
  grid-row: 1;
  justify-self: end;
}

#requestDialog #requestDialogClientBadge {
  grid-column: 1;
  grid-row: 2;
  justify-self: end;
}

#requestDialog #requestDialogVirtualMarker {
  grid-column: 2;
  grid-row: 2;
  justify-self: end;
}

#requestDialog .request-virtual-marker-badge {
  width: max-content;
  min-height: 30px;
  height: 30px;
  padding: 5px 11px;
  font-size: 13px;
  line-height: 1;
  white-space: nowrap;
  box-shadow: none;
}

#requestDialog .request-client-state-badge {
  width: max-content;
  min-height: 30px;
  height: 30px;
  padding: 5px 9px;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}

/* P4.1 owner corrections: login, error report and calendar selection, 2026-06-23. */
.login-brand-row {
  align-items: center;
}

.login-brand-row > div:last-child {
  display: grid;
  align-content: center;
  height: 40px;
  min-height: 40px;
}

.login-brand-row h1 {
  font-size: 18px;
  line-height: 20px;
}

.login-brand-row p {
  font-size: 12px;
  line-height: 20px;
}

.login-copyright {
  position: fixed;
  right: 18px;
  bottom: 12px;
  margin: 0;
  color: rgba(64, 83, 106, 0.46);
  font-size: 11px;
  line-height: 1.2;
  pointer-events: none;
}

.login-copyright a {
  color: inherit;
  text-decoration: none;
  pointer-events: auto;
}

#errorReportFileStatus strong {
  font-weight: 600;
}

.fc .fc-timegrid-slot-lane[data-slot-start]::after {
  content: none;
  display: none;
}

#calendar {
  position: relative;
}

.calendar-slot-hover-label {
  position: absolute;
  z-index: 6;
  padding: 2px 5px;
  border-radius: 5px;
  color: rgba(6, 27, 69, 0.52);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 4px 10px rgba(6, 27, 69, 0.06);
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  pointer-events: none;
  transform: translateY(-50%);
}

.calendar-ctrl-selection-preview {
  position: absolute;
  z-index: 5;
  box-sizing: border-box;
  pointer-events: none;
  border: 1px solid rgba(14, 116, 144, 0.72);
  border-radius: 6px;
  background:
    linear-gradient(135deg, rgba(14, 116, 144, 0.24), rgba(45, 212, 191, 0.12)),
    rgba(236, 254, 255, 0.42);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.60), 0 8px 18px rgba(14, 116, 144, 0.16);
}

.calendar-ctrl-selection-preview.is-invalid {
  border-color: rgba(220, 38, 38, 0.72);
  background:
    linear-gradient(135deg, rgba(220, 38, 38, 0.22), rgba(251, 113, 133, 0.10)),
    rgba(255, 241, 242, 0.48);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.60), 0 8px 18px rgba(220, 38, 38, 0.14);
}

/* P4.1 request lifecycle tone: source background stays, left border follows lifecycle. */
.request-card[data-request-tone] {
  border-left-color: var(--request-lifecycle-border, var(--warning)) !important;
}

.request-card[data-request-tone]:hover,
.request-card[data-request-tone]:focus-visible {
  border-left-color: var(--request-lifecycle-border, var(--warning)) !important;
}

/* P4.1 request card visual contract: one entity, same typography/badges/icons everywhere. */
#allRequestList .request-card,
#requestList .request-card,
.request-card {
  --request-card-padding-y: 18px;
  --request-card-padding-x: 22px;
  display: grid;
  grid-template-areas:
    "title badges"
    "created badges"
    "facts facts"
    "marker marker"
    "quick quick"
    "meta meta";
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px 16px;
  min-width: 0;
  min-height: 132px;
  padding: var(--request-card-padding-y) var(--request-card-padding-x) var(--request-card-padding-y) calc(var(--request-card-padding-x) + 2px);
  border: 1px solid #d8e3ee;
  border-left-width: 6px;
  border-radius: 8px;
  color: #061b45;
  background: #ffffff;
  box-shadow: var(--shadow-card);
}

.request-card-main {
  display: contents;
}

.request-card-meta-badges {
  grid-area: badges;
  display: flex;
  width: max-content;
  max-width: 160px;
  min-width: 0;
  flex-direction: column;
  align-items: flex-end;
  justify-self: end;
  gap: 8px;
}

.request-card > .request-quick-actions {
  grid-area: quick;
}

.request-card > .appointment-meta {
  grid-area: meta;
}

.request-card-title {
  grid-area: title;
  min-width: 0;
  overflow: hidden;
  color: #061b45;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.request-card-created {
  grid-area: created;
  min-width: 0;
  overflow: hidden;
  color: #40536a;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.request-contact-line {
  grid-area: facts;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 14px;
  min-width: 0;
  min-height: 22px;
  overflow: hidden;
  color: #526b92;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
}

.request-contact-line > span {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 7px;
}

.request-contact-phone {
  flex: 0 1 auto;
  max-width: 54%;
}

.request-contact-car,
.request-contact-empty {
  flex: 1 1 0;
  overflow: hidden;
}

.request-contact-icon {
  display: inline-grid;
  width: 18px;
  height: 18px;
  place-items: center;
  flex: 0 0 18px;
  color: #073b91;
}

.request-contact-icon svg,
.request-contact-line svg {
  display: block;
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.request-contact-text {
  min-width: 0;
  overflow: hidden;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.request-card-marker-row {
  grid-area: marker;
  display: flex;
  min-height: 32px;
  min-width: 0;
  align-items: center;
  justify-content: flex-start;
  margin-top: 2px;
}

.request-card-meta-badges .request-source-badge,
.request-card-meta-badges .request-client-state-badge,
.request-card-marker-row .request-reaction-badge,
.request-source-badge,
.request-client-state-badge,
.request-reaction-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  max-width: 100%;
  min-height: 32px;
  padding: 5px 10px;
  border-width: 1px;
  border-style: solid;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.request-card-marker-row .request-reaction-badge {
  padding-inline: 12px;
}

.request-source-badge .request-source-icon,
.request-client-state-badge .svg-icon {
  display: inline-grid;
  width: 18px;
  height: 18px;
  place-items: center;
  flex: 0 0 18px;
}

.request-source-badge svg,
.request-client-state-badge svg {
  display: block;
  width: 18px;
  height: 18px;
  stroke-width: 1.9;
}

.request-source-icon-text {
  width: 18px;
  color: currentColor;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  text-align: center;
}

#requestList .request-card-created,
#allRequestList .request-card-created {
  color: #40536a;
}

#requestList .request-card-head,
#requestList .request-card-side-source,
#requestList .request-card-side-client-state,
#requestList .request-card-detail-slot,
#requestList .client-link-badge,
#requestList .request-lifecycle-chips,
#requestList .request-attention-list,
#requestList .request-quick-actions {
  display: none;
}

#requestList .request-card-meta-badges,
#requestList .request-card-marker-row {
  visibility: visible;
}

@container request-card (max-width: 520px) {
  #allRequestList .request-card,
  #requestList .request-card,
  .request-card {
    grid-template-areas:
      "badges"
      "title"
      "created"
      "facts"
      "marker"
      "quick"
      "meta";
    grid-template-columns: minmax(0, 1fr);
  }

  .request-card-meta-badges {
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
  }

  .request-contact-phone {
    max-width: 58%;
  }
}

/* Final side request compact lock. Must stay after request card container rules. */
#requestList .request-card {
  --request-card-padding-y: 12px;
  --request-card-padding-x: 16px;
  position: relative;
  grid-template-areas:
    "title badges"
    "created badges"
    "facts facts";
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px 10px;
  min-height: 118px;
  padding: 12px 16px 34px 18px;
}

#requestList .request-card-meta-badges {
  grid-area: badges;
  display: flex;
  width: auto;
  max-width: 150px;
  min-width: 0;
  flex-direction: row-reverse;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  justify-self: end;
  gap: 6px;
}

#requestList .request-card-meta-badges .request-source-badge {
  width: 24px;
  min-width: 24px;
  max-width: 24px;
  height: 24px;
  min-height: 24px;
  padding: 0;
  gap: 0;
}

#requestList .request-card-meta-badges .request-source-badge > span:not(.request-source-icon):not(.request-source-icon-text) {
  display: none;
}

#requestList .request-source-badge .request-source-icon {
  width: 14px;
  height: 14px;
  flex-basis: 14px;
}

#requestList .request-source-badge svg {
  width: 14px;
  height: 14px;
  stroke-width: 1.8;
}

#requestList .request-source-icon-text {
  width: 14px;
  font-size: 8.5px;
}

#requestList .request-card-meta-badges .request-client-state-badge {
  min-height: 24px;
  max-width: 112px;
  padding: 3px 8px;
  gap: 4px;
  overflow: hidden;
  font-size: 11px;
}

#requestList .request-card-meta-badges .request-client-state-badge svg {
  width: 13px;
  height: 13px;
}

#requestList .request-card-marker-row {
  position: absolute;
  right: 16px;
  bottom: 8px;
  left: 18px;
  min-height: 24px;
  margin-top: 0;
  pointer-events: none;
}

#requestList .request-card-marker-row .request-reaction-badge {
  min-height: 24px;
  max-width: 100%;
  padding: 3px 9px;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
}

/* P4.1 owner correction: event meta is an overlay, and side requests are denser. */
.fc .fc-timegrid-event,
.fc-event.service-event {
  box-sizing: border-box;
  min-height: 0;
}

.fc-event.service-event {
  overflow: hidden;
}

.fc .fc-timegrid-event-harness > .fc-timegrid-event,
.fc .fc-timegrid-event-harness > .fc-timegrid-event.fc-event,
.fc .fc-timegrid-event-harness > .fc-timegrid-event.service-event {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  height: auto;
  min-height: 0;
  max-height: none;
}

.fc-event.service-event .fc-event-main,
.fc-event.service-event .fc-event-main-frame,
.fc-event.service-event .fc-event-title-container,
.fc-event.service-event .fc-event-title {
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.calendar-event-content,
.fc-event.service-event .calendar-event-content,
:root[data-calendar-details-mode="on"] .calendar-event-content,
:root[data-calendar-details-mode="off"] .calendar-event-content,
:root[data-calendar-details-mode="on"] .fc-event.service-event .calendar-event-content,
:root[data-calendar-details-mode="off"] .fc-event.service-event .calendar-event-content {
  box-sizing: border-box;
  position: static;
  min-height: 0;
  height: 100%;
  padding-bottom: 0;
  overflow: hidden;
}

.calendar-event-meta,
:root[data-calendar-details-mode="on"] .calendar-event-meta {
  position: absolute;
  z-index: 2;
  bottom: 0;
  left: 0;
  height: 18px;
  min-height: 18px;
  max-height: 18px;
  pointer-events: none;
}

#requestList .request-card {
  --request-card-padding-y: 10px;
  --request-card-padding-x: 12px;
  gap: 4px 8px;
  min-height: 104px;
  padding: 10px 12px 28px 14px;
  color: #06111f;
}

#requestList .request-card-title {
  color: #06111f;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.12;
}

#requestList .request-card-created {
  color: #102033;
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1.12;
}

#requestList .request-contact-line {
  min-height: 18px;
  gap: 8px;
  color: #102033;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.12;
}

#requestList .request-contact-line > span {
  gap: 5px;
}

#requestList .request-contact-icon {
  width: 16px;
  height: 16px;
  flex-basis: 16px;
}

#requestList .request-contact-icon svg,
#requestList .request-contact-line svg,
#requestList .request-source-badge svg,
#requestList .request-client-state-badge svg {
  width: 16px;
  height: 16px;
  stroke-width: 1.2;
}

#requestList .request-source-badge .request-source-icon,
#requestList .request-client-state-badge .svg-icon {
  width: 16px;
  height: 16px;
  flex-basis: 16px;
}

#requestList .request-source-icon-text {
  width: 16px;
  font-size: 9px;
}

#requestList .request-card-meta-badges {
  max-width: 160px;
  gap: 5px;
}

#requestList .request-card-meta-badges .request-source-badge,
#requestList .request-card-meta-badges .request-client-state-badge {
  min-height: 24px;
  border: 0;
  box-shadow: none;
  font-size: 12px;
  font-weight: 400;
}

#requestList .request-card-meta-badges .request-source-badge {
  width: 24px;
  min-width: 24px;
  max-width: 24px;
}

#requestList .request-card-meta-badges .request-client-state-badge {
  max-width: 122px;
  padding: 3px 8px;
}

.request-client-state-badge.is-linked {
  border-color: transparent;
  color: #14532d;
  background: #dcfce7;
}

#requestList .request-card-meta-badges .request-client-state-badge.is-linked {
  border: 0;
  color: #14532d;
  background: #dcfce7;
}

#requestList .request-card-marker-row {
  right: 12px;
  bottom: 6px;
  left: 14px;
  min-height: 22px;
}

#requestList .request-card-marker-row .request-reaction-badge {
  min-height: 22px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 400;
}

#requestList .request-card-marker-row .request-reaction-badge.is-new-attention {
  border-color: rgba(185, 28, 28, 0.34);
  color: #b91c1c;
  background: #fff1f1;
}

/* P4.1 owner filters/toggles/right queue correction, 2026-06-23. */
.big-workspace-panel .filter-bar,
.main-list > .filter-bar,
#allRequestList > .filter-bar,
#allAppointmentList > .filter-bar,
#clientList > .filter-bar,
#auditList > .filter-bar {
  border-color: #9fb4d1;
  border-width: 1px;
  background: rgba(255, 255, 255, 0.95);
}

#allRequestList > .filter-bar {
  position: sticky;
  top: 0;
  z-index: 5;
  min-height: 64px;
  align-content: center;
  align-items: flex-end;
  overflow: visible;
  box-shadow: 0 8px 14px rgba(245, 247, 250, 0.86);
}

#allRequestList .filter-summary {
  flex-basis: auto;
  margin-left: auto;
}

.list-icon-button {
  display: inline-grid;
  width: 34px;
  min-width: 34px;
  min-height: 34px;
  padding: 0;
  place-items: center;
}

.list-icon-button svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

@media (min-width: 1180px) {
  #allRequestList > .filter-bar {
    display: grid;
    grid-template-columns:
      minmax(150px, 1fr)
      minmax(86px, 0.45fr)
      minmax(108px, 0.52fr)
      minmax(170px, 0.78fr)
      34px
      34px
      auto
      minmax(112px, auto);
    gap: 8px;
  }

  #allRequestList > .filter-bar label,
  #allRequestList > .filter-bar .request-filter-group,
  #allRequestList > .filter-bar .request-filter-appointment,
  #allRequestList > .filter-bar .request-filter-source,
  #allRequestList > .filter-bar .request-filter-id,
  #allRequestList > .filter-bar .request-filter-search {
    min-width: 0;
    max-width: none;
    flex: 0 1 auto;
  }

  #allRequestList > .filter-bar .request-filter-appointment {
    max-width: 112px;
  }

  #allRequestList > .filter-bar .request-filter-source {
    max-width: 138px;
  }

  #allRequestList > .filter-bar .request-filter-id {
    max-width: 132px;
  }

  #allRequestList > .filter-bar .request-filter-search {
    min-width: 0;
    max-width: 196px;
  }

  #allRequestList > .filter-bar .filter-summary {
    justify-self: end;
    align-self: center;
    margin-left: 0;
  }
}

.nav-detail-control {
  gap: 5px;
}

.nav-detail-control > span {
  font-size: 10.5px;
}

.detail-toggle {
  width: 30px;
  height: 16px;
  min-height: 16px;
  border-color: rgba(255, 255, 255, 0.38);
}

.detail-toggle span {
  top: 2px;
  left: 2px;
  width: 10px;
  height: 10px;
}

.detail-toggle.is-active {
  border-color: rgba(147, 197, 253, 0.92);
  background: #38bdf8;
  box-shadow: 0 7px 14px rgba(0, 18, 54, 0.18), inset 0 1px 2px rgba(255, 255, 255, 0.22);
}

#calendarDetailsToggleButton.detail-toggle.is-active {
  border-color: rgba(147, 197, 253, 0.92) !important;
  background: #38bdf8 !important;
}

.detail-toggle.is-active span {
  transform: translateX(14px);
  background: #ffffff;
}

#requestList .request-card {
  grid-template-areas:
    "title badges"
    "facts facts"
    "footer footer";
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto minmax(26px, 1fr) auto;
  align-items: start;
  gap: 13px 10px;
  min-height: 122px;
  padding: 12px 12px 10px 14px;
}

#requestList .request-card-title {
  font-weight: 400;
}

#requestList .request-contact-line {
  align-self: center;
  min-height: 22px;
  gap: 10px;
}

#requestList .request-contact-phone {
  max-width: 48%;
}

#requestList .request-card-footer,
#allRequestList .request-card-footer {
  grid-area: footer;
  display: flex;
  min-width: 0;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

#requestList .request-card-footer {
  position: relative;
  height: 22px;
  min-height: 22px;
  overflow: visible;
}

#requestList .request-card-created {
  flex: 0 0 auto;
  color: #102033;
  font-size: 12px;
  font-weight: 100;
  line-height: 1.1;
  text-align: right;
}

#requestList .request-card-marker-row {
  position: static;
  flex: 1 1 auto;
  min-height: 22px;
  min-width: 0;
  margin-top: 0;
  justify-content: flex-start;
  pointer-events: none;
}

#requestList .request-card-marker-row .request-reaction-badge {
  max-width: 100%;
  min-height: 22px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* P4.1 owner request modal/list correction, 2026-06-23. */
#allRequestList .request-card {
  grid-template-areas:
    "title badges"
    "facts facts"
    "footer footer";
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto minmax(26px, 1fr) auto;
  align-items: start;
  gap: 13px 10px;
  height: 122px;
  min-height: 122px;
  max-height: 122px;
  overflow: hidden;
  padding: 12px 12px 10px 14px;
  color: #06111f;
}

#allRequestList .request-card-title {
  color: #06111f;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.12;
}

#allRequestList .request-card-created {
  flex: 0 0 auto;
  color: #102033;
  font-size: 12px;
  font-weight: 100;
  line-height: 1.1;
  text-align: right;
}

#allRequestList .request-contact-line {
  align-self: center;
  min-height: 22px;
  gap: 10px;
  color: #102033;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.12;
}

#allRequestList .request-contact-line > span {
  gap: 5px;
}

#allRequestList .request-contact-phone {
  max-width: 48%;
}

#allRequestList .request-contact-icon {
  width: 16px;
  height: 16px;
  flex-basis: 16px;
}

#allRequestList .request-contact-icon svg,
#allRequestList .request-contact-line svg,
#allRequestList .request-source-badge svg,
#allRequestList .request-client-state-badge svg {
  width: 16px;
  height: 16px;
  stroke-width: 1.2;
}

#allRequestList .request-source-badge .request-source-icon,
#allRequestList .request-client-state-badge .svg-icon {
  width: 16px;
  height: 16px;
  flex-basis: 16px;
}

#allRequestList .request-source-icon-text {
  width: 16px;
  font-size: 9px;
}

#allRequestList .request-card-meta-badges {
  display: flex !important;
  grid-area: badges;
  width: auto;
  max-width: 160px;
  flex-direction: row-reverse;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  justify-self: end;
  gap: 5px;
  opacity: 1 !important;
  visibility: visible !important;
}

#allRequestList .request-card-meta-badges .request-source-badge,
#allRequestList .request-card-meta-badges .request-client-state-badge {
  min-height: 24px;
  border: 0;
  box-shadow: none;
  font-size: 12px;
  font-weight: 400;
}

#allRequestList .request-card-meta-badges .request-source-badge {
  width: 24px;
  min-width: 24px;
  max-width: 24px;
  height: 24px;
  min-height: 24px;
  padding: 0;
  gap: 0;
  overflow: hidden;
}

#allRequestList .request-card-meta-badges .request-source-badge > span:not(.request-source-icon):not(.request-source-icon-text) {
  display: none;
}

#allRequestList .request-card-meta-badges .request-client-state-badge {
  max-width: 122px;
  padding: 3px 8px;
}

#allRequestList .request-card-meta-badges .request-client-state-badge.is-linked {
  border: 0;
  color: #14532d;
  background: #dcfce7;
}

#allRequestList .request-card-marker-row {
  position: static;
  flex: 1 1 auto;
  min-height: 22px;
  min-width: 0;
  margin-top: 0;
  justify-content: flex-start;
  pointer-events: none;
}

#allRequestList .request-card-marker-row .request-reaction-badge {
  max-width: 100%;
  min-height: 22px;
  overflow: hidden;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 400;
  text-overflow: ellipsis;
}

#allRequestList .request-card-marker-row .request-reaction-badge.is-new-attention {
  border-color: rgba(185, 28, 28, 0.34);
  color: #b91c1c;
  background: #fff1f1;
}

#allRequestList .request-card > .request-quick-actions,
#allRequestList .request-card > .appointment-meta {
  display: none !important;
}

#requestDialog #requestAdvancedToggleButton.request-advanced-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid #073b91;
  color: #ffffff;
  background: linear-gradient(180deg, #0e5fc2, #073b91);
  font-weight: 600;
  box-shadow: 0 14px 28px rgba(7, 59, 145, 0.24);
}

#requestDialog #requestClientStatsLink.request-client-stats-link {
  border: 1px solid #073b91;
  color: #ffffff;
  background: linear-gradient(180deg, #0e5fc2, #073b91);
  box-shadow: 0 14px 28px rgba(7, 59, 145, 0.24);
}

#requestDialog #requestAdvancedToggleButton.request-advanced-toggle:hover,
#requestDialog #requestAdvancedToggleButton.request-advanced-toggle:focus-visible,
#requestDialog #requestAdvancedToggleButton.request-advanced-toggle.is-active,
#requestDialog #requestClientStatsLink.request-client-stats-link:hover,
#requestDialog #requestClientStatsLink.request-client-stats-link:focus-visible {
  color: #ffffff;
  background: linear-gradient(180deg, #0b57b4, #062f75);
}

#requestDialog #requestDialogSubtitle,
#requestDialog #requestDialogMeta,
#requestDialog #requestDialogAttention.dialog-attention {
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: #526173;
  background: transparent;
  box-shadow: none;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.22;
}

#requestDialog #requestDialogSubtitle {
  margin-top: 8px;
}

#requestDialog #requestDialogMeta,
#requestDialog #requestDialogAttention.dialog-attention {
  margin-top: 3px !important;
}

#requestDialog #requestDialogAttention[hidden],
#requestDialog #requestDialogClientBadge[hidden] {
  display: none !important;
}

#requestDialog #requestDialogClientBadge.request-client-state-badge {
  display: inline-flex;
  border: 0;
  box-shadow: none;
}

#requestDialog #requestDialogClientBadge.request-client-state-badge.is-linked {
  color: #14532d;
  background: #dcfce7;
}

#requestDialog .request-virtual-marker-badge.is-new-attention {
  border-color: rgba(185, 28, 28, 0.34);
  color: #b91c1c;
  background: #fff1f1;
}

#requestDialog .request-client-control {
  position: relative;
  display: block;
  height: 34px;
}

#requestDialog .request-client-db-field input {
  padding-right: 40px;
}

#requestDialog .request-client-control.has-create-action input {
  padding-right: 104px;
}

#requestDialog .request-client-control.has-clear-action input {
  padding-right: 40px;
}

#requestDialog .request-client-clear-button {
  top: 50%;
  right: 6px;
  display: grid;
  width: 24px;
  min-width: 24px;
  height: 24px;
  min-height: 24px;
  padding: 0;
  place-items: center;
  font-size: 17px;
  line-height: 24px;
  transform: translateY(-50%);
}

#requestDialog .request-client-create-button {
  top: 50%;
  right: 6px;
  height: 24px;
  min-height: 24px;
  transform: translateY(-50%);
}

#requestDialog .request-client-clear-button[hidden],
#requestDialog .request-client-create-button[hidden] {
  display: none !important;
}

/* P4.1 owner overflow/filter corrections, 2026-06-23. */
#requestDialogTitle {
  flex-wrap: nowrap;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
}

#requestDialog .request-dialog-head {
  grid-template-columns: auto minmax(0, 1fr) minmax(260px, 300px);
}

#requestDialogTitle .request-title-fixed,
#requestDialogTitle .request-title-separator,
#requestDialogTitle .request-title-copy[data-request-copy="phone"] {
  flex: 0 0 auto;
  white-space: nowrap;
}

#requestDialogTitle .request-title-copy {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#requestDialogTitle .request-title-copy[data-request-copy="name"] {
  flex: 0 1 auto;
}

#requestDialog #requestDialogClientBadge.request-client-state-badge.is-unlinked {
  border: 1px solid #bfdbfe;
  color: #075985;
  background: #eff6ff;
  box-shadow: none;
}

/* Phase 5.1 request status header tone, 2026-06-26. */
#requestDialog .request-dialog-head[data-request-status-tone] {
  border-bottom-color: var(--request-status-border-color, rgba(216, 227, 238, 0.95));
  background:
    linear-gradient(
      90deg,
      var(--request-status-color, #e8eef6) 0%,
      var(--request-status-soft-color, #f8fafc) 74%,
      #ffffff 100%
    );
  color: var(--request-status-text-color, #102033);
}

#requestDialog .request-dialog-head[data-request-status-tone="final"] {
  background: var(--request-status-color, #647386);
}

#requestDialog .request-dialog-head[data-request-status-tone] #requestDialogTitle,
#requestDialog .request-dialog-head[data-request-status-tone] .request-title-copy,
#requestDialog .request-dialog-head[data-request-status-tone] .request-title-separator {
  color: var(--request-status-text-color, #102033);
}

#requestDialog .request-dialog-head[data-request-status-tone] .request-title-copy {
  text-decoration: none;
}

#requestDialog .request-dialog-head[data-request-status-tone] #requestDialogSubtitle,
#requestDialog .request-dialog-head[data-request-status-tone] #requestDialogMeta,
#requestDialog .request-dialog-head[data-request-status-tone] #requestDialogAttention,
#requestDialog .request-dialog-head[data-request-status-tone] .dialog-meta,
#requestDialog .request-dialog-head[data-request-status-tone] .dialog-attention {
  color: var(--request-status-muted-color, #475569);
}

#requestDialog .request-dialog-head[data-request-status-tone] .request-dialog-icon {
  border-color: color-mix(in srgb, var(--request-status-text-color, #102033) 32%, transparent);
  color: var(--request-status-text-color, #102033);
  background: color-mix(in srgb, var(--request-status-text-color, #102033) 10%, transparent);
}

#requestDialog .request-dialog-head[data-request-status-tone="final"] .request-client-stats-link,
#requestDialog .request-dialog-head[data-request-status-tone="final"] .request-advanced-toggle,
#requestDialog .request-dialog-head[data-request-status-tone="final"] .dialog-close-button {
  border-color: rgba(255, 255, 255, 0.38);
  color: var(--request-status-text-color, #ffffff);
  background: rgba(255, 255, 255, 0.18);
}

#requestDialog .request-dialog-head[data-request-status-tone="final"] .request-client-stats-link:hover,
#requestDialog .request-dialog-head[data-request-status-tone="final"] .request-client-stats-link:focus-visible,
#requestDialog .request-dialog-head[data-request-status-tone="final"] .request-advanced-toggle:hover,
#requestDialog .request-dialog-head[data-request-status-tone="final"] .request-advanced-toggle:focus-visible,
#requestDialog .request-dialog-head[data-request-status-tone="final"] .dialog-close-button:hover,
#requestDialog .request-dialog-head[data-request-status-tone="final"] .dialog-close-button:focus-visible {
  background: rgba(255, 255, 255, 0.26);
}

#allRequestList[data-request-layout="wide"],
#allRequestList[data-request-layout="two"] {
  display: grid;
  align-content: start;
  gap: 10px;
}

#allAppointmentList[data-appointment-layout="wide"],
#allAppointmentList[data-appointment-layout="two"],
#clientList[data-client-layout="wide"],
#clientList[data-client-layout="two"] {
  display: grid;
  align-content: start;
  grid-auto-rows: max-content;
  gap: 10px;
}

#allRequestList[data-request-layout="wide"] {
  grid-template-columns: minmax(0, 1fr);
}

#allRequestList[data-request-layout="two"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#allAppointmentList[data-appointment-layout="wide"],
#clientList[data-client-layout="wide"] {
  grid-template-columns: minmax(0, 1fr);
}

#allAppointmentList[data-appointment-layout="two"],
#clientList[data-client-layout="two"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#allRequestList[data-request-layout="wide"] > .filter-bar,
#allRequestList[data-request-layout="two"] > .filter-bar,
#allRequestList[data-request-layout="wide"] > .muted,
#allRequestList[data-request-layout="two"] > .muted,
#allRequestList[data-request-layout="wide"] > .list-command,
#allRequestList[data-request-layout="two"] > .list-command {
  grid-column: 1 / -1;
}

#allAppointmentList[data-appointment-layout="wide"] > .filter-bar,
#allAppointmentList[data-appointment-layout="two"] > .filter-bar,
#allAppointmentList[data-appointment-layout="wide"] > .muted,
#allAppointmentList[data-appointment-layout="two"] > .muted,
#allAppointmentList[data-appointment-layout="wide"] > .list-command,
#allAppointmentList[data-appointment-layout="two"] > .list-command,
#allAppointmentList[data-appointment-layout="wide"] > .appointment-side-group-title,
#allAppointmentList[data-appointment-layout="two"] > .appointment-side-group-title,
#clientList[data-client-layout="wide"] > .filter-bar,
#clientList[data-client-layout="two"] > .filter-bar,
#clientList[data-client-layout="wide"] > .muted,
#clientList[data-client-layout="two"] > .muted,
#clientList[data-client-layout="wide"] > .list-command,
#clientList[data-client-layout="two"] > .list-command {
  grid-column: 1 / -1;
}

#allRequestList[data-request-layout="wide"] .request-card + .request-card,
#allRequestList[data-request-layout="two"] .request-card + .request-card {
  margin-top: 0;
}

#allAppointmentList[data-appointment-layout="wide"] .appointment-card + .appointment-card,
#allAppointmentList[data-appointment-layout="two"] .appointment-card + .appointment-card,
#clientList[data-client-layout="wide"] .client-card + .client-card,
#clientList[data-client-layout="two"] .client-card + .client-card {
  margin-top: 0;
}

#allAppointmentList[data-appointment-layout="wide"] > .list-command + .appointment-card,
#allAppointmentList[data-appointment-layout="two"] > .list-command + .appointment-card,
#clientList[data-client-layout="wide"] > .list-command + .client-card,
#clientList[data-client-layout="two"] > .list-command + .client-card {
  margin-top: 0;
}

#allRequestList .request-card-created {
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#allRequestList .request-card-marker-row {
  max-width: none;
}

#requestList .request-card-footer,
#allRequestList .request-card-footer {
  grid-area: footer;
  display: flex;
  min-width: 0;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

#requestList .request-card-marker-row,
#allRequestList .request-card-marker-row {
  flex: 1 1 auto;
  min-width: 0;
  max-width: none;
  overflow: hidden;
}

#requestList .request-card-marker-row .request-reaction-badge,
#allRequestList .request-card-marker-row .request-reaction-badge {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (min-width: 1180px) {
  #allRequestList > .filter-bar {
    box-sizing: border-box;
    min-height: 86px;
    padding-right: 10px;
    grid-template-columns:
      minmax(220px, 1fr)
      minmax(112px, 0.34fr)
      minmax(220px, 0.62fr)
      minmax(132px, 0.34fr)
      minmax(180px, 0.54fr)
      34px
      34px
      64px;
    grid-template-areas:
      "group appointment source id search sort layout reset"
      "summary summary summary summary summary summary summary summary";
    align-items: end;
  }

  #allRequestList > .filter-bar .request-filter-group {
    grid-area: group;
  }

  #allRequestList > .filter-bar .request-filter-appointment {
    grid-area: appointment;
  }

  #allRequestList > .filter-bar .request-filter-source {
    grid-area: source;
    min-width: 200px;
    max-width: none;
  }

  #allRequestList > .filter-bar .request-filter-id {
    grid-area: id;
    max-width: none;
  }

  #allRequestList > .filter-bar .request-filter-search {
    grid-area: search;
    max-width: none;
  }

  #allRequestList > .filter-bar [data-request-sort] {
    grid-area: sort;
  }

  #allRequestList > .filter-bar [data-request-layout-toggle] {
    grid-area: layout;
  }

  #allRequestList > .filter-bar [data-request-reset] {
    grid-area: reset;
  }

  #allRequestList > .filter-bar .filter-summary {
    position: static;
    grid-area: summary;
    justify-self: end;
    max-width: 100%;
    margin-left: 0;
    overflow: hidden;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media (max-width: 1240px) {
  #allRequestList[data-request-layout="two"] {
    grid-template-columns: minmax(0, 1fr);
  }

  #allAppointmentList[data-appointment-layout="two"],
  #clientList[data-client-layout="two"] {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* P4.1 request filters: use the proven wrapped list-filter contract, not a fixed grid. */
#allRequestList > .filter-bar {
  display: flex !important;
  box-sizing: border-box;
  height: max-content;
  min-height: 64px;
  padding: 10px 12px;
  flex-wrap: wrap;
  align-content: flex-start;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 10px;
  overflow: visible;
}

#allRequestList > .filter-bar label,
#allRequestList > .filter-bar .request-filter-group,
#allRequestList > .filter-bar .request-filter-appointment,
#allRequestList > .filter-bar .request-filter-source,
#allRequestList > .filter-bar .request-filter-id,
#allRequestList > .filter-bar .request-filter-search {
  min-width: 0;
  max-width: none;
}

#allRequestList > .filter-bar .request-filter-group {
  flex: 2 1 260px;
}

#allRequestList > .filter-bar .request-filter-appointment {
  flex: 0 1 130px;
}

#allRequestList > .filter-bar .request-filter-source {
  flex: 1.35 1 240px;
  min-width: 220px;
}

#allRequestList > .filter-bar .request-filter-id {
  flex: 0 1 150px;
}

#allRequestList > .filter-bar .request-filter-search {
  flex: 1 1 220px;
  min-width: 190px;
}

#allRequestList > .filter-bar [data-request-sort],
#allRequestList > .filter-bar [data-request-layout-toggle] {
  flex: 0 0 34px;
}

#allRequestList > .filter-bar [data-request-reset] {
  flex: 0 0 auto;
}

#allRequestList > .filter-bar .filter-summary {
  position: static;
  flex: 1 0 100%;
  min-width: 0;
  max-width: 100%;
  margin: -2px 0 0;
  overflow: hidden;
  color: #526b92;
  line-height: 1.2;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* P5.15 owner correction: appointments/clients use the same stable wrapped filter contract as requests. */
#allAppointmentList > .filter-bar,
#clientList > .filter-bar {
  display: flex !important;
  box-sizing: border-box;
  height: max-content;
  min-height: 64px;
  padding: 10px 12px;
  flex-wrap: wrap;
  align-content: flex-start;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 10px;
  overflow: visible;
}

#allAppointmentList > .filter-bar label,
#allAppointmentList > .filter-bar .appointment-filter-status,
#allAppointmentList > .filter-bar .appointment-filter-type,
#allAppointmentList > .filter-bar .appointment-filter-id,
#allAppointmentList > .filter-bar .appointment-filter-search,
#clientList > .filter-bar label,
#clientList > .filter-bar .client-filter-search,
#clientList > .filter-bar .client-filter-open,
#clientList > .filter-bar .client-filter-future,
#clientList > .filter-bar .client-filter-history {
  min-width: 0;
  max-width: none;
}

#allAppointmentList > .filter-bar .appointment-filter-status {
  flex: 1.2 1 210px;
}

#allAppointmentList > .filter-bar .appointment-filter-type {
  flex: 0.75 1 128px;
}

#allAppointmentList > .filter-bar .appointment-filter-id {
  flex: 0 1 150px;
  min-width: 132px;
}

#allAppointmentList > .filter-bar .appointment-filter-search {
  flex: 1 1 210px;
  min-width: 170px;
}

#clientList > .filter-bar .client-filter-search {
  flex: 1.2 1 240px;
  min-width: 180px;
}

#clientList > .filter-bar .client-filter-open,
#clientList > .filter-bar .client-filter-future,
#clientList > .filter-bar .client-filter-history {
  flex: 0.9 1 142px;
}

#allAppointmentList > .filter-bar [data-appointment-sort],
#allAppointmentList > .filter-bar [data-appointment-layout-toggle],
#clientList > .filter-bar [data-client-sort],
#clientList > .filter-bar [data-client-layout-toggle] {
  flex: 0 0 34px;
}

#allAppointmentList > .filter-bar [data-appointment-reset],
#clientList > .filter-bar [data-client-reset] {
  flex: 0 0 auto;
}

#allAppointmentList > .filter-bar .filter-summary,
#clientList > .filter-bar .filter-summary {
  position: static;
  flex: 1 0 100%;
  min-width: 0;
  max-width: 100%;
  margin: -2px 0 0;
  overflow: hidden;
  color: #526b92;
  line-height: 1.2;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@container main-list (max-width: 980px) {
  #allRequestList > .filter-bar {
    gap: 8px;
  }

  #allRequestList > .filter-bar .request-filter-group {
    flex: 1.2 1 216px;
  }

  #allRequestList > .filter-bar .request-filter-appointment {
    flex: 0 0 104px;
  }

  #allRequestList > .filter-bar .request-filter-source {
    flex: 1.1 1 206px;
    min-width: 190px;
  }

  #allRequestList > .filter-bar .request-filter-id {
    flex: 0 1 136px;
  }

  #allRequestList > .filter-bar .request-filter-search {
    flex: 0.85 1 166px;
    min-width: 150px;
  }

  #allRequestList > .filter-bar [data-request-reset] {
    flex: 0 0 58px;
    padding-right: 10px;
    padding-left: 10px;
  }

  #allAppointmentList > .filter-bar,
  #clientList > .filter-bar {
    gap: 8px;
  }

  #allAppointmentList > .filter-bar .appointment-filter-status {
    flex: 1.1 1 184px;
  }

  #allAppointmentList > .filter-bar .appointment-filter-type {
    flex: 0.75 1 112px;
  }

  #allAppointmentList > .filter-bar .appointment-filter-id {
    flex: 0 1 132px;
    min-width: 124px;
  }

  #allAppointmentList > .filter-bar .appointment-filter-search {
    flex: 1 1 166px;
    min-width: 150px;
  }

  #clientList > .filter-bar .client-filter-search {
    flex: 1.1 1 188px;
    min-width: 150px;
  }

  #clientList > .filter-bar .client-filter-open,
  #clientList > .filter-bar .client-filter-future,
  #clientList > .filter-bar .client-filter-history {
    flex: 0.9 1 118px;
  }

  #allAppointmentList > .filter-bar [data-appointment-reset],
  #clientList > .filter-bar [data-client-reset] {
    flex: 0 0 58px;
    padding-right: 10px;
    padding-left: 10px;
  }
}

@container main-list (max-width: 620px) {
  #allAppointmentList > .filter-bar label,
  #clientList > .filter-bar label {
    flex-basis: 100%;
  }

  #allAppointmentList > .filter-bar .filter-summary,
  #clientList > .filter-bar .filter-summary {
    text-align: left;
  }
}

/* P4.1 accepted calendar meta R6/R4 model, 2026-06-24.
   The meta layer is visual-only: it must not change calendar event duration or layout. */
.calendar-event-meta,
:root[data-calendar-details-mode="on"] .calendar-event-meta,
:root[data-calendar-details-mode="off"] .calendar-event-meta {
  --calendar-meta-size: 18px;
  --calendar-meta-icon-size: 18px;
  --calendar-meta-glyph-size: 17px;
  box-sizing: border-box;
  position: absolute;
  z-index: 2;
  bottom: 2px;
  left: 4px;
  display: none;
  width: auto;
  min-width: 0;
  max-width: calc(100% - 8px);
  min-height: var(--calendar-meta-size);
  height: var(--calendar-meta-size);
  max-height: var(--calendar-meta-size);
  align-items: center;
  justify-content: flex-start;
  gap: 1px;
  padding: 0 2px;
  border: 0;
  border-radius: 5px;
  color: rgba(6, 17, 31, 0.66);
  background: transparent;
  clip-path: none;
  box-shadow: none;
  filter: none;
  overflow: hidden;
  pointer-events: none;
}

:root[data-density="3"] .calendar-event-meta,
:root[data-density="4"] .calendar-event-meta {
  --calendar-meta-size: 22px;
  --calendar-meta-icon-size: 22px;
  --calendar-meta-glyph-size: 21px;
}

:root[data-calendar-details-mode="on"][data-calendar-status-mode="off"] .calendar-event-meta.has-works {
  display: inline-flex;
}

:root[data-calendar-status-mode="on"] .calendar-event-meta.has-status {
  display: inline-flex;
  width: var(--calendar-meta-size);
  min-width: var(--calendar-meta-size);
  max-width: var(--calendar-meta-size);
  padding: 0;
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
}

:root[data-calendar-details-mode="off"]:not([data-calendar-status-mode="on"]) .calendar-event-meta,
.fc-event.block-event .calendar-event-meta,
.fc-event-mirror .calendar-event-meta {
  display: none !important;
}

.calendar-event-meta.has-works {
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.16);
}

.calendar-event-meta.has-works.is-customer-oil {
  color: rgba(6, 17, 31, 0.66);
  background: rgba(255, 255, 255, 0.76);
}

.calendar-event-meta.has-works.is-shop-oil {
  color: rgba(6, 17, 31, 0.92);
  background: rgba(217, 248, 255, 0.94);
  box-shadow:
    0 0 0 1px rgba(56, 189, 248, 0.42),
    -2px 5px 10px rgba(56, 189, 248, 0.20);
}

.fc-event.service-event:hover .calendar-event-meta.has-works.is-shop-oil {
  background: rgba(202, 244, 255, 0.98);
  box-shadow:
    0 0 0 1px rgba(56, 189, 248, 0.48),
    -3px 6px 12px rgba(56, 189, 248, 0.24);
}

.calendar-event-meta .appointment-service-icons,
:root[data-calendar-details-mode="on"] .calendar-event-meta .appointment-service-icons {
  display: inline-flex;
  flex: 0 1 auto;
  flex-wrap: nowrap;
  min-height: var(--calendar-meta-size);
  max-width: 100%;
  align-items: center;
  gap: 1px;
  overflow: hidden;
}

.calendar-event-meta .service-mini-icon,
:root[data-calendar-details-mode="on"] .calendar-event-meta .service-mini-icon {
  display: inline-grid;
  flex: 0 0 var(--calendar-meta-icon-size);
  place-items: center;
  width: var(--calendar-meta-icon-size);
  height: var(--calendar-meta-icon-size);
  border: 0;
  border-radius: 0;
  color: currentColor;
  background: transparent;
  box-shadow: none;
}

.calendar-event-meta .service-mini-icon.work-engine_oil_change,
.calendar-event-meta .service-mini-icon.work-gearbox_oil_change,
.calendar-event-meta .service-mini-icon.work-filter_change,
.calendar-event-meta .service-mini-icon.work-other_service {
  color: currentColor;
  background: transparent;
  border-color: transparent;
}

.calendar-event-meta .service-mini-icon.source-customer::after,
.calendar-event-meta .service-mini-icon.source-shop::after {
  display: none;
}

.calendar-event-meta .service-mini-icon svg,
:root[data-calendar-details-mode="on"] .calendar-event-meta .service-mini-icon svg {
  width: var(--calendar-meta-glyph-size);
  height: var(--calendar-meta-glyph-size);
  stroke: currentColor;
  stroke-width: 1.35;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.calendar-status-led {
  display: none;
  place-items: center;
  width: var(--calendar-meta-size);
  height: var(--calendar-meta-size);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.94);
  background: #eab308;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.72), 0 2px 8px rgba(15, 23, 42, 0.14);
}

.calendar-status-led.status-led-waiting {
  color: rgba(255, 255, 255, 0.70);
  background: #facc15;
}

.calendar-status-led.status-led-positive {
  color: #ffffff;
  background: #16a34a;
}

.calendar-status-led.status-led-negative {
  color: #ffffff;
  background: #ef233c;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.74), 0 2px 10px rgba(239, 35, 60, 0.22);
}

.calendar-status-led-icon {
  display: block;
  font-size: calc(var(--calendar-meta-size) - 5px);
  font-weight: 600;
  line-height: 1;
  transform: translateY(-0.5px);
}

:root[data-calendar-status-mode="on"] .calendar-event-meta .calendar-status-led {
  display: grid;
}

:root[data-calendar-status-mode="on"] .calendar-event-meta .appointment-service-icons,
:root[data-calendar-status-mode="off"] .calendar-event-meta .calendar-status-led {
  display: none;
}

#requestList .request-card-ctrl-sla {
  display: none;
}

:root[data-details-ctrl="on"] #requestList .request-card-ctrl-sla {
  display: inline-flex;
}

/* P4.1 request badge adaptive texts, 2026-06-24. */
.request-source-badge [data-badge-label],
.request-client-state-badge [data-badge-label],
.request-reaction-badge [data-badge-label] {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#allRequestList[data-request-layout="wide"] .request-card-meta-badges {
  max-width: 270px;
}

#allRequestList[data-request-layout="wide"] .request-card-meta-badges .request-source-badge {
  width: auto;
  min-width: 0;
  max-width: 128px;
  height: 24px;
  padding: 3px 8px;
  gap: 6px;
}

#allRequestList[data-request-layout="wide"] .request-card-meta-badges .request-source-badge > span:not(.request-source-icon):not(.request-source-icon-text) {
  display: inline-block;
}

#allRequestList[data-request-layout="two"] .request-card-meta-badges .request-source-badge {
  width: 24px;
  min-width: 24px;
  max-width: 24px;
  padding: 0;
  gap: 0;
}

#allRequestList[data-request-layout="two"] .request-card-meta-badges .request-source-badge > span:not(.request-source-icon):not(.request-source-icon-text) {
  display: none;
}

#allRequestList[data-request-layout="two"] .request-card-list-sla {
  display: none;
}

:root[data-details-ctrl="on"] #requestList .request-card-marker-row {
  gap: 6px;
}

/* P4.1 R6/R4 final correction lock, 2026-06-24.
   This layer transfers the accepted lab geometry/glyphs without changing FullCalendar event sizing. */
:root {
  --calendar-r4-work-muted: #374151;
  --calendar-r4-work-strong: #111827;
  --calendar-r4-cyan-bg: rgba(190, 248, 255, 0.82);
  --calendar-r4-cyan-bg-hover: rgba(170, 244, 255, 0.92);
  --calendar-r4-cyan-border: rgba(0, 165, 210, 0.34);
  --calendar-r6-cyan-glow: rgba(170, 244, 255, 0.36);
  --calendar-r6-led-plan: #f7c948;
  --calendar-r6-led-arrived: #16a34a;
  --calendar-r6-led-noshow: #ef233c;
}

.calendar-event-meta,
:root[data-calendar-details-mode="on"] .calendar-event-meta,
:root[data-calendar-details-mode="off"] .calendar-event-meta {
  --calendar-meta-size: 18px;
  --calendar-meta-glyph-size: 16px;
  --calendar-meta-gap: 1px;
  position: absolute;
  z-index: 3;
  bottom: 0;
  left: 0;
  display: none;
  box-sizing: border-box;
  width: auto;
  min-width: 0;
  max-width: min(164px, 82%);
  height: var(--calendar-meta-size);
  min-height: var(--calendar-meta-size);
  max-height: var(--calendar-meta-size);
  align-items: center;
  justify-content: flex-start;
  gap: var(--calendar-meta-gap);
  padding: 0 7px 0 3px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-bottom: 0;
  border-left: 0;
  border-radius: 0 7px 0 7px;
  color: var(--calendar-r4-work-muted);
  background: rgba(255, 255, 255, 0.78);
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 100%, 0 100%);
  box-shadow: none;
  filter: none;
  overflow: hidden;
  pointer-events: none;
  transition: background 0.12s ease, box-shadow 0.12s ease, max-width 0.12s ease;
}

:root[data-density="3"] .calendar-event-meta,
:root[data-density="4"] .calendar-event-meta {
  --calendar-meta-size: 22px;
  --calendar-meta-glyph-size: 20px;
  --calendar-meta-gap: 2px;
}

:root[data-calendar-details-mode="on"][data-calendar-status-mode="off"] .calendar-event-meta.has-works {
  display: inline-flex;
}

:root[data-calendar-details-mode="off"]:not([data-calendar-status-mode="on"]) .calendar-event-meta,
.fc-event.block-event .calendar-event-meta,
.fc-event-mirror .calendar-event-meta {
  display: none !important;
}

.calendar-event-meta.has-works.is-customer-oil {
  color: var(--calendar-r4-work-muted);
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(255, 255, 255, 0.78);
}

.calendar-event-meta.has-works.is-shop-oil {
  color: var(--calendar-r4-work-strong);
  background: var(--calendar-r4-cyan-bg);
  border-color: var(--calendar-r4-cyan-border);
  box-shadow: -5px 5px 9px -5px var(--calendar-r6-cyan-glow);
}

.fc-event.service-event:hover .calendar-event-meta.has-works {
  max-width: min(176px, 88%);
  background: rgba(255, 255, 255, 0.92);
}

.fc-event.service-event:hover .calendar-event-meta.has-works.is-shop-oil {
  background: var(--calendar-r4-cyan-bg-hover);
  box-shadow: -6px 6px 11px -5px rgba(170, 244, 255, 0.44);
}

.calendar-event-meta .appointment-service-icons,
:root[data-calendar-details-mode="on"] .calendar-event-meta .appointment-service-icons {
  display: inline-flex;
  flex: 0 1 auto;
  flex-wrap: nowrap;
  align-items: center;
  gap: var(--calendar-meta-gap);
  min-width: 0;
  max-width: 100%;
  min-height: var(--calendar-meta-size);
  overflow: hidden;
}

.calendar-event-meta .service-mini-icon,
:root[data-calendar-details-mode="on"] .calendar-event-meta .service-mini-icon,
.calendar-event-meta .calendar-work-icon {
  display: inline-grid;
  flex: 0 0 var(--calendar-meta-size);
  width: var(--calendar-meta-size);
  height: var(--calendar-meta-size);
  place-items: center;
  border: 0;
  border-radius: 0;
  padding: 0;
  color: currentColor;
  background: transparent;
  box-shadow: none;
}

.calendar-event-meta .service-mini-icon.source-customer::after,
.calendar-event-meta .service-mini-icon.source-shop::after {
  display: none;
}

.calendar-event-meta .service-mini-icon svg,
:root[data-calendar-details-mode="on"] .calendar-event-meta .service-mini-icon svg,
.calendar-event-meta .calendar-work-icon svg,
.calendar-event-meta .calendar-status-led svg {
  display: block;
  width: var(--calendar-meta-glyph-size);
  height: var(--calendar-meta-glyph-size);
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.65;
}

:root[data-calendar-status-mode="on"] .calendar-event-meta.has-status {
  display: inline-flex;
  width: var(--calendar-meta-size);
  min-width: var(--calendar-meta-size);
  max-width: var(--calendar-meta-size);
  padding: 0;
  border-color: transparent;
  border-radius: 0;
  background: transparent;
  clip-path: none;
  box-shadow: none;
}

:root[data-calendar-status-mode="on"] .calendar-event-meta .appointment-service-icons,
:root[data-calendar-status-mode="off"] .calendar-event-meta .calendar-status-led {
  display: none !important;
}

.calendar-status-led {
  display: none;
  flex: 0 0 var(--calendar-meta-size);
  width: var(--calendar-meta-size);
  height: var(--calendar-meta-size);
  place-items: center;
  border: 0;
  border-radius: 999px;
  padding: 0;
  color: rgba(255, 255, 255, 0.96);
  background: transparent;
  clip-path: none;
  box-shadow: none;
}

:root[data-calendar-status-mode="on"] .calendar-event-meta .calendar-status-led {
  display: grid;
}

:root[data-calendar-status-mode="on"] .calendar-status-led.status-plan {
  color: rgba(255, 255, 255, 0.70);
  background: var(--calendar-r6-led-plan);
  box-shadow: 0 0 8px -4px rgba(247, 201, 72, 0.76);
}

:root[data-calendar-status-mode="on"] .calendar-status-led.status-completed-no-sale {
  color: rgba(255, 255, 255, 0.92);
  background: #c88719;
  box-shadow: 0 0 8px -4px rgba(200, 135, 25, 0.86);
}

:root[data-calendar-status-mode="on"] .calendar-status-led.status-arrived {
  background: var(--calendar-r6-led-arrived);
  box-shadow: 0 0 8px -4px rgba(22, 163, 74, 0.78);
}

:root[data-calendar-status-mode="on"] .calendar-status-led.status-noshow {
  background: var(--calendar-r6-led-noshow);
  box-shadow: 0 0 8px -4px rgba(239, 35, 60, 0.84);
}

#requestList .request-card-ctrl-sla {
  display: none;
  min-width: max-content;
  border: 1px solid rgba(239, 35, 60, 0.34);
  color: #b91c1c;
  background: #fff1f2;
  font-variant-numeric: tabular-nums;
}

#requestList .request-card-ctrl-sla.is-new-attention {
  border-color: rgba(220, 38, 38, 0.28);
  color: #c2410c;
  background: #fff7ed;
}

:root[data-details-ctrl="on"] #requestList .request-card-ctrl-sla {
  display: inline-flex;
}

/* P4.1 final LED status lock: status mode must not inherit work/cyan backgrounds. */
:root[data-calendar-status-mode="on"] .calendar-event-meta.has-status,
:root[data-calendar-status-mode="on"] .calendar-event-meta.has-status.has-works,
:root[data-calendar-status-mode="on"] .calendar-event-meta.has-status.is-shop-oil,
:root[data-calendar-status-mode="on"] .calendar-event-meta.has-status.is-customer-oil,
:root[data-calendar-status-mode="on"] .fc-event.service-event:hover .calendar-event-meta.has-status {
  border-color: transparent !important;
  background: transparent !important;
  clip-path: none;
  box-shadow: none !important;
  transition: none;
}

/* Owner follow-up: spinner stays left of the native clear action. */
.audit-filter-bar .search-field input,
.list-filter-bar .search-field input {
  padding-right: 58px;
}

.audit-filter-bar .search-field::after,
.list-filter-bar .search-field::after {
  right: 34px;
  bottom: 13px;
}

.client-picker-field input[name="client_search"] {
  padding-right: 58px;
}

.client-picker-field::after {
  right: 34px;
}

#requestDialog .request-client-control.has-clear-action input {
  padding-right: 64px;
}

#requestDialog .request-client-control input {
  padding-right: 64px;
}

#requestDialog .request-client-control::after {
  right: 34px;
}

#requestDialog .request-client-control.has-create-action::after {
  right: 88px;
}

#appointmentDialog input:not([type="checkbox"]):not([type="hidden"]),
#appointmentDialog select,
#requestDialog input:not([type="checkbox"]):not([type="hidden"]),
#requestDialog select,
#requestDialog .request-appointment-panel input:not([type="checkbox"]):not([type="hidden"]),
#requestDialog .request-appointment-panel select {
  box-sizing: border-box;
  height: 34px !important;
  min-height: 34px !important;
  padding: 6px 8px !important;
  font-size: 13px !important;
  line-height: 1.2;
}

.is-calendar-picked-field {
  border-color: #fb7185 !important;
  background: #fff1f2 !important;
  box-shadow: inset 0 0 0 1px rgba(251, 113, 133, 0.22), 0 0 0 3px rgba(251, 113, 133, 0.10) !important;
}

/* Owner follow-up: quick-search spinner alignment next to the clear action. */
.audit-filter-bar .search-field input,
.list-filter-bar .search-field input {
  padding-right: 72px;
}

.audit-filter-bar .search-field::after,
.list-filter-bar .search-field::after {
  right: 38px;
  top: calc(100% - 16px);
  bottom: auto;
  transform: translateY(-50%);
}

.filter-search-clear-button {
  position: absolute;
  right: 7px;
  top: calc(100% - 16px);
  display: inline-grid;
  place-items: center;
  width: 24px;
  min-width: 24px;
  height: 24px;
  min-height: 24px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  color: #526b92;
  background: transparent;
  font-size: 22px;
  font-weight: 400;
  line-height: 1;
  transform: translateY(-50%);
  cursor: pointer;
}

.filter-search-clear-button svg,
.request-client-clear-button svg {
  display: block;
  width: 15px;
  height: 15px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.filter-search-clear-button:hover,
.filter-search-clear-button:focus-visible {
  color: #073b91;
  background: #edf5ff;
  outline: 0;
}

.filter-search-clear-button[hidden] {
  display: none !important;
}

.client-picker-field::after {
  top: 38px;
  right: 34px;
  transform: translateY(-50%);
}

#requestDialog .request-client-control::after {
  top: 50%;
  right: 34px;
  margin-top: 0;
  transform: translateY(-50%);
}

#requestDialog .request-client-control.has-create-action::after {
  right: 88px;
}

#requestDialog .request-client-control.has-create-action.has-clear-action input {
  padding-right: 146px;
}

#requestDialog .request-client-control.has-create-action.has-clear-action::after {
  right: 116px;
}

#requestDialog .request-client-control.has-create-action.has-clear-action .request-client-clear-button {
  right: 80px;
}

/* Phase 5.8: компактный обзор недельной загрузки во вкладке правой панели. */
.module-tabs {
  gap: 0 !important;
  margin-top: 12px;
}

.week-overview {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: #1d2733;
  background: transparent;
  box-shadow: none;
}

.week-overview-title {
  margin: 0;
  color: #132238;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.18;
  text-align: left;
}

.week-overview-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 3px;
}

.week-overview-day {
  min-width: 0;
  min-height: 0;
  height: 286px;
  display: grid;
  grid-template-rows: 32px minmax(0, 1fr);
  gap: 3px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 3px;
  color: #29313d;
  background: transparent;
  cursor: pointer;
}

.week-overview-day:hover,
.week-overview-day:focus-visible {
  border-color: rgba(29, 99, 158, 0.24);
  background: rgba(211, 228, 241, 0.52);
  outline: 0;
}

.week-overview-day.is-selected {
  border-color: rgba(83, 139, 190, 0.22);
  background: rgba(181, 210, 234, 0.88);
}

.week-overview-day.is-selected:hover,
.week-overview-day.is-selected:focus-visible {
  background: rgba(167, 200, 228, 0.96);
}

.week-overview-day-head {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0;
  color: inherit;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  text-align: center;
}

.week-overview-day-head strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
}

.week-overview-day.is-weekend .week-overview-day-head {
  color: #db5b69;
}

.week-overview-day-body {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: rgba(238, 243, 244, 0.92);
}

.week-overview-day.is-selected .week-overview-day-body {
  background: rgba(181, 210, 234, 0.92);
}

.week-overview-event,
.week-overview-loading-bar {
  position: absolute;
  top: var(--week-event-top);
  left: calc(var(--week-event-left, 0%) + 1px);
  width: calc(var(--week-event-width, 100%) - 2px);
  height: var(--week-event-height);
  min-height: 3px;
  border-radius: 2px;
  pointer-events: none;
}

.week-overview-event {
  background: var(--week-event-color);
  box-shadow: none;
}

.week-overview-loading-bar {
  left: 8%;
  width: 84%;
  background: rgba(203, 214, 224, 0.58);
}

.week-overview-message {
  margin: 0;
  padding: 10px 4px;
  color: #647386;
  font-size: 12px;
  line-height: 1.25;
  text-align: center;
}

.week-overview.is-error .week-overview-grid {
  display: block;
}

.app-shell[data-layout-mode="mobile-section"] .week-overview {
  display: none;
}

@media (max-width: 560px) {
  .week-overview {
    display: none;
  }
}

.side-overview-pane {
  display: grid;
  align-content: start;
  gap: 14px;
}

.side-overview-pane[hidden] {
  display: none !important;
}

.week-overview-stats {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding-top: 4px;
  border-top: 1px solid #dfe8f1;
}

.week-overview-stats h3 {
  margin: 0;
  color: #132238;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.18;
}

.week-overview-stats-grid {
  display: grid;
  gap: 10px;
}

.week-overview-stats-section {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.week-overview-stats-section h4,
.week-overview-stats-section p,
.week-overview-stats-message {
  margin: 0;
}

.week-overview-stats-section h4 {
  color: #24364d;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.2;
}

.week-overview-stats-section p,
.week-overview-stats-message {
  color: #4e6077;
  font-size: 13px;
  line-height: 1.28;
}

.week-overview-stats-section strong {
  color: #132238;
  font-weight: 650;
}

/* Phase 5.8: Full HD uses a narrower right pane; ultrawide keeps the current pane. */
@media (min-width: 961px) and (max-width: 2199px) {
  .app-shell {
    grid-template-columns: minmax(188px, 210px) minmax(0, 1fr) minmax(270px, 322px);
  }
}

@media (min-width: 2200px) {
  .app-shell {
    grid-template-columns: 224px minmax(900px, 1fr) 500px;
  }
}

/* Phase 5.9: compact horizontal gutters on desktop up to Full HD. */
@media (min-width: 961px) and (max-width: 1920px) {
  .c-topbar,
  .w-topbar {
    padding: 8px 12px;
  }

  .calendar-pane {
    padding: 16px 12px 12px;
  }

  .side-account {
    padding: 8px 12px;
  }

  .side-head {
    padding: 14px 12px;
  }

  .side-tabs {
    padding: 12px 12px 4px;
  }

  .appointment-list {
    padding: 14px 12px 18px;
  }

  .main-list {
    padding-left: 12px;
    padding-right: 12px;
  }
}

/* Phase 5.9: точечная читаемость календарной сетки. */
#calendar {
  border-color: rgba(139, 168, 204, 0.42);
  box-shadow: 0 8px 18px rgba(6, 27, 69, 0.045);
}

.fc-theme-standard .fc-scrollgrid {
  border: 0 !important;
}

.fc .fc-day-today {
  background: rgba(232, 241, 254, 0.58) !important;
}

.fc .fc-col-header-cell.fc-day-today {
  background: rgba(224, 236, 252, 0.68) !important;
}

.fc .fc-col-header-cell.fc-day-sat .fc-col-header-cell-cushion,
.fc .fc-col-header-cell.fc-day-sun .fc-col-header-cell-cushion {
  color: #db5b69 !important;
}

.fc .fc-timegrid-now-indicator-line {
  z-index: 8;
  border-color: #ff1f2d !important;
  border-width: 1px 0 0 !important;
  filter:
    drop-shadow(0 1px 1px rgba(108, 12, 24, 0.42))
    drop-shadow(0 0 4px rgba(255, 31, 45, 0.50));
}

.fc .fc-timegrid-now-indicator-arrow {
  z-index: 9;
  margin-top: -9px !important;
  border-color: transparent transparent transparent #ff1f2d !important;
  border-width: 9px 0 9px 13px !important;
  filter:
    drop-shadow(0 1px 1px rgba(108, 12, 24, 0.42))
    drop-shadow(0 0 5px rgba(255, 31, 45, 0.48));
}

.fc .fc-timegrid-slot-label {
  overflow: visible;
}

.fc .fc-timegrid-slot-label-frame {
  position: relative;
  z-index: 3;
  top: -7px;
  transform: translateY(-50%);
}

.fc .fc-timegrid-slot-label-cushion {
  display: inline-block;
  line-height: 1;
}

/* Phase 5.9: тонкие, малозаметные scrollbar для рабочих вертикальных зон. */
:root {
  --sd-scrollbar-thumb: rgba(82, 107, 146, 0.28);
  --sd-scrollbar-thumb-hover: rgba(82, 107, 146, 0.44);
  --sd-scrollbar-track: rgba(223, 232, 241, 0.22);
}

.fc .fc-scroller,
.main-list,
.appointment-list,
.log-list,
.history-panel,
.recognition-events-list,
.request-client-picker-results,
.clarification-table-wrap,
.error-report-list,
.settings-list {
  scrollbar-width: thin;
  scrollbar-color: var(--sd-scrollbar-thumb) transparent;
}

.fc .fc-scroller::-webkit-scrollbar,
.main-list::-webkit-scrollbar,
.appointment-list::-webkit-scrollbar,
.log-list::-webkit-scrollbar,
.history-panel::-webkit-scrollbar,
.recognition-events-list::-webkit-scrollbar,
.request-client-picker-results::-webkit-scrollbar,
.clarification-table-wrap::-webkit-scrollbar,
.error-report-list::-webkit-scrollbar,
.settings-list::-webkit-scrollbar {
  width: 6px;
}

.fc .fc-scroller::-webkit-scrollbar-track,
.main-list::-webkit-scrollbar-track,
.appointment-list::-webkit-scrollbar-track,
.log-list::-webkit-scrollbar-track,
.history-panel::-webkit-scrollbar-track,
.recognition-events-list::-webkit-scrollbar-track,
.request-client-picker-results::-webkit-scrollbar-track,
.clarification-table-wrap::-webkit-scrollbar-track,
.error-report-list::-webkit-scrollbar-track,
.settings-list::-webkit-scrollbar-track {
  background: var(--sd-scrollbar-track);
}

.fc .fc-scroller::-webkit-scrollbar-thumb,
.main-list::-webkit-scrollbar-thumb,
.appointment-list::-webkit-scrollbar-thumb,
.log-list::-webkit-scrollbar-thumb,
.history-panel::-webkit-scrollbar-thumb,
.recognition-events-list::-webkit-scrollbar-thumb,
.request-client-picker-results::-webkit-scrollbar-thumb,
.clarification-table-wrap::-webkit-scrollbar-thumb,
.error-report-list::-webkit-scrollbar-thumb,
.settings-list::-webkit-scrollbar-thumb {
  min-height: 40px;
  border: 2px solid transparent;
  border-radius: 999px;
  background: var(--sd-scrollbar-thumb);
  background-clip: content-box;
}

.fc .fc-scroller::-webkit-scrollbar-thumb:hover,
.main-list::-webkit-scrollbar-thumb:hover,
.appointment-list::-webkit-scrollbar-thumb:hover,
.log-list::-webkit-scrollbar-thumb:hover,
.history-panel::-webkit-scrollbar-thumb:hover,
.recognition-events-list::-webkit-scrollbar-thumb:hover,
.request-client-picker-results::-webkit-scrollbar-thumb:hover,
.clarification-table-wrap::-webkit-scrollbar-thumb:hover,
.error-report-list::-webkit-scrollbar-thumb:hover,
.settings-list::-webkit-scrollbar-thumb:hover {
  background: var(--sd-scrollbar-thumb-hover);
  background-clip: content-box;
}

/* Phase 5.9: phone fit in the right request queue on desktop up to Full HD. */
@media (min-width: 961px) and (max-width: 1920px) {
  #requestList .request-contact-line {
    gap: 4px;
  }

  #requestList .request-contact-line > span {
    gap: 0;
  }

  #requestList .request-contact-phone {
    flex: 0 0 132px;
    max-width: 132px;
  }

  #requestList .request-contact-car {
    flex: 1 1 0;
    max-width: none;
  }

  #requestList .request-contact-phone .request-contact-icon {
    width: 12px;
    height: 12px;
    flex-basis: 12px;
  }

  #requestList .request-contact-phone .request-contact-icon svg,
  #requestList .request-contact-phone svg {
    width: 12px;
    height: 12px;
  }

  #requestList .request-contact-car .request-contact-icon {
    width: 14px;
    height: 14px;
    flex-basis: 14px;
  }

  #requestList .request-contact-car .request-contact-icon svg,
  #requestList .request-contact-car svg {
    width: 14px;
    height: 14px;
  }
}

/* Phase 5.9: compact tab/logout buttons and clean right queue CTRL badges. */
.side-tabs button,
.side-account .logout-button,
.account-logout-button {
  min-height: 36px;
  height: 36px;
}

:root[data-details-ctrl="on"] #requestList .request-card-footer {
  overflow: visible;
}

:root[data-details-ctrl="on"] #requestList .request-card-marker-row {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  max-width: none;
  overflow: visible;
}

:root[data-details-ctrl="on"] #requestList .request-card-marker-row .request-reaction-badge {
  max-width: none;
  overflow: visible;
  text-overflow: clip;
}

:root[data-details-ctrl="on"] #requestList .request-card-created {
  position: relative;
  z-index: 1;
  margin-left: auto;
}

/* Phase 5.10: appointment list cards are visually distinct from request cards. */
.appointment-side-group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 6px 0 0;
  color: #526b92;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
}

.appointment-side-group-title:first-child {
  margin-top: 0;
}

.appointment-side-group-title span:last-child {
  color: #40536a;
  font-weight: 500;
}

.appointment-card.is-service,
.appointment-card.is-block {
  display: grid;
  grid-template-rows: 62px minmax(0, 1fr);
  align-content: start;
  min-width: 0;
  height: 130px;
  min-height: 130px;
  max-height: 130px;
  gap: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--appointment-border, #c8d8ec);
  border-left-width: 1px;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.appointment-card.is-block {
  border-color: #cbd5e1;
  --appointment-manager-bg: #f1f5f9;
  --appointment-manager-border: #cbd5e1;
  --appointment-manager-color: #475569;
}

.appointment-card.is-service:hover,
.appointment-card.is-service:focus-visible,
.appointment-card.is-block:hover,
.appointment-card.is-block:focus-visible {
  border-color: #9ab0c2;
  box-shadow: 0 8px 18px rgba(6, 27, 69, 0.12);
}

.appointment-card-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 62px;
  padding: 8px 12px;
  color: #ffffff;
  background:
    radial-gradient(circle at 86% 10%, rgba(255, 255, 255, 0.09), transparent 30%),
    linear-gradient(110deg, rgba(255, 255, 255, 0.06), transparent 28%),
    linear-gradient(135deg, #42464d, #2d3036);
}

.appointment-card.is-block .appointment-card-head {
  background:
    radial-gradient(circle at 86% 10%, rgba(255, 255, 255, 0.09), transparent 30%),
    linear-gradient(110deg, rgba(255, 255, 255, 0.06), transparent 28%),
    linear-gradient(135deg, #42464d, #2d3036);
}

.appointment-time-box {
  display: grid;
  place-items: center;
  box-sizing: border-box;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 2px;
  border: 1px solid rgba(251, 247, 239, 0.28);
  border-radius: 8px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.07);
  text-align: center;
}

.appointment-time-box span {
  display: block;
}

.appointment-time-box span:first-child {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.05;
}

.appointment-time-box span:last-child {
  margin-top: -10px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 10px;
  font-weight: 300;
  line-height: 1.05;
}

.appointment-card-title {
  min-width: 0;
  overflow: hidden;
}

.appointment-card-title strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #ffffff;
  font-size: 17px;
  font-weight: 300 !important;
  line-height: 1.2;
}

.appointment-card-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 80px;
  align-items: stretch;
  gap: 8px;
  min-height: 0;
  padding: 6px 12px 7px;
  color: #102033;
  background: #ffffff;
}

.appointment-card-main {
  display: grid;
  min-width: 0;
  height: 100%;
  align-content: space-between;
  gap: 4px;
}

.appointment-card-services-line {
  min-width: 0;
  overflow: hidden;
  color: #53657d;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.appointment-card-lower {
  display: grid;
  grid-template-columns: 92px minmax(64px, max-content);
  min-width: 0;
  align-items: center;
  justify-content: start;
  gap: 7px;
}

.appointment-card-block-details {
  display: grid;
  min-width: 0;
  gap: 1px;
  color: #314056;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.1;
}

.appointment-card-block-details span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.appointment-card-status-text {
  justify-self: start;
  max-width: 92px;
  overflow: hidden;
  color: #40536a;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.appointment-card-status-text.status-completed {
  color: #16865a;
}

.appointment-card-status-text.status-no-show,
.appointment-card-status-text.status-cancelled {
  color: #b4233b;
}

.appointment-card-status-text.status-needs-review {
  color: #a86405;
}

.appointment-card-side-rail {
  display: grid;
  align-self: stretch;
  align-content: space-between;
  justify-items: end;
  min-width: 0;
}

.appointment-card-side-rail [data-copy-action] {
  max-width: 80px;
  min-height: 13px;
  padding: 0 7px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.1;
  align-self: start;
  justify-self: end;
}

.appointment-manager-ticket {
  display: flex;
  width: 80px;
  height: 30px;
  align-self: end;
  align-items: center;
  justify-content: flex-end;
  box-sizing: border-box;
  padding: 0 7px;
  border: 1px solid var(--appointment-manager-border, #c8d8ec);
  border-radius: 8px;
  color: #243244;
  background: var(--appointment-manager-bg, #eef4fb);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.48);
}

.appointment-manager-ticket span {
  min-width: 0;
  overflow: hidden;
  color: #243244;
  font-size: 10px;
  font-weight: 400;
  line-height: 1.1;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.appointment-card-body .appointment-service-icons {
  display: inline-flex;
  width: 92px;
  flex: 0 0 92px;
  min-width: 0;
  max-width: 92px;
  align-items: center;
  gap: 6px;
  overflow: hidden;
}

.appointment-card-body .appointment-service-icons.is-compact {
  min-height: 18px;
}

.appointment-card-body .service-mini-icon,
.appointment-card-body .calendar-work-icon {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border: 0;
  border-radius: 0;
  color: #334155;
  background: transparent;
  box-shadow: none;
}

.appointment-card-body .service-mini-icon svg,
.appointment-card-body .calendar-work-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.45;
}

.appointment-card-body .service-mini-icon.work-engine_oil_change {
  color: #647386;
}

.appointment-card-body .service-mini-icon.work-gearbox_oil_change {
  color: #647386;
}

.appointment-card-body .service-mini-icon.work-filter_change {
  color: #647386;
}

.appointment-card-body .service-mini-icon.work-other_service {
  color: #647386;
}

.appointment-card-body .service-mini-icon.source-customer::after,
.appointment-card-body .service-mini-icon.source-shop::after {
  display: none;
}

.appointment-card-body .service-mini-icon.source-shop,
.appointment-card-body .calendar-work-icon.source-shop {
  color: #0284c7;
  background: transparent;
  filter:
    drop-shadow(0 0 3px rgba(56, 189, 248, 0.76))
    drop-shadow(0 0 7px rgba(56, 189, 248, 0.28));
  box-shadow: none;
}

.appointment-card-body .service-mini-icon.source-customer,
.appointment-card-body .calendar-work-icon.source-customer {
  color: #647386;
  opacity: 0.78;
}

.appointment-card-empty-icons {
  display: block;
  width: 92px;
  min-width: 92px;
}

.appointment-card.is-block .appointment-card-lower {
  grid-template-columns: minmax(0, 1fr) minmax(64px, max-content);
}

#appointmentList .appointment-card-head {
  gap: 10px;
  padding: 8px 10px;
}

#appointmentList .appointment-card-body {
  grid-template-columns: minmax(0, 1fr) 80px;
  padding: 6px 10px 7px;
}

#appointmentList .appointment-card-lower {
  grid-template-columns: 92px;
}

#appointmentList .appointment-card-status-text {
  display: none;
}

#appointmentList .appointment-card.is-block .appointment-card-lower {
  grid-template-columns: minmax(0, 1fr);
}

#appointmentList .appointment-card-title strong {
  font-size: 15px;
}

@container main-list (max-width: 620px) {
  #allAppointmentList .appointment-card-body,
  #appointmentList .appointment-card-body {
    grid-template-columns: minmax(0, 1fr) 74px;
    gap: 8px;
  }
}

/* Фаза 5.16: дополнительные строки стикера записи, без изменения первых двух строк. */
:root[data-density="1"] .fc-event.service-event,
:root[data-density="2"] .fc-event.service-event,
:root[data-density="3"] .fc-event.service-event,
:root[data-density="4"] .fc-event.service-event {
  padding: 4px 6px;
}

:root[data-density="1"] .fc-event.service-event .calendar-event-content,
:root[data-density="2"] .fc-event.service-event .calendar-event-content,
:root[data-density="3"] .fc-event.service-event .calendar-event-content,
:root[data-density="4"] .fc-event.service-event .calendar-event-content {
  gap: 1px;
}

.fc-event.service-event .calendar-event-title-row,
.fc-event.service-event .calendar-event-start-time,
.fc-event.service-event .calendar-event-title,
.fc-event.service-event .calendar-event-car,
.fc-event.service-event .calendar-event-comment,
.fc-event.service-event .calendar-event-client-status {
  line-height: 1.1;
}

.calendar-event-comment,
.calendar-event-client-status {
  display: none;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  color: #40536a;
  font-size: 11px;
  font-weight: 400;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-event-client-status {
  color: #466070;
  font-size: 10px;
  font-weight: 400;
}

:root[data-density="3"] .calendar-event-comment,
:root[data-density="4"] .calendar-event-comment,
:root[data-density="4"] .calendar-event-client-status {
  display: block;
}

/* Фаза 5.11: модалка записи. */
#appointmentDialog.dialog {
  width: min(1040px, calc(100vw - 28px));
  max-width: 1040px;
  height: auto !important;
  max-height: none !important;
  overflow: hidden !important;
  overflow-y: hidden !important;
  border: 1px solid rgba(216, 227, 238, 0.95);
  border-radius: 18px;
  background: #ffffff;
}

#appointmentDialog form {
  display: grid;
  grid-template-rows: auto auto auto auto;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  overflow-y: visible !important;
}

#appointmentDialog .appointment-dialog-head {
  grid-row: 1;
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  min-height: 98px;
  padding: 16px 22px 15px 26px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px 18px 0 0;
  color: #f8fafc;
  background:
    radial-gradient(circle at 86% 10%, rgba(255, 255, 255, 0.09), transparent 30%),
    linear-gradient(110deg, rgba(255, 255, 255, 0.06), transparent 28%),
    linear-gradient(135deg, #42464d, #2d3036);
}

#appointmentDialog .appointment-header-time-card {
  display: grid;
  place-items: center;
  align-content: center;
  width: 70px;
  height: 70px;
  min-width: 70px;
  border: 1px solid rgba(226, 232, 240, 0.30);
  border-radius: 14px;
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.08);
}

#appointmentDialog #appointmentHeaderTime {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: 0;
}

#appointmentDialog #appointmentHeaderDuration {
  margin-top: 4px;
  color: #d7deeb;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.1;
}

#appointmentDialog .appointment-dialog-title-block {
  display: grid;
  align-content: center;
  gap: 3px;
  min-width: 0;
  min-height: 70px;
}

#appointmentDialog #dialogTitle {
  margin: 0;
  color: #dce7f6;
  font-size: 12px;
  font-weight: 300 !important;
  line-height: 1.2;
  text-transform: uppercase;
}

#appointmentDialog #dialogSubtitle {
  display: none !important;
}

#appointmentDialog .appointment-header-facts {
  display: block;
  min-width: 0;
}

#appointmentDialog .appointment-header-facts > span,
#appointmentDialog .appointment-header-works {
  max-width: 100%;
  overflow: hidden;
  color: #ffffff;
  font-size: 22px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#appointmentDialog .appointment-header-facts > span {
  display: block;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: #ffffff;
  background: transparent;
  font-size: 22px;
  font-weight: 300;
}

#appointmentDialog .appointment-header-copy-token {
  width: auto;
  min-height: 0;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  line-height: inherit;
  text-decoration: none;
  cursor: copy;
}

#appointmentDialog .appointment-header-copy-token:hover,
#appointmentDialog .appointment-header-copy-token:focus-visible {
  color: inherit;
  text-decoration: none;
  outline: 0;
}

#appointmentDialog .appointment-header-copy-separator {
  display: inline;
  color: rgba(255, 255, 255, 0.76);
}

#appointmentDialog .appointment-header-facts > span[hidden] {
  display: none !important;
}

#appointmentDialog .appointment-header-works {
  margin: 6px 0 0;
  color: #ffffff;
  font-size: 12px;
  font-weight: 300;
}

#appointmentDialog .appointment-dialog-head-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 360px;
  margin-left: 8px;
}

#appointmentDialog .appointment-head-relation {
  display: inline-flex;
  align-items: center;
  max-width: 140px;
  min-height: 34px;
  overflow: hidden;
  padding: 0 12px;
  border: 1px solid rgba(251, 247, 239, 0.28);
  border-radius: 8px;
  color: #fbf7ef;
  background: rgba(255, 255, 255, 0.08);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#appointmentDialog .appointment-head-relation[hidden] {
  display: none !important;
}

#appointmentDialog .appointment-ap-copy-button {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(251, 247, 239, 0.28);
  border-radius: 8px;
  color: #fbf7ef;
  background: rgba(255, 255, 255, 0.08);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.1;
  white-space: nowrap;
  cursor: copy;
}

#appointmentDialog .appointment-ap-copy-button:hover,
#appointmentDialog .appointment-ap-copy-button:focus-visible,
#appointmentDialog .dialog-close-button:hover,
#appointmentDialog .dialog-close-button:focus-visible {
  background: rgba(255, 255, 255, 0.20);
  outline: 0;
}

#appointmentDialog .dialog-close-button {
  position: static;
  top: auto;
  right: auto;
  z-index: auto;
  width: 34px;
  min-width: 34px;
  min-height: 34px;
  border-radius: 8px;
  border-color: rgba(255, 255, 255, 0.24);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.10);
}

#appointmentDialog .appointment-edit-warning {
  display: none !important;
}

#appointmentDialog .appointment-form-grid {
  grid-row: 3;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px 18px;
  min-height: 0;
  padding: 16px 22px 8px;
  align-items: stretch;
  overflow: visible;
}

#appointmentDialog[data-appointment-mode="service"] .appointment-type-field {
  grid-column: 1;
  grid-row: 1;
}

#appointmentDialog[data-appointment-mode="service"] .appointment-status-field {
  grid-column: 2;
  grid-row: 1;
}

#appointmentDialog[data-appointment-mode="service"] .appointment-car-field {
  grid-column: 1;
  grid-row: 2;
}

#appointmentDialog[data-appointment-mode="service"] .appointment-client-db-field {
  grid-column: 2;
  grid-row: 2;
}

#appointmentDialog[data-appointment-mode="service"] .appointment-work-controls {
  grid-column: 1;
  grid-row: 3;
}

#appointmentDialog[data-appointment-mode="service"] .appointment-side-panel {
  grid-column: 2;
  grid-row: 3 / span 2;
}

#appointmentDialog[data-appointment-mode="service"] .appointment-comment-field {
  grid-column: 1;
  grid-row: 4;
}

#appointmentDialog .appointment-work-controls,
#appointmentDialog .appointment-side-panel,
#appointmentDialog .appointment-time-controls,
#appointmentDialog .appointment-comment-field,
#appointmentDialog .appointment-manager-controls {
  min-width: 0;
}

#appointmentDialog .appointment-work-controls {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 12px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

#appointmentDialog .appointment-side-panel,
#appointmentDialog .appointment-time-controls,
#appointmentDialog .appointment-comment-field,
#appointmentDialog .appointment-manager-controls {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  min-inline-size: 0;
}

#appointmentDialog .appointment-side-panel {
  align-content: start;
  align-self: start;
  gap: 14px;
}

#appointmentDialog .appointment-work-controls legend {
  padding: 0 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

#appointmentDialog .appointment-time-controls legend {
  display: none;
}

#appointmentDialog .appointment-manager-controls legend {
  padding: 0 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.2;
}

#appointmentDialog .appointment-work-controls .service-toggle-grid {
  grid-template-columns: 1fr;
  gap: 6px;
}

#appointmentDialog .appointment-work-controls .service-toggle-card {
  position: relative;
  grid-template-columns: minmax(0, 1fr) 112px;
  align-items: stretch;
  gap: 8px;
}

#appointmentDialog .appointment-work-controls .service-toggle-card[data-work-type="filter_change"],
#appointmentDialog .appointment-work-controls .service-toggle-card[data-work-type="other_service"] {
  grid-template-columns: 1fr;
}

#appointmentDialog .appointment-work-controls .service-toggle-card[data-work-type="filter_change"] {
  grid-template-columns: minmax(0, 1fr) 112px;
}

#appointmentDialog .appointment-work-controls .service-flag-input {
  width: 1px;
  height: 1px;
  margin: 0;
  clip-path: inset(50%);
}

#appointmentDialog .appointment-work-controls .service-toggle-button {
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  justify-items: start;
  min-height: 40px;
  padding: 7px 10px;
  border-radius: 6px;
  text-align: left;
}

#appointmentDialog .appointment-work-controls .service-toggle-button:hover,
#appointmentDialog .appointment-work-controls .service-toggle-button:focus-visible {
  border-color: #38bdf8;
}

#appointmentDialog .appointment-work-controls .service-toggle-card.is-active .service-toggle-button {
  border-color: #38bdf8;
  color: #075985;
  background: linear-gradient(180deg, #f0f9ff 0%, #ffffff 100%);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.28), 0 0 18px rgba(56, 189, 248, 0.14);
}

#appointmentDialog .appointment-work-controls .service-toggle-title {
  justify-self: start;
  min-width: 0;
  overflow: hidden;
  font-size: 13px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#appointmentDialog .appointment-work-controls .service-toggle-state {
  justify-self: end;
  min-height: 20px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(82, 107, 146, 0.08);
  font-size: 11px;
  line-height: 1.1;
  white-space: nowrap;
}

#appointmentDialog .appointment-work-controls .service-toggle-card.is-active .service-toggle-state {
  color: #0369a1;
  background: rgba(56, 189, 248, 0.13);
}

#appointmentDialog .appointment-work-controls .material-source-toggle {
  width: 112px;
  align-self: stretch;
}

#appointmentDialog .appointment-work-controls .material-source-toggle button {
  min-height: 40px;
  border-radius: 6px;
  font-size: 13px;
}

#appointmentDialog .appointment-work-controls .material-source-toggle button.is-active {
  border-color: #38bdf8;
  color: #075985;
  background: #f0f9ff;
  box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.20);
}

#appointmentDialog .appointment-time-controls label {
  display: grid;
  gap: 4px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: #40536a;
  background: transparent;
  font-size: 12px;
  font-weight: 600;
}

#appointmentDialog .appointment-time-controls input {
  width: 100%;
}

#appointmentDialog .appointment-time-controls {
  align-content: start;
  gap: 8px;
  min-height: 0;
}

#appointmentDialog .appointment-comment-field {
  align-content: start;
  gap: 4px;
  color: #40536a;
  font-size: 12px;
  font-weight: 600;
}

#appointmentDialog #appointmentCommentLabel {
  color: #526b92;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
}

#appointmentDialog .appointment-block-warning {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #fed7aa;
  border-radius: 6px;
  color: #9a3412;
  background: #fff7ed;
  font-size: 12px;
  line-height: 1.35;
}

#appointmentDialog .appointment-comment-field textarea {
  min-height: 78px;
  padding-right: 72px;
  resize: vertical;
}

#appointmentDialog .appointment-import-comment-button {
  position: absolute;
  top: 9px;
  right: 39px;
  display: inline-grid;
  width: 24px;
  min-width: 24px;
  height: 24px;
  min-height: 24px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 6px;
  color: #526b92;
  background: transparent;
}

#appointmentDialog .appointment-import-comment-button:hover,
#appointmentDialog .appointment-import-comment-button:focus-visible {
  color: #073b91;
  background: #edf5ff;
  outline: 0;
}

#appointmentDialog .appointment-import-comment-button[hidden] {
  display: none !important;
}

#appointmentDialog .appointment-import-comment-button svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

#appointmentDialog .appointment-manager-controls {
  align-content: start;
  gap: 8px;
  min-height: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

#appointmentDialog .appointment-manager-controls.has-selected-manager {
  border-color: rgba(var(--appointment-manager-section-rgb, 56, 189, 248), 0.24);
  background:
    radial-gradient(circle at 0% 0%, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.88) 28%, transparent 52%),
    radial-gradient(circle at 92% 100%, rgba(var(--appointment-manager-section-rgb, 56, 189, 248), 0.11), transparent 48%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.99) 0%, rgba(var(--appointment-manager-section-rgb, 56, 189, 248), 0.045) 50%, rgba(var(--appointment-manager-section-rgb, 56, 189, 248), 0.085) 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.70);
}

#appointmentDialog .appointment-manager-summary {
  margin: 2px 0 0;
  color: #40536a;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.25;
}

#appointmentDialog .appointment-client-control input {
  padding-right: 64px !important;
}

#appointmentDialog .appointment-client-control {
  position: relative;
  z-index: 20;
  display: block;
  height: 34px;
  min-width: 0;
}

#appointmentDialog .appointment-client-control::after {
  top: 50%;
  right: 34px;
  margin-top: 0;
  transform: translateY(-50%);
}

#appointmentDialog .appointment-client-control.has-create-action input {
  padding-right: 112px !important;
}

#appointmentDialog .appointment-client-control.has-create-action::after {
  right: 88px;
}

#appointmentDialog .appointment-client-control.has-clear-action input {
  padding-right: 64px !important;
}

#appointmentDialog .appointment-client-control.has-create-action.has-clear-action input {
  padding-right: 146px !important;
}

#appointmentDialog .appointment-client-control.has-create-action.has-clear-action::after {
  right: 116px;
}

#appointmentDialog .appointment-client-control.has-create-action.has-clear-action .appointment-client-clear-button {
  right: 80px;
}

#appointmentDialog .appointment-client-clear-button {
  top: 50%;
  right: 5px;
  transform: translateY(-50%);
}

#appointmentDialog .appointment-recognition-field-control input {
  padding-right: 112px !important;
}

#appointmentDialog .appointment-recognition-field-control .appointment-field-clear-button {
  right: 77px;
}

#appointmentDialog .appointment-car-field,
#appointmentDialog .appointment-client-db-field {
  display: grid;
  align-content: start;
  gap: 4px;
  min-width: 0;
}

#appointmentDialog .appointment-last-visit-hint {
  min-height: 16px;
  margin: 0;
  font-size: 12px;
}

#appointmentDialog .appointment-client-db-field .client-picker-selected {
  margin: 0;
}

#appointmentDialog .appointment-client-picker-results {
  top: calc(100% + 3px);
}

#appointmentDialog .appointment-client-picker-results .client-picker-option {
  justify-content: flex-start;
  min-height: 22px;
  padding: 1px 9px;
  border: 1px solid transparent;
  border-radius: 5px;
  color: #082a5f;
  background: #ffffff;
  box-shadow: none;
  font-size: 13px;
  font-weight: 650;
  line-height: 18px;
  text-align: left;
}

#appointmentDialog .appointment-client-picker-results .client-picker-empty {
  min-height: 22px;
  padding: 2px 8px;
  border: 1px solid transparent;
  border-radius: 5px;
  color: #526173;
  background: #ffffff;
  font-size: 12px;
  line-height: 16px;
}

#appointmentDialog .appointment-client-picker-results .client-picker-option:hover,
#appointmentDialog .appointment-client-picker-results .client-picker-option:focus-visible {
  border-color: #3b82f6;
  background: #f8fbff;
}

#appointmentDialog .appointment-dialog-actions {
  grid-row: 4;
  align-items: center;
  border-top: 1px solid var(--line);
  background: #ffffff;
  min-height: 56px;
  padding: 10px 18px;
}

#appointmentDialog .appointment-dialog-actions-left {
  display: grid;
  gap: 4px;
  min-width: 0;
}

#appointmentDialog .appointment-history-link {
  justify-self: start;
  min-height: 0;
  padding: 0;
  border: 0;
  color: #0f67c8;
  background: transparent;
  font-size: 12px;
  text-decoration: underline;
}

#appointmentDialog .appointment-history-link:disabled {
  color: #94a3b8;
  text-decoration: none;
  cursor: default;
}

#requestDialog .request-dialog-actions-left {
  display: grid;
  justify-items: start;
  gap: 4px;
  min-width: 0;
}

#requestDialog .request-dialog-actions-right {
  align-items: center;
}

#requestDialog .request-history-link {
  justify-self: start;
  min-height: 0;
  padding: 0;
  border: 0;
  color: #0f67c8;
  background: transparent;
  font-size: 12px;
  text-decoration: underline;
}

#requestDialog .request-history-link:disabled {
  color: #94a3b8;
  text-decoration: none;
  cursor: default;
}

#appointmentDialog[data-appointment-mode="block"] .appointment-form-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

#appointmentDialog[data-appointment-mode="block"] .appointment-type-field {
  grid-column: 1 / -1;
}

#appointmentDialog[data-appointment-mode="block"] .appointment-comment-field {
  grid-column: 1;
  grid-row: 2;
  align-self: stretch;
}

#appointmentDialog[data-appointment-mode="block"] .appointment-side-panel {
  grid-column: 2;
  grid-row: 2 / span 2;
}

#appointmentDialog[data-appointment-mode="block"] .appointment-block-warning {
  grid-column: 1;
  grid-row: 3;
  align-self: stretch;
}

#appointmentDialog[data-appointment-mode="block"] .appointment-comment-field textarea {
  min-height: 188px;
}

@media (min-width: 761px) {
  #appointmentDialog[data-appointment-mode="block"].dialog,
  #appointmentDialog[data-appointment-mode="block"] form {
    height: auto !important;
  }
}

@media (max-width: 760px) {
  #appointmentDialog.dialog {
    width: min(100vw - 16px, 560px);
  }

  #appointmentDialog .appointment-dialog-head {
    grid-template-columns: auto minmax(0, 1fr);
  }

  #appointmentDialog .appointment-dialog-head-tools {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }

  #appointmentDialog .appointment-form-grid,
  #appointmentDialog[data-appointment-mode="block"] .appointment-form-grid {
    grid-template-columns: 1fr;
  }

  #appointmentDialog[data-appointment-mode="block"] .appointment-comment-field,
  #appointmentDialog[data-appointment-mode="block"] .appointment-side-panel,
  #appointmentDialog[data-appointment-mode="block"] .appointment-block-warning {
    grid-column: auto;
    grid-row: auto;
  }
}

/* 5.11.6: request appointment panel follows the appointment modal center layout. */
.dialog-head h2,
#requestDialog .dialog-head h2 {
  font-size: 22px;
  font-weight: 300 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.32);
}

#requestDialog textarea[name="raw_comment"][readonly] {
  color: #334155;
  background: #f8fafc;
  cursor: text;
}

#requestDialog .request-appointment-panel {
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 12px;
  border-color: #dfe8f1;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: none;
}

#requestDialog .request-appointment-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.92fr);
  gap: 16px;
  align-items: start;
  min-width: 0;
}

#requestDialog .request-appointment-main-panel,
#requestDialog .request-appointment-side-panel {
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
}

#requestDialog .request-appointment-panel .appointment-work-controls,
#requestDialog .request-appointment-panel .appointment-side-panel,
#requestDialog .request-appointment-panel .appointment-time-controls,
#requestDialog .request-appointment-panel .appointment-comment-field,
#requestDialog .request-appointment-panel .appointment-manager-controls {
  min-width: 0;
}

#requestDialog .request-appointment-panel .appointment-work-controls {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

#requestDialog .request-appointment-panel .appointment-work-controls legend,
#requestDialog .request-appointment-panel .appointment-manager-controls legend {
  padding: 0 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.2;
}

#requestDialog .request-appointment-panel .appointment-work-controls .service-toggle-grid {
  grid-template-columns: 1fr;
  gap: 6px;
}

#requestDialog .request-appointment-panel .appointment-work-controls .service-toggle-card {
  position: relative;
  grid-template-columns: minmax(0, 1fr) 112px;
  align-items: stretch;
  gap: 8px;
}

#requestDialog .request-appointment-panel .appointment-work-controls .service-toggle-card[data-work-type="filter_change"] {
  grid-template-columns: minmax(0, 1fr) 112px;
}

#requestDialog .request-appointment-panel .appointment-work-controls .service-toggle-card[data-work-type="other_service"] {
  grid-template-columns: 1fr;
}

#requestDialog .request-appointment-panel .appointment-work-controls .service-flag-input {
  width: 1px;
  height: 1px;
  margin: 0;
  clip-path: inset(50%);
}

#requestDialog .request-appointment-panel .appointment-work-controls .service-toggle-button {
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  justify-items: start;
  min-height: 40px;
  padding: 7px 10px;
  border-radius: 6px;
  text-align: left;
}

#requestDialog .request-appointment-panel .appointment-work-controls .service-toggle-button:hover,
#requestDialog .request-appointment-panel .appointment-work-controls .service-toggle-button:focus-visible {
  border-color: #38bdf8;
}

#requestDialog .request-appointment-panel .appointment-work-controls .service-toggle-card.is-active .service-toggle-button {
  border-color: #38bdf8;
  color: #075985;
  background: linear-gradient(180deg, #f0f9ff 0%, #ffffff 100%);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.28), 0 0 18px rgba(56, 189, 248, 0.14);
}

#requestDialog .request-appointment-panel .appointment-work-controls .service-toggle-title {
  justify-self: start;
  min-width: 0;
  overflow: hidden;
  font-size: 13px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#requestDialog .request-appointment-panel .appointment-work-controls .service-toggle-state {
  justify-self: end;
  min-height: 20px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(82, 107, 146, 0.08);
  font-size: 11px;
  line-height: 1.1;
  white-space: nowrap;
}

#requestDialog .request-appointment-panel .appointment-work-controls .service-toggle-card.is-active .service-toggle-state {
  color: #0369a1;
  background: rgba(56, 189, 248, 0.13);
}

#requestDialog .request-appointment-panel .appointment-work-controls .material-source-toggle {
  width: 112px;
  align-self: stretch;
}

#requestDialog .request-appointment-panel .appointment-work-controls .material-source-toggle button {
  min-height: 40px;
  border-radius: 6px;
  font-size: 13px;
}

#requestDialog .request-appointment-panel .appointment-work-controls .material-source-toggle button.is-active {
  border-color: #38bdf8;
  color: #075985;
  background: #f0f9ff;
  box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.20);
}

#requestDialog .request-appointment-panel .appointment-side-panel,
#requestDialog .request-appointment-panel .appointment-time-controls,
#requestDialog .request-appointment-panel .appointment-comment-field,
#requestDialog .request-appointment-panel .appointment-manager-controls {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  min-inline-size: 0;
}

#requestDialog .request-appointment-panel .appointment-time-controls {
  align-content: start;
  gap: 9px;
}

#requestDialog .request-appointment-panel .appointment-time-controls legend {
  display: none;
}

#requestDialog .request-appointment-panel .appointment-time-controls label {
  display: grid;
  gap: 5px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: #40536a;
  background: transparent;
  font-size: 12px;
  font-weight: 600;
}

#requestDialog .request-appointment-panel .appointment-comment-field {
  align-content: start;
  gap: 7px;
  color: #40536a;
  font-size: 12px;
  font-weight: 600;
}

#requestDialog .request-appointment-panel .appointment-comment-field textarea {
  min-height: 78px;
  padding-right: 42px;
  resize: vertical;
}

#requestDialog .request-appointment-panel .appointment-manager-controls {
  align-content: start;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

#requestDialog .request-appointment-panel .appointment-manager-controls.has-selected-manager {
  border-color: rgba(var(--appointment-manager-section-rgb, 56, 189, 248), 0.24);
  background:
    radial-gradient(circle at 0% 0%, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.88) 28%, transparent 52%),
    radial-gradient(circle at 92% 100%, rgba(var(--appointment-manager-section-rgb, 56, 189, 248), 0.11), transparent 48%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.99) 0%, rgba(var(--appointment-manager-section-rgb, 56, 189, 248), 0.045) 50%, rgba(var(--appointment-manager-section-rgb, 56, 189, 248), 0.085) 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.70);
}

#requestDialog .request-appointment-panel .appointment-manager-summary {
  margin: 2px 0 0;
  color: #40536a;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.25;
}

#appointmentDialog .appointment-manager-controls.has-manager-warning,
#requestDialog .request-appointment-panel .appointment-manager-controls.has-manager-warning {
  border-color: rgba(185, 28, 28, 0.42) !important;
  box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.08) !important;
}

#appointmentDialog .appointment-manager-warning,
#requestDialog .request-appointment-panel .appointment-manager-warning {
  color: #b91c1c !important;
  font-size: 14px !important;
  font-weight: 700 !important;
}

#requestDialog .request-appointment-actions {
  display: flex;
  justify-content: flex-end;
}

@media (max-width: 980px) {
  #requestDialog .request-appointment-body {
    grid-template-columns: 1fr;
  }
}
