:root {
  --ink: #0b2348;
  --ink-soft: #234a78;
  --sky: #1e78d7;
  --sky-soft: #7bc5ef;
  --mint: #1bb866;
  --lime: #7ad83c;
  --shell: rgba(255, 255, 255, 0.74);
  --shell-strong: rgba(255, 255, 255, 0.9);
  --line: rgba(11, 35, 72, 0.12);
  --shadow: 0 24px 60px rgba(15, 59, 104, 0.18);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --cell-width: 72px;
  --cell-height: 72px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: Aptos, "Segoe UI", "Trebuchet MS", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(30, 120, 215, 0.22), transparent 30%),
    radial-gradient(circle at bottom right, rgba(122, 216, 60, 0.24), transparent 28%),
    linear-gradient(160deg, #f1f9ff 0%, #f7fcf4 40%, #eef6ff 100%);
  overflow-x: hidden;
}

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

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.background-orb {
  position: fixed;
  inset: auto;
  border-radius: 999px;
  filter: blur(40px);
  opacity: 0.55;
  pointer-events: none;
}

.background-orb-a {
  width: 340px;
  height: 340px;
  top: -80px;
  right: -80px;
  background: rgba(30, 120, 215, 0.2);
}

.background-orb-b {
  width: 300px;
  height: 300px;
  left: -70px;
  bottom: -60px;
  background: rgba(122, 216, 60, 0.22);
}

.shell {
  position: relative;
  z-index: 1;
  width: min(1440px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 40px;
}

.glass-panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.72));
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: var(--shadow);
  border-radius: var(--radius-xl);
}

.eyebrow {
  margin: 0 0 6px;
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--sky);
}

.section-heading h1,
.section-heading h2,
.brand-card h1,
.topbar h1 {
  margin: 0;
  line-height: 1.05;
}

.login-panel {
  min-height: calc(100vh - 68px);
  display: grid;
  gap: 28px;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
}

.brand-card,
.login-form,
.topbar,
.workspace-nav,
.toolbar-card,
.info-panel,
.board-panel,
.section-toolbar,
.table-card {
  padding: 24px;
}

.brand-card {
  display: grid;
  gap: 18px;
  align-items: center;
  grid-template-columns: 112px 1fr;
}

.brand-card__mark {
  width: 112px;
  height: 112px;
  object-fit: contain;
}

.brand-card__copy {
  margin: 10px 0 0;
  max-width: 28rem;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--ink-soft);
}

.login-form {
  display: grid;
  gap: 16px;
}

.login-alert {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(196, 58, 58, 0.12);
  border: 1px solid rgba(196, 58, 58, 0.16);
  color: #8f2020;
  font-weight: 700;
}

.login-form label,
.modal-form label {
  display: grid;
  gap: 8px;
  font-weight: 600;
  color: var(--ink);
}

.login-form input,
.modal-form input,
.modal-form select,
.modal-form textarea {
  width: 100%;
  border: 1px solid rgba(35, 74, 120, 0.12);
  border-radius: 14px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
}

.modal-form input.batch-input {
  background: #111111;
  border-color: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.modal-form input.batch-input::placeholder {
  color: rgba(255, 255, 255, 0.74);
}

.login-form input:focus,
.modal-form input:focus,
.modal-form select:focus,
.modal-form textarea:focus {
  outline: 2px solid rgba(30, 120, 215, 0.2);
  border-color: rgba(30, 120, 215, 0.4);
}

.login-hint {
  border-radius: 16px;
  padding: 16px;
  background: rgba(30, 120, 215, 0.08);
  color: var(--ink-soft);
}

.login-hint p {
  margin: 6px 0;
}

.primary-button,
.secondary-button,
.ghost-button,
.mini-button,
.nav-button,
.switch-button {
  border: none;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 700;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover,
.mini-button:hover,
.nav-button:hover,
.switch-button:hover {
  transform: translateY(-1px);
}

.primary-button {
  background: linear-gradient(135deg, var(--sky), var(--mint));
  color: white;
  box-shadow: 0 16px 34px rgba(30, 120, 215, 0.22);
}

.secondary-button {
  background: rgba(11, 35, 72, 0.08);
  color: var(--ink);
}

.secondary-button.is-active {
  background: rgba(196, 58, 58, 0.14);
  color: #7f1f1f;
  box-shadow: inset 0 0 0 1px rgba(196, 58, 58, 0.16);
}

.ghost-button,
.nav-button,
.switch-button,
.mini-button {
  background: rgba(255, 255, 255, 0.8);
  color: var(--ink);
  border: 1px solid rgba(11, 35, 72, 0.08);
}

.nav-button.is-active,
.switch-button.is-active {
  background: linear-gradient(135deg, rgba(30, 120, 215, 0.15), rgba(27, 184, 102, 0.16));
  color: var(--ink);
  border-color: rgba(30, 120, 215, 0.22);
}

.app-shell {
  display: grid;
  gap: 18px;
}

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

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

.brand-inline__mark {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.topbar__meta {
  display: flex;
  align-items: center;
  gap: 18px;
}

.topbar__name {
  margin: 0;
  font-weight: 800;
}

.topbar__role {
  margin: 2px 0 0;
  color: var(--ink-soft);
}

.workspace-nav {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.feedback {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
  width: min(720px, calc(100vw - 32px));
  padding: 14px 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(11, 35, 72, 0.08);
  box-shadow: 0 18px 44px rgba(11, 35, 72, 0.16);
  color: var(--ink);
  backdrop-filter: blur(14px);
}

.feedback.is-error {
  background: rgba(196, 58, 58, 0.12);
  color: #7f1f1f;
  border-color: rgba(196, 58, 58, 0.18);
}

.workspace {
  display: grid;
}

.view-panel {
  display: grid;
  gap: 18px;
}

.toolbar-card,
.section-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  align-items: end;
}

.toolbar-card {
  flex-wrap: nowrap;
}

.section-toolbar input[type="search"] {
  min-width: min(320px, 100%);
  margin-left: auto;
}

.toolbar-group {
  display: grid;
  gap: 10px;
}

.toolbar-group--actions {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-left: auto;
  flex: 1 1 auto;
  justify-content: flex-end;
  min-width: 0;
  flex-wrap: nowrap;
}

.toolbar-group--actions .primary-button,
.toolbar-group--actions .secondary-button {
  white-space: nowrap;
}

.toolbar-search-button {
  margin-left: auto;
  position: relative;
}

.toolbar-search-button::before {
  content: '';
  position: absolute;
  left: -20px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  border-radius: 999px;
  background: rgba(11, 35, 72, 0.26);
}

.topbar__admin-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.camera-switch,
.mode-switch,
.zoom-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.camera-dropdown {
  position: relative;
}

.camera-dropdown[open] {
  z-index: 6;
}

.camera-dropdown__summary {
  list-style: none;
  cursor: pointer;
  min-width: 180px;
}

.camera-dropdown__summary::-webkit-details-marker {
  display: none;
}

.camera-dropdown__menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 220px;
  display: grid;
  gap: 8px;
  padding: 12px;
}

.camera-dropdown__item {
  border: 1px solid rgba(11, 35, 72, 0.08);
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  border-radius: 16px;
  padding: 12px 14px;
  text-align: left;
  font-weight: 700;
}

.plan-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 18px;
}

.info-panel {
  display: grid;
  gap: 18px;
  align-content: start;
}

.stat-grid {
  display: grid;
  gap: 12px;
}

.stat-card {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(30, 120, 215, 0.08);
}

.stat-card strong,
.helper-title {
  display: block;
  margin-bottom: 4px;
}

.helper-block {
  padding: 16px;
  border-radius: 18px;
  background: rgba(11, 35, 72, 0.05);
  color: var(--ink-soft);
}

.helper-block--tablet-only,
.board-dock__hint,
.corridor-controls__hint {
  display: none;
}

.helper-block p {
  margin: 0;
  line-height: 1.6;
}

.helper-block p + p {
  margin-top: 8px;
}

.board-panel {
  min-height: 70vh;
  overflow: hidden;
  display: grid;
  gap: 12px;
}

.board-scroll {
  width: 100%;
  height: 100%;
  min-height: 62vh;
  overflow: auto;
  padding: 10px;
  border-radius: 22px;
  background:
    linear-gradient(90deg, rgba(30, 120, 215, 0.04) 1px, transparent 1px),
    linear-gradient(rgba(30, 120, 215, 0.04) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(246, 251, 255, 0.82));
  background-size: calc(var(--cell-width) / 2) calc(var(--cell-height) / 2);
}

.board-scroll.gesture-mode {
  touch-action: none;
  overscroll-behavior: contain;
}

.board-grid {
  display: grid;
  gap: 6px;
  align-content: start;
}

.board-3d {
  position: relative;
  min-height: 62vh;
  padding: 24px;
}

.corridor-view {
  display: grid;
  gap: 16px;
}

.corridor-view__hud {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
}

.corridor-view__hud h3,
.corridor-view__hud p {
  margin: 0;
}

.corridor-view__coords {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(11, 35, 72, 0.07);
  font-weight: 700;
  color: var(--ink-soft);
}

.corridor-controls {
  display: grid;
  gap: 12px;
}

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

.corridor-controls__pad {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
}

.corridor-controls__hint {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.corridor-button {
  min-height: 56px;
  font-size: 1rem;
  font-weight: 800;
}

.corridor-button--move {
  min-height: 64px;
}

.corridor-button--back {
  grid-column: 1 / -1;
}

.corridor-scene {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  border-radius: 28px;
  background:
    radial-gradient(circle at 50% 12%, rgba(255, 255, 255, 0.98), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(228, 236, 246, 0.95) 42%, rgba(212, 223, 236, 0.98));
}

.corridor-scene__svg {
  width: 100%;
  height: 100%;
  display: block;
}

.corridor-svg__lane {
  stroke: rgba(11, 35, 72, 0.18);
  stroke-width: 3;
}

.corridor-svg__label,
.corridor-svg__meta,
.corridor-svg__slot {
  fill: var(--ink);
  font-weight: 800;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.92);
  stroke-width: 6px;
  stroke-linejoin: round;
}

.corridor-svg__meta,
.corridor-svg__slot {
  fill: var(--ink-soft);
}

@media (max-width: 1024px) {
  .board-3d {
    padding: 14px 14px 128px;
    min-height: 72vh;
  }

  .corridor-view__hud {
    align-items: start;
    flex-direction: column;
  }

  .corridor-controls {
    position: sticky;
    bottom: 0;
    z-index: 6;
    padding: 12px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(11, 35, 72, 0.08);
    box-shadow: 0 18px 32px rgba(11, 35, 72, 0.12);
    backdrop-filter: blur(12px);
  }

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

  .corridor-button--turn,
  .corridor-button--move,
  .corridor-button--back,
  .corridor-button--lane {
    min-height: 62px;
    font-size: 1rem;
  }

  .corridor-button--move,
  .corridor-button--back {
    grid-column: span 2;
  }

  .corridor-scene {
    min-height: 520px;
  }
}

@media (max-width: 680px) {
  .corridor-controls__lanes,
  .corridor-controls__pad {
    grid-template-columns: 1fr;
  }

  .corridor-button--move,
  .corridor-button--back {
    grid-column: auto;
  }

  .corridor-view__coords {
    width: 100%;
    text-align: center;
  }

  .corridor-scene {
    min-height: 440px;
  }
}

.consult-switch {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.board-slot {
  position: relative;
  width: var(--cell-width);
  height: var(--cell-height);
  border: 1px solid rgba(11, 35, 72, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  padding: 6px;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: left;
  box-shadow: inset 0 -8px 18px rgba(11, 35, 72, 0.04);
}

.board-slot--occupied {
  color: white;
  border-color: rgba(255, 255, 255, 0.45);
  box-shadow: 0 14px 22px rgba(11, 35, 72, 0.18);
}

.board-slot--occupied::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 34%;
  border-radius: 0 0 14px 14px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.14));
}

.board-slot--selected {
  outline: 3px solid rgba(27, 184, 102, 0.36);
  transform: translateY(-2px);
}

.board-slot--search-hit {
  transform: translateY(-2px);
  z-index: 4;
}

.board-slot--search-hit::before {
  content: "";
  position: absolute;
  inset: -1px;
  border: 4px solid rgba(255, 196, 0, 0.95);
  border-radius: 22px;
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.78),
    0 0 0 7px rgba(255, 196, 0, 0.34),
    0 14px 28px rgba(255, 196, 0, 0.26);
  pointer-events: none;
  animation: board-slot-search-hit-pulse 1.4s ease-in-out infinite;
  z-index: 1;
}

@keyframes board-slot-search-hit-pulse {
  0%,
  100% {
    border-color: rgba(27, 184, 102, 0.95);
    box-shadow:
      0 0 0 3px rgba(255, 255, 255, 0.78),
      0 0 0 7px rgba(27, 184, 102, 0.34),
      0 14px 28px rgba(27, 184, 102, 0.26);
    transform: scale(1);
  }

  50% {
    border-color: rgba(30, 120, 215, 0.95);
    box-shadow:
      0 0 0 3px rgba(255, 255, 255, 0.78),
      0 0 0 11px rgba(30, 120, 215, 0.34),
      0 18px 32px rgba(30, 120, 215, 0.28);
    transform: scale(1.06);
  }
}

.board-slot--move-selected {
  outline: 3px solid rgba(30, 120, 215, 0.5);
  transform: translateY(-2px);
}

.board-slot--delete-selected {
  outline: 3px solid rgba(214, 60, 60, 0.58);
  transform: translateY(-2px);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.44), 0 10px 22px rgba(214, 60, 60, 0.18);
}

.board-slot--selection-brush {
  outline: 3px dashed rgba(30, 120, 215, 0.42);
}

.board-slot--preview-valid {
  outline: 3px dashed rgba(27, 184, 102, 0.54);
}

.board-slot--preview-invalid {
  outline: 3px dashed rgba(214, 60, 60, 0.56);
}

.board-slot--drag-anchor {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.55), 0 0 0 6px rgba(30, 120, 215, 0.38);
}

.slot-meta,
.slot-index {
  position: relative;
  z-index: 1;
  font-size: 0.72rem;
  font-weight: 700;
}

.slot-index {
  color: rgba(11, 35, 72, 0.38);
}

.board-slot--occupied .slot-index {
  color: rgba(255, 255, 255, 0.82);
}

.slot-meta {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.slot-top {
  position: relative;
  z-index: 1;
}

.slot-quantity {
  position: absolute;
  inset: 50% 8px auto;
  transform: translateY(-42%);
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  pointer-events: none;
}

.slot-quantity--split {
  inset-inline: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
}

.slot-quantity__single,
.slot-quantity__part {
  font-weight: 900;
  font-size: 1.55rem;
  line-height: 1;
  letter-spacing: -0.04em;
  color: #fff;
  text-shadow:
    0 2px 6px rgba(11, 35, 72, 0.42),
    0 0 1px rgba(11, 35, 72, 0.72);
}

.slot-quantity__part {
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff !important;
}

.table-card {
  overflow: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.data-table th,
.data-table td {
  padding: 16px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.data-table th {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(30, 120, 215, 0.08);
  font-size: 0.86rem;
  font-weight: 700;
}

.pill.is-off {
  background: rgba(11, 35, 72, 0.08);
}

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

.link-button {
  border: none;
  background: transparent;
  color: var(--sky);
  font-weight: 700;
  padding: 0;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 18, 38, 0.38);
}

.modal__dialog {
  position: relative;
  width: min(820px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 26px;
}

.modal__close {
  position: absolute;
  top: 14px;
  right: 16px;
  border: none;
  background: transparent;
  font-size: 2rem;
  color: var(--ink-soft);
}

.board-print-preview {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: #ffffff;
  padding: 28px 34px 34px;
  overflow: auto;
}

.board-print-preview__close {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: none;
  border-radius: 999px;
  background: rgba(11, 35, 72, 0.92);
  color: #ffffff;
  font-size: 2rem;
  line-height: 1;
  box-shadow: 0 14px 30px rgba(11, 35, 72, 0.24);
  z-index: 2;
}

.board-print-preview__toolbar {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.board-print-preview__print {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--sky), var(--mint));
  color: #ffffff;
  font-size: 1.8rem;
  line-height: 1;
  box-shadow: 0 14px 30px rgba(30, 120, 215, 0.24);
}

.board-print-preview__pages {
  display: grid;
  gap: 28px;
  justify-items: center;
  padding-top: 10px;
}

.board-print-preview__page {
  width: min(100%, 1400px);
  min-height: calc(100vh - 120px);
  padding: 26px;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 18px 48px rgba(11, 35, 72, 0.12);
  border: 1px solid rgba(11, 35, 72, 0.08);
  display: grid;
  gap: 18px;
  align-content: start;
}

.board-print-preview__page-header h2,
.board-print-preview__page-header p {
  margin: 0;
}

.board-print-preview__page-header p {
  margin-top: 6px;
  color: var(--ink-soft);
  font-weight: 700;
}

.board-print-preview__page-grid-wrap {
  overflow: auto;
  padding: 6px;
}

.board-preview-grid {
  gap: 10px;
  justify-content: start;
  align-content: start;
  min-width: max-content;
}

.board-preview-grid .board-slot {
  width: var(--cell-width);
  height: var(--cell-height);
  border-radius: 18px;
  padding: 8px;
  box-shadow: inset 0 -10px 22px rgba(11, 35, 72, 0.06);
}

.board-preview-grid .slot-index,
.board-preview-grid .slot-meta {
  font-size: 0.96rem;
}

.board-preview-grid .slot-quantity__single,
.board-preview-grid .slot-quantity__part {
  font-size: 2rem;
}

body.board-print-preview-open {
  overflow: hidden;
}

.modal-form {
  display: grid;
  gap: 18px;
}

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

.form-card {
  padding: 16px;
  border-radius: 18px;
  background: rgba(11, 35, 72, 0.05);
}

.form-card h3 {
  margin: 0 0 12px;
}

.form-card--custom {
  background: rgba(27, 184, 102, 0.1);
  border: 1px solid rgba(27, 184, 102, 0.22);
}

.form-card--locked {
  opacity: 0.78;
}

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

.cell-card__header h3 {
  margin: 0;
}

.cell-card__toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.92rem;
}

.cell-card__toggle input {
  margin: 0;
}

.cell-card__note {
  margin: 0;
  color: var(--ink-soft);
}

.readonly-value {
  min-height: 52px;
  display: flex;
  align-items: center;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(11, 35, 72, 0.08);
  color: var(--ink);
  font-weight: 700;
  pointer-events: none;
  user-select: none;
}

.modal-feedback {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(30, 120, 215, 0.1);
  color: var(--ink);
  font-weight: 700;
}

.modal-feedback.is-error {
  background: rgba(178, 55, 55, 0.12);
  color: #8f2020;
  border: 1px solid rgba(178, 55, 55, 0.16);
}

.product-color-field {
  display: flex;
  align-items: center;
}

.product-color-field__picker {
  width: 86px;
  min-width: 86px;
  height: 52px;
  padding: 0;
  border: 1px solid rgba(11, 35, 72, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  overflow: hidden;
}

.product-color-field__picker::-webkit-color-swatch-wrapper {
  padding: 0;
}

.product-color-field__picker::-webkit-color-swatch {
  border: none;
  border-radius: 16px;
}

.product-color-field__picker::-moz-color-swatch {
  border: none;
  border-radius: 16px;
}

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

.selection-chip {
  display: inline-flex;
  margin: 4px 8px 0 0;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(27, 184, 102, 0.1);
  font-weight: 700;
}

.search-export-card {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.search-export-card__copy {
  margin: 6px 0 0;
  color: var(--ink-soft);
}

.search-export-card__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.package-cell-summary {
  margin-top: 14px;
  display: grid;
  gap: 8px;
  color: var(--ink-soft);
}

.package-cell-summary p {
  margin: 0;
}

.color-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

.color-chip__swatch {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid rgba(11, 35, 72, 0.14);
  flex: 0 0 auto;
}

.empty-state {
  padding: 26px;
  border-radius: 18px;
  background: rgba(11, 35, 72, 0.05);
  color: var(--ink-soft);
}

.board-dock {
  display: none;
  gap: 10px;
  padding: 10px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(11, 35, 72, 0.08);
}

.board-dock__modes,
.board-dock__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.board-dock__actions {
  margin-left: auto;
}

.board-dock__hint {
  width: 100%;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

@media (max-width: 1400px) {
  .toolbar-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: end;
    justify-content: stretch;
  }

  .toolbar-card > .toolbar-group {
    flex: 0 1 auto;
    min-width: 180px;
  }

  .toolbar-card > .toolbar-group:first-child {
    grid-column: 1;
    justify-self: start;
  }

  .toolbar-card > .toolbar-group:nth-child(2) {
    grid-column: 2;
    justify-self: center;
    text-align: center;
  }

  .toolbar-card > .toolbar-group:nth-child(2) .mode-switch {
    justify-content: center;
  }

  .toolbar-card > .toolbar-group:nth-child(3):not(.toolbar-group--actions) {
    grid-column: 3;
    justify-self: end;
  }

  .toolbar-group--actions {
    grid-column: 1 / -1;
    width: 100%;
    margin-left: 0;
    justify-content: stretch;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    align-items: stretch;
  }

  .toolbar-group--actions .primary-button,
  .toolbar-group--actions .secondary-button {
    width: 100%;
    min-width: 0;
  }

  .toolbar-search-button {
    margin-left: 0;
  }

  .toolbar-search-button::before {
    display: none;
  }

  .plan-layout {
    grid-template-columns: 1fr;
  }

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

  .helper-block:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .login-panel {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 18px;
  }

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

  .topbar__meta {
    width: 100%;
    justify-content: space-between;
  }

  .toolbar-card > .toolbar-group:nth-child(2) {
    margin-inline: auto;
    text-align: center;
  }

  .toolbar-card > .toolbar-group:nth-child(2) .mode-switch {
    justify-content: center;
  }

  .toolbar-card {
    display: flex;
  }

  .toolbar-group--actions {
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
    flex: 1 1 100%;
    grid-template-columns: 1fr 1fr;
  }

  .toolbar-group--actions .primary-button,
  .toolbar-group--actions .secondary-button {
    flex: 1 1 0;
  }

  .toolbar-search-button {
    margin-left: 0;
  }

  .toolbar-search-button::before {
    display: none;
  }

  .info-panel {
    grid-template-columns: 1fr;
  }

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

  .toolbar-card .toolbar-group:nth-child(2),
  .toolbar-card .toolbar-group--actions {
    display: none;
  }

  .board-dock {
    display: flex;
    position: sticky;
    bottom: 0;
    z-index: 3;
    align-items: center;
    flex-wrap: wrap;
    box-shadow: 0 -12px 32px rgba(15, 59, 104, 0.12);
  }

  .helper-block--tablet-only,
  .board-dock__hint,
  .corridor-controls__hint {
    display: block;
  }
}

@media (max-width: 700px) {
  .shell {
    width: min(100%, calc(100% - 18px));
    padding-top: 16px;
  }

  .brand-card,
  .login-form,
  .topbar,
  .workspace-nav,
  .toolbar-card,
  .info-panel,
  .board-panel,
  .section-toolbar,
  .table-card,
  .modal__dialog {
    padding: 18px;
    border-radius: 22px;
  }

  .brand-card {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .camera-switch,
  .mode-switch {
    gap: 8px;
  }

  .toolbar-group--actions {
    grid-template-columns: 1fr;
  }

  .board-slot {
    border-radius: 12px;
  }
}

@media (max-width: 900px) {
  .board-print-preview {
    padding: 18px;
  }

  .board-print-preview__page {
    min-height: auto;
    padding: 18px;
  }
}

@media print {
  body.board-print-preview-open .shell,
  body.board-print-preview-open .background-orb,
  body.board-print-preview-open .modal {
    display: none !important;
  }

  body.board-print-preview-open .board-print-preview {
    position: static;
    inset: auto;
    padding: 0;
    overflow: visible;
  }

  body.board-print-preview-open .board-print-preview__close {
    display: none !important;
  }

  body.board-print-preview-open .board-print-preview__print,
  body.board-print-preview-open .board-print-preview__toolbar {
    display: none !important;
  }

  body.board-print-preview-open .board-print-preview__page {
    width: 100%;
    min-height: auto;
    padding: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
    break-after: page;
    page-break-after: always;
  }

  body.board-print-preview-open .board-print-preview__page:last-child {
    break-after: auto;
    page-break-after: auto;
  }
}
