:root {
  --bg: #eef1f4;
  --surface: #ffffff;
  --surface-2: #eef2f6;
  --ink: #1f2b36;
  --muted: #6e7883;
  --line: #d7dde4;
  --primary: #2d3a46;
  --primary-dark: #202a34;
  --accent: #8ea6c8;
  --danger: #a44747;
  --ok: #2f7464;
  --warn: #9b6b2f;
  --radius: 8px;
  font-family: Montserrat, "Helvetica Neue", Arial, "Segoe UI", sans-serif;
}

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

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

.account-settings-meta {
  display: grid;
  align-content: center;
  gap: 3px;
  color: var(--ink);
}

.account-settings-meta small {
  color: var(--muted);
}

.account-settings-form .form-actions {
  align-items: end;
}

.user-notification-controls {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.toggle-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  cursor: pointer;
}

.toggle-switch.compact {
  gap: 5px;
  font-size: 11px;
  white-space: nowrap;
}

.toggle-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.mail-option-grid .toggle-switch input {
  width: 1px;
  height: 1px;
  flex: none;
}

.toggle-track {
  position: relative;
  width: 38px;
  height: 22px;
  flex: 0 0 38px;
  border-radius: 999px;
  background: #b9c1c8;
  box-shadow: inset 0 0 0 1px rgb(31 43 54 / 0.08);
  transition: background-color 160ms ease;
}

.toggle-track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgb(31 43 54 / 0.28);
  transition: transform 160ms ease;
}

.toggle-switch.compact .toggle-track {
  width: 32px;
  height: 18px;
  flex-basis: 32px;
}

.toggle-switch.compact .toggle-track::after {
  width: 14px;
  height: 14px;
}

.toggle-switch input:checked + .toggle-track {
  background: #2f9a72;
}

.toggle-switch input:checked + .toggle-track::after {
  transform: translateX(16px);
}

.toggle-switch.compact input:checked + .toggle-track::after {
  transform: translateX(14px);
}

.toggle-switch input:focus-visible + .toggle-track {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.toggle-switch input:disabled + .toggle-track {
  opacity: 0.5;
  cursor: wait;
}

.toggle-label {
  color: var(--ink);
}

.user-notification-events {
  margin: 12px 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.user-notification-events .mail-option-grid {
  grid-template-columns: 1fr;
}

.event-toggle {
  min-height: 34px;
  padding: 4px 2px;
}

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

.mail-config-form fieldset {
  min-width: 0;
  margin: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.mail-config-form .wide,
.mail-config-form .form-actions {
  grid-column: 1 / -1;
}

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

.mail-option-grid label,
.mail-config-form > .checkline {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 7px;
}

.mail-option-grid input,
.mail-config-form .checkline input {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}

.mail-senders-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.mail-senders-head small {
  display: block;
  color: var(--muted);
  margin-top: 3px;
}

#notificationSettingsState.is-enabled,
#personalNotificationSettingsState.is-enabled {
  color: #087464;
}

.personal-notification-form {
  display: grid;
  gap: 10px;
}

.user-editor-notifications {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.user-editor-notifications legend {
  padding: 0 5px;
  color: var(--ink);
  font-weight: 700;
}

.catalog-form-grid .user-editor-notifications .toggle-switch {
  display: flex;
  grid-template-columns: none;
  color: var(--ink);
}

.catalog-form-grid .user-editor-notifications .toggle-switch input {
  width: 1px;
  min-height: 0;
  padding: 0;
}

.gmail-connection {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f7faf9;
}

.gmail-connection small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.gmail-connection.is-connected {
  border-color: #78ad9f;
  background: #edf8f4;
}

@media (max-width: 720px) {
  .table-pagination {
    position: sticky;
    bottom: 0;
    z-index: 4;
    padding: 7px 4px;
    background: var(--surface);
    border-top: 1px solid var(--border);
  }

  .table-pagination-actions label {
    font-size: 0;
  }

  .table-pagination-actions label select {
    font-size: 12px;
  }

  .mail-config-form,
  .mail-option-grid,
  .account-settings-form {
    grid-template-columns: 1fr;
  }

  .account-settings-form .form-actions {
    justify-content: stretch;
  }

  .account-settings-form .form-actions button {
    width: 100%;
  }

  .user-notification-controls {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .gmail-connection {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 720px) {
  .calendar-toolbar {
    display: grid;
    grid-template-columns: 38px 1fr 38px;
  }

  .calendar-toolbar strong {
    min-width: 0;
    font-size: 15px;
  }

  .calendar-toolbar #calendarTodayBtn {
    grid-column: 1 / -1;
  }

  .calendar-weekdays span {
    padding: 5px 1px;
    font-size: 9px;
  }

  .calendar-cell {
    min-height: 62px;
    padding: 4px;
  }

  .calendar-date {
    margin: 0;
    font-size: 11px;
  }

  .calendar-date span {
    min-width: 16px;
    height: 16px;
    font-size: 8px;
  }

  .calendar-events button {
    display: none;
  }

  .calendar-more {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .reports-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .reports-toolbar label:first-child,
  .reports-toolbar #reportExportBtn {
    grid-column: 1 / -1;
  }

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

  .delivery-schedule-table {
    min-width: 780px;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: linear-gradient(135deg, #25313d 0%, #eef1f4 42%, #eef1f4 100%);
  color: var(--ink);
}

body.auth-pending > .login-view,
body.auth-pending > .app-shell {
  visibility: hidden;
}

body.auth-pending::after {
  position: fixed;
  top: calc(50% - 14px);
  left: calc(50% - 14px);
  width: 28px;
  height: 28px;
  border: 3px solid #d5dee8;
  border-top-color: #2b5c82;
  border-radius: 50%;
  content: "";
  animation: auth-loading 0.8s linear infinite;
}

@keyframes auth-loading {
  to {
    transform: rotate(360deg);
  }
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}

button:hover {
  border-color: var(--primary);
}

.primary {
  border-color: #dce7f7;
  background: var(--primary);
  color: white;
}

.primary:hover {
  background: var(--primary-dark);
}

.secondary {
  background: var(--surface-2);
}

.danger {
  border-color: #efd2d2;
  background: #fff1f1;
  color: var(--danger);
}

.login-view {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 420px);
  gap: 32px;
  align-items: center;
  min-height: 100vh;
  padding: clamp(20px, 6vw, 72px);
  background: #2b3744;
  color: #edf4ff;
}

.login-view.is-hidden {
  display: none;
}

.login-brand {
  max-width: 760px;
}

.login-logo {
  display: block;
  width: min(420px, 82vw);
  margin-bottom: 58px;
  color: #edf4ff;
}

.logo-inline svg {
  display: block;
  width: 100%;
  height: auto;
}

.logo-inline svg path {
  fill: currentColor;
}

.login-brand h1 {
  margin: 0 0 14px;
  font-size: clamp(42px, 7vw, 86px);
  line-height: 0.95;
  letter-spacing: 0;
}

.login-brand p {
  max-width: 560px;
  color: #b9c6d5;
  font-size: 18px;
  line-height: 1.5;
}

.login-card {
  display: grid;
  gap: 14px;
  padding: 24px;
  border: 1px solid rgb(255 255 255 / 0.16);
  border-radius: var(--radius);
  background: rgb(255 255 255 / 0.95);
  color: var(--ink);
  box-shadow: 0 24px 80px rgb(0 0 0 / 0.22);
}

.login-card h2 {
  margin: 0 0 6px;
  font-size: 24px;
}

.login-card label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
}

.login-card input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 9px 11px;
}

.demo-accounts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding-top: 8px;
}

.demo-accounts span {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 13px;
}

.demo-accounts button {
  min-height: 34px;
  padding: 6px;
  background: var(--surface-2);
  font-size: 12px;
}

.app-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: 100vh;
}

.app-shell.sidebar-collapsed {
  grid-template-columns: 64px minmax(0, 1fr);
}

.app-shell.is-hidden {
  display: none !important;
}

.sidebar {
  display: flex;
  flex-direction: column;
  position: relative;
  gap: 14px;
  padding: 16px;
  border-right: 1px solid #3b4856;
  background: #2b3744;
  color: #edf4ff;
}

.sidebar-toggle {
  align-self: flex-end;
  border-color: #556575;
  background: #2b3744;
  color: #edf4ff;
}

.layout-switcher {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3px;
  padding: 3px;
  border: 1px solid #4b5968;
  border-radius: 6px;
  background: #202a34;
}

.layout-option {
  display: grid;
  min-height: 30px;
  place-items: center;
  padding: 4px;
  border-color: transparent;
  border-radius: 4px;
  background: transparent;
  color: #aebdcb;
}

.layout-option:hover {
  border-color: #718292;
  color: #fff;
}

.layout-option.is-active {
  border-color: #dce7f7;
  background: #edf4ff;
  color: #2b3744;
}

.layout-option svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.sidebar-collapsed .sidebar {
  align-items: center;
  padding: 12px 8px;
}

.sidebar-collapsed .user-panel {
  display: none;
}

.sidebar-collapsed .brand {
  display: block;
  width: 40px;
  margin-top: 0;
}

.sidebar-collapsed .brand > div {
  display: none;
}

.sidebar-collapsed .sidebar-logo {
  display: none;
}

.sidebar-collapsed .sidebar-logo-mark {
  display: block;
}

.sidebar-collapsed .nav-tab {
  width: 48px;
  position: relative;
  justify-content: center;
  padding: 10px;
}

.sidebar-collapsed .nav-group {
  width: 48px;
}

.sidebar-collapsed .nav-menu-chevron {
  display: none;
}

.sidebar-collapsed .nav-context-menu {
  left: 56px;
}

.sidebar-collapsed .nav-label {
  display: none;
}

.sidebar-collapsed .nav-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border: 2px solid #2b3744;
  color: white;
  font-size: 10px;
  line-height: 1;
}

.sidebar-collapsed .work-badge {
  color: white;
}

.sidebar-collapsed .revision-badge {
  color: #1f2b36;
}

.sidebar-collapsed .sidebar-toggle {
  transform: rotate(180deg);
}

.sidebar-collapsed .layout-switcher {
  grid-template-columns: 1fr;
  width: 40px;
}

.app-shell.menu-top {
  display: block;
}

.menu-top .sidebar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 165px auto minmax(320px, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 70px;
  padding: 9px 16px;
  border-right: 0;
  border-bottom: 1px solid #3b4856;
}

.menu-top .brand {
  display: block;
  width: 155px;
}

.menu-top .brand > div,
.menu-top .sidebar-logo-mark,
.menu-top .sidebar-toggle,
.menu-top .user-panel > span,
.menu-top .user-panel > small {
  display: none;
}

.menu-top .sidebar-logo {
  display: block;
  width: 155px;
}

.menu-top .nav-tabs {
  display: flex;
  min-width: 0;
  gap: 5px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.menu-top .nav-tabs:has(.nav-group.is-open) {
  overflow: visible;
}

.menu-top .nav-group {
  flex: 0 0 auto;
}

.menu-top .nav-tab {
  position: relative;
  flex: 0 0 auto;
  min-height: 38px;
  padding: 7px 9px;
  white-space: nowrap;
}

.menu-top .nav-context-menu {
  position: fixed;
  top: var(--nav-menu-top, 64px);
  left: var(--nav-menu-left, 12px);
}

.menu-top .nav-badge {
  min-width: 19px;
  height: 19px;
  margin-left: 2px;
  font-size: 10px;
}

.menu-top .user-panel {
  display: flex;
  gap: 9px;
  align-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  white-space: nowrap;
}

.menu-top .user-panel strong {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.menu-top .user-panel button {
  min-height: 34px;
  margin: 0;
  padding: 5px 10px;
}

.mobile-logout {
  display: none;
}

.menu-top .workspace {
  min-height: calc(100vh - 70px);
  padding-top: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-logo {
  display: block;
  width: 190px;
  color: #edf4ff;
}

.sidebar-logo-mark {
  display: none;
  width: 40px;
  height: 36px;
  color: #edf4ff;
}

.brand {
  display: grid;
  align-items: start;
  gap: 8px;
}

.brand span,
.user-panel span,
.user-panel small,
.topbar p {
  color: var(--muted);
  font-size: 13px;
}

.sidebar .brand span,
.sidebar .user-panel span,
.sidebar .user-panel small {
  color: #b9c6d5;
}

.nav-tabs {
  display: grid;
  gap: 8px;
}

.nav-group {
  position: relative;
  min-width: 0;
}

.nav-tab {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-start;
  padding: 10px 12px;
  text-align: left;
  border-color: #3b4856;
  background: #344250;
  color: #edf4ff;
}

.nav-group > .nav-tab {
  width: 100%;
}

.nav-menu-chevron {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  margin-left: auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  transition: transform 150ms ease;
}

.nav-group.is-open .nav-menu-chevron {
  transform: rotate(180deg);
}

.nav-context-menu {
  position: absolute;
  top: 0;
  left: calc(100% + 8px);
  z-index: 40;
  display: none;
  width: max-content;
  min-width: 210px;
  max-width: min(280px, calc(100vw - 24px));
  gap: 3px;
  padding: 6px;
  border: 1px solid #cad6e2;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 12px 30px rgb(24 40 56 / 20%);
}

.nav-group.is-open .nav-context-menu {
  display: grid;
}

.nav-subtab {
  display: flex;
  min-height: 36px;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  border-color: transparent;
  border-radius: 4px;
  background: transparent;
  color: #243444;
  text-align: left;
  white-space: nowrap;
}

.nav-subtab:hover,
.nav-subtab:focus-visible {
  border-color: #d2dee9;
  background: #eef4f8;
}

.nav-subtab.is-active {
  border-color: #c5d7e8;
  background: #e6f0fa;
  color: #173b5d;
  font-weight: 700;
}

.nav-subtab[hidden] {
  display: none !important;
}

.nav-group-badge {
  margin-left: auto;
}

.nav-group-badge + .nav-menu-chevron {
  margin-left: 0;
}

.nav-icon,
.sidebar-toggle svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.nav-tab.is-active {
  border-color: #dce7f7;
  background: #edf4ff;
  color: #2b3744;
  font-weight: 700;
}

.nav-group.is-active > .nav-tab {
  border-color: #dce7f7;
  background: #edf4ff;
  color: #2b3744;
  font-weight: 700;
}

.nav-badge {
  display: inline-grid;
  min-width: 22px;
  height: 22px;
  place-items: center;
  margin-left: 6px;
  border-radius: 999px;
  background: #b73535;
  color: white;
  font-size: 12px;
  font-weight: 800;
}

.nav-badge[hidden] {
  display: none;
}

.work-badge {
  background: #3274b8;
  color: white;
}

.revision-badge {
  background: #d39a24;
  color: #1f2b36;
}

.drafts-badge {
  background: #708195;
  color: white;
}

.nav-tab[hidden] {
  display: none !important;
}

.user-panel {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid #3b4856;
  border-radius: var(--radius);
  background: #344250;
}

.user-panel button {
  margin-top: 6px;
  border-color: #556575;
  background: #2b3744;
  color: #edf4ff;
}

.admin-role-switcher {
  display: grid;
  gap: 4px;
  margin-top: 4px;
}

.admin-role-switcher[hidden] {
  display: none !important;
}

.admin-role-switcher span {
  font-size: 11px;
  text-transform: uppercase;
}

.admin-role-switcher select {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  padding: 5px 28px 5px 8px;
  border-color: #556575;
  background: #2b3744;
  color: #edf4ff;
}

.menu-top .admin-role-switcher {
  display: flex;
  align-items: center;
  margin: 0;
}

.menu-top .admin-role-switcher > span {
  display: none;
}

.menu-top .admin-role-switcher select {
  width: min(320px, 30vw);
  max-width: 320px;
}

.role-switcher select,
.filters input,
.filters select,
.form-grid input,
.form-grid select,
.catalog-form-grid input,
.catalog-form-grid select,
.catalog-form-grid textarea,
.items-table input,
.items-table select,
.bulk-panel select,
.items-table textarea {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  color: var(--ink);
  padding: 8px 10px;
}

input[type="checkbox"] {
  width: 16px !important;
  height: 16px;
  min-height: 16px !important;
  margin: 0;
  padding: 0 !important;
  accent-color: var(--primary);
}

.items-table .row-select,
.items-table #selectAllItems {
  display: block;
  margin: 0 auto;
}

.checkline input[type="checkbox"] {
  flex: 0 0 16px;
}

.workspace {
  min-width: 0;
  padding: 22px;
  background: var(--bg);
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.topbar h1 {
  margin: 0 0 4px;
  font-size: 28px;
  letter-spacing: 0;
}

.topbar p {
  margin: 0;
}

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

.new-request-cta {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  gap: 8px;
  padding: 9px 15px;
  border-color: #1f615c;
  background: #1f6f6a;
  font-weight: 800;
  box-shadow: 0 3px 10px rgb(31 111 106 / 0.18);
}

.new-request-cta:hover {
  background: #185b57;
}

.new-request-cta svg,
.registry-items-toggle svg,
.submit-request-cta svg,
.add-item-inline svg,
.draft-actions .icon-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.registry-items-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.registry-items-toggle.is-active {
  border-color: #6b8e89;
  background: #e2efed;
  color: #185b57;
}

.submit-request-cta {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  gap: 9px;
  margin-left: auto;
  padding: 10px 18px;
  border-color: #175c57;
  background: #1f7a73;
  font-size: 15px;
  font-weight: 800;
  box-shadow: 0 4px 12px rgb(31 111 106 / 0.22);
}

.submit-request-cta:hover {
  background: #175f5a;
}

.column-settings-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.column-settings-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.8;
}

.view {
  display: none;
}

.view.is-visible {
  display: block;
}

.filters,
.bulk-panel {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 180px 220px auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.checkline {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
}

.table-frame {
  max-height: calc(100dvh - 190px);
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.table-pagination {
  display: flex;
  min-height: 38px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 2px 0;
  color: var(--muted);
  font-size: 12px;
}

.table-pagination:empty {
  display: none;
}

.table-pagination-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.table-pagination-actions label {
  display: flex;
  align-items: center;
  gap: 6px;
}

.table-pagination-actions select {
  width: auto;
  min-width: 62px;
  height: 30px;
  padding: 3px 24px 3px 7px;
}

.table-pagination-actions .icon-button {
  width: 30px;
  height: 30px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

.registry-table {
  table-layout: fixed;
}

.registry-table thead,
.items-table thead {
  position: sticky;
  top: 0;
  z-index: 2;
}

.table-frame thead {
  position: sticky;
  top: 0;
  z-index: 8;
  box-shadow: 0 1px 0 var(--line), 0 4px 8px rgb(31 48 59 / 0.08);
}

.registry-table thead th,
.items-table thead th {
  position: relative;
  top: auto;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 5px 7px;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

th + th,
td + td {
  border-left: 1px solid #e2e7eb;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f7faf9;
  color: #40504c;
  font-size: 11px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.registry-table thead > tr:first-child th,
.items-table .item-header-row th {
  padding: 3px 5px;
  vertical-align: middle;
  line-height: 1.1;
}

.registry-table th[draggable="true"] {
  position: relative;
  cursor: grab;
  user-select: none;
}

.registry-table th[draggable="true"]:active {
  cursor: grabbing;
}

.registry-table th[draggable="true"] {
  overflow: hidden;
  white-space: normal;
}

.column-header-label {
  display: inline-block;
  max-width: calc(100% - 22px);
  vertical-align: middle;
  overflow-wrap: anywhere;
  white-space: normal;
}

.column-grip {
  width: 11px;
  height: 11px;
  margin-left: 3px;
  vertical-align: middle;
  fill: currentColor;
  opacity: 0.45;
}

.registry-table th[draggable="true"]:hover .column-grip {
  opacity: 1;
}

.registry-column-resize {
  position: absolute;
  top: 5px;
  right: -4px;
  bottom: 5px;
  z-index: 5;
  width: 11px;
  cursor: col-resize;
}

.registry-filter-row th,
.item-filter-row th {
  padding: 1px 2px;
  background: #edf3f1;
}

.checkline[hidden] {
  display: none;
}

.registry-column-filter,
.item-column-filter {
  width: 100%;
  min-width: 0;
  min-height: 21px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 4px;
  background: white;
  color: var(--ink);
  font-size: 10px;
  text-transform: none;
}

.items-table .item-column-filter {
  min-height: 21px;
  padding: 1px 18px 1px 4px;
}

.registry-column-filter:focus,
.item-column-filter:focus {
  border-color: var(--primary);
  outline: 2px solid rgb(31 111 106 / 0.12);
}

tbody tr {
  cursor: pointer;
}

.registry-table tbody tr:nth-child(odd) td,
.items-table tbody tr:nth-child(odd):not(.is-completed-item) td {
  background: #ffffff;
}

.registry-table tbody tr:nth-child(even) td,
.items-table tbody tr:nth-child(even):not(.is-completed-item) td {
  background: #f1f5f7;
}

.registry-table tbody tr:hover td,
.items-table tbody tr:hover td {
  background: #e8f1f2;
}

.registry-table tbody tr.is-selected-row td {
  background: #dce9f2;
  box-shadow: inset 0 1px 0 #8eabc1, inset 0 -1px 0 #8eabc1;
}

.registry-table td {
  overflow: hidden;
  font-size: 13px;
  line-height: 1.15;
  overflow-wrap: anywhere;
  white-space: normal;
  word-break: break-word;
}

.status {
  display: inline-block;
  max-width: 100%;
  min-height: 22px;
  border-radius: 999px;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.registry-table td[data-column="status"] {
  white-space: nowrap;
}

.registry-table td[data-column="date"] {
  font-size: 12px;
  white-space: nowrap;
}

.registry-table td[data-column="responsible"] .assignee {
  display: inline-block;
  max-width: 100%;
  line-height: 1.15;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
}

.status.in_progress {
  background: #e6edf7;
  color: #314a6a;
}

.status.needs_revision {
  background: #fff2d9;
  color: var(--warn);
}

.status.pending_approval {
  background: #fff0c2;
  color: #755200;
}

.status.supply_review {
  background: #dcecf8;
  color: #245475;
}

.status.rejected {
  background: #ffe3e1;
  color: #a62f2a;
}

.registry-table tbody tr.status-row-pending_approval td {
  background: #fffaf0;
}

.registry-table tbody tr.status-row-rejected td {
  background: #fff4f3;
}

.status.done {
  border: 1px solid #58aa80;
  background: #bfe7d2;
  color: #075a35;
  font-weight: 800;
}

.registry-table tbody tr.status-row-done td {
  background: #e5f6ed;
}

.registry-table tbody tr.status-row-done:hover td {
  background: #d5efdf;
}

.status.sent,
.status.accepted,
.status.revision_requested,
.status.revision_approved {
  background: #edf0f3;
  color: #40504c;
}

.status.deleted {
  border: 1px solid #c5cbd0;
  background: #e4e7e9;
  color: #4d555b;
}

.registry-table tbody tr.status-row-deleted td {
  background: #eef0f1;
  color: #687077;
}

.registry-item-summary {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
}

.registry-item-summary > span {
  overflow: hidden;
  min-width: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.registry-item-summary small {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 1px 5px;
  background: #e7edef;
  color: #52616b;
  font-size: 10px;
  font-weight: 700;
}

.registry-position-row td {
  height: 30px;
  padding-top: 3px;
  padding-bottom: 3px;
}

.registry-position-row td[data-position-column="position"],
.registry-position-row td[data-position-column="quantity"],
.registry-position-row td[data-position-column="unit"] {
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.registry-position-row td[data-position-column="requestNumber"],
.registry-position-row td[data-position-column="status"] {
  white-space: nowrap;
}

.registry-position-row.is-completed-position td {
  background: #dff3e8 !important;
}

.registry-position-row.is-completed-position:hover td {
  background: #d1ebdc !important;
}

.registry-position-loading {
  cursor: default;
}

.registry-position-loading td {
  padding: 18px;
  color: var(--muted);
  text-align: center;
}

.assignee {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.assignee.is-assigned {
  background: #e2f1ed;
  color: var(--ok);
}

.assignee.is-unassigned {
  background: #fff1f1;
  color: var(--danger);
}

.request-form {
  display: grid;
  gap: 10px;
}

.request-igk-field {
  display: none !important;
}

.request-form.is-object-request-new .form-grid,
.request-form.is-object-request-new .people-details {
  display: none;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

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

.person-card {
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.person-card span {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.person-card strong {
  font-size: 15px;
}

.person-card small {
  color: var(--muted);
  font-size: 13px;
}

.performer-list {
  display: grid;
  gap: 6px;
}

.performer-list > div {
  display: grid;
  gap: 1px;
}

.revision-reason-panel {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid #e1b95d;
  border-left-width: 4px;
  border-radius: 6px;
  background: #fff7df;
  color: #684a08;
}

.revision-reason-panel[hidden] {
  display: none;
}

.form-grid label,
.bulk-panel label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 13px;
}

.form-grid input,
.form-grid select {
  min-height: 34px;
  padding: 6px 8px;
}

.form-checkline {
  align-self: end;
  padding-bottom: 10px;
}

.items-toolbar,
.form-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.items-toolbar {
  min-height: 38px;
  flex-wrap: wrap;
}

.request-total-cost {
  padding: 5px 9px;
  border: 1px solid #c9d7d2;
  border-radius: 5px;
  background: #eaf3f0;
  color: var(--ok);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.items-toolbar div,
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.items-frame {
  max-height: calc(100dvh - 210px);
}

.add-item-inline {
  display: grid;
  width: 36px;
  height: 32px;
  place-items: center;
  margin: 6px auto 0;
  padding: 0;
  border: 1px solid #9fb0c1;
  background: #f8fafc;
  color: #2f536f;
}

.add-item-inline:hover {
  border-color: #2f536f;
  background: #eaf1f7;
}

.add-item-inline:disabled {
  visibility: hidden;
}

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

.drafts-summary strong {
  color: var(--ink);
}

.drafts-table,
.trash-table {
  table-layout: fixed;
}

.drafts-table th,
.drafts-table td,
.trash-table th,
.trash-table td {
  padding: 5px 7px;
  vertical-align: middle;
}

.trash-table tbody tr:nth-child(odd) td {
  background: #fff;
}

.trash-table tbody tr:nth-child(even) td {
  background: #f1f5f7;
}

.trash-table th:nth-child(1) { width: 20%; }
.trash-table th:nth-child(2) { width: 20%; }
.trash-table th:nth-child(3) { width: 20%; }
.trash-table th:nth-child(4) { width: 17%; }
.trash-table th:nth-child(5) { width: 9%; }
.trash-table th:nth-child(6) { width: 14%; }

.drafts-table th:nth-child(1) { width: 22%; }
.drafts-table th:nth-child(2) { width: 22%; }
.drafts-table th:nth-child(3) { width: 30%; }
.drafts-table th:nth-child(4) { width: 10%; }
.drafts-table th:nth-child(5) { width: 16%; }

.draft-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.draft-actions .icon-button {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  padding: 0;
  color: var(--danger);
}

.drafts-empty {
  padding: 28px !important;
  color: var(--muted);
  text-align: center;
}

.items-table {
  width: 100%;
  table-layout: fixed;
}

.item-filter-row th {
  position: static;
  top: auto;
  z-index: auto;
}

.items-table td {
  padding: 2px 3px;
  white-space: normal;
}

.items-table tr.is-completed-item td {
  background: #ccebd9;
}

.items-table tr.is-completed-item:nth-child(even) td {
  background: #bfe4d0;
}

.items-table tr.is-completed-item:hover td {
  background: #addbc2;
}

.items-table tr.is-completed-item input:not([type="checkbox"]),
.items-table tr.is-completed-item select,
.items-table tr.is-completed-item output {
  border-color: #68ad86;
  background: #e2f5e9;
  color: #075a35;
}

.items-table tr.is-completed-item .name-input,
.items-table tr.is-completed-item .spec-input {
  color: #075a35;
  font-weight: 700;
}

.item-group {
  display: inline-grid;
  gap: 1px;
  max-width: 100%;
  padding: 3px 7px;
  border-radius: 999px;
  background: #e6edf7;
  color: #314a6a;
  font-size: 11px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.item-group strong,
.item-group small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-group small {
  color: #476078;
  font-size: 10px;
  font-weight: 500;
}

.item-group.is-empty {
  background: #eef1f4;
  color: var(--muted);
  font-weight: 500;
}

.item-completed-toggle {
  display: grid;
  place-items: center;
}

.items-table .is-hidden-column,
.items-table [hidden] {
  display: none !important;
}

.items-table th:nth-child(1),
.items-table td:nth-child(1) {
  padding-right: 2px;
  padding-left: 2px;
  text-align: center;
}

.items-table th:nth-child(2),
.items-table td:nth-child(2) {
  padding-right: 3px;
  padding-left: 3px;
  text-align: center;
}

.items-table input,
.items-table select {
  min-width: 0;
  min-height: 27px;
  padding: 3px 5px;
  border-radius: 4px;
  font-size: 11px;
}

.items-table .calculated-input {
  border-color: #c5d2da;
  background: #eef3f5;
  color: #243848;
  font-weight: 700;
}

.items-table .name-input {
  min-width: 0;
}

.items-table .spec-input {
  min-width: 0;
}

.expandable-text-cell {
  position: relative;
  display: grid;
  min-width: 0;
}

.expandable-text-cell > input {
  position: absolute;
  inset: 0 27px 0 0;
  z-index: 1;
  width: calc(100% - 27px);
  height: 100%;
  opacity: 0;
}

.expandable-text-cell > input:focus {
  opacity: 1;
}

.expandable-text-cell:has(> input:focus) .wrapped-cell-preview {
  visibility: hidden;
}

.wrapped-cell-preview {
  display: block;
  min-height: 27px;
  padding: 4px 27px 4px 6px;
  overflow-wrap: anywhere;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: white;
  color: var(--ink);
  font-size: 11px;
  line-height: 1.3;
  white-space: pre-wrap;
}

.wrapped-cell-preview.is-placeholder {
  color: #7f8d92;
}

.expand-cell-editor {
  position: absolute;
  top: 3px;
  right: 3px;
  z-index: 2;
  display: grid;
  width: 21px;
  min-height: 21px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: #587078;
  opacity: 0.25;
}

.expand-cell-editor svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.expandable-text-cell:hover .expand-cell-editor,
.expand-cell-editor:focus-visible {
  background: #e8f0ef;
  opacity: 1;
}

.items-table tr.is-completed-item .wrapped-cell-preview {
  border-color: #68ad86;
  background: #e2f5e9;
  color: #075a35;
  font-weight: 700;
}

.items-table th[data-item-column] {
  position: relative;
  overflow: visible;
  white-space: normal;
}

.item-header-label {
  display: block;
  overflow-wrap: anywhere;
  font-size: 10px;
  line-height: 1.1;
}

.item-column-resize {
  position: absolute;
  top: 7px;
  right: -3px;
  bottom: 7px;
  z-index: 3;
  width: 11px;
  cursor: col-resize;
}

.is-resizing-columns,
.is-resizing-columns * {
  cursor: col-resize !important;
  user-select: none;
}

.row-tools {
  display: flex;
  align-items: center;
  gap: 2px;
}

.row-tools button,
.icon-button {
  display: inline-grid;
  width: 30px;
  min-height: 30px;
  place-items: center;
  padding: 0;
}

.row-tools button {
  width: 26px;
  min-height: 26px;
  border-radius: 4px;
}

.item-leading-tools {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.item-leading-tools .attach-row {
  position: relative;
  display: grid;
  width: 26px;
  min-height: 26px;
  place-items: center;
  padding: 0;
  border-color: #d9e0e2;
  border-radius: 4px;
  background: #f5f7f7;
  color: #a4afb2;
}

.item-leading-tools .attach-row.has-attachments {
  border-color: #63ad89;
  background: #dff3e8;
  color: #087246;
}

.item-leading-tools .attach-row:not(:disabled):hover {
  border-color: #89a3a9;
  background: #edf2f2;
  color: #5d7378;
}

.item-leading-tools .attach-row.has-attachments:not(:disabled):hover {
  border-color: #388c66;
  background: #cdebdc;
  color: #05633c;
}

.attachment-count {
  position: absolute;
  top: -4px;
  right: -4px;
  display: grid;
  min-width: 15px;
  height: 15px;
  place-items: center;
  border-radius: 999px;
  background: #1f6f6a;
  color: white;
  font-size: 9px;
  font-weight: 800;
}

.attachment-list strong {
  display: grid;
  gap: 5px;
}

.attachment-list a {
  color: #175f72;
  text-decoration: none;
}

.attachment-list a:hover {
  text-decoration: underline;
}

.attachment-list small {
  color: var(--muted);
  font-weight: 400;
}

.attachment-dialog {
  width: min(760px, calc(100vw - 24px));
}

.attachment-manager-list {
  display: grid;
  max-height: min(54vh, 460px);
  margin-bottom: 12px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.attachment-manager-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  min-height: 48px;
  padding: 6px 8px;
  border-bottom: 1px solid var(--line);
  background: white;
}

.attachment-manager-item:nth-child(even) {
  background: #f5f8f8;
}

.attachment-manager-item:last-child {
  border-bottom: 0;
}

.attachment-file-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 5px;
  background: #e4f1ed;
  color: #147052;
}

.attachment-file-icon svg,
.attachment-action svg,
.attachment-picker svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.attachment-file-info {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.attachment-file-info strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-file-info small {
  color: var(--muted);
  font-size: 11px;
}

.attachment-file-actions {
  display: flex;
  gap: 4px;
}

.attachment-action {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: white;
  color: #34515c;
  text-decoration: none;
}

.attachment-action:hover:not(:disabled) {
  border-color: #7e9da2;
  background: #edf4f3;
}

.attachment-action:disabled {
  opacity: 0.35;
}

.attachment-action.delete-attachment {
  color: var(--danger);
}

.attachment-manager-empty {
  padding: 28px 14px;
  color: var(--muted);
  text-align: center;
}

.attachment-picker {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 8px 10px;
  border: 1px dashed #83a6a5;
  border-radius: 6px;
  background: #f5faf8;
  cursor: pointer;
}

.attachment-picker input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.attachment-picker > span {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #126555;
  font-weight: 800;
}

.attachment-picker > small {
  color: var(--muted);
}

.attachment-picker:has(input:focus-visible) {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.expanded-cell-dialog {
  width: min(760px, calc(100vw - 24px));
}

#expandedCellInput {
  width: 100%;
  min-height: 190px;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  background: white;
  color: var(--ink);
  line-height: 1.45;
  resize: vertical;
}

#expandedCellInput[readonly] {
  background: #f4f6f6;
}

.expanded-cell-suggestions {
  display: grid;
  max-height: 230px;
  margin: -2px 0 12px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.expanded-cell-suggestions[hidden] {
  display: none;
}

.expanded-cell-suggestions button {
  display: grid;
  min-height: 44px;
  gap: 2px;
  padding: 7px 10px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  text-align: left;
}

.expanded-cell-suggestions button:last-child {
  border-bottom: 0;
}

.expanded-cell-suggestions button:hover {
  background: #eaf4f1;
}

.expanded-cell-suggestions small {
  color: var(--muted);
}

.row-tools svg,
.item-leading-tools svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.row-tools .delete-row {
  border-color: #efd2d2;
  color: var(--danger);
}

.row-tools button:disabled {
  cursor: default;
  opacity: 0.45;
}

.item-leading-tools button:disabled {
  cursor: default;
  opacity: 0.45;
}

.dashboard-grid,
.split-layout,
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.delivery-calendar {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.calendar-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.calendar-toolbar strong {
  min-width: 190px;
  font-size: 18px;
  text-transform: capitalize;
  text-align: center;
}

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

.calendar-weekdays {
  border-bottom: 1px solid var(--line);
  background: #edf3f1;
}

.calendar-weekdays span {
  padding: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
}

.calendar-cell {
  min-width: 0;
  min-height: 116px;
  padding: 7px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.calendar-cell:nth-child(7n) {
  border-right: 0;
}

.calendar-cell.is-outside {
  background: #f5f7f8;
}

.calendar-cell.has-deliveries {
  background: #e9f4ff;
  box-shadow: inset 0 3px #397eb5;
}

.calendar-cell.has-overdue {
  background: #fff0ef;
  box-shadow: inset 0 3px #ca4c45;
}

.calendar-cell.has-completed {
  background: #def3e6;
  box-shadow: inset 0 3px #24845b;
}

.calendar-cell.is-today {
  outline: 2px solid #1e746f;
  outline-offset: -2px;
}

.calendar-date {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  margin-bottom: 5px;
  font-weight: 800;
}

.calendar-date span {
  display: grid;
  min-width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.85);
  font-size: 10px;
}

.calendar-events {
  display: grid;
  gap: 3px;
}

.calendar-events button {
  display: grid;
  min-width: 0;
  padding: 4px 5px;
  border: 1px solid rgba(35, 66, 91, 0.15);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.82);
  text-align: left;
}

.calendar-events button strong,
.calendar-events button small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-events button strong {
  font-size: 11px;
}

.calendar-events button small,
.calendar-more {
  color: var(--muted);
  font-size: 9px;
}

.calendar-events button.is-static {
  cursor: default;
}

.delivery-schedule-panel {
  margin-top: 14px;
}

.delivery-schedule-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 7px;
}

.delivery-schedule-head h2 {
  margin: 0;
  font-size: 17px;
}

.delivery-schedule-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.delivery-schedule-frame {
  max-height: 430px;
}

.delivery-schedule-table {
  width: 100%;
  table-layout: fixed;
}

.delivery-schedule-table th,
.delivery-schedule-table td {
  padding: 6px 8px;
  vertical-align: top;
}

.delivery-schedule-table th[draggable="true"] {
  position: sticky;
  cursor: grab;
  user-select: none;
}

.delivery-schedule-table th[draggable="true"]:active {
  cursor: grabbing;
}

.delivery-schedule-table th[draggable="true"]:hover .column-grip {
  opacity: 1;
}

.delivery-schedule-table th.is-dragging {
  opacity: 0.45;
}

.delivery-schedule-table th.is-drag-over[data-drop-side="before"] {
  box-shadow: inset 3px 0 0 var(--accent);
}

.delivery-schedule-table th.is-drag-over[data-drop-side="after"] {
  box-shadow: inset -3px 0 0 var(--accent);
}

.delivery-schedule-table tbody tr:nth-child(odd) td {
  background: #f4f7f9;
}

.delivery-schedule-table tbody tr.is-completed td {
  background: #def3e6;
}

.delivery-schedule-table td strong,
.delivery-schedule-table td small {
  display: block;
}

.delivery-schedule-table td small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.delivery-schedule-table td[data-delivery-column="dueDate"] {
  white-space: nowrap;
}

.delivery-schedule-empty {
  height: 92px;
  color: var(--muted);
  text-align: center;
  vertical-align: middle !important;
}

.reports-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(150px, 1fr)) auto;
  gap: 8px;
  align-items: end;
  margin-bottom: 10px;
}

.reports-toolbar label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
}

.reports-toolbar select,
.reports-toolbar input {
  min-height: 34px;
}

.report-summary {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 8px;
  color: var(--muted);
}

.report-table {
  width: 100%;
  border-collapse: collapse;
}

.report-table th,
.report-table td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

.report-table tbody tr:nth-child(even) td {
  background: #f2f6f7;
}

.report-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #edf3f1;
  font-size: 10px;
  text-transform: uppercase;
}

.empty-table-cell {
  padding: 24px !important;
  color: var(--muted);
  text-align: center !important;
}

.delivery-day {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.delivery-day > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  background: #edf3f1;
  font-weight: 800;
  text-transform: capitalize;
}

.delivery-day.is-past > header {
  background: #fff1df;
  color: #7a4d13;
}

.delivery-day > header span {
  display: grid;
  min-width: 24px;
  height: 22px;
  place-items: center;
  border-radius: 999px;
  background: white;
  font-size: 11px;
}

.delivery-day > div {
  display: grid;
}

.delivery-entry {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: white;
  color: var(--ink);
  text-align: left;
}

.delivery-entry:last-child {
  border-bottom: 0;
}

.delivery-entry:hover {
  background: #f2f7f6;
}

.delivery-entry > span:first-child {
  display: grid;
  gap: 2px;
}

.delivery-entry small {
  color: var(--muted);
}

.delivery-entry.is-completed {
  background: #e5f6ed;
}

.calendar-empty {
  display: grid;
  gap: 5px;
  place-items: center;
  min-height: 180px;
  padding: 24px;
  border: 1px dashed #bfcac7;
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}

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

.catalog-panel,
.settings-panel {
  padding: 0;
  border-radius: 6px;
}

.catalog-panel summary,
.settings-panel summary {
  min-height: 42px;
  padding: 8px 10px;
  cursor: pointer;
  list-style: none;
  margin: 0;
}

.catalog-panel summary::-webkit-details-marker,
.settings-panel summary::-webkit-details-marker {
  display: none;
}

.catalog-count {
  min-width: 28px;
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.catalog-chevron {
  display: inline-grid;
  width: 24px;
  height: 24px;
  place-items: center;
  color: var(--muted);
  font-size: 24px;
  line-height: 1;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 140ms ease, transform 140ms ease;
}

.catalog-panel summary:hover .catalog-chevron,
.catalog-panel summary:focus-visible .catalog-chevron,
.settings-panel summary:hover .catalog-chevron,
.settings-panel summary:focus-visible .catalog-chevron {
  opacity: 1;
  transform: translateX(0);
}

.catalog-panel[open] .catalog-chevron,
.settings-panel[open] .catalog-chevron {
  opacity: 1;
  transform: rotate(90deg);
}

.catalog-panel .compact-list {
  padding: 0 10px 10px;
}

.settings-stack {
  display: grid;
  gap: 8px;
}

.settings-panel-body {
  padding: 0 10px 10px;
}

.settings-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 8px;
}

.export-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0;
}

.export-columns label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.split-layout {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 14px;
}

.catalog-grid {
  grid-template-columns: 1fr;
  gap: 6px;
}

.catalog-panel .panel-head h2 {
  font-size: 15px;
}

.catalog-panel .catalog-add {
  min-height: 30px;
  padding: 4px 9px;
  font-size: 12px;
}

.catalog-panel .compact-list {
  gap: 4px;
}

.catalog-panel .compact-item {
  min-height: 36px;
  padding: 6px 8px;
  border-radius: 5px;
  font-size: 13px;
}

.catalog-panel .compact-item small {
  font-size: 12px;
}

.permissions-panel {
  margin-bottom: 14px;
}

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

.permissions-grid {
  display: grid;
  grid-template-columns: 150px repeat(5, minmax(130px, 1fr));
  gap: 1px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.permissions-head,
.role-cell,
.permission-cell {
  min-width: 130px;
  padding: 10px;
  background: white;
}

.permissions-head {
  color: #40504c;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.role-cell {
  font-weight: 800;
}

.permission-cell {
  display: grid;
  gap: 7px;
}

.permission-cell label {
  display: flex;
  gap: 7px;
  align-items: center;
  font-size: 13px;
}

.metric,
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 14px;
}

.metric span {
  color: var(--muted);
  font-size: 13px;
}

.metric strong {
  display: block;
  margin-top: 8px;
  font-size: 28px;
}

.panel h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

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

.panel-head h2 {
  margin: 0;
}

.compact-list {
  display: grid;
  gap: 8px;
}

.compact-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px;
  border-radius: var(--radius);
  background: #f7faf9;
}

.compact-item-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
}

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

.catalog-form-grid label,
.object-checks {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.dialog-field {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 13px;
}

.dialog-field input {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 10px;
}

.column-settings-dialog {
  width: min(920px, calc(100vw - 24px));
}

.column-settings-dialog .item-card {
  max-height: min(84vh, 820px);
  overflow: auto;
}

.column-settings-section {
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.column-settings-section h3,
.column-role-section h4 {
  margin: 0 0 9px;
  font-size: 15px;
}

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

.column-checklist label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  font-size: 13px;
}

.admin-column-access {
  margin: 6px 0 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.admin-column-access > summary {
  padding: 11px 12px;
  cursor: pointer;
  font-weight: 800;
}

.admin-column-access > p,
.column-role-section {
  margin-right: 12px;
  margin-left: 12px;
}

.column-role-section {
  margin-bottom: 14px;
  overflow: auto;
}

.column-role-grid {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) repeat(7, 110px);
  gap: 1px;
  min-width: 960px;
  border: 1px solid var(--line);
  border-radius: 5px;
  overflow: hidden;
  background: var(--line);
}

.column-role-head,
.column-role-name,
.column-role-cell {
  min-height: 34px;
  padding: 7px 8px;
  background: white;
}

.column-role-head {
  background: #edf3f1;
  color: #40504c;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.column-role-name {
  font-size: 12px;
}

.column-role-cell {
  display: grid;
  place-items: center;
}

.column-settings-actions {
  position: sticky;
  bottom: -16px;
  padding: 10px 0 0;
  background: white;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.catalog-form-grid .wide,
.object-checks {
  grid-column: 1 / -1;
}

.object-checks > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.object-checks label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  color: var(--ink);
}

dialog {
  width: min(720px, calc(100vw - 24px));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0;
}

dialog::backdrop {
  background: rgb(0 0 0 / 0.28);
}

.stage-confirm-dialog {
  width: min(480px, calc(100vw - 24px));
}

.stage-confirm-request {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.stage-confirm-message {
  margin: 0;
  padding: 12px;
  border: 1px solid #d6e0e8;
  border-radius: 6px;
  background: #f3f7fa;
  color: var(--ink);
  line-height: 1.45;
}

.stage-confirm-actions {
  justify-content: flex-end;
  margin-top: 16px;
}

.stage-confirm-actions button {
  min-width: 118px;
}

.item-card {
  padding: 16px;
}

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

.dialog-head h2 {
  margin: 0;
}

.history {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.history-entry {
  padding: 10px;
  border-left: 3px solid var(--primary);
  background: #f7faf9;
}

.request-history-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.request-history-panel[hidden] {
  display: none;
}

.request-history-panel > summary {
  cursor: pointer;
  padding: 10px 12px;
  color: var(--ink);
  font-weight: 700;
}

.request-history-panel > summary span {
  display: inline-grid;
  min-width: 22px;
  min-height: 22px;
  place-items: center;
  margin-left: 6px;
  border-radius: 11px;
  background: #e6edf1;
  font-size: 12px;
}

.history-list {
  display: grid;
  gap: 8px;
  max-height: 420px;
  overflow: auto;
  padding: 0 12px 12px;
}

.history-entry {
  display: grid;
  gap: 5px;
  border-bottom: 1px solid var(--line);
  border-left: 0;
  background: transparent;
}

.history-entry-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.history-entry-head time,
.history-entry > span {
  color: var(--muted);
  font-size: 12px;
}

.history-change {
  display: grid;
  grid-template-columns: minmax(160px, 0.45fr) minmax(0, 1fr);
  gap: 10px;
  font-size: 13px;
}

.history-change span {
  overflow-wrap: anywhere;
}

.history-empty {
  padding: 18px;
  color: var(--muted);
  text-align: center;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  display: none;
  max-width: 360px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: #17211f;
  color: white;
  box-shadow: 0 12px 30px rgb(0 0 0 / 0.2);
}

.toast.is-visible {
  display: block;
}

@media (max-width: 980px) {
  .login-view {
    grid-template-columns: 1fr;
  }

  .mega-logo {
    margin-bottom: 28px;
  }

  .login-logo {
    margin-bottom: 28px;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 4;
    gap: 12px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .menu-top .sidebar {
    grid-template-columns: minmax(130px, 1fr) auto;
    padding: 8px 12px;
  }

  .menu-top .brand {
    grid-column: 1;
    grid-row: 1;
  }

  .menu-top .layout-switcher {
    grid-column: 2;
    grid-row: 1;
  }

  .menu-top .nav-tabs {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .menu-top .user-panel {
    display: none;
  }

  .nav-tabs {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .nav-tab {
    padding: 9px 7px;
    text-align: center;
  }

  .workspace {
    padding: 14px;
  }

  .topbar,
  .items-toolbar,
  .form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar-actions,
  .items-toolbar div,
  .form-actions {
    width: 100%;
  }

  .topbar-actions button,
  .items-toolbar button,
  .form-actions button {
    flex: 1;
  }

  .submit-request-cta {
    margin-left: 0;
  }

  .filters,
  .bulk-panel,
  .form-grid,
  .dashboard-grid,
  .split-layout,
  .catalog-grid,
  .catalog-form-grid,
  .object-checks > div,
  .people-details {
    grid-template-columns: 1fr;
  }

  .export-columns {
    grid-template-columns: 1fr;
  }

  .column-checklist {
    grid-template-columns: 1fr;
  }

  .topbar h1 {
    font-size: 23px;
  }

  .expand-cell-editor {
    width: 24px;
    min-height: 24px;
    background: #e8f0ef;
    opacity: 1;
  }

  .wrapped-cell-preview {
    min-height: 32px;
    padding-top: 6px;
    padding-right: 31px;
    padding-bottom: 6px;
    font-size: 12px;
  }

  .expanded-cell-dialog {
    width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
  }

  .expanded-cell-dialog .item-card {
    display: flex;
    min-height: min(78dvh, 620px);
    flex-direction: column;
  }

  #expandedCellInput {
    min-height: 40dvh;
    flex: 1;
    font-size: 16px;
  }
}

@media (max-width: 720px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  .menu-top .sidebar {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    min-height: auto;
    padding: 8px 10px;
  }

  .sidebar-toggle,
  .layout-switcher {
    display: none !important;
  }

  .menu-top .brand,
  .menu-top .sidebar-logo {
    width: 150px;
  }

  .menu-top .brand {
    grid-column: 1;
    grid-row: 1;
  }

  .mobile-logout {
    display: flex;
    grid-column: 2;
    grid-row: 1;
    min-height: 36px;
    gap: 6px;
    align-items: center;
    padding: 6px 9px;
    border-color: #536272;
    background: #2f3d4b;
    color: #edf4ff;
  }

  .mobile-logout svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
  }

  .menu-top .user-panel.mobile-admin-mode {
    display: block;
    grid-column: 1 / -1;
    grid-row: 3;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .menu-top .user-panel.mobile-admin-mode > strong,
  .menu-top .user-panel.mobile-admin-mode > #logoutBtn {
    display: none;
  }

  .menu-top .user-panel.mobile-admin-mode .admin-role-switcher {
    display: grid;
    width: 100%;
    gap: 4px;
  }

  .menu-top .user-panel.mobile-admin-mode .admin-role-switcher > span {
    display: block;
    color: #b9c6d5;
    font-size: 10px;
  }

  .menu-top .user-panel.mobile-admin-mode .admin-role-switcher select {
    width: 100%;
    max-width: none;
    min-height: 42px;
    font-size: 16px;
  }

  .menu-top .nav-tabs {
    grid-column: 1 / -1;
    grid-row: 2;
    gap: 4px;
    padding-bottom: 2px;
  }

  .menu-top .nav-tab {
    min-height: 40px;
    padding: 7px 9px;
  }

  .menu-top .workspace,
  .workspace {
    min-width: 0;
    padding: 10px;
  }

  .topbar {
    gap: 9px;
    margin-bottom: 10px;
  }

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

  .topbar-actions .new-request-cta {
    grid-column: 1 / -1;
    min-height: 46px;
  }

  .topbar-actions button {
    min-width: 0;
    padding-right: 6px;
    padding-left: 6px;
  }

  .request-form {
    min-width: 0;
  }

  .form-grid {
    gap: 8px;
  }

  .form-grid input,
  .form-grid select {
    min-height: 44px;
    font-size: 16px;
  }

  .items-toolbar {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    margin-top: 8px;
  }

  .items-toolbar > div {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 6px;
  }

  .items-toolbar > div #addItemBtn {
    grid-column: 1 / -1;
  }

  .items-toolbar button {
    min-height: 42px;
    min-width: 0;
    padding: 6px 8px;
  }

  .items-frame {
    max-height: none;
    overflow: visible;
    border: 0;
    background: transparent;
  }

  .items-table {
    display: block;
    width: 100% !important;
    min-width: 0 !important;
  }

  .items-table colgroup,
  .items-table thead {
    display: none;
  }

  .items-table tbody {
    display: grid;
    gap: 10px;
  }

  .items-table tbody tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    min-width: 0;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: white;
    box-shadow: 0 2px 7px rgb(31 48 59 / 0.06);
  }

  .items-table tbody tr::before {
    display: flex;
    grid-column: 1;
    grid-row: 1;
    align-items: center;
    color: #28404d;
    content: "Позиция " attr(data-position);
    font-size: 15px;
    font-weight: 800;
  }

  .items-table td {
    display: grid !important;
    min-width: 0;
    gap: 4px;
    padding: 0;
    border: 0;
    background: transparent !important;
    white-space: normal;
  }

  .items-table td::before {
    color: var(--muted);
    content: attr(data-item-label);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
  }

  .items-table td[data-item-key="select"] {
    display: flex !important;
    grid-column: 2;
    grid-row: 1;
    align-items: center;
    justify-content: flex-end;
  }

  .items-table td[data-item-key="select"]::before,
  .items-table td[data-item-key="position"] {
    display: none !important;
  }

  .items-table td[data-item-key="name"],
  .items-table td[data-item-key="specs"],
  .items-table td[data-item-key="note"],
  .items-table td[data-item-key="due"],
  .items-table td[data-item-key="supplier"],
  .items-table td[data-item-key="contact"],
  .items-table td[data-item-key="phone"],
  .items-table td[data-item-key="email"],
  .items-table td[data-item-key="invoice"],
  .items-table td[data-item-key="payment"],
  .items-table td[data-item-key="actions"] {
    grid-column: 1 / -1;
  }

  .items-table input:not([type="checkbox"]),
  .items-table select,
  .items-table textarea {
    min-height: 42px;
    padding: 7px 8px;
    font-size: 16px;
  }

  .items-table .wrapped-cell-preview {
    min-height: 44px;
    padding: 8px 34px 8px 9px;
    font-size: 14px;
    line-height: 1.35;
  }

  .items-table .expand-cell-editor {
    top: 6px;
    right: 6px;
    width: 28px;
    min-height: 28px;
  }

  .items-table .item-leading-tools {
    justify-content: flex-end;
  }

  .items-table .row-tools {
    display: flex !important;
    align-items: center;
    justify-content: flex-end;
    padding-top: 2px;
  }

  .items-table .row-tools::before {
    margin-right: auto;
  }

  .items-table .row-tools button {
    width: 38px;
    min-height: 38px;
  }

  .items-table tr.is-completed-item {
    border-color: #58a77d;
    background: #dcf2e5;
  }

  .add-item-inline {
    width: 44px;
    height: 42px;
    margin-top: 10px;
  }

  .request-form .form-actions {
    position: sticky;
    bottom: 0;
    z-index: 7;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 12px -10px -10px;
    padding: 9px 10px calc(9px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: rgb(238 243 247 / 0.96);
    backdrop-filter: blur(8px);
  }

  .request-form .form-actions button {
    min-height: 44px;
    min-width: 0;
  }

  .request-form .submit-request-cta {
    grid-column: 1 / -1;
    grid-row: 1;
    min-height: 50px;
  }

  .registry-table,
  .drafts-table,
  .trash-table {
    min-width: 680px;
  }

  .table-frame:not(.items-frame) {
    max-height: calc(100dvh - 205px);
  }
}
