:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #eef3f6;
  --text: #17202a;
  --muted: #65717c;
  --line: #d8e0e6;
  --accent: #116c7a;
  --accent-strong: #0b5965;
  --success: #237a45;
  --warning: #a15c00;
  --danger: #b42318;
  --info: #315c9a;
  --shadow: 0 14px 38px rgba(22, 32, 42, 0.12);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

.inventory-count-header,
.inventory-import-panel {
  margin-bottom: 18px;
}

.inventory-preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.inventory-inline-filter {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  color: var(--muted);
  font-size: .9rem;
}

.inventory-inline-filter input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.inventory-count-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.inventory-count-header h2,
.inventory-import-panel h2 {
  margin: 0;
}

.inventory-count-header p,
.inventory-import-panel p {
  margin: 5px 0 0;
  color: var(--muted);
}

.inventory-count-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
  padding: 16px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.inventory-count-form .full {
  grid-column: span 2;
}

.inventory-count-mode,
.inventory-new-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--text);
}

.inventory-count-mode {
  flex-wrap: wrap;
  padding: 10px 14px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.inventory-count-mode > span { font-weight: 700; }
.inventory-count-mode small,
.inventory-new-item small { color: var(--muted); }

.inventory-date-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.inventory-date-field span {
  font-size: .88rem;
  font-weight: 700;
}

.inventory-date-field input {
  min-height: 34px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
}

.inventory-switch,
.inventory-new-item {
  cursor: pointer;
  user-select: none;
}

.inventory-switch input,
.inventory-new-item input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.inventory-switch span {
  position: relative;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: #aeb9c2;
  transition: background .18s ease;
}

.inventory-switch span::after,
.inventory-new-item span {
  content: "";
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.22);
}

.inventory-switch span::after {
  position: absolute;
  top: 3px;
  left: 3px;
  transition: transform .18s ease;
}

.inventory-switch input:checked + span { background: var(--accent); }
.inventory-switch input:checked + span::after { transform: translateX(18px); }

.inventory-new-item {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.inventory-new-item span {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 2px solid var(--muted);
  border-radius: 5px;
  box-shadow: none;
}

.inventory-new-item input:checked + span {
  border-color: var(--accent);
  background: var(--accent);
}

.inventory-new-item input:checked + span::after {
  content: "✓";
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}

.inventory-switch input:focus-visible + span,
.inventory-new-item input:focus-visible + span {
  outline: 3px solid rgba(17, 108, 122, .24);
  outline-offset: 2px;
}

/* Mantém o switch independente das regras globais de campos de formulário. */
.inventory-count-mode .inventory-switch {
  display: inline-flex !important;
  flex: 0 0 auto !important;
  align-items: center !important;
  gap: 8px !important;
  min-height: 26px !important;
}

.inventory-count-mode .inventory-switch > input {
  position: absolute !important;
  inline-size: 1px !important;
  block-size: 1px !important;
  margin: -1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.inventory-count-mode .inventory-switch-track {
  display: block !important;
  position: relative !important;
  flex: 0 0 42px !important;
  inline-size: 42px !important;
  block-size: 24px !important;
  border-radius: 999px !important;
  background: #aeb9c2 !important;
}

.inventory-count-mode .inventory-switch-track::after {
  content: "" !important;
  position: absolute !important;
  inset: 3px auto auto 3px !important;
  inline-size: 18px !important;
  block-size: 18px !important;
  border-radius: 50% !important;
  background: #fff !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .22) !important;
  transition: transform .18s ease !important;
}

.inventory-count-mode .inventory-switch > input:checked + .inventory-switch-track { background: var(--accent) !important; }
.inventory-count-mode .inventory-switch > input:checked + .inventory-switch-track::after { transform: translateX(18px) !important; }
.inventory-count-mode .inventory-switch > input:focus-visible + .inventory-switch-track { outline: 3px solid rgba(17, 108, 122, .24) !important; outline-offset: 2px !important; }

.inventory-csv-help {
  font-size: .86rem;
  margin-bottom: 14px !important;
}

.inventory-difference-positive { color: #18794e; font-weight: 700; }
.inventory-difference-negative { color: #c33b2b; font-weight: 700; }

@media (max-width: 720px) {
  .inventory-count-header { align-items: stretch; flex-direction: column; }
  .inventory-count-header .file-btn { justify-content: center; }
  .inventory-date-field { width: 100%; margin-left: 0; justify-content: space-between; }
  .inventory-count-form { grid-template-columns: 1fr; }
  .inventory-count-form .full { grid-column: auto; }
  .inventory-count-form .primary-btn { width: 100%; }
  .inventory-import-panel .panel-header { align-items: flex-start; gap: 12px; flex-direction: column; }
  .inventory-preview-actions { width: 100%; }
  .inventory-preview-actions button { flex: 1 1 140px; }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
}

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

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(17, 108, 122, 0.24);
  outline-offset: 2px;
  border-color: var(--accent);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.app-shell {
  display: grid;
  grid-template-columns: 264px 1fr;
  min-height: 100vh;
  transition: grid-template-columns 180ms ease;
}

.app-shell.sidebar-collapsed {
  grid-template-columns: 82px 1fr;
}

.sidebar {
  position: sticky;
  top: 10px;
  height: calc(100vh - 20px);
  height: calc(100dvh - 20px);
  margin: 0 0 10px 10px;
  border: 1px solid #272e3a;
  border-radius: 16px;
  background: #151a23;
  color: #f3f5f7;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: visible;
  overscroll-behavior: contain;
  box-shadow: 0 12px 32px rgba(8, 12, 18, 0.18);
  transition: padding 180ms ease, transform 180ms ease;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 60px;
  padding: 9px 38px 9px 9px;
  border: 1px solid #2b323f;
  border-radius: 12px;
  background: #1b202a;
}

.brand-copy {
  min-width: 0;
  flex: 1;
}

.brand-copy strong {
  font-size: 13px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.brand-logo {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  object-fit: contain;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: #929aa8;
  margin-top: 2px;
  font-size: 11px;
}

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

.sidebar-navigation-search {
  position: relative;
}

.sidebar-navigation-search input {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid #343d4b;
  border-radius: 9px;
  background: #1b202a;
  color: #f3f5f7;
  font: inherit;
  font-size: 12px;
}

.sidebar-navigation-search input::placeholder {
  color: #929aa8;
}

.sidebar-navigation-search input:focus-visible {
  outline: 2px solid #f5c400;
  outline-offset: 1px;
}

.sidebar-navigation-search-status {
  margin: -8px 0 0;
  color: #b7bfca;
  font-size: 12px;
}

.nav .nav-search-hidden {
  display: none !important;
}

.nav.is-searching .nav-subitems.nav-search-match:not([hidden]) {
  display: grid;
}

.sidebar-toggle,
.mobile-menu-btn {
  display: grid;
  place-items: center;
  padding: 0;
}

.sidebar-toggle {
  position: absolute;
  top: 30px;
  right: -11px;
  z-index: 2;
  width: 24px;
  height: 24px;
  border: 1px solid #343c49;
  border-radius: 7px;
  background: #1c222d;
  color: #b7bec9;
  box-shadow: 0 5px 12px rgba(5, 8, 13, 0.24);
}

.mobile-menu-btn {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border: 1px solid #e1e4e7;
  border-radius: 8px;
  background: #f7f8f9;
  color: #606870;
}

.sidebar-toggle:hover,
.sidebar-toggle:focus-visible {
  border-color: #4b5667;
  background: #2a313e;
  color: #ffffff;
}

.sidebar-toggle-icon {
  display: block;
  font-size: 20px;
  line-height: 1;
  transform: translateY(-1px);
}

.mobile-menu-btn,
.sidebar-overlay {
  display: none;
}

.app-shell.sidebar-collapsed .sidebar {
  padding-right: 9px;
  padding-left: 9px;
  z-index: 50;
}

.app-shell.sidebar-collapsed .brand {
  flex-direction: column;
  gap: 8px;
  padding: 8px 5px;
}

.app-shell.sidebar-collapsed .brand-logo {
  width: 40px;
  height: 40px;
  flex-basis: 40px;
}

.app-shell.sidebar-collapsed .brand-copy,
.app-shell.sidebar-collapsed .sidebar-navigation-search,
.app-shell.sidebar-collapsed .sidebar-action-item {
  display: none !important;
}

.app-shell.sidebar-collapsed .nav-subitems {
  display: none;
}

.app-shell.sidebar-collapsed .nav-item,
.app-shell.sidebar-collapsed .nav-parent {
  justify-content: center;
  gap: 0;
  min-height: 44px;
  padding: 10px;
  overflow: hidden;
  font-size: 0;
}

.app-shell.sidebar-collapsed .nav-parent .nav-chevron {
  display: none;
}

.app-shell.sidebar-collapsed .sidebar-footer .nav-parent,
.app-shell.sidebar-collapsed .sidebar-logout {
  justify-content: center;
  gap: 0;
  min-height: 44px;
  padding: 10px;
  overflow: hidden;
  font-size: 0;
}

.app-shell.sidebar-collapsed .nav-subitems.compact-flyout {
  position: fixed;
  top: var(--compact-flyout-top);
  left: var(--compact-flyout-left);
  z-index: 60;
  display: grid;
  width: min(220px, calc(100vw - var(--compact-flyout-left) - 12px));
  max-height: min(420px, calc(100vh - var(--compact-flyout-top) - 12px));
  margin: 0;
  padding: 8px;
  overflow-y: auto;
  border: 1px solid #343c49;
  border-radius: 10px;
  background: #1b202a;
  box-shadow: 0 16px 34px rgba(5, 8, 13, 0.34);
}

.app-shell.sidebar-collapsed .nav:has(.compact-flyout) {
  overflow: visible;
}

.app-shell.sidebar-collapsed .nav-subitems.compact-flyout > .nav-item,
.app-shell.sidebar-collapsed .nav-subitems.compact-flyout > .nav-parent,
.app-shell.sidebar-collapsed .nav-subitems.compact-flyout > .sidebar-action-item {
  display: flex !important;
  justify-content: flex-start;
  gap: 10px;
  min-height: 38px;
  padding: 8px 10px;
  overflow: visible;
  font-size: 13px;
}

.app-shell.sidebar-collapsed .nav-subitems.compact-flyout > .nav-parent .nav-chevron {
  display: block;
}

.app-shell.sidebar-collapsed .nav-subitems.compact-flyout .nav-subitems.open {
  position: static;
  display: grid;
  width: auto;
  max-height: none;
  margin: 0 0 0 18px;
  padding: 2px 0 2px 8px;
  overflow: visible;
  border: 0;
  border-left: 1px solid #343b47;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.app-shell.sidebar-collapsed .nav-subitems.compact-flyout .nav-subitems.open .nav-item {
  display: flex !important;
  justify-content: flex-start;
  gap: 8px;
  min-height: 36px;
  padding: 7px 9px;
  font-size: 12px;
}

.app-shell.sidebar-collapsed .nav-icon {
  width: 20px;
  height: 20px;
}

.nav {
  display: grid;
  gap: 4px;
  min-height: 0;
  overflow-y: auto;
  padding-right: 2px;
  scrollbar-width: thin;
  scrollbar-color: #343c48 transparent;
}

.nav-item,
.nav-parent {
  border: 0;
  background: transparent;
  color: #a1a8b3;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 9px 11px;
  border-radius: 8px;
  text-align: left;
  font-size: 14px;
  font-weight: 600;
}

.nav-parent {
  width: 100%;
}

.nav-item:hover,
.nav-parent:hover {
  background: #202631;
  color: #f4f6f8;
}

.nav-item.active {
  background: #343a48;
  color: #ffffff;
  box-shadow: 0 7px 16px rgba(7, 10, 15, 0.26);
}

.nav-parent.active {
  background: #232a36;
  color: #f4f6f8;
}

.nav-icon {
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-parent .nav-chevron {
  margin-left: auto;
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform 160ms ease;
}

[hidden] {
  display: none !important;
}

.login-screen {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr auto;
  color: #f7f8f6;
  background:
    radial-gradient(circle at 72% 45%, rgba(67, 100, 105, 0.3), transparent 28%),
    linear-gradient(112deg, rgba(10, 14, 15, 0.97) 0%, rgba(20, 25, 26, 0.93) 50%, rgba(9, 13, 14, 0.98) 100%);
}

.login-atmosphere {
  position: absolute;
  inset: 0;
  opacity: 0.34;
  pointer-events: none;
  background-image:
    linear-gradient(90deg, rgba(8, 13, 14, 0.64), rgba(8, 13, 14, 0.18) 52%, rgba(8, 13, 14, 0.54)),
    url("./assets-login/fundo-operacao.png"),
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-position: center;
  background-repeat: no-repeat, no-repeat, repeat, repeat;
  background-size: cover, cover, 44px 44px, 44px 44px;
}

.login-header,
.login-footer {
  position: relative;
  z-index: 2;
  min-height: 68px;
  padding: 0 clamp(22px, 5vw, 72px);
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 3px solid #f5c400;
  background: rgba(10, 13, 14, 0.64);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.login-footer {
  color: #b8c0c0;
  font-size: 11px;
  font-weight: 800;
}

.login-header strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(18px, 2vw, 24px);
  letter-spacing: 0.02em;
}

.login-layout {
  position: relative;
  z-index: 1;
  width: 100%;
  margin: auto;
  display: grid;
  place-items: center;
  padding: 8px 12px;
}

.login-fridge-stage {
  position: relative;
  width: min(386px, calc(100vw - 24px), calc((100vh - 124px) * 0.5078));
  aspect-ratio: 423 / 833;
  transform: translateX(15.5%);
}

.login-fridge-stage::after {
  content: "";
  position: absolute;
  left: 6%;
  right: 2%;
  bottom: 0;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.7);
  filter: blur(15px);
}

.login-fridge-stage > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  filter: drop-shadow(22px 26px 24px rgba(0, 0, 0, 0.5));
}

.login-form {
  position: absolute;
  top: 13.2%;
  left: 4.5%;
  z-index: 2;
  width: 60.5%;
  height: 52.1%;
  display: grid;
  grid-template-rows: repeat(4, 1fr);
  color: #17202a;
}

.login-form-heading {
  text-align: center;
}

.login-form-heading strong {
  display: block;
  font-size: clamp(17px, 2.7vh, 24px);
}

.login-form-heading small {
  display: block;
  margin-top: 2px;
  color: #566267;
  font-size: clamp(10px, 1.55vh, 13px);
}

.fridge-shelf-slot {
  display: grid;
  align-content: center;
  gap: clamp(2px, 0.5vh, 5px);
  min-width: 0;
  padding: 6% 7%;
}

.login-form > label > span {
  color: #263338;
  font-size: clamp(10px, 1.55vh, 13px);
  font-weight: 800;
}

.login-form input {
  width: 100%;
  height: clamp(34px, 5.2vh, 42px);
  padding: 0 clamp(7px, 1vw, 10px);
  border: 1px solid #536064;
  border-radius: 5px;
  outline: none;
  background: rgba(15, 20, 21, 0.92);
  color: #fff;
  font-size: clamp(12px, 1.95vh, 16px);
}

.login-form input:focus {
  border-color: #f5c400;
  box-shadow: 0 0 0 3px rgba(245, 196, 0, 0.13);
}

.password-field {
  position: relative;
}

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

.password-field button {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  padding: 4px;
  border: 0;
  background: transparent;
  color: #f5c400;
  font-size: clamp(9px, 1.3vh, 11px);
  font-weight: 800;
}

.login-error {
  position: absolute;
  top: 100%;
  left: 2%;
  right: 2%;
  min-height: 14px;
  margin: 3px 0 0;
  color: #a61b12;
  font-size: clamp(7px, 1.05vh, 9px);
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
}

.login-submit {
  width: 100%;
  min-height: clamp(36px, 5.4vh, 44px);
  border: 0;
  border-radius: 5px;
  background: #f5c400;
  color: #16191a;
  font-size: clamp(11px, 1.7vh, 14px);
  font-weight: 900;
}

.login-submit:hover {
  background: #ffdb43;
}

.login-submit:disabled {
  opacity: 0.65;
  cursor: wait;
}

.login-footer {
  min-height: 38px;
  justify-content: center;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-parent[aria-expanded="false"] .nav-chevron {
  transform: rotate(-45deg);
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.nav-subitems {
  display: none;
  gap: 4px;
  margin-left: 20px;
  padding-left: 10px;
  border-left: 1px solid #343b47;
}

.nav-subitems.open {
  display: grid;
}

.nav-subitem {
  padding-left: 9px;
}

.nav-nested-parent {
  padding-left: 9px;
}

.nav-nested-subitems {
  margin-left: 18px;
  padding-left: 8px;
}

.sidebar-footer {
  margin-top: auto;
  display: grid;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid #2d3440;
}

.sidebar-settings {
  display: grid;
  gap: 4px;
}

.sidebar-action-item.file-btn {
  display: flex;
  place-items: initial;
}

.sidebar-logout {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #e98d94;
  text-align: left;
  font-size: 14px;
  font-weight: 700;
}

.sidebar-logout:hover,
.sidebar-logout:focus-visible {
  background: rgba(218, 85, 95, 0.12);
  color: #ffabb1;
}

.main {
  min-width: 0;
  padding: 24px;
}

.topbar-heading {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 66px;
  margin: -24px -24px 20px;
  padding: 12px 24px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, #fff 0%, #f7fafc 100%);
}

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

.topbar p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.view-title-row { display: flex; align-items: baseline; gap: 8px; }
.view-breadcrumb { display: flex; align-items: center; gap: 7px; margin-bottom: 3px; color: var(--muted); font-size: 11px; }
.view-breadcrumb strong { color: var(--text); }
.topbar-right { display: flex; align-items: center; justify-content: flex-end; gap: 16px; }
.request-sync-notice-header { padding: 7px 10px; border: 1px solid #fecaca; border-radius: 6px; background: #fff5f5; font-size: 11px; }
.request-sync-notice-header .request-sync-status { margin: 0; font-size: 11px; }
.request-sync-notice-header .request-sync-details-btn { font-size: 11px; }

@media (max-width: 920px) {
  .topbar { margin: -16px -12px 16px; padding: 12px; }
  .topbar-right { width: 100%; justify-content: space-between; }
}

.request-sync-status.is-error {
  color: #b42318;
  font-weight: 700;
}

.request-sync-notice {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 10px;
}

.request-sync-notice .request-sync-status {
  margin-right: 0;
}

.request-sync-details-btn {
  color: #9c1c13;
  font-size: 13px;
  font-weight: 700;
}

.request-sync-failures-dialog {
  width: min(680px, calc(100vw - 28px));
}

.request-sync-failures-list {
  display: grid;
  gap: 10px;
}

.request-sync-failure-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
  border: 1px solid #e6b7b2;
  border-radius: 8px;
  background: #fff8f7;
}

.request-sync-failure-item strong,
.request-sync-failure-item small {
  display: block;
}

.request-sync-failure-item small {
  margin-top: 3px;
  color: var(--muted);
}

@media (max-width: 560px) {
  .request-sync-failure-item {
    align-items: stretch;
    flex-direction: column;
  }
}

.connection-status {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  color: #17683c;
  font-size: 13px;
  font-weight: 700;
}

.connection-status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #8a98a1;
}

.connection-status[data-state="online"] .connection-status-dot {
  background: #16803c;
}

.connection-status[data-state="offline"] {
  color: #b42318;
}

.connection-status[data-state="offline"] .connection-status-dot {
  background: #b42318;
}

.connection-status-detail {
  color: var(--muted);
  font-weight: 400;
}

.connection-retry-btn {
  margin-left: 4px;
  font-size: inherit;
  font-weight: 700;
}

.sync-origin-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  margin: 4px 0 0 4px;
  padding: 2px 7px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
}

.sync-origin-badge.is-server {
  border-color: #b9dec6;
  background: #edf9f0;
  color: #176b35;
}

.sync-origin-badge.is-local {
  border-color: #efc676;
  background: #fff7e5;
  color: #8a5900;
}

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

.primary-btn,
.secondary-btn,
.danger-btn,
.ghost-btn,
.text-btn,
.icon-btn {
  border-radius: 6px;
  min-height: 38px;
  border: 1px solid transparent;
}

.primary-btn {
  background: var(--accent);
  color: #fff;
  padding: 0 16px;
}

.primary-btn:hover {
  background: var(--accent-strong);
}

.secondary-btn {
  background: var(--surface);
  border-color: var(--line);
  color: var(--text);
  padding: 0 14px;
}

.ghost-btn {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
  color: #eef6f8;
  padding: 0 12px;
}

.text-btn {
  background: transparent;
  color: var(--accent);
  padding: 0;
  min-height: auto;
}

.icon-btn {
  width: 38px;
  min-height: 38px;
  flex: 0 0 38px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #6d8191;
  font-size: 34px;
  font-weight: 400;
  line-height: 1;
}

.icon-btn:hover {
  color: var(--accent-strong);
}

.icon-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.file-btn {
  display: grid;
  place-items: center;
}

.file-btn input {
  display: none;
}

.view {
  display: none;
}

.active-view {
  display: block;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

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

.metric-card {
  padding: 16px;
}

.metric-card span,
.metric-card small {
  color: var(--muted);
}

.metric-card strong {
  display: block;
  font-size: 32px;
  margin: 8px 0 4px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 16px;
}

.panel {
  padding: 16px;
}

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

.header-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

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

.queue-list {
  display: grid;
  gap: 10px;
}

.queue-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
}

.queue-item:first-child {
  border-top: 0;
}

.queue-item strong,
.queue-item small {
  display: block;
}

.queue-item small {
  color: var(--muted);
  margin-top: 3px;
}

.toolbar {
  margin-bottom: 12px;
}

.toolbar-help {
  flex-basis: 100%;
  color: var(--muted);
  font-size: 12px;
}

.multi-select-filter {
  position: relative;
  min-width: 220px;
}

.multi-select-filter summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  list-style: none;
}

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

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

.multi-select-filter[open] summary {
  border-color: var(--accent);
}

.multi-select-filter-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 5px);
  left: 0;
  display: grid;
  min-width: 260px;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16);
}

.multi-select-filter-menu label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  cursor: pointer;
}

.multi-select-filter-menu input {
  min-height: 0;
  margin: 0;
}

.multi-select-filter-menu .small-btn {
  margin-top: 4px;
}

.search-input,
select,
input,
textarea {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 6px;
  min-height: 38px;
  padding: 8px 10px;
  color: var(--text);
}

.search-input {
  min-width: min(420px, 100%);
  flex: 1;
}

#requestSearch {
  min-width: min(260px, 100%);
}

#requestGvFilter {
  min-width: 210px;
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-profile-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  text-align: left;
}

.user-profile-btn:hover,
.user-profile-btn:focus-visible {
  background: var(--surface-2);
  outline: none;
}

.user-profile-copy strong,
.user-profile-copy small {
  display: block;
}

.user-profile-copy small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.user-avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #16262d;
  color: #f3c744;
  font-size: 12px;
  font-weight: 900;
}

body[data-role="director"] [data-admin-only],
body[data-role="director"] [data-administrator-only],
body[data-role="marketing"] [data-administrator-only] {
  display: none !important;
}

body[data-role="sales_manager"] button[data-view="dashboard"],
body[data-role="sales_manager"] button[data-view="today"],
body[data-role="sales_manager"] button[data-view="comodatoPrint"],
body[data-role="sales_manager"] #requestGvFilter,
body[data-role="sales_manager"] [data-admin-only],
body[data-role="sales_manager"] [data-administrator-only] {
  display: none !important;
}

body[data-role="director"] #clearTurnoverBtn,
body[data-role="director"] #issueTurnoverPdfBtn,
body[data-role="director"] #printTurnoverBtn { display: none !important; }

.director-dashboard-note { display: grid; gap: 8px; padding: 18px; border-radius: 12px; background: linear-gradient(135deg, #f2f7f7, #fff9e1); }
.director-dashboard-note small { color: var(--muted); line-height: 1.5; }

.catalog-status {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.catalog-status.is-error {
  color: var(--danger);
}

.materials-table-wrap table {
  min-width: 1260px;
}

.sales-team-table-wrap table {
  min-width: 820px;
}

.sales-team-table-wrap th:last-child,
.sales-team-table-wrap td:last-child {
  width: 180px;
  text-align: right;
}

.materials-table-wrap th:first-child,
.materials-table-wrap td:first-child {
  width: 180px;
}

.materials-table-wrap th:last-child,
.materials-table-wrap td:last-child {
  width: 180px;
  text-align: right;
}

.list-filters select {
  min-width: 170px;
  max-width: 240px;
}

.nav-image {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  object-fit: contain;
  filter: invert(1);
}

.app-shell.sidebar-collapsed .nav-image {
  width: 20px;
  height: 20px;
  flex-basis: 20px;
}

.customer-filters {
  flex-wrap: wrap;
  overflow-x: visible;
  align-items: flex-end;
}

.customer-filters .search-input,
.customer-filters #customerRnFilter,
.customer-filters #customerGvFilter,
.customer-filters #customerStatusFilter {
  flex: 1 1 180px;
  width: auto;
  min-width: 0;
  max-width: none;
}

#customerCodeFilter {
  flex: 0 1 110px;
}

#customerNameFilter {
  flex: 2 1 260px;
}

#customerDocumentFilter {
  flex-basis: 180px;
}

.customer-inactive-filter {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font-size: 13px;
  white-space: nowrap;
  cursor: pointer;
}

.customer-inactive-filter input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.customer-filters .catalog-status {
  flex: 1 0 100%;
  margin-left: 0;
  white-space: normal;
}

.inventory-table-wrap table {
  min-width: 1100px;
}

.inventory-table-wrap th,
.inventory-table-wrap td {
  padding: 7px 8px;
  font-size: 12px;
  white-space: nowrap;
}

.inventory-table-wrap th:nth-child(1) { width: 58px; }
.inventory-table-wrap th:nth-child(2) { min-width: 170px; white-space: normal; }
.inventory-table-wrap th:nth-child(n + 3):nth-child(-n + 9) { width: 70px; text-align: center; }
.inventory-table-wrap th:nth-child(10) { width: 64px; }
.inventory-table-wrap th.inventory-image-cell { width: 58px; }
.inventory-table-wrap th.inventory-notes-cell { min-width: 150px; white-space: normal; }
.inventory-table-wrap th.inventory-actions-cell { width: 120px; }

.inventory-table-wrap td:nth-child(n + 3):nth-child(-n + 9),
.inventory-table-wrap td:nth-child(10) {
  text-align: center;
}

.inventory-table-wrap td.inventory-image-cell {
  text-align: center;
}

.inventory-image {
  display: block;
  width: 58px;
  height: 84px;
  object-fit: cover;
  border-radius: 4px;
}

.refrigerator-stock-summary {
  display: grid;
  grid-template-columns: repeat(7, minmax(110px, 1fr));
  gap: 10px;
  margin: 0 0 14px;
  overflow-x: auto;
}

.refrigerator-stock-summary article {
  min-width: 110px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.refrigerator-stock-summary span,
.refrigerator-stock-summary strong {
  display: block;
}

.refrigerator-stock-summary span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.refrigerator-stock-summary strong {
  margin-top: 4px;
  font-size: 22px;
}

.material-stock-summary {
  grid-template-columns: repeat(7, minmax(140px, 1fr));
}

.gift-stock-summary {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
}

.inventory-stock-toolbar {
  gap: 12px;
  margin-bottom: 16px;
}

.inventory-search-field {
  position: relative;
  display: flex;
  min-width: 280px;
  flex: 1 1 420px;
  align-items: center;
}

.inventory-search-field > svg {
  position: absolute;
  left: 14px;
  z-index: 1;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: #496078;
  stroke-width: 1.8;
  pointer-events: none;
}

.inventory-search-field .search-input {
  width: 100%;
  min-height: 44px;
  padding-left: 43px;
  border-radius: 8px;
  background: var(--surface);
}

.inventory-stock-toolbar > select,
.inventory-stock-toolbar .inventory-inline-filter,
.inventory-stock-toolbar .multi-select-filter summary,
.inventory-stock-toolbar > button {
  min-height: 44px;
  border-radius: 8px;
}

.inventory-stock-toolbar .inventory-inline-filter {
  padding: 0 4px 0 12px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.inventory-stock-toolbar .inventory-inline-filter select {
  border: 0;
  background: transparent;
}

.inventory-stock-toolbar .inventory-create-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  box-shadow: 0 6px 14px rgba(27, 91, 214, 0.18);
}

.inventory-stock-toolbar .secondary-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 750;
}

.button-icon {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.refrigerator-stock-summary {
  gap: 12px;
  margin-bottom: 16px;
}

.refrigerator-stock-summary article.inventory-summary-card {
  display: flex;
  min-width: 140px;
  min-height: 82px;
  align-items: center;
  gap: 13px;
  padding: 13px 14px;
  border-color: #dce5ee;
  border-radius: 9px;
  box-shadow: 0 4px 12px rgba(24, 43, 61, 0.045);
}

.inventory-summary-icon {
  display: grid !important;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 12px;
}

.inventory-summary-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.inventory-summary-icon img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.inventory-summary-copy {
  min-width: 0;
}

.refrigerator-stock-summary .inventory-summary-copy > span {
  color: #63758a;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.15;
}

.refrigerator-stock-summary .inventory-summary-copy > strong {
  margin-top: 5px;
  color: #12243a;
  font-size: 23px;
  line-height: 1;
}

.inventory-summary-blue .inventory-summary-icon { color: #1574d8; background: #e9f4ff; }
.inventory-summary-green .inventory-summary-icon { color: #099968; background: #e7f8f1; }
.inventory-summary-orange .inventory-summary-icon { color: #e58b00; background: #fff4da; }
.inventory-summary-purple .inventory-summary-icon { color: #6c54db; background: #f0edff; }
.inventory-summary-red .inventory-summary-icon { color: #e34652; background: #ffebed; }
.inventory-summary-blue .inventory-summary-copy > strong { color: #1268c4; }
.inventory-summary-green .inventory-summary-copy > strong { color: #098a5e; }
.inventory-summary-orange .inventory-summary-copy > strong { color: #d58200; }
.inventory-summary-purple .inventory-summary-copy > strong { color: #654bcf; }
.inventory-summary-red .inventory-summary-copy > strong { color: #d83240; }

.inventory-list-panel {
  overflow: hidden;
  border: 1px solid #dce5ee;
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 5px 16px rgba(24, 43, 61, 0.05);
}

.inventory-list-header {
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 16px;
}

.stock-availability-tabs {
  display: inline-flex;
  flex: 0 0 auto;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.stock-availability-tab {
  border: 0;
  border-radius: 6px;
  padding: 7px 11px;
  background: transparent;
  color: var(--muted);
  font-weight: 750;
}

.stock-availability-tab:hover { background: rgba(23, 44, 60, .055); color: #24435a; }
.stock-availability-tab.is-active { background: #172c3c; color: #fff; box-shadow: 0 2px 5px rgba(12, 30, 43, .16); }
.stock-availability-tab span { margin-left: 4px; font-size: .85em; }

.inventory-list-heading {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.inventory-list-icon {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #dcecff;
  border-radius: 8px;
  color: #1475da;
  background: #f5faff;
}

.inventory-list-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.inventory-list-heading h2,
.inventory-list-heading p {
  margin: 0;
}

.inventory-list-heading h2 {
  color: #13253a;
  font-size: 17px;
}

.inventory-list-heading p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.inventory-list-count {
  flex: 0 0 auto;
  color: #627389;
  font-size: 12px;
  font-weight: 650;
}

.inventory-list-panel > .inventory-table-wrap {
  border: 0;
  border-top: 1px solid #e1e8ef;
  border-radius: 0;
}

.inventory-stock-view .inventory-table-wrap th {
  padding-top: 9px;
  padding-bottom: 9px;
  color: #30445b;
  background: #f3f7fa;
  font-size: 11px;
}

.inventory-stock-view .inventory-table-wrap td {
  padding-top: 8px;
  padding-bottom: 8px;
  color: #253a50;
}

.inventory-stock-view .inventory-table-wrap tbody tr:hover td {
  background: #f8fbfe;
}

.inventory-stock-view .inventory-table-wrap .inventory-segment-header th {
  padding: 8px 14px;
  border-top: 1px solid #cfdce8;
  border-bottom: 1px solid #dbe5ee;
  color: #173e61;
  background: #eaf3fa;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .01em;
  text-align: left;
  text-transform: none;
}

.inventory-segment-header span {
  margin-right: 8px;
  color: #5f7891;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.inventory-code-cell {
  white-space: nowrap;
}

.inventory-drag-handle {
  display: inline-flex;
  width: 18px;
  min-height: 26px;
  align-items: center;
  justify-content: center;
  margin-right: 5px;
  border-radius: 5px;
  color: #8292a4;
  cursor: grab;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -4px;
  user-select: none;
  vertical-align: middle;
}

.inventory-drag-handle:hover {
  color: var(--accent);
  background: #eaf4ff;
}

.inventory-drag-handle:active {
  cursor: grabbing;
}

[data-stock-row].dragging {
  opacity: 0.45;
}

[data-stock-row].drop-before td {
  box-shadow: inset 0 3px 0 var(--accent);
}

[data-stock-row].drop-after td {
  box-shadow: inset 0 -3px 0 var(--accent);
}

.inventory-stock-view .inventory-image {
  width: 46px;
  height: 56px;
  border: 1px solid #e2e8ee;
  border-radius: 7px;
}

.inventory-gift-list-panel .gift-stock-groups {
  gap: 12px;
  padding: 14px;
  border-top: 1px solid #e1e8ef;
  background: #f6f9fc;
}

.gift-stock-groups {
  display: grid;
  gap: 14px;
}

.gift-stock-model-group {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 4px 14px rgba(26, 43, 58, 0.05);
}

.gift-stock-model-header {
  display: flex;
  min-height: 64px;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: linear-gradient(115deg, #fff 0%, #f8fbff 100%);
}

.gift-stock-model-icon {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(145deg, #68b1ff, #347fdd);
  box-shadow: 0 5px 12px rgba(52, 127, 221, 0.2);
}

.gift-stock-model-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.gift-stock-model-header h2 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.2;
}

.gift-stock-model-meta {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  gap: 7px;
  padding: 0 11px;
  border-radius: 999px;
  color: #1764b4;
  background: #e7f2ff;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.gift-stock-model-meta i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
}

.gift-stock-model-group .gift-stock-table-wrap {
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
}

.gift-stock-table-wrap table {
  min-width: 960px;
  table-layout: fixed;
}

.gift-stock-table-wrap th:nth-child(2),
.gift-stock-table-wrap td:nth-child(2) {
  width: 230px;
  min-width: 230px;
  max-width: 230px;
  white-space: normal;
}

.gift-stock-table-wrap td.gift-stock-description-cell {
  line-height: 1.35;
}

.gift-stock-model-group .gift-stock-table-wrap th.inventory-notes-cell,
.gift-stock-table-wrap td.inventory-notes-cell {
  width: 160px;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.gift-stock-table-wrap .gift-stock-available-cell strong {
  color: #0969c3;
  font-size: 14px;
}

.gift-stock-empty {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.inventory-image-button {
  display: inline-flex;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  cursor: zoom-in;
}

.refrigerator-image-upload {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  flex-wrap: wrap;
}

.refrigerator-image-upload-preview {
  width: 92px;
  height: 128px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  object-fit: cover;
  background: var(--surface-2);
}

.refrigerator-image-upload input[type="file"] {
  display: block;
  max-width: 100%;
}

.refrigerator-image-upload small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}

.refrigerator-image-upload .checkbox-field {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
  font-size: 13px;
}

.inventory-image-dialog {
  width: min(720px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 14px;
  border: 0;
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.38);
}

.inventory-image-dialog::backdrop {
  background: rgba(7, 13, 18, 0.72);
}

.inventory-image-dialog .icon-btn {
  display: block;
  margin: 0 0 8px auto;
}

.inventory-image-dialog img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 100px);
  margin: 0 auto;
  object-fit: contain;
}

.pagination-bar {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 10px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
}

.pagination-summary {
  font-weight: 700;
  color: var(--text);
}

.pagination-size,
.pagination-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pagination-size select {
  min-height: 32px;
  padding: 4px 8px;
}

.pagination-actions button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.table-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: auto;
}

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

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

th {
  background: var(--surface-2);
  color: #34434d;
  font-weight: 700;
  position: sticky;
  top: 0;
  z-index: 1;
}

td {
  color: #25313a;
}

tr:hover td {
  background: #f9fbfc;
}

.row-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

.small-btn {
  min-height: 30px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 6px;
  padding: 0 9px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: #edf2f7;
  color: #334155;
  white-space: nowrap;
}

.badge.success {
  background: #e6f4ec;
  color: var(--success);
}

.badge.warning {
  background: #fff4df;
  color: var(--warning);
}

.badge.danger {
  background: #ffebe8;
  color: var(--danger);
}

.badge.info {
  background: #e8f0ff;
  color: var(--info);
}

.route-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(240px, 1fr));
  gap: 14px;
}

/* Acompanhamento de rotas: superfície de consulta rápida e ação por rota. */
.routes-page-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin: 0 0 18px;
}

.route-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.route-action-icon {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.route-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  overflow: hidden;
  margin-bottom: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.route-metric {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 104px;
  padding: 20px 22px;
  border-right: 1px solid var(--line);
}

.route-metric:last-child { border-right: 0; }

.route-metric-icon {
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  font-size: 23px;
  font-weight: 800;
}

.route-metric-icon.blue { background: #edf3ff; color: #1b5bd6; }
.route-metric-icon.green { background: #edf8f0; color: #17823d; }
.route-metric-icon.orange { background: #fff4e5; color: #d97706; }
.route-metric-icon.red { background: #fff0f0; color: #d92d20; }

.route-metric-svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.route-metric strong,
.route-metric small { display: block; }
.route-metric strong { color: #152534; font-size: 23px; line-height: 1.1; }
.route-metric small { margin-top: 5px; color: var(--muted); font-size: 13px; }

.routes-filters {
  display: grid;
  grid-template-columns: minmax(260px, 1.5fr) minmax(180px, .8fr) minmax(180px, .8fr) auto;
  gap: 12px;
  align-items: stretch;
  margin-bottom: 14px;
}

.route-search-field,
.route-filter-field {
  position: relative;
  display: flex;
  min-height: 50px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.route-search-field .search-input {
  width: 100%;
  min-height: 48px;
  padding-left: 44px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.route-search-field .search-input:focus { outline: 0; }
.route-search-field:focus-within,
.route-filter-field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(17, 108, 122, .12); }

.route-filter-icon {
  position: absolute;
  left: 16px;
  color: #566979;
  font-size: 25px;
  line-height: 1;
}

.route-filter-field {
  display: grid;
  grid-template-columns: 1fr;
  align-content: center;
  padding: 5px 12px 4px;
}

.route-filter-field > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.route-filter-field input,
.route-filter-field select {
  width: 100%;
  min-height: 22px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 14px;
}

.route-filter-field input:focus,
.route-filter-field select:focus { outline: 0; }

.route-clear-filters { min-height: 50px; white-space: nowrap; }

.routes-table-wrap { min-width: 0; }
.routes-table-shell { overflow: hidden; }
.routes-table { min-width: 1120px; }
.routes-table th { height: 48px; background: #f7f9fb; color: #3b526b; font-size: 12px; }
.routes-table td { padding-top: 12px; padding-bottom: 12px; vertical-align: middle; }
.routes-table tbody tr:last-child td { border-bottom: 0; }
.routes-table small { display: block; margin-top: 5px; color: #64748b; font-size: 11px; text-transform: uppercase; }
.route-name-cell { min-width: 250px; }
.route-name-cell strong { color: #17202a; font-size: 13px; }
.route-city { display: flex !important; align-items: center; gap: 5px; }
.route-city-icon { width: 12px; height: 12px; object-fit: contain; opacity: .7; }
.routes-table td:nth-child(2) { white-space: nowrap; }
.routes-table td:nth-child(3) { min-width: 160px; }

.route-progress-cell { min-width: 145px; }
.route-progress-cell > span { display: block; color: #425466; font-size: 13px; }
.route-progress-cell strong { color: #243b53; }
.route-table-progress {
  height: 4px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 99px;
  background: #e6ebef;
}

.route-table-progress span { display: block; height: 100%; border-radius: inherit; }
.route-table-progress-delivery span { background: #1d8a46; }
.route-table-progress-pending span { background: #cf2424; }

.route-row-actions { display: flex; align-items: center; justify-content: flex-start; gap: 8px; min-width: 260px; }
.route-row-btn { min-height: 34px; padding: 0 12px; white-space: nowrap; font-size: 12px; }
.route-more-action { width: 32px; min-height: 32px; padding: 0; font-size: 19px; line-height: 1; }
.route-add-item-action { border-radius: 50%; color: var(--accent-strong); font-size: 23px; font-weight: 500; }
.route-overflow-action { font-size: 22px; font-weight: 800; }
.route-legacy-actions .row-actions { justify-content: flex-end; }
.route-extra-action { display: none; }

.route-actions-dialog { width: min(360px, calc(100vw - 28px)); }
.route-actions-menu { display: grid; gap: 6px; margin-top: 18px; }
.route-menu-action {
  min-height: 42px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  text-align: left;
  font: inherit;
  font-weight: 650;
}
.route-menu-action:hover:not(:disabled), .route-menu-action:focus-visible:not(:disabled) { background: var(--surface-2); outline: 0; }
.route-menu-action.danger { color: var(--danger); }
.route-menu-action:disabled { color: var(--muted); cursor: not-allowed; opacity: .62; }

.route-add-requests-dialog { width: min(700px, calc(100vw - 28px)); }
.route-add-requests-list { display: grid; gap: 8px; max-height: min(52vh, 460px); overflow: auto; }
.route-add-request-option {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}
.route-add-request-option:hover { background: #f6faf9; }
.route-add-request-option input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); }
.route-add-request-option strong, .route-add-request-option small { display: block; }
.route-add-request-option small { margin-top: 3px; color: var(--muted); font-size: 12px; }

.route-start-dialog { width: min(620px, calc(100vw - 28px)); }
.route-start-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 20px; }
.route-start-option {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  min-height: 132px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
  font: inherit;
}
.route-start-option:hover, .route-start-option:focus-visible { border-color: var(--accent); background: #f4faf9; outline: 0; }
.route-start-option-icon { display: grid; width: 42px; height: 42px; flex: 0 0 auto; place-items: center; border-radius: 50%; }
.route-start-option-icon.truck { background: #edf3ff; color: #1b5bd6; }
.route-start-option-icon.sellers { background: #edf8f0; color: #17823d; }
.route-start-option-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.route-start-option strong, .route-start-option small { display: block; }
.route-start-option strong { margin: 2px 0 6px; font-size: 15px; }
.route-start-option small { color: var(--muted); font-size: 12px; line-height: 1.45; }

.routes-table-footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  min-height: 66px;
  padding: 0 20px;
  border-top: 1px solid var(--line);
  color: #425466;
  font-size: 12px;
}

.routes-table-footer > :last-child { justify-self: end; }
.routes-pagination { display: flex; align-items: center; gap: 8px; }
.routes-pagination button { width: 34px; min-height: 34px; padding: 0; font-size: 22px; line-height: 1; }
.routes-pagination strong { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 6px; background: var(--accent); color: #fff; }

@media (max-width: 1180px) {
  .routes-page-actions { justify-content: flex-start; }
  .route-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .route-metric:nth-child(3) { border-right: 0; }
  .route-metric:nth-child(-n+3) { border-bottom: 1px solid var(--line); }
  .routes-filters { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .routes-page-actions { display: grid; grid-template-columns: 1fr; }
  .route-metrics { grid-template-columns: 1fr; }
  .route-metric, .route-metric:nth-child(3) { min-height: 76px; border-right: 0; border-bottom: 1px solid var(--line); }
  .route-metric:last-child { border-bottom: 0; }
  .routes-filters { grid-template-columns: 1fr; }
  .route-clear-filters { width: 100%; }
  .routes-table-footer { grid-template-columns: 1fr; justify-items: center; padding: 14px; }
  .routes-table-footer > :last-child { justify-self: center; }
  .route-start-options { grid-template-columns: 1fr; }
}

.danger-btn {
  min-height: 38px;
  border: 1px solid var(--danger);
  border-radius: 6px;
  background: var(--danger);
  color: #fff;
  padding: 0 14px;
}

.route-vendors-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 14px;
  margin-bottom: 16px;
}

.route-vendors-toolbar .field {
  width: min(100%, 360px);
}

.route-vendors-toolbar .field:first-child {
  width: min(100%, 200px);
}

#routeMktTruckView .route-vendors-toolbar .field:first-child {
  width: min(100%, 360px);
}

.route-ocp-toolbar { justify-content: space-between; }

.mkt-truck-ocp-content { max-width: 1120px; margin: 0 auto; }

.mkt-truck-ocp-sheet {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 28px;
}

.mkt-truck-ocp-header,
.mkt-truck-ocp-stop > header,
.mkt-truck-ocp-stop > header > div { display: flex; align-items: flex-start; }

.mkt-truck-ocp-header {
  justify-content: space-between;
  gap: 24px;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 18px;
}

.mkt-truck-ocp-kicker {
  margin: 0 0 4px;
  color: var(--accent-strong);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .75rem;
}

.mkt-truck-ocp-header h2,
.mkt-truck-ocp-stop h3,
.mkt-truck-ocp-stop h4 { margin: 0; }

.mkt-truck-ocp-header p,
.mkt-truck-ocp-stop p { margin: 5px 0 0; color: var(--muted); }

.mkt-truck-ocp-route-meta {
  display: grid;
  grid-template-columns: auto auto;
  gap: 5px 14px;
  font-size: .9rem;
}

.mkt-truck-ocp-route-meta span { color: var(--muted); }

.mkt-truck-ocp-load-summary,
.mkt-truck-ocp-operation-section {
  margin-top: 22px;
}

.mkt-truck-ocp-load-summary {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fbfcfc;
}

.mkt-truck-ocp-load-summary > h3 { margin: 0 0 14px; }

.mkt-truck-ocp-load-summary-section + .mkt-truck-ocp-load-summary-section {
  margin-top: 16px;
}

.mkt-truck-ocp-load-summary-section h3 {
  margin: 0;
  padding: 8px 10px;
  font-size: .86rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.mkt-truck-ocp-load-summary-section--delivery h3,
.mkt-truck-ocp-operation-section--delivery > header {
  background: #e8f5ef;
  color: #14532d;
}

.mkt-truck-ocp-load-summary-section--recollection h3,
.mkt-truck-ocp-operation-section--recollection > header {
  background: #fff3e5;
  color: #9a3412;
}

.mkt-truck-ocp-operation-section {
  border: 1px solid var(--line);
  border-radius: 9px;
  overflow: hidden;
}

.mkt-truck-ocp-operation-section > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
}

.mkt-truck-ocp-operation-section > header h3,
.mkt-truck-ocp-operation-kicker { margin: 0; }

.mkt-truck-ocp-operation-kicker {
  margin-bottom: 3px;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.mkt-truck-ocp-stop {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 14px;
  overflow: hidden;
  break-inside: avoid;
}

.mkt-truck-ocp-stop > header {
  justify-content: space-between;
  gap: 16px;
  background: #f5f8f7;
  padding: 14px 16px;
}

.mkt-truck-ocp-stop > header > div { gap: 12px; }

.mkt-truck-ocp-stop-number {
  display: grid;
  place-items: center;
  min-width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
}

.mkt-truck-ocp-stop--delivery { border-left: 5px solid #238a56; }
.mkt-truck-ocp-stop--recollection { border-left: 5px solid #e47a2e; }

.mkt-truck-ocp-stop--delivery > header { background: #f1faf5; }
.mkt-truck-ocp-stop--recollection > header { background: #fff8f1; }

.mkt-truck-ocp-operation-label {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: .75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.mkt-truck-ocp-stop--delivery .mkt-truck-ocp-operation-label { background: #d7f1e1; color: #14532d; }
.mkt-truck-ocp-stop--recollection .mkt-truck-ocp-operation-label { background: #ffe3c4; color: #9a3412; }

.mkt-truck-ocp-equipment,
.mkt-truck-ocp-other-items,
.mkt-truck-ocp-signer { padding: 15px 16px; }

.mkt-truck-ocp-signer { background: #fffdf5; border-bottom: 1px solid var(--line); }

.mkt-truck-ocp-signer label,
.mkt-truck-ocp-signer small { display: block; }

.mkt-truck-ocp-signer input {
  display: block;
  width: min(100%, 540px);
  margin: 9px 0 6px;
  border: 1px solid #aeb8bc;
  border-radius: 5px;
  padding: 8px 10px;
  font: inherit;
}

.mkt-truck-ocp-signer small { color: var(--muted); }
.mkt-truck-ocp-equipment h4,
.mkt-truck-ocp-other-items h4 { margin-bottom: 10px; }
.mkt-truck-ocp-note { font-style: italic; }
.mkt-truck-ocp-other-items { border-top: 1px solid var(--line); }
.mkt-truck-ocp-other-items p { color: #25313a; }


.route-vendors-toolbar .panel-description {
  flex: 1;
  margin-bottom: 10px;
}

.route-vendors-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(460px, 1.1fr);
  gap: 16px;
  align-items: start;
}

.route-vendor-gifts-panel,
.load-order-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.route-vendor-gift-list {
  display: grid;
  gap: 14px;
}

.route-vendor-city-group {
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
}

.route-vendor-city-group h3 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0;
  padding: 10px 12px;
  background: #f7faf9;
  color: var(--accent-strong);
  font-size: .95rem;
}

.route-vendor-city-group h3 span {
  display: inline-grid;
  min-width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  background: #e5f1ec;
  font-size: .8rem;
}

.route-vendor-gift {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px;
  cursor: pointer;
}

.route-vendor-gift + .route-vendor-gift {
  border-top: 1px solid var(--line);
}

.route-vendor-gift.is-selected {
  background: #f0f8f4;
}

.route-vendor-gift input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--accent);
}

.route-vendor-gift span,
.route-vendor-gift small {
  display: block;
}

.route-vendor-gift small {
  color: var(--muted);
  margin-top: 3px;
}

.load-order-panel {
  position: sticky;
  top: 16px;
}

.load-order-table-wrap {
  margin-top: 14px;
}

.load-order-table {
  width: 100%;
  min-width: 460px;
}

.load-order-table th:first-child,
.load-order-table td:first-child {
  width: 110px;
}

.load-order-table.has-operation th:nth-child(2),
.load-order-table.has-operation td:nth-child(2) {
  width: 110px;
}

.load-order-table th:last-child,
.load-order-table td:last-child {
  width: 132px;
  text-align: right;
}

.route-save-actions {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.route-save-actions button {
  width: 100%;
}

.route-progress {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin: 12px 0;
  color: var(--muted);
  font-size: .82rem;
}

.route-card-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

.route-card-actions button {
  width: 100%;
}

.modal-dialog {
  width: min(560px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 24px 70px rgba(11, 25, 34, .28);
  overflow: auto;
}

.modal-dialog::backdrop {
  background: rgba(12, 20, 24, .55);
}

.scrap-csv-dialog {
  width: min(620px, calc(100vw - 28px));
}

.csv-import-instructions {
  display: grid;
  gap: 7px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f7faf9;
}

.csv-import-instructions code {
  overflow-wrap: anywhere;
  color: var(--accent-strong);
}

.csv-import-instructions small,
.csv-selected-file {
  color: var(--muted);
}

.csv-dropzone {
  display: grid;
  place-items: center;
  gap: 6px;
  min-height: 150px;
  padding: 20px;
  border: 2px dashed #9ebbb4;
  border-radius: 12px;
  background: #f8fcfb;
  color: var(--text);
  cursor: pointer;
  text-align: center;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}

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

.csv-dropzone:hover,
.csv-dropzone:focus-visible,
.csv-dropzone.is-dragging {
  border-color: var(--accent);
  background: #edf8f4;
  outline: none;
}

.csv-dropzone.is-dragging {
  transform: scale(1.01);
}

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

.route-details-dialog {
  width: min(820px, calc(100vw - 28px));
}

.load-order-dialog {
  width: min(940px, calc(100vw - 28px));
}

.route-load-order-preview {
  margin-top: 18px;
}

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

.route-load-order-meta > div {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px;
}

.route-load-order-meta span,
.route-load-order-meta strong {
  display: block;
}

.route-load-order-meta span {
  color: var(--muted);
  font-size: .75rem;
  margin-bottom: 4px;
}

.load-order-dialog-actions {
  margin-top: 16px;
}

.route-load-order-print-sheet {
  display: none;
}

.route-details-header,
.route-delivery-stop header,
.dialog-actions {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.route-details-header h2,
.modal-dialog h2 {
  margin: 0;
}

.route-details-stops,
.stack-form {
  display: grid;
  gap: 14px;
}

.route-details-stops {
  margin-top: 18px;
}

.route-batch-letter-action {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft, #f7f8fa);
}

.route-batch-letter-action span {
  color: var(--muted);
  font-size: .875rem;
}

.route-delivery-stop {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.route-delivery-stop header small,
.route-delivery-stop > small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.route-delivery-stop p {
  margin: 10px 0 0;
}

.route-return-reason {
  border-left: 3px solid var(--danger);
  padding: 8px 10px;
  background: #fff5f3;
}

.route-delivery-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}

.dialog-actions {
  justify-content: flex-end;
  margin-top: 4px;
}

@media (max-width: 920px) {
  .route-vendors-toolbar,
  .route-vendors-layout {
    display: grid;
    grid-template-columns: 1fr;
  }

  .route-vendors-toolbar .field {
    width: 100%;
  }

  .route-vendors-toolbar .panel-description {
    margin: 0;
  }

  .load-order-panel {
    position: static;
  }

  .route-load-order-meta,
  .route-card-actions {
    grid-template-columns: 1fr;
  }

  .route-batch-letter-action {
    align-items: stretch;
    flex-direction: column;
  }
}

.kanban {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(210px, 1fr);
  gap: 12px;
  margin-bottom: 14px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.kanban.collapsed {
  display: none;
}

.kanban-column {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 0;
  min-height: 180px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.kanban-column.drop-target {
  border-color: var(--accent);
  background: #f3fbf7;
}

.kanban-column header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.kanban-column header strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.kanban-column header span {
  color: var(--muted);
  font-weight: 800;
}

.kanban-cards {
  display: grid;
  gap: 8px;
  padding: 10px;
  min-width: 0;
}

.kanban-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px 10px 10px;
  background: #fff;
  cursor: grab;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  transition: box-shadow 0.15s ease, opacity 0.15s ease, transform 0.15s ease;
}

.kanban-card:active {
  cursor: grabbing;
}

.kanban-card.dragging {
  opacity: 0.55;
  transform: rotate(1deg);
  box-shadow: var(--shadow);
}

.kanban-card.is-updating {
  cursor: wait;
  opacity: 0.68;
  pointer-events: none;
}

.kanban-card strong,
.kanban-card small {
  display: block;
}

.kanban-card small {
  color: var(--muted);
  margin-top: 4px;
}

.kanban-card strong,
.kanban-card small {
  overflow-wrap: anywhere;
}

.kanban-card-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
}

.kanban-card .badge {
  margin-top: 8px;
  max-width: 100%;
  height: auto;
  min-height: 24px;
  padding-top: 4px;
  padding-bottom: 4px;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
}

.kanban-card .row-actions {
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #e8edf1;
}

.kanban-card .small-btn {
  flex: 1 1 108px;
  min-height: 34px;
  padding: 6px 10px;
  border-color: #bfd0d6;
  border-radius: 7px;
  background: #f8fbfc;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.kanban-card .small-btn:hover {
  border-color: var(--accent);
  background: #e8f3f5;
  box-shadow: 0 3px 8px rgba(17, 108, 122, 0.14);
  transform: translateY(-1px);
}

.kanban-card .small-btn:focus-visible {
  outline: 3px solid rgba(17, 108, 122, 0.28);
  outline-offset: 2px;
}

.empty-mini {
  color: var(--muted);
  font-size: 13px;
  padding: 8px;
  text-align: center;
}

.compact-table {
  max-height: 420px;
}

.print-module {
  max-width: 980px;
}

.print-module p {
  color: var(--muted);
  margin: 0 0 16px;
}

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

.module-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfd;
}

.module-grid strong,
.module-grid small {
  display: block;
}

.module-grid small {
  color: var(--muted);
  margin-top: 6px;
}

.wide-print-module {
  max-width: none;
}

.print-workspace {
  display: grid;
  grid-template-columns: minmax(360px, 520px) minmax(720px, 1fr);
  gap: 18px;
  align-items: start;
  overflow-x: auto;
}

.print-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfd;
  position: relative;
  z-index: 2;
  max-height: calc(100vh - 170px);
  overflow: auto;
}

.letter-items {
  display: grid;
  gap: 8px;
}

.letter-item-row {
  display: grid;
  grid-template-columns: 1fr 80px;
  gap: 6px;
}

.letter-item-row input {
  min-width: 0;
  font-size: 12px;
}

.turnover-workspace {
  grid-template-columns: minmax(320px, 360px) minmax(1080px, 1fr);
}

.turnover-form {
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
}

.turnover-document {
  display: grid;
  justify-items: start;
}

.turnover-loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 15px;
  color: #fff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  font-weight: bold;
  border-radius: 4px;
  z-index: 100;
}

.turnover-loading-overlay[hidden] {
  display: none !important;
}

.turnover-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 255, 255, 0.15);
  border-left-color: #38bdf8;
  border-radius: 50%;
  animation: turnover-spin 0.8s linear infinite;
}

@keyframes turnover-spin {
  to {
    transform: rotate(360deg);
  }
}

.turnover-sheet {
  position: relative;
  width: 297mm;
  min-height: 210mm;
  background: #fff;
  color: #fff;
  border: 1px solid #cfd8df;
  box-shadow: var(--shadow);
  padding: 2mm;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 7.5px;
  line-height: 1.15;
  page: turnover;
}

.turnover-header-date {
  font-size: 9px;
  font-weight: 800;
  color: #fff;
}

.turnover-exchange-indicator {
  padding: .7mm 1.6mm;
  border: .35mm solid #ffe082;
  border-radius: 999px;
  background: #f59e0b;
  color: #18232c;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.turnover-score5-indicator {
  padding: .7mm 1.6mm;
  border: .35mm solid #ddd6fe;
  border-radius: 999px;
  background: #ede9fe;
  color: #4c1d95;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.turnover-score5-indicator strong { font-weight: 900; }

.turnover-sheet.is-exchange .turnover-title {
  background: #8a4b08;
}

/* Form validation styling */
input.is-invalid, select.is-invalid, textarea.is-invalid {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2) !important;
}

/* Clear button styling */
.input-with-clear {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.input-with-clear input {
  flex: 1;
  width: 100%;
  padding-right: 25px !important;
}

.clear-input-btn {
  position: absolute;
  right: 8px;
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
  padding: 2px;
  display: none;
  z-index: 5;
}

.clear-input-btn:hover {
  color: #64748b;
}

.turnover-title,
.turnover-request-box h3 {
  background: #2d5870;
  color: #fff;
}

.turnover-title {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 3mm;
  margin: 0;
  padding: 1.1mm 0 1mm;
  border-radius: 1.5mm 1.5mm 0 0;
  text-align: center;
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
}

.turnover-analysis {
  display: grid;
  grid-template-columns: 0.95fr 0.65fr 1fr 1.15fr;
  align-items: stretch;
  background: #fff;
  border: 1.4px solid #2d5870;
  border-radius: 0 0 1.5mm 1.5mm;
  min-height: 52mm;
  overflow: hidden;
}

.turnover-panel {
  padding: 4mm 4.2mm 3mm;
  position: relative;
  min-width: 0;
  color: #0f2e48;
}

.turnover-panel + .turnover-panel {
  border-left: 0.7mm dashed #2d5870;
}

.turnover-panel h3 {
  margin: 0 0 2.6mm;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.1;
  color: #2d5870;
}

.turnover-register-grid,
.turnover-finance-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5mm;
}

.turnover-register-grid > div:last-child,
.turnover-finance-grid > div:last-child {
  text-align: right;
}

.turnover-panel strong,
.turnover-panel small {
  display: block;
}

.panel-description {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: .9rem;
}

.status-message {
  min-height: 1.2em;
  color: var(--muted);
}

.status-message.is-error {
  color: var(--danger);
}

.issued-documents-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.issued-documents-filter-actions {
  justify-content: end;
}

.issued-documents-filter-actions button {
  width: 100%;
}

.issued-documents-table-wrap th:last-child,
.issued-documents-table-wrap td:last-child {
  min-width: 220px;
}

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

.delivery-history-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0 12px;
}

.delivery-history-filter-actions {
  justify-content: end;
}

.delivery-history-filter-actions button {
  width: 100%;
}

.legacy-gift-history-filters {
  display: grid;
  grid-template-columns: minmax(145px, .75fr) minmax(145px, .75fr) minmax(190px, 1.15fr) minmax(220px, 1.4fr) max-content;
  gap: 12px;
  align-items: end;
  margin: 16px 0 12px;
  padding: 12px;
  border: 1px solid #dbe5ec;
  border-radius: 9px;
  background: #f8fafb;
}

.legacy-gift-history-filters > .field > span {
  color: #3f4c56;
  font-size: 12px;
  font-weight: 750;
}

.delivery-history-view-controls {
  display: flex;
  align-items: center;
  margin: 2px 0 12px;
}

.legacy-gift-history-filter-actions {
  display: flex;
  align-items: flex-end;
}

.legacy-gift-history-filter-actions button {
  min-width: 132px;
  min-height: 42px;
}

.delivery-history-source {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 10px 12px;
  border: 1px solid #dbe7ee;
  border-radius: 7px;
  background: #f5fafc;
  color: #496273;
  font-size: 12px;
}

.delivery-history-source span {
  font-weight: 750;
}

.delivery-history-table-wrap table {
  min-width: 1320px;
}

.delivery-history-table-wrap td strong,
.delivery-history-table-wrap td small,
.delivery-history-evidence span {
  display: block;
}

.delivery-history-table-wrap td small {
  max-width: 260px;
  margin-top: 3px;
  color: var(--muted);
  line-height: 1.35;
}

.delivery-history-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #edf1f4;
  color: #526473;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.delivery-history-badge.is-exato { background: #dcf6e7; color: #147d4c; }
.delivery-history-badge.is-provavel,
.delivery-history-badge.is-em-andamento { background: #fff1d8; color: #a45d05; }
.delivery-history-badge.is-ambiguo { background: #eee7ff; color: #6941b2; }
.delivery-history-badge.is-divergente,
.delivery-history-badge.is-cancelado,
.delivery-history-badge.is-devolvido { background: #ffe2e6; color: #bd2d45; }
.delivery-history-badge.is-confirmada { background: #dcf6e7; color: #147d4c; }
.delivery-history-badge.is-em-andamento,
.delivery-history-badge.is-parcial { background: #fff1d8; color: #a45d05; }
.delivery-history-badge.is-cancelada,
.delivery-history-badge.is-devolvida,
.delivery-history-badge.is-incompativel,
.delivery-history-badge.is-nao-encontrada { background: #ffe2e6; color: #bd2d45; }
.delivery-history-badge.is-sem-nota,
.delivery-history-badge.is-nao-informada { background: #edf1f5; color: #53606d; }

.legacy-gift-history-table-wrap table {
  min-width: 1320px;
}

.legacy-gift-history-table-wrap td strong,
.legacy-gift-history-table-wrap td small {
  display: block;
}

.legacy-gift-history-table-wrap td small {
  margin-top: 4px;
  color: var(--muted);
}

.legacy-gift-history-serials {
  display: grid;
  gap: 4px;
}

.legacy-gift-history-serials span {
  width: max-content;
  max-width: 220px;
  padding: 3px 7px;
  overflow-wrap: anywhere;
  border-radius: 5px;
  background: #eef4f7;
  color: #28485d;
  font-size: 12px;
  font-weight: 750;
}

.delivery-history-reason {
  min-width: 190px;
}

.muted-text {
  color: var(--muted);
}

body.archiving-document :is(.turnover-sheet, .registration-turnover-sheet) {
  width: 287mm;
  height: 199.5mm;
  min-height: 0;
  margin: 0;
  overflow: hidden;
  border: 0;
  box-shadow: none;
}

body.archiving-document .registration-turnover-sheet {
  break-after: page;
  page-break-after: always;
}

body.archiving-document .registration-turnover-pages {
  display: block;
  gap: 0;
}

body.archiving-document :is(.registration-turnover-sheet, .comodato-page):last-child {
  break-after: auto;
  page-break-after: auto;
}

body.archiving-document .recollection-letter-page,
body.archiving-document .comodato-page {
  width: 210mm;
  margin: 0;
  border: 0;
  box-shadow: none;
  overflow: hidden;
}

body.archiving-document .recollection-letter-page {
  height: 297mm;
}

body.archiving-document .comodato-document {
  display: block;
  gap: 0;
}

body.archiving-document .comodato-page {
  height: 297mm;
  min-height: 0;
  break-after: auto;
  page-break-after: auto;
}

@media (max-width: 920px) {
  .issued-documents-filters,
  .delivery-history-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .legacy-gift-history-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .legacy-gift-history-filter-actions { grid-column: 1 / -1; }
  .legacy-gift-history-filter-actions button { width: 100%; }
}

@media (max-width: 620px) {
  .issued-documents-filters,
  .delivery-history-filters { grid-template-columns: 1fr; }
  .legacy-gift-history-filters { grid-template-columns: 1fr; }
}

.turnover-registration-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2mm;
}

.turnover-from-to-role {
  display: inline-flex;
  align-items: center;
  min-height: 4.8mm;
  padding: 0 1.8mm;
  border-radius: 999px;
  background: #d8e8ef;
  color: #0f526e;
  font-size: 8px;
  font-weight: 900;
  line-height: 1;
}

.turnover-panel strong {
  min-height: 3.5mm;
  font-size: 8.5px;
  font-weight: 800;
  text-transform: uppercase;
  color: #0f2e48;
}

.turnover-panel small {
  font-size: 7.4px;
  margin-bottom: 0.8mm;
  color: #475569;
}

.turnover-active {
  color: #16823a !important;
  font-size: 10px !important;
}

.turnover-active.is-alert {
  color: #ef4444 !important;
  text-shadow: -1.5px -1px 0 #0000008a;
}

.turnover-check {
  display: block;
  font-size: 14px;
  line-height: 1;
}

.turnover-check.is-ok {
  color: #29d05f;
}

.turnover-check.is-alert {
  color: #ef4444;
  font-size: 12px;
  font-weight: bold;
  text-shadow: -1.5px -1px 0 #0000008a;
}

.turnover-risk-field {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
}

.turnover-risk {
  font-size: 20px !important;
  text-align: left;
}

.turnover-analysis-icon {
  display: block;
  width: 8mm;
  height: 10mm;
  margin: -1mm 0 1.5mm auto;
  object-fit: contain;
  filter: brightness(0) saturate(100%) opacity(0.8);
}

.turnover-quarter-heading {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2.6mm;
}

.turnover-quarter-heading h3 {
  margin: 0;
}

.turnover-sku-table,
.turnover-product-table,
.turnover-request-box table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.turnover-quarter-wrap {
  display: flex;
  justify-content: center;
  width: 100%;
  min-width: 0;
  margin-top: 0;
}

.turnover-quarter-table {
  width: min(62mm, 100%);
  min-width: 0;
  max-width: 100%;
  height: auto;
  border: 1.4px solid #2d5870;
  border-collapse: collapse;
  table-layout: fixed;
}

.turnover-quarter-table th,
.turnover-quarter-table td,
.turnover-sku-table th,
.turnover-sku-table td,
.turnover-product-table th,
.turnover-product-table td,
.turnover-request-box th,
.turnover-request-box td {
  border: 1px solid #dfe8ed;
  padding: 0.45mm;
  text-align: center;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.turnover-quarter-table th {
  padding: 0.25mm;
  font-size: 6.8px;
  font-weight: 600;
  text-transform: uppercase;
  line-height: 1.1;
  position: static;
  white-space: normal;
  text-overflow: clip;
}

.turnover-quarter-table th,
.turnover-quarter-table td {
  border-color: #7893a3;
  color: #0f2e48;
  background: #fff;
}

.turnover-quarter-table thead th {
  color: #fff;
  background: #2d5870;
}

.turnover-quarter-table td {
  font-size: 8px;
  font-weight: 800;
}

.turnover-quarter-table td:nth-child(2),
.turnover-quarter-table td:nth-child(3) {
  font-size: 7px;
}

.turnover-quarter-table tr:hover th,
.turnover-quarter-table tr:hover td {
  background: #fff;
}

.turnover-quarter-table thead tr:hover th {
  background: #2d5870;
}

.turnover-quarter-table .turnover-segment-col {
  width: 11mm;
}

.turnover-segment-heading-icon {
  display: block;
  width: 9mm;
  height: 5mm;
  max-width: 100%;
  margin: 0 auto;
  object-fit: contain;
}

.turnover-quarter-table .turnover-volume-col {
  width: 15mm;
}

.turnover-quarter-table .turnover-goal-col {
  width: 15mm;
}

.turnover-quarter-table .turnover-comodato-col {
  width: 9mm;
}

.turnover-quarter-table .turnover-requested-col {
  width: 11mm;
}

.turnover-quarter-table .turnover-check-col {
  width: 7mm;
}

.turnover-quarter-table tbody th {
  font-size: 6.3px;
  font-weight: 800;
}

.turnover-quarter-table td:last-child {
  font-size: 0;
  position: relative;
}

.turnover-quarter-table td:last-child::after {
  content: "✔";
  color: #29d05f;
  font-size: 10px;
  line-height: 1;
  font-weight: 900;
}

.turnover-quarter-table td:last-child.is-fail::after {
  content: "❌";
  color: #ef4444;
  font-size: 10px;
}

.turnover-quarter-table td:last-child.is-na {
  font-size: 6.8px !important;
  color: #64748b;
  font-weight: 700;
  text-align: center;
}

.turnover-quarter-table td:last-child.is-na::after {
  content: "";
}

.turnover-grid-section {
  display: flex;
  flex-direction: column;
  gap: 1.2mm;
  margin-top: 1mm;
}

.turnover-grid-row {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 1.2mm;
}

.turnover-side-banner {
  background: #0f2e48;
  color: #ffffff;
  font-size: 7.5px;
  font-weight: 700;
  width: 22mm;
  min-width: 22mm;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-radius: 0.8mm;
  padding: 0.6mm;
}

.turnover-table-wrap {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
}

.turnover-grid-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 6px;
}

.turnover-grid-table th,
.turnover-grid-table td {
  border: 0.2pt solid #cbd5e1;
  padding: 0.18mm 0.35mm;
  text-align: center;
  white-space: nowrap;
  font-size: 8px;
}

.turnover-grid-table thead th {
  background: #7893a3;
  color: #000;
  font-weight: 700;
  font-size: 6.2px;
}

.turnover-grid-table thead th:first-child {
  font-size: 6.5px;
  font-weight: 800;
  text-align: center;
  padding-left: 0;
}

.turnover-grid-table thead th:nth-child(2) {
  font-size: 6.5px;
  font-weight: 800;
  text-align: left;
  padding-left: 1mm;
}

.turnover-grid-table td.turnover-category-cell {
  text-align: left;
  font-weight: 600;
  font-size: 6.8px;
  padding-left: 1mm;
}

.turnover-group-cell {
  background: #e2e8f0;
  color: #0f172a;
  font-weight: 800;
  text-align: center;
  vertical-align: middle;
  font-size: 7.2px;
  padding: 0.5mm 0.2mm !important;
  width: 6mm;
  max-width: 6mm;
}

.turnover-group-cell span {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  display: inline-block;
  white-space: nowrap;
}

.turnover-items-wrap {
  display: flex;
  justify-content: center;
  width: 100%;
  min-width: 0;
  margin-top: 0;
}

.turnover-items-table {
  width: min(62mm, 100%);
  min-width: 0;
  max-width: 100%;
  height: auto;
  border: 1.4px solid #2d5870;
  border-collapse: collapse;
  table-layout: fixed;
}

.turnover-items-table th,
.turnover-items-table td {
  border: 1px solid #7893a3;
  padding: 0.25mm 0.4mm;
  text-align: center;
  color: #0f2e48;
  background: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.turnover-items-table th {
  color: #fff;
  background: #2d5870;
  padding: 0.35mm;
  font-size: 6.8px;
  font-weight: 800;
  text-transform: uppercase;
  line-height: 1.1;
}

.turnover-items-table td {
  font-size: 8.8px;
  font-weight: 700;
}

.turnover-items-table tbody tr:nth-child(even) td {
  background: #f1f5f9;
}

.turnover-quarter-table thead tr,
.turnover-items-table thead tr,
.turnover-quarter-table tbody tr,
.turnover-items-table tbody tr {
  height: 4.35mm;
}

.turnover-items-table td:first-child {
  padding-left: 0.8mm;
  text-align: left;
  font-weight: 800;
}

.turnover-items-table td:nth-child(2) {
  text-align: left;
  padding-left: 1mm;
  vertical-align: middle;
  font-size: 8.4px;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.12;
}

.turnover-quick-controls {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  position: relative;
  z-index: 3;
}

.turnover-customer-field {
  flex: 0 1 150px;
  min-width: 120px;
}

.turnover-operation-field {
  flex: 0 0 auto;
}

.turnover-form:not(.is-registration-turnover) .turnover-operation-field {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.turnover-registration-customer-fields {
  display: grid;
  gap: 12px;
  flex: 1 1 0;
  min-width: 0;
}

.turnover-registration-customer-fields .turnover-customer-field {
  min-width: 0;
}

.turnover-registration-from-to-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.turnover-form.is-registration-turnover .turnover-quick-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: start;
  column-gap: 12px;
  row-gap: 0;
}

.turnover-form.is-registration-turnover .turnover-operation-field {
  align-self: start;
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
  justify-content: space-between;
  min-height: 60px;
}

.turnover-form.is-registration-turnover .turnover-registration-customer-fields {
  flex: 1 1 0;
  width: auto;
}

.registration-turnover-pages {
  display: grid;
  gap: 20px;
}

.turnover-document.is-registration-turnover.has-registration-turnover-pages [data-turnover-source-sheet] {
  display: none;
}

.turnover-document.is-registration-turnover .turnover-items-panel {
  display: none;
}

.turnover-document.is-registration-turnover .turnover-analysis {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr) minmax(0, 1.25fr);
  min-height: 56mm;
}

.turnover-document.is-registration-turnover .turnover-panel {
  padding: 4.5mm 5mm 3.5mm;
}

.turnover-document.is-registration-turnover .turnover-panel h3 {
  margin-bottom: 3mm;
  font-size: 13px;
}

.turnover-document.is-registration-turnover .turnover-register-grid,
.turnover-document.is-registration-turnover .turnover-finance-grid {
  gap: 6mm;
}

.turnover-document.is-registration-turnover .turnover-panel strong {
  min-height: 4mm;
  font-size: 9.5px;
}

.turnover-document.is-registration-turnover .turnover-panel small {
  font-size: 8px;
  margin-bottom: 1mm;
}

.turnover-document.is-registration-turnover .turnover-active {
  font-size: 11px !important;
}

.turnover-document.is-registration-turnover .turnover-risk {
  font-size: 22px !important;
}

.turnover-document.is-registration-turnover .turnover-analysis-icon {
  width: 9mm;
  height: 11mm;
}

.turnover-document.is-registration-turnover .turnover-quarter-table {
  width: min(90mm, 100%);
}

.turnover-document.is-registration-turnover .turnover-quarter-table th {
  font-size: 7.4px;
}

.turnover-document.is-registration-turnover .turnover-quarter-table td {
  font-size: 9px;
}

.turnover-document.is-registration-turnover .turnover-quarter-table td:nth-child(2),
.turnover-document.is-registration-turnover .turnover-quarter-table td:nth-child(3) {
  font-size: 8px;
}

.turnover-document.is-registration-turnover .turnover-quarter-table tbody th,
.turnover-document.is-registration-turnover .turnover-quarter-table td:last-child.is-na {
  font-size: 7.2px !important;
}

.turnover-document.is-registration-turnover .turnover-quarter-table .turnover-segment-col {
  width: 14mm;
}

.turnover-document.is-registration-turnover .turnover-quarter-table .turnover-volume-col,
.turnover-document.is-registration-turnover .turnover-quarter-table .turnover-goal-col {
  width: 20mm;
}

.turnover-document.is-registration-turnover .turnover-quarter-table .turnover-comodato-col {
  width: 12mm;
}

.turnover-document.is-registration-turnover .turnover-quarter-table .turnover-requested-col {
  width: 15mm;
}

.turnover-document.is-registration-turnover .turnover-quarter-table .turnover-check-col {
  width: 9mm;
}

.registration-turnover-sheet {
  display: block;
}

.turnover-exchange-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
}

.turnover-exchange-switch b {
  font-size: .82rem;
}

.turnover-exchange-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.turnover-exchange-switch-track {
  position: relative;
  width: 32px;
  height: 18px;
  border-radius: 999px;
  background: #aeb9c2;
  transition: background .18s ease;
}

.turnover-exchange-switch-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .22);
  transition: transform .18s ease;
}

.turnover-exchange-switch input:checked + .turnover-exchange-switch-track { background: var(--accent); }
.turnover-exchange-switch input:checked + .turnover-exchange-switch-track::after { transform: translateX(14px); }
.turnover-exchange-switch input:focus-visible + .turnover-exchange-switch-track { outline: 3px solid rgba(17, 108, 122, .24); outline-offset: 2px; }

.turnover-exchange-tooltip {
  position: absolute;
  z-index: 30;
  left: 0;
  top: calc(100% + 6px);
  width: 250px;
  max-width: calc(100vw - 48px);
  box-sizing: border-box;
  padding: 7px 9px;
  border-radius: 6px;
  background: #17202a;
  color: #fff;
  font-size: .78rem;
  line-height: 1.3;
  box-shadow: 0 6px 16px rgba(15, 23, 42, .2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(3px);
  transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
  pointer-events: none;
}

.turnover-operation-field:hover .turnover-exchange-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

@media (max-width: 520px) {
  .turnover-quick-controls {
    align-items: start;
    flex-wrap: wrap;
  }

  .turnover-registration-from-to-fields {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .turnover-registration-customer-fields {
    flex-basis: 100%;
    width: 100%;
  }
}

.turnover-items {
  display: grid;
  gap: 8px;
}

.turnover-item-row {
  display: grid;
  grid-template-columns: minmax(110px, 150px) minmax(80px, 120px) 52px;
  gap: 4px;
  margin-bottom: 6px;
}

.turnover-item-row.has-stock-source {
  grid-template-columns: minmax(110px, 150px) minmax(80px, 120px) 52px minmax(72px, 105px);
}

.turnover-item-row select,
.turnover-item-row input {
  min-width: 0;
  width: 100%;
  font-size: 11px;
  padding: 4px;
  min-height: 28px;
}

.turnover-item-row input[data-field="quantity"] {
  text-align: center;
}

.turnover-notes,
.turnover-approval-note {
  color: #000 !important;
  font-size: 8px;
  font-weight: 800;
  margin: 1mm 0 0 !important;
}

.turnover-signatures {
  color: #000;
  position: absolute;
  right: 6mm;
  bottom: 5mm;
  width: 76mm;
}

.turnover-signatures div {
  display: grid;
  gap: 1mm;
  font-size: 8px;
  font-weight: 800;
}

.turnover-signatures span {
  border-top: 1px solid #000;
  height: 1px;
}

.recollection-letter-page {
  width: 210mm;
  min-height: 297mm;
  background: #fff;
  color: #000;
  border: 1px solid #c8c8c8;
  padding: 5mm 7mm;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 10.5px;
  box-shadow: 0 12px 28px rgba(22, 32, 42, 0.12);
}

.letter-brand-header {
  height: 26mm;
  display: grid;
  grid-template-columns: 40mm 1fr 43mm;
  gap: 4mm;
  align-items: start;
  margin-bottom: 2mm;
}

.letter-brand-header img {
  max-width: 100%;
  object-fit: contain;
}

.letter-logo-imarui {
  height: 22mm;
}

.letter-logo-brands {
  height: 24mm;
  align-self: center;
}

.letter-right-logos {
  display: grid;
  gap: 2mm;
}

.letter-right-logos img {
  height: 11mm;
  width: 100%;
}

.recollection-letter-page h2 {
  margin: 0 0 2.5mm;
  border: 2px solid #000;
  padding: 2.4mm 2mm;
  text-align: center;
  font-size: 18px;
  font-weight: 800;
}

.letter-client-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  border-top: 1px solid #000;
  border-left: 1px solid #000;
  margin-bottom: 2.8mm;
}

.letter-client-grid div {
  border-right: 1px solid #000;
  border-bottom: 1px solid #000;
  min-height: 6mm;
  padding: 1.2mm 1.6mm;
}

.letter-client-grid .client-code {
  grid-column: span 2;
}

.letter-client-grid .client-sector {
  grid-column: span 2;
}

.letter-client-grid .client-fantasy {
  grid-column: span 8;
}

.letter-client-grid .client-legal {
  grid-column: span 9;
}

.letter-client-grid .client-phone {
  grid-column: span 3;
}

.letter-client-grid .client-address {
  grid-column: span 8;
}

.letter-client-grid .client-district {
  grid-column: span 2;
}

.letter-client-grid .client-city {
  grid-column: span 2;
}

.letter-table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  table-layout: fixed;
  margin-bottom: 2.5mm;
}

.letter-table th,
.letter-table td {
  border: 1px solid #000;
  color: #000;
  padding: 10px 5px;
  font-size: 10px;
  height: auto;
  text-align: left;
  vertical-align: top;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.letter-table th {
  background: #e9e9e9;
  text-align: center;
  font-weight: 800;
}

.material-table .material-description-column {
  width: 34.67%;
}

.material-table .material-quantity-column {
  width: 6.13%;
}

.material-table .material-validation-column {
  width: 29.73%;
}

.material-table .material-scrap-column {
  width: 7.07%;
}

.material-table .material-rg-column {
  width: 22.4%;
}

.material-table th:nth-child(2),
.material-table td:nth-child(2),
.material-table th:nth-child(4),
.material-table td:nth-child(4) {
  text-align: center;
}

.material-table thead tr:nth-child(2) th:nth-child(4) {
  padding-left: 0;
  padding-right: 0;
  text-align: center;
  vertical-align: middle;
}

.letter-declaration {
  margin: 1.4mm 0;
  font-size: 10.5px;
  line-height: 1.25;
}

.letter-signatures {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20mm;
  margin: 7mm 18mm 5mm;
  text-align: center;
}

.letter-signatures span {
  display: block;
  border-top: 1px solid #000;
  height: 1px;
  margin-bottom: 2mm;
}

.inbound-table .inbound-description-column {
  width: 56.35%;
}

.inbound-table .inbound-quantity-column {
  width: 9.89%;
}

.inbound-table .inbound-stamp-column {
  width: 33.76%;
}

.inbound-table th:nth-child(2),
.inbound-table td:nth-child(2) {
  text-align: center;
}

.inbound-table .conference-name-cell {
  font-weight: 800;
  text-align: left;
  vertical-align: middle;
}

.letter-notes {
  border: 1px solid #000;
  min-height: 10mm;
  padding: 1.5mm;
  margin-top: 2mm;
}

.letter-footer {
  display: grid;
  justify-items: end;
  gap: 0.6mm;
  margin-top: 4mm;
  font-size: 9.5px;
}

.comodato-items {
  display: grid;
  gap: 8px;
}

.comodato-item-row {
  display: grid;
  grid-template-columns: 92px 58px minmax(90px, 1.5fr) 42px 82px minmax(82px, 1fr);
  gap: 4px;
}

.comodato-item-row--with-tag {
  grid-template-columns: 92px 58px minmax(90px, 1.5fr) 42px 82px minmax(82px, 1fr) minmax(82px, 1fr);
}

.comodato-item-row--registration {
  grid-template-columns: 58px minmax(90px, 1.5fr) 42px minmax(82px, 1fr) minmax(82px, 1fr);
}

.comodato-item-row--pdv {
  grid-template-columns: 58px minmax(90px, 1.5fr) 42px minmax(82px, 1fr);
}

.comodato-item-row--from-to {
  grid-template-columns: 58px minmax(90px, 1.5fr) 42px minmax(82px, 1fr) minmax(82px, 1fr);
}

.comodato-item-row--from-to.comodato-item-row--installation {
  grid-template-columns: 82px 82px 58px minmax(90px, 1.5fr) 42px 82px minmax(82px, 1fr) minmax(82px, 1fr);
}

.comodato-item-row input,
.comodato-item-row select {
  min-width: 0;
  width: 100%;
  font-size: 11px;
  padding: 4px;
  min-height: 28px;
}

.comodato-item-row select[data-field="unit"] {
  text-align: center;
  text-align-last: center;
}

.comodato-item-row input[data-field="quantity"],
.comodato-item-row input[data-field="installation"],
.comodato-item-row input[data-field="installationTag"],
.comodato-item-row input[data-field="fromTo"],
.comodato-item-row input[data-field="renewal"] {
  text-align: center;
}

.comodato-item-row .is-hidden {
  visibility: hidden;
  pointer-events: none;
}

.comodato-document {
  display: grid;
  gap: 18px;
  justify-items: start;
  min-width: 210mm;
}

.comodato-page {
  width: 210mm;
  min-height: 297mm;
  background: #fff;
  color: #000;
  border: 1px solid #c8c8c8;
  padding: 8mm 10mm;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 10.3px;
  line-height: 1.22;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
}

.comodato-contract-page {
  padding: 6mm 8mm;
  font-size: 8.6px;
  line-height: 1.16;
  display: flex;
  flex-direction: column;
}

.comodato-sheet-header {
  position: relative;
  display: grid;
  gap: 7mm;
  margin: 0 -8mm 3mm;
  padding: 4mm 8mm 4mm;
  border-top: 1px dashed #000;
  border-bottom: 1px dashed #000;
  text-align: center;
}

.comodato-sheet-header h2 {
  margin: 2mm 0 0;
  font-size: 15px;
  letter-spacing: 0;
}

.comodato-vendor {
  position: absolute;
  top: 1mm;
  right: 22mm;
  font-weight: 800;
}

.comodato-page-number {
  position: absolute;
  top: 1mm;
  right: 7mm;
}

.comodato-code-line {
  font-size: 11px;
}

.comodato-preamble {
  margin-top: 4mm;
}

.comodato-preamble p {
  margin-bottom: 0.8mm;
  line-height: 1.15;
}

.comodato-preamble b[data-comodato] {
  display: inline-block;
  min-width: 22mm;
}

.comodato-preamble b[data-comodato="legalName"],
.comodato-preamble b[data-comodato="address"] {
  min-width: 58mm;
}

.inline-gap {
  display: inline-block;
  min-width: 18mm;
}

.comodato-page p {
  color: #000;
  margin: 0 0 1.7mm;
  text-align: justify;
}

.comodato-highlight-clause {
  background: #000;
  color: #fff !important;
  font-weight: 800;
  margin: 2.5mm 0 !important;
  padding: 2.3mm 4mm;
  text-align: left !important;
}

.comodato-highlight-clause b {
  color: #fff;
}

.comodato-subclause {
  margin-left: 4mm !important;
  margin-bottom: 1.9mm !important;
}

.comodato-observation {
  font-weight: 800;
}

.comodato-header {
  display: grid;
  gap: 2mm;
  margin-bottom: 3mm;
  text-align: center;
}

.comodato-header h2,
.comodato-placeholder-page h2 {
  margin: 0;
  text-align: center;
  font-size: 16px;
  letter-spacing: 0;
}

.comodato-items-table {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  border-collapse: collapse;
  margin: 2.5mm 0;
  table-layout: fixed;
}

.comodato-items-table th,
.comodato-items-table td {
  border: 0;
  /* border-bottom: 1px solid var(--line); */
  padding: 10px 12px;
  height: auto;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
  font-size: 10px;
}

.comodato-items-table th {
  border-top: 1px dashed #000;
  border-bottom: 1px dashed #000;
  padding: 0.8mm 1mm;
  text-align: center;
  font-size: 9px;
  background: transparent;
}

.comodato-items-table thead tr:first-child th:nth-child(1),
.comodato-items-table thead tr:first-child th:nth-child(5),
.comodato-items-table thead tr:nth-child(2) th:first-child {
    border-left: 1px dashed #000;
}

.comodato-items-table thead tr:first-child th:nth-child(5),
.comodato-items-table thead tr:nth-child(2) th:first-child,
.comodato-items-table thead tr:nth-child(2){
    border-right: 1px dashed #000;
}

.comodato-items-table th:nth-child(1),
.comodato-items-table td:nth-child(1) {
  width: 7%;
}

.comodato-items-table th:nth-child(2),
.comodato-items-table td:nth-child(2) {
  width: 34%;
}

.comodato-items-table th:nth-child(3),
.comodato-items-table td:nth-child(3) {
  width: 8%;
  text-align: center;
}

.comodato-items-table th:nth-child(4),
.comodato-items-table td:nth-child(4) {
  width: 5%;
  text-align: center;
}

.comodato-items-table th:nth-child(5),
.comodato-items-table td:nth-child(5) {
  width: 24%;
  text-align: center;
}

.comodato-items-table th:nth-child(6),
.comodato-items-table td:nth-child(6) {
  width: 18%;
  text-align: center;
}

.comodato-date-line {
  margin-top: 4mm !important;
  text-align: right !important;
}

.comodato-signature-footer {
  margin-top: auto;
  padding-top: 4mm;
}

.comodato-signatures,
.comodato-witnesses {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14mm;
  margin-top: 8mm;
}

.comodato-signatures div {
  text-align: center;
}

.comodato-signatures span {
  display: block;
  border-top: 1px solid #000;
  height: 1px;
  margin-bottom: 2mm;
}

.comodato-signatures small {
  display: block;
}

.comodato-witnesses {
  font-size: 9.5px;
  line-height: 2.05;
}

.promissory-page {
  padding: 13mm 16mm;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  line-height: 1.35;
  position: relative;
  display: flex;
  flex-direction: column;
}

.promissory-page-number {
  position: absolute;
  top: 13mm;
  right: 18mm;
  font-size: 8px;
}

.promissory-top-grid {
  display: grid;
  grid-template-columns: 78mm 44mm;
  gap: 45mm;
  margin: 0 0 20mm;
  align-items: start;
}

.promissory-operation-table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  table-layout: fixed;
}

.promissory-operation-table th,
.promissory-operation-table td {
  border: 0;
  height: 5mm;
  padding: 0.2mm 1mm;
  text-align: center;
  color: #000;
  background: transparent;
}

.promissory-operation-table th {
  font-size: 10px;
  background: transparent;
}

.promissory-total-box {
  min-height: 31mm;
  padding: 0;
  display: grid;
  gap: 0.8mm;
  align-content: end;
  justify-items: center;
}

.promissory-total-box span {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.promissory-total-box strong {
  font-size: 11px;
}

.promissory-text {
  width: 151mm;
  margin: 0 0 10mm;
  font-size: 13px;
  line-height: 1.28;
}

.promissory-line {
  display: grid;
  grid-template-columns: 63mm 1fr;
  gap: 6mm;
  min-height: 5mm;
  align-items: start;
}

.promissory-line b {
  font-weight: 800;
}

.promissory-title-line {
  margin-bottom: 5mm;
}

.promissory-company-line {
  display: block;
  margin-bottom: 5mm;
}

.promissory-payable-line {
  display: block;
  margin-top: 9mm;
}

.promissory-issuer-box {
  margin-top: 0;
}

.issuer-row {
  min-height: 7mm;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 3mm;
  align-items: center;
  padding: 0;
}

.issuer-row span {
  font-weight: 700;
}

.issuer-row:nth-child(2) {
  grid-template-columns: auto 1fr;
}

.issuer-name-row {
  grid-template-columns: auto minmax(0, 1fr) 38mm 32mm;
}

.issuer-name-row b:last-child {
  grid-column: 4;
  text-align: left;
}

.issuer-address-row {
  grid-template-columns: auto minmax(0, 1fr) 38mm 32mm;
}

.promissory-date-line {
  width: 92mm;
  margin: 18mm 0 11mm auto !important;
  text-align: center !important;
  font-size: 12px;
}

.promissory-signature {
  width: 92mm;
  margin: 0 0 18mm auto;
  display: grid;
  gap: 8mm;
}

.signature-line,
.cpf-line {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1mm;
  align-items: end;
}

.signature-line span,
.cpf-line span {
  display: block;
  border-top: 1px solid #000;
  height: 1px;
}

.promissory-guarantors {
  margin-top: auto;
}

.promissory-guarantors h3 {
  margin: 0 0 13mm;
  text-align: left;
  font-size: 16px;
  letter-spacing: 0;
}

.guarantor-grid {
  display: grid;
  grid-template-columns: 74mm 74mm;
  gap: 30mm;
}

.guarantor-field {
  text-align: left;
}

.guarantor-field > span {
  display: block;
  border-top: 1px solid #000;
  width: 74mm;
  height: 1px;
  margin-bottom: 1mm;
}

.guarantor-field b {
  display: block;
  font-size: 11px;
  margin-bottom: 6mm;
}

.guarantor-field small {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.5mm;
  align-items: end;
  font-size: 12px;
  line-height: 1;
}

.guarantor-field small span {
  display: block;
  border-top: 1px solid #000;
  height: 1px;
}

.investment-proposal-page {
  order: -1;
  padding: 5mm 6mm;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 8.6px;
  line-height: 1.2;
}

.proposal-header {
  height: 16mm;
  display: grid;
  grid-template-columns: 44mm 1fr 44mm;
  align-items: start;
  border: 2px solid #000;
  border-bottom: 1px solid #000;
  padding: 1.5mm 3mm 0;
}

.proposal-header h2 {
  margin: 0;
  text-align: center;
  font-size: 10px;
  text-decoration: underline;
  letter-spacing: 0;
}

.proposal-logo {
  max-width: 42mm;
  max-height: 13mm;
  object-fit: contain;
}

.proposal-logo-right {
  justify-self: end;
}

.proposal-info-table,
.proposal-question-table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  table-layout: fixed;
  border-left: 2px solid #000;
  border-right: 2px solid #000;
}

.proposal-info-table th,
.proposal-info-table td,
.proposal-question-table th,
.proposal-question-table td {
  border: 1px solid #000;
  height: 4.1mm;
  padding: 0.35mm 1mm;
  color: #000;
  background: transparent;
  text-align: left;
  vertical-align: middle;
}

.proposal-info-table th,
.proposal-question-table th {
  font-weight: 400;
}

.proposal-info-table th:nth-child(1),
.proposal-question-table th:nth-child(1) {
  width: 36%;
}

.proposal-info-table td:nth-child(2),
.proposal-question-table td:nth-child(2) {
  width: 32%;
}

.proposal-info-table th:nth-child(3),
.proposal-question-table th:nth-child(3) {
  width: 8%;
}

.proposal-info-table td:nth-child(4),
.proposal-question-table td:nth-child(4) {
  width: 24%;
}

.proposal-question-table {
  margin-top: 4mm;
}

.proposal-justification-row th,
.proposal-justification-row td {
  height: 10mm;
  vertical-align: top;
}

.proposal-justification-row td {
  background: #dbe8f2;
}

.proposal-info-table td,
.proposal-question-table td,
.proposal-responsible span,
.proposal-observations span {
  font-weight: 700;
}

.proposal-items-table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  table-layout: fixed;
  border-left: 2px solid #000;
  border-right: 2px solid #000;
  margin-top: 4mm;
}

.proposal-items-table th,
.proposal-items-table td {
  border: 1px solid #000;
  height: 4mm;
  padding: 0.5mm 1mm;
  color: #000;
  background: transparent;
}

.proposal-items-table th {
  font-size: 8px;
  font-weight: 400;
  text-align: center;
}

.proposal-items-table td:nth-child(1) {
  font-size: 10px;
}

.proposal-items-table th:nth-child(1),
.proposal-items-table td:nth-child(1) {
  width: 36%;
  max-width: 36%;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.proposal-items-table th:nth-child(2),
.proposal-items-table td:nth-child(2) {
  width: 32%;
  text-align: center;
}

.proposal-items-table th:nth-child(3),
.proposal-items-table td:nth-child(3) {
  width: 8%;
  text-align: center;
}

.proposal-items-table th:nth-child(4),
.proposal-items-table td:nth-child(4) {
  width: 24%;
  text-align: center;
}

.proposal-approvals {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-left: 2px solid #000;
  border-right: 2px solid #000;
  border-bottom: 2px solid #000;
  min-height: 18mm;
}

.proposal-approvals div {
  padding: 2mm 1mm 0;
}

.proposal-approvals span {
  display: block;
  width: 28mm;
  border-top: 1px solid #000;
  margin-top: 6mm;
}

.proposal-approvals b {
  display: block;
  margin-top: 1mm;
  font-size: 8px;
  font-weight: 400;
}

.proposal-rules {
  border-left: 2px solid #000;
  border-right: 2px solid #000;
  border-bottom: 2px solid #000;
  padding: 1mm 1.5mm;
  font-size: 8px;
  font-weight: 700;
}

.proposal-rules h3 {
  margin: 0 0 0.5mm;
  text-align: center;
  font-size: 8.2px;
  letter-spacing: 0;
}

.proposal-rules p {
  margin: 0 0 0.6mm;
  text-align: left;
}

.proposal-responsible {
  border-left: 2px solid #000;
  border-right: 2px solid #000;
  border-bottom: 2px solid #000;
  padding: 1mm;
  display: grid;
  gap: 1mm;
}

.proposal-responsible div {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.5mm;
}

.proposal-responsible span {
  border-bottom: 1px solid #000;
}

.proposal-observations {
  border-left: 2px solid #000;
  border-right: 2px solid #000;
  border-bottom: 2px solid #000;
  min-height: 18mm;
  display: grid;
  grid-template-rows: 4mm repeat(3, 1fr);
  text-align: center;
}

.proposal-observations b {
  border-bottom: 1px solid #000;
}

.proposal-observations span {
  border-bottom: 1px solid #000;
  text-align: left;
  padding: 1mm;
}

.proposal-observations span:last-child {
  border-bottom: 0;
}

.comodato-placeholder-page {
  display: grid;
  align-content: start;
  gap: 8mm;
  font-size: 12px;
}

.placeholder-line {
  border-bottom: 1px solid #000;
  padding-bottom: 2mm;
}

.route-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

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

.route-card h3 {
  margin: 0;
  font-size: 16px;
}

.route-stops {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.route-stop {
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.queue-item .badge {
  align-self: start;
}

.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(12, 20, 24, 0.32);
  z-index: 10;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(840px, 100vw);
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  background: var(--surface);
  box-shadow: var(--shadow);
  z-index: 11;
  transform: translateX(100%);
  transition: transform 120ms ease-out;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.drawer.open {
  transform: translateX(0);
}

.drawer.request-drawer {
  width: min(1040px, 100vw);
}

.drawer-header {
  padding: 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex: 0 0 auto;
}

.drawer-header > div {
  min-width: 0;
}

.drawer-header h2 {
  margin: 0;
  font-size: 20px;
}

.drawer-header p {
  margin: 4px 0 0;
  color: var(--muted);
}

.record-form {
  padding: 18px;
  overflow: auto;
  min-height: 0;
  flex: 1 1 auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-content: start;
  gap: 12px;
}

.form-section {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  padding: 12px 0 2px;
  border-top: 1px solid var(--line);
}

.form-section:first-child {
  padding-top: 0;
  border-top: 0;
}

.form-section h3 {
  margin: 0;
  color: #21313a;
  font-size: 13px;
  font-weight: 800;
}

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.form-section-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.registration-change-code-fields {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.registration-change-code-fields[hidden] {
  display: none;
}

.registration-change-pdv-field {
  display: contents;
}

.registration-change-pdv-field[hidden] {
  display: none;
}

.registration-comodato-section {
  gap: 8px;
}

.form-section-help {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.registration-comodato-items {
  display: grid;
  gap: 8px;
}

.registration-comodato-table-wrap {
  max-height: 280px;
}

.registration-comodato-table {
  min-width: 680px;
}

.registration-comodato-table th:last-child,
.registration-comodato-table td:last-child {
  text-align: right;
}

.request-items-grid {
  display: grid;
  grid-template-columns: 0.8fr 0.72fr 1.45fr 0.45fr 0.95fr 0.72fr 0.72fr;
  min-width: 980px;
  gap: 8px;
  align-items: center;
}

.recollection-conference-items {
  display: grid;
  gap: 12px;
}

.recollection-conference-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  background: var(--surface);
}

.recollection-conference-item-header {
  display: grid;
  gap: 3px;
  margin-bottom: 12px;
}

.recollection-conference-item-header span,
.form-section-help {
  color: var(--muted);
  font-size: 13px;
}

.form-section-help {
  margin: -4px 0 14px;
}

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

.recollection-conference-fields label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.recollection-conference-fields input,
.recollection-conference-fields select {
  min-width: 0;
}

.recollection-conference-notes {
  grid-column: 1 / -1;
}

@media (max-width: 760px) {
  .recollection-conference-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .recollection-conference-fields {
    grid-template-columns: 1fr;
  }
}

.request-items-section {
  overflow: visible;
}

.request-items-grid > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.request-items-grid input,
.request-items-grid select,
.request-items-grid output {
  min-width: 0;
}

.request-items-grid .request-stock-status {
  justify-content: center;
  text-align: center;
}

.request-stock-status.is-available {
  background: #e8f5ec;
  color: #1f6b3a;
}

.request-stock-status.is-unavailable {
  background: #fdecec;
  color: #a52a2a;
}

.request-stock-status.is-neutral {
  background: var(--surface-2);
  color: var(--muted);
}

.request-items-grid input[readonly] {
  background: var(--surface-2);
  color: var(--muted);
}

.request-items-grid output {
  min-height: 38px;
  display: flex;
  align-items: center;
  padding: 8px 10px;
  border-radius: 6px;
  background: #eef5f1;
  color: #1f5136;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.field {
  display: grid;
  gap: 6px;
}

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

.field label {
  color: #3f4c56;
  font-size: 13px;
  font-weight: 700;
}

.form-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 8px;
  padding-bottom: max(2px, env(safe-area-inset-bottom));
}

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

.toast {
  position: fixed;
  inset: auto auto 20px 50%;
  width: max-content;
  max-width: min(520px, calc(100vw - 32px));
  margin: 0;
  border: 0;
  transform: translateX(-50%) translateY(20px);
  background: #17202a;
  color: #fff;
  padding: 10px 14px;
  border-radius: 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
  z-index: 20;
}

.toast.show,
.toast:popover-open {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.requests-page-header,
.requests-view-controls,
.requests-filters {
  display: flex;
  gap: 12px;
  align-items: center;
}

.requests-page-header {
  justify-content: space-between;
  margin-bottom: 16px;
}

#requestsView .requests-page-header > div:first-child { display: none; }
.event-entries-header { justify-content: flex-end; }

.requests-page-header h1 { margin: 2px 0 4px; font-size: clamp(25px, 3vw, 34px); }
.eyebrow { margin: 0; color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.requests-page-header .panel-description { margin: 0; }
.request-metrics,
.gift-preparation-metrics { display: grid; grid-template-columns: repeat(6, minmax(145px, 1fr)); gap: 10px; margin-bottom: 14px; overflow-x: auto; }
.request-metric,
.gift-preparation-metric { min-width: 145px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); box-shadow: 0 3px 10px rgba(24, 43, 61, .04); }
.request-metric span, .request-metric small,
.gift-preparation-metric span, .gift-preparation-metric small { display: block; color: var(--muted); font-size: 11px; }
.request-metric span,
.gift-preparation-metric span { font-weight: 800; text-transform: uppercase; letter-spacing: .025em; }
.request-metric strong,
.gift-preparation-metric strong { display: block; margin: 3px 0 1px; color: #12243a; font-size: 23px; line-height: 1; }
.request-metric.is-blue strong, .gift-preparation-metric.is-blue strong { color: #1268c4; }.request-metric.is-green strong, .gift-preparation-metric.is-green strong { color: #098a5e; }.request-metric.is-orange strong, .gift-preparation-metric.is-orange strong { color: #d58200; }.request-metric.is-purple strong, .gift-preparation-metric.is-purple strong { color: #654bcf; }.request-metric.is-red strong, .gift-preparation-metric.is-red strong { color: #d83240; }
.requests-view-controls { justify-content: space-between; margin: 2px 0 12px; }
.view-tabs { position: relative; display: inline-flex; isolation: isolate; padding: 3px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); }
.view-tabs::before { content: ""; position: absolute; z-index: 0; top: 3px; bottom: 3px; left: 0; width: var(--view-tab-slider-width, 0); border-radius: 6px; background: #172c3c; box-shadow: 0 2px 5px rgba(12, 30, 43, .16); opacity: 0; transform: translateX(var(--view-tab-slider-x, 0)); transition: width 280ms cubic-bezier(.22, .75, .28, 1), transform 280ms cubic-bezier(.22, .75, .28, 1), opacity 120ms ease; pointer-events: none; }
.view-tabs[data-slider-ready="true"]::before { opacity: 1; }
.view-tab, .kanban-grouping-controls .small-btn { border: 0; background: transparent; padding: 8px 18px; font-weight: 800; color: var(--muted); }
.view-tab { position: relative; z-index: 1; border-radius: 6px; transition: color 180ms ease; }
.view-tab:not(.is-active):hover { color: #24435a; background: rgba(23, 44, 60, .055); border-radius: 6px; }
.view-tab.is-active { color: #fff; }
.kanban-grouping-controls .small-btn.is-active { background: #172c3c; color: #fff; border-radius: 6px; box-shadow: 0 2px 5px rgba(12, 30, 43, .16); }

.kanban-grouping-controls { display: flex; gap: 4px; align-items: center; font-size: 12px; color: var(--muted); }
.requests-filters { flex-wrap: wrap; margin-bottom: 12px; }
.requests-filters .search-input { flex: 1 1 260px; }
.requests-filters select { min-width: 150px; }
.gift-preparation-view { min-width: 0; }
.request-standard-filters,
.gift-preparation-filters { display: grid; gap: 10px; align-items: end; padding: 12px; border: 1px solid #dce5ee; border-radius: 9px; background: var(--surface); }
.request-standard-filters { grid-template-columns: minmax(250px, 1.7fr) repeat(5, minmax(150px, 1fr)) auto; }
.gift-preparation-filters { grid-template-columns: minmax(230px, 1.7fr) minmax(190px, 1.15fr) minmax(180px, 1fr) minmax(170px, 1fr) minmax(145px, .8fr) minmax(145px, .8fr) minmax(175px, 1fr) auto; }
.request-standard-filters label,
.gift-preparation-filters label { display: grid; gap: 5px; min-width: 0; }
.request-standard-filters label > span,
.gift-preparation-filters label > span { color: #617489; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .045em; }
.request-standard-filters input, .request-standard-filters select, .request-standard-filters button,
.gift-preparation-filters input, .gift-preparation-filters select, .gift-preparation-filters button { width: 100%; min-width: 0; min-height: 40px; }
.gift-preparation-print-header { display: none; }
.gift-preparation-actions { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin: 7px 0 12px; }
.gift-preparation-rule { margin: 0 2px; color: var(--muted); font-size: 10px; }
.gift-preparation-actions .secondary-btn { flex: 0 0 auto; }
.gift-preparation-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); gap: 12px; align-items: start; }
.gift-preparation-group { --gift-group-accent: #2478ee; min-width: 0; overflow: hidden; border: 1px solid #dce5ee; border-left: 3px solid var(--gift-group-accent); border-radius: 9px; background: #f8fafc; box-shadow: 0 4px 12px rgba(24, 43, 61, .045); }
.gift-preparation-group:only-child { width: 100%; max-width: 520px; }
.gift-preparation-group.accent-1 { --gift-group-accent: #c84bf1; }.gift-preparation-group.accent-2 { --gift-group-accent: #13a76c; }.gift-preparation-group.accent-3 { --gift-group-accent: #ef4164; }.gift-preparation-group.accent-4 { --gift-group-accent: #2478ee; }
.gift-preparation-group-header { display: flex; justify-content: space-between; gap: 10px; padding: 13px 13px 10px; background: linear-gradient(135deg, #fff, #f8f7ff); }
.gift-preparation-group-header h2 { margin: 0; color: #152538; font-size: 18px; }
.gift-preparation-group-header p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.gift-preparation-group-totals { display: flex; flex-wrap: wrap; justify-content: flex-end; align-content: flex-start; gap: 5px; }
.gift-preparation-group-totals span { padding: 4px 7px; border-radius: 99px; background: #e6f2fb; color: #315979; font-size: 10px; font-weight: 800; white-space: nowrap; }
.gift-preparation-status-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; padding: 0 11px 10px; }
.gift-preparation-status-summary > span { display: grid; place-items: center; gap: 2px; min-width: 0; padding: 7px 3px; border-radius: 6px; font-size: 9px; text-align: center; }
.gift-preparation-status-summary strong { font-size: 16px; line-height: 1; }.gift-preparation-status-summary .is-pending { color: #2470c7; background: #e8f3ff; }.gift-preparation-status-summary .is-separated { color: #138953; background: #e3f7eb; }.gift-preparation-status-summary .is-overdue { color: #df3851; background: #ffe9ee; }
.gift-preparation-customers { display: grid; gap: 6px; padding: 0 9px 9px; }
.gift-preparation-customer { padding: 10px; border: 1px solid #dce5ee; border-radius: 7px; background: #fff; cursor: pointer; transition: border-color 120ms ease, box-shadow 120ms ease; }
.gift-preparation-customer:hover, .gift-preparation-customer.is-selected { border-color: #93bfe7; box-shadow: 0 3px 10px rgba(25, 83, 134, .1); }
.gift-preparation-customer:focus-visible { outline: 3px solid rgba(17, 108, 122, .25); outline-offset: 1px; }
.gift-preparation-customer > header { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.gift-preparation-customer > header strong, .gift-preparation-customer > header small { display: block; }
.gift-preparation-customer > header strong { color: #17283b; font-size: 11px; line-height: 1.3; }
.gift-preparation-customer > header small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.gift-preparation-status { flex: 0 0 auto; padding: 4px 7px; border-radius: 5px; font-size: 9px; font-weight: 800; white-space: nowrap; }
.gift-preparation-status.is-pending { color: #216abd; background: #dcecff; }.gift-preparation-status.is-separated { color: #14844f; background: #daf5e4; }.gift-preparation-status.is-overdue { color: #d92f49; background: #ffe0e7; }
.gift-preparation-customer ul { display: grid; gap: 5px; margin: 9px 0 0; padding: 8px 0 0; border-top: 1px solid #edf1f4; list-style: none; }
.gift-preparation-customer li { display: flex; justify-content: space-between; gap: 10px; color: #526579; font-size: 10px; }
.gift-preparation-customer li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.gift-preparation-customer li strong { color: #17283b; font-size: 11px; }
.gift-preparation-empty { grid-column: 1 / -1; border: 1px dashed #cfdbe6; border-radius: 9px; background: #fff; }
.request-list-wrap { max-height: min(66vh, 670px); }
.request-list-row { cursor: pointer; }
.request-list-row:hover, .request-list-row.is-selected { background: #f0f7fa; }
.request-list-row:focus-visible { outline: 3px solid rgba(17, 108, 122, .3); outline-offset: -3px; }
.request-list-row .row-actions { min-width: 128px; }
.event-materials-kanban { grid-template-columns: repeat(2, minmax(260px, 1fr)); grid-auto-flow: unset; }
.event-material-card .kanban-card-title span { color: var(--accent-strong); font-size: 11px; font-weight: 800; letter-spacing: 0; }
.event-metrics { display:grid; grid-template-columns:repeat(4,minmax(190px,1fr)); gap:10px; margin-bottom:12px; }
.event-metric { display:flex; align-items:center; gap:12px; padding:12px 14px; border:1px solid var(--line); border-radius:6px; background:#fff; }
.event-metric i { display:grid; place-items:center; flex:0 0 36px; width:36px; height:36px; border-radius:50%; color:#fff; font-style:normal; font-size:18px; font-weight:800; }.event-metric-icon { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:2; }.event-metric span,.event-metric small { display:block; font-size:11px; color:#5d7180; }.event-metric strong { display:block; margin:1px 0; font-size:20px; line-height:1; }
.event-metric-active { background:#f4fcf8; border-color:#d8eee3; }.event-metric-active i { background:#29ad70; }.event-metric-closing { background:#fffaf2; border-color:#f7e5c7; }.event-metric-closing i { background:#ffab52; }.event-metric-closing strong { color:#ef741c; }.event-metric-collection { background:#fff6f6; border-color:#f5dddd; }.event-metric-collection i { background:#f14646; }.event-metric-collection strong { color:#de2f35; }.event-metric-loaned { background:#f3f9ff; border-color:#d6e8fb; }.event-metric-loaned i { background:#1784d3; }.event-metric-loaned strong { color:#0872bd; }
.event-closing-alerts { margin:0 0 14px; padding:11px; border:1px solid #f7dfc1; border-radius:7px; background:#fffaf3; }.event-closing-alerts > header { display:flex; justify-content:space-between; gap:12px; align-items:center; }.event-closing-alerts h2 { margin:0; color:#f26722; font-size:14px; }.event-closing-alerts p { margin:2px 0 0; color:#5d7180; font-size:11px; }.link-btn { border:0; background:transparent; color:#12799e; font-size:11px; font-weight:800; }.event-closing-cards { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin-top:10px; }.event-closing-card { padding:9px; border:1px solid #f1e4d7; border-radius:6px; background:#fff; }.event-closing-card > div { display:inline-grid; gap:2px; }.event-closing-card strong { font-size:12px; }.event-closing-card small { color:#5d7180; font-size:10px; }.event-closing-card > span { float:right; padding:3px 6px; border-radius:8px; background:#fff0dc; color:#eb6e22; font-size:10px; font-weight:800; }.event-closing-card footer { display:flex; justify-content:space-between; align-items:center; gap:8px; margin-top:10px; }.event-closing-card footer b { color:#e34e4e; font-size:10px; }.event-closing-card .small-btn { padding:6px 8px; font-size:10px; }

.kanban-grouped { display: grid; grid-template-columns: repeat(4, minmax(270px, 1fr)); grid-auto-flow: unset; overflow: auto; align-items: start; }
.event-materials-kanban.kanban-grouped { grid-template-columns: repeat(3, minmax(310px, 1fr)); }
.kanban-group { border: 1px solid var(--line); border-radius: 10px; padding: 8px; background: #f6fafc; min-width: 0; }
.kanban-group > header { display: flex; justify-content: space-between; gap: 8px; padding: 7px 5px 11px; }
.kanban-group > header strong, .kanban-group > header small { display: block; }
.kanban-group > header small { color: var(--muted); font-size: 11px; margin-top: 3px; }
.kanban-group > header > span { display: grid; place-items: center; min-width: 28px; height: 28px; border-radius: 99px; background: #dcecf4; font-weight: 800; }
.kanban-group:nth-child(2) { background: #faf7ff; }.kanban-group:nth-child(2) > header > span { background: #e8ddfd; }
.kanban-group:nth-child(3) { background: #f3fbf6; }.kanban-group:nth-child(3) > header > span { background: #d5f2df; }
.kanban-group:nth-child(4) { background: #f7f9fb; }.kanban-group:nth-child(4) > header > span { background: #e3e9ef; }
.kanban-group-stages { display: grid; grid-template-columns: repeat(var(--group-columns, 1), minmax(190px, 1fr)); gap: 8px; overflow-x: auto; }
.kanban-grouped .kanban-column { min-width: 190px; background: rgba(255,255,255,.72); }
.kanban-card { padding: 10px; cursor: pointer; }
.kanban-card b { display: block; margin-top: 4px; font-size: 13px; line-height: 1.25; }
.kanban-card-title { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; }
.kanban-card-title span { color: var(--muted); letter-spacing: 1px; }
.kanban-card .kanban-card-tags { margin: 7px 0 2px; }
.kanban-card .badge { margin: 0; min-height: 20px; padding: 2px 6px; font-size: 11px; }

.request-details-panel { position: fixed; z-index: 12; top: 0; right: 0; width: min(480px, 100vw); height: 100dvh; background: var(--surface); box-shadow: -12px 0 36px rgba(13, 27, 39, .18); transform: translateX(105%); transition: transform 120ms ease-out; display: flex; flex-direction: column; overflow: hidden; }
.request-details-panel.open { transform: translateX(0); }
.request-details-header { padding: 23px 24px 17px; display: flex; justify-content: space-between; gap: 12px; }
.request-details-header h2 { margin: 7px 0 5px; font-size: 24px; }.request-details-header p, .request-details-header small { margin: 0; color: var(--muted); }.request-details-code { display: flex; align-items: center; gap: 9px; }.request-details-code strong { font-size: 16px; }.request-details-code .badge { margin: 0; font-size: 11px; }
.request-details-tabs { display: flex; gap: 16px; padding: 0 24px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }.request-details-tabs::-webkit-scrollbar { display: none; }.request-details-tabs button { white-space: nowrap; padding: 10px 0 11px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--muted); font-size: 11px; font-weight: 700; }.request-details-tabs button.is-active { color: var(--accent-strong); border-bottom-color: var(--accent); }
.request-details-body { overflow: auto; padding: 20px 24px 24px; display: grid; align-content: start; gap: 16px; }
.request-detail-status { display: flex; gap: 6px; flex-wrap: wrap; }.request-detail-status .badge { margin: 0; }
.request-next-action { padding: 15px 16px; border: 1px solid #beddec; border-radius: 8px; background: #eef8fd; }.request-next-action::before { content: "▣"; float: left; display: grid; place-items: center; width: 29px; height: 29px; margin: 0 10px 12px 0; border-radius: 6px; background: #d9ecff; color: var(--accent-strong); }.request-next-action strong, .request-next-action span, .request-next-action small { display: block; }.request-next-action span { margin-top: 4px; font-size: 14px; }.request-next-action small { margin-top: 4px; color: var(--muted); font-size: 11px; }
.request-detail-section { border-top: 1px solid var(--line); padding-top: 14px; }.request-detail-section h3 { margin: 0 0 10px; font-size: 14px; }.request-detail-section p { color: var(--muted); font-size: 13px; margin: 0; }
.request-detail-section.no-border { border-top: 0; padding-top: 0; }.request-detail-section dl { display: grid; grid-template-columns: 1fr 1fr; margin: 0; gap: 8px; }.request-detail-section dl div { padding: 10px; background: var(--surface-2); border: 1px solid #edf1f4; border-radius: 6px; }.request-detail-section dt, .request-demand small, .request-observations small { display: block; color: var(--muted); font-size: 11px; }.request-detail-section dd { margin: 4px 0 0; font-size: 13px; font-weight: 700; }.request-detail-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }.request-demand, .request-observations { margin-top: 9px; padding: 11px; border: 1px solid #edf1f4; border-radius: 6px; }.request-demand strong, .request-observations span { display: block; margin-top: 5px; font-size: 13px; }.request-observations span { color: var(--muted); }
.request-detail-section ul { list-style: none; margin: 0; padding: 0; }.request-detail-section li { padding: 7px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.request-process { list-style: none; margin: 0; padding: 0; display: flex; justify-content: space-between; gap: 0; }.request-process li { position: relative; flex: 1; color: var(--muted); display: grid; justify-items: center; gap: 5px; padding: 0; border: 0; font-size: 10px; text-align: center; }.request-process li::before { content: "○"; position: relative; z-index: 1; display: grid; place-items: center; width: 19px; height: 19px; border-radius: 50%; background: var(--surface); border: 1px solid #a8b7c3; }.request-process li:not(:last-child)::after { content: ""; position: absolute; top: 9px; left: 55%; width: 90%; border-top: 1px solid #a8b7c3; }.request-process li.is-done { color: var(--accent-strong); font-weight: 700; }.request-process li.is-done::before { content: "✓"; background: #1596df; border-color: #1596df; color: #fff; }.request-process li.is-done:not(:last-child)::after { border-color: #1596df; }
.request-process li.is-current { color: #6f42c1; font-weight: 800; }.request-process li.is-current::before { content: "●"; background: #fff; border: 3px solid #7c4dff; color: #7c4dff; font-size: 9px; box-shadow: 0 0 0 3px #eee8ff; }
.request-details-actions { border-top: 1px solid var(--line); padding-top: 14px; }.request-details-actions .row-actions { display: grid; grid-template-columns: 1fr 1fr; }.request-details-actions .small-btn { width: 100%; }.request-details-actions .row-actions .small-btn:first-child { grid-column: 1 / -1; padding: 11px; background: #132d40; border-color: #132d40; color: #fff; }

@media (max-width: 520px) { .request-details-panel { width: 100vw; }.request-details-header { padding: 18px 14px 14px; }.request-details-tabs { padding: 0 14px; gap: 14px; }.request-details-body { padding: 16px 14px 20px; }.request-detail-grid { grid-template-columns: repeat(3, minmax(76px, 1fr)) !important; }.request-process li { font-size: 9px; } }

@media (max-width: 1500px) {
  .request-standard-filters,
  .gift-preparation-filters {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .request-filter-search,
  .gift-preparation-search {
    grid-column: span 2;
  }
}

@media (max-width: 920px) {
  .mkt-truck-ocp-sheet { padding: 18px; }

  .mkt-truck-ocp-header,
  .mkt-truck-ocp-stop > header {
    flex-direction: column;
  }

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

  .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 30;
    width: min(320px, 86vw);
    height: 100vh;
    height: 100dvh;
    max-height: none;
    margin: 0;
    padding: 18px 16px;
    border-left: 0;
    border-radius: 0 16px 16px 0;
    overflow: visible;
    transform: translateX(-100%);
    box-shadow: var(--shadow);
  }

  .sidebar-toggle {
    top: 22px;
    right: 12px;
  }

  .sidebar.mobile-open {
    transform: translateX(0);
  }

  .sidebar-overlay {
    position: fixed;
    inset: 0;
    z-index: 29;
    width: 100%;
    height: 100%;
    border: 0;
    background: rgba(12, 20, 24, 0.52);
  }

  .sidebar-overlay:not([hidden]),
  .mobile-menu-btn {
    display: grid;
  }

  .mobile-menu-btn {
    margin-top: 1px;
    border-color: var(--line);
    background: var(--surface);
    color: var(--text);
  }

  .mobile-menu-btn span {
    display: block;
    width: 17px;
    height: 2px;
    margin: 2px 0;
    border-radius: 999px;
    background: currentColor;
  }

  body.mobile-nav-open {
    overflow: hidden;
  }

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

  .metric-grid,
  .dashboard-grid,
  .route-board,
  .kanban,
  .module-grid {
    grid-template-columns: 1fr;
  }

  .kanban {
    grid-auto-flow: row;
    grid-auto-columns: auto;
  }

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

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

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

  .registration-change-code-fields {
    grid-template-columns: 1fr;
  }

  .comodato-item-row,
  .comodato-item-row--with-tag {
    grid-template-columns: 1fr;
  }

  .list-filters select {
    width: 100%;
    max-width: none;
  }

  .multi-select-filter {
    width: 100%;
  }

  .multi-select-filter-menu {
    right: 0;
    min-width: 0;
  }

  .customer-filters {
    flex-wrap: wrap;
    overflow-x: visible;
  }

  .customer-filters .search-input,
  #customerCodeFilter,
  #customerNameFilter,
  #customerDocumentFilter,
  #customerRnFilter,
  #customerGvFilter,
  #customerStatusFilter,
  .customer-inactive-filter,
  #clearCustomerFiltersBtn {
    flex-basis: 100%;
    width: 100%;
  }

  .customer-filters .catalog-status {
    margin-left: 0;
    white-space: normal;
  }

  .refrigerator-stock-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow-x: visible;
  }

  .request-metrics,
  .gift-preparation-metrics {
    grid-template-columns: repeat(3, minmax(145px, 1fr));
  }

  .request-standard-filters,
  .gift-preparation-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .request-filter-search,
  .request-standard-filters #clearRequestFiltersBtn,
  .gift-preparation-search,
  .gift-preparation-filters #clearGiftPreparationFiltersBtn {
    grid-column: 1 / -1;
  }

  .gift-preparation-groups {
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  }

  .inventory-stock-toolbar {
    align-items: stretch;
  }

  .inventory-search-field {
    width: 100%;
    min-width: 0;
    flex-basis: 100%;
  }

  .inventory-stock-toolbar > select,
  .inventory-stock-toolbar .inventory-inline-filter,
  .inventory-stock-toolbar .multi-select-filter,
  .inventory-stock-toolbar > button {
    flex: 1 1 210px;
  }

  .inventory-stock-toolbar > button {
    justify-content: center;
  }

  .inventory-list-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .stock-availability-tabs { width: 100%; }
  .stock-availability-tab { flex: 1 1 50%; }

  .inventory-list-count {
    padding-left: 48px;
  }

  .refrigerator-stock-summary > .inventory-summary-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .gift-stock-model-header {
    align-items: flex-start;
    flex-wrap: wrap;
    padding: 10px 12px;
  }

  .gift-stock-model-header h2 {
    flex: 1;
    padding-top: 8px;
    font-size: 17px;
  }

  .gift-stock-model-meta {
    width: 100%;
    justify-content: center;
  }

  .pagination-bar,
  .pagination-actions {
    align-items: stretch;
  }

  .pagination-actions {
    width: 100%;
    overflow-x: auto;
  }
}

@media (max-width: 600px) {
  .login-fridge-stage {
    width: min(386px, 76vw, calc((100vh - 124px) * 0.5078));
  }

  .user-profile-copy {
    display: none;
  }

  .main {
    padding: 16px 12px;
  }

  .requests-view-controls {
    align-items: stretch;
    overflow-x: auto;
  }

  .requests-view-controls .view-tabs {
    min-width: max-content;
  }

  .request-metrics,
  .request-standard-filters,
  .gift-preparation-metrics,
  .gift-preparation-filters,
  .gift-preparation-groups {
    grid-template-columns: 1fr;
  }

  .request-metrics,
  .gift-preparation-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .request-filter-search,
  .request-standard-filters #clearRequestFiltersBtn,
  .gift-preparation-search,
  .gift-preparation-filters #clearGiftPreparationFiltersBtn {
    grid-column: auto;
  }

  .gift-preparation-rule {
    text-align: left;
  }

  .gift-preparation-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .gift-preparation-actions .secondary-btn {
    width: 100%;
  }

  .drawer-header,
  .record-form {
    padding: 14px 12px;
  }

  .drawer-header p {
    font-size: 13px;
  }

  .form-actions {
    flex-direction: column-reverse;
  }

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media print {
  @page {
    size: A4 portrait;
    margin: 0;
  }

  @page turnover {
    size: A4 landscape;
    margin: 5mm;
  }

  @page inventory {
    size: A4 landscape;
    margin: 8mm;
  }

  @page gift-preparation {
    size: A4 landscape;
    margin: 8mm;
  }

  body.printing-gift-preparation {
    background: #fff;
    page: gift-preparation;
  }

  body.printing-gift-preparation #requestsView {
    display: block !important;
  }

  body.printing-gift-preparation :is(.requests-page-header, .requests-view-controls, #requestMetrics, #requestStandardFilters, #requestsKanban, #requestsListWrap, .gift-preparation-filters, .gift-preparation-actions, .request-details-panel, .request-details-overlay) {
    display: none !important;
  }

  body.printing-gift-preparation #giftPreparationView,
  body.printing-gift-preparation .gift-preparation-print-header {
    display: block !important;
  }

  body.printing-gift-preparation #giftPreparationView {
    zoom: var(--gift-preparation-print-scale, 1);
  }

  body.printing-gift-preparation .gift-preparation-print-header {
    margin-bottom: 6mm;
    border-bottom: 1px solid #9aa7b2;
    padding-bottom: 3mm;
  }

  body.printing-gift-preparation .gift-preparation-print-header h1 {
    margin: 0 0 2mm;
    font-size: 20px;
  }

  body.printing-gift-preparation .gift-preparation-print-header p {
    margin: 0;
    color: #4e5b63;
    font-size: 9px;
  }

  body.printing-gift-preparation .gift-preparation-metrics {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 2mm;
    margin-bottom: 4mm;
    overflow: visible;
  }

  body.printing-gift-preparation .gift-preparation-metric {
    min-width: 0;
    padding: 2.5mm;
    border-color: #aeb8bc;
    border-radius: 2mm;
    box-shadow: none;
  }

  body.printing-gift-preparation .gift-preparation-metric strong {
    font-size: 17px;
  }

  body.printing-gift-preparation .gift-preparation-groups {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 3mm;
    align-items: start;
  }

  body.printing-gift-preparation .gift-preparation-group {
    max-width: none;
    overflow: visible;
    border-color: #9aa7b2;
    border-radius: 2mm;
    box-shadow: none;
    break-inside: auto;
    page-break-inside: auto;
  }

  body.printing-gift-preparation .gift-preparation-customer {
    border-color: #b7c1c9;
    box-shadow: none;
    cursor: default;
    break-inside: avoid-page;
    page-break-inside: avoid;
  }

  body.printing-gift-preparation .gift-preparation-customer li span {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
  }

  @page load-order {
    size: A4 portrait;
    margin: 14mm;
  }

  @page mkt-truck-ocp {
    size: A4 portrait;
    margin: 10mm;
  }

  body.printing-mkt-truck-ocp {
    background: #fff;
    page: mkt-truck-ocp;
  }

  body.printing-mkt-truck-ocp .mkt-truck-ocp-sheet {
    border: 0;
    border-radius: 0;
    padding: 0;
    page: mkt-truck-ocp;
  }

  body.printing-mkt-truck-ocp .mkt-truck-ocp-stop {
    border-color: #8d989d;
    break-inside: avoid-page;
    page-break-inside: avoid;
  }

  body.printing-mkt-truck-ocp .mkt-truck-ocp-stop > header,
  body.printing-mkt-truck-ocp .mkt-truck-ocp-signer {
    background: #fff !important;
  }

  body.printing-mkt-truck-ocp .mkt-truck-ocp-signer input {
    border: 0;
    border-radius: 0;
    border-bottom: 1px solid #303a42;
    padding: 4px 0;
    background: transparent;
  }

  body.printing-mkt-truck-ocp .mkt-truck-ocp-equipment .table-wrap {
    border: 0;
    overflow: visible;
  }

  body.printing-mkt-truck-ocp .mkt-truck-ocp-equipment table {
    min-width: 0;
    border-collapse: collapse;
  }

  body.printing-mkt-truck-ocp .mkt-truck-ocp-equipment th,
  body.printing-mkt-truck-ocp .mkt-truck-ocp-equipment td {
    border: 1px solid #8d989d;
    padding: 6px;
    font-size: 10px;
  }

  body.printing-route-load-order {
    background: #fff;
  }

  body.printing-route-load-order .app-shell,
  body.printing-route-load-order .drawer,
  body.printing-route-load-order .drawer-overlay,
  body.printing-route-load-order dialog,
  body.printing-route-load-order .toast,
  body.printing-route-load-order datalist {
    display: none !important;
  }

  body.printing-route-load-order .route-load-order-print-sheet {
    display: block !important;
    page: load-order;
    color: #17202a;
  }

  .route-load-order-print-sheet header h1 {
    margin: 0 0 4px;
    font-size: 22px;
  }

  .route-load-order-print-sheet header p {
    margin: 0;
    color: #4e5b63;
  }

  .route-load-order-print-sheet .route-load-order-meta {
    margin: 22px 0 16px;
  }

  .route-load-order-print-sheet .route-load-order-meta > div {
    border-color: #aeb8bc;
    border-radius: 0;
  }

  .route-load-order-print-sheet .table-wrap {
    border: 0;
    overflow: visible;
  }

  .route-load-order-print-sheet .load-order-table {
    min-width: 0;
    border-collapse: collapse;
  }

  .route-load-order-print-sheet .load-order-table th,
  .route-load-order-print-sheet .load-order-table td {
    border: 1px solid #aeb8bc;
    padding: 9px;
    font-size: 12px;
  }

  .route-load-order-print-sheet .load-order-table th {
    background: #eef3f1 !important;
  }

  .route-load-order-print-sheet footer {
    margin-top: 24px;
    color: #69767d;
    font-size: 10px;
  }

  .sidebar,
  .sidebar-overlay,
  .login-screen,
  .topbar-actions,
  .topbar,
  .toolbar,
  .row-actions,
  .drawer,
  .drawer-overlay,
  .toast,
  .print-form,
  .print-module > .panel-header {
    display: none !important;
  }

  .inventory-drag-handle {
    display: none !important;
  }

  :is(body.printing-inventory, body.printing-beer-dispenser-inventory, body.printing-material-inventory, body.printing-gift-inventory) .inventory-list-header,
  :is(body.printing-inventory, body.printing-beer-dispenser-inventory, body.printing-material-inventory, body.printing-gift-inventory) .inventory-summary-icon {
    display: none !important;
  }

  :is(body.printing-inventory, body.printing-beer-dispenser-inventory, body.printing-material-inventory, body.printing-gift-inventory) .inventory-list-panel {
    overflow: visible;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  :is(body.printing-inventory, body.printing-beer-dispenser-inventory, body.printing-material-inventory, body.printing-gift-inventory) .inventory-summary-card {
    display: block;
    min-height: 0;
  }

  body.printing-gift-inventory .inventory-gift-list-panel .gift-stock-groups {
    padding: 0;
    border: 0;
    background: transparent;
  }

  .app-shell {
    display: block;
  }

  .main {
    padding: 0;
  }

  .view {
    display: none !important;
  }

  .view.active-view {
    display: block !important;
  }

  .metric-card,
  .panel,
  .route-card,
  .table-wrap {
    border: 1px solid #999;
    box-shadow: none;
  }

  .panel {
    padding: 0;
    border: 0;
  }

  .print-workspace {
    display: block;
  }

  .turnover-sheet {
    width: 287mm;
    height: 199.5mm;
    min-height: 0;
    border: 0;
    box-shadow: none;
    margin: 0;
    overflow: hidden;
    break-inside: avoid-page;
    break-after: avoid-page;
    page-break-inside: avoid;
    page-break-after: avoid;
  }

  body.printing-turnover {
    width: 287mm;
    height: 199.5mm;
    min-height: 0;
    margin: 0;
    overflow: hidden;
    background: #fff;
    page: turnover;
  }

  body.printing-inventory,
  body.printing-beer-dispenser-inventory,
  body.printing-material-inventory,
  body.printing-gift-inventory {
    page: inventory;
  }

  body.printing-inventory #inventoryView {
    display: block !important;
  }

  body.printing-material-inventory #inventoryMaterialsView {
    display: block !important;
  }

  body.printing-beer-dispenser-inventory #inventoryChopeirasView {
    display: block !important;
  }

  body.printing-gift-inventory #inventoryGiftsView {
    display: block !important;
  }

  :is(body.printing-inventory, body.printing-beer-dispenser-inventory, body.printing-material-inventory, body.printing-gift-inventory) .refrigerator-stock-summary {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 3px;
    margin-bottom: 6px;
    overflow: visible;
  }

  body.printing-material-inventory .material-stock-summary {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  body.printing-gift-inventory .gift-stock-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  :is(body.printing-inventory, body.printing-beer-dispenser-inventory, body.printing-material-inventory, body.printing-gift-inventory) .refrigerator-stock-summary article {
    min-width: 0;
    width: auto;
    padding: 4px 5px;
    border-radius: 3px;
  }

  :is(body.printing-inventory, body.printing-beer-dispenser-inventory, body.printing-material-inventory, body.printing-gift-inventory) .refrigerator-stock-summary strong {
    margin-top: 2px;
    font-size: 14px;
  }

  :is(body.printing-inventory, body.printing-beer-dispenser-inventory, body.printing-material-inventory, body.printing-gift-inventory) .refrigerator-stock-summary span {
    font-size: 8px;
  }

  :is(body.printing-inventory, body.printing-beer-dispenser-inventory, body.printing-material-inventory, body.printing-gift-inventory) .inventory-table-wrap {
    overflow: visible;
    border: 0;
  }

  :is(body.printing-inventory, body.printing-beer-dispenser-inventory, body.printing-material-inventory, body.printing-gift-inventory) .inventory-table-wrap table {
    min-width: 0;
    font-size: 9px;
    table-layout: fixed;
  }

  :is(body.printing-inventory, body.printing-beer-dispenser-inventory, body.printing-material-inventory, body.printing-gift-inventory) .inventory-table-wrap thead {
    display: table-header-group;
  }

  :is(body.printing-inventory, body.printing-beer-dispenser-inventory, body.printing-material-inventory, body.printing-gift-inventory) .inventory-table-wrap tr {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  :is(body.printing-inventory, body.printing-beer-dispenser-inventory, body.printing-material-inventory, body.printing-gift-inventory) .inventory-table-wrap th,
  :is(body.printing-inventory, body.printing-beer-dispenser-inventory, body.printing-material-inventory, body.printing-gift-inventory) .inventory-table-wrap td {
    padding: 4px;
    font-size: 9px;
    white-space: normal;
  }

  :is(body.printing-inventory, body.printing-beer-dispenser-inventory, body.printing-material-inventory, body.printing-gift-inventory) .inventory-table-wrap th:nth-child(2),
  :is(body.printing-inventory, body.printing-beer-dispenser-inventory, body.printing-material-inventory, body.printing-gift-inventory) .inventory-table-wrap td:nth-child(2) {
    width: 170px;
    min-width: 170px;
    max-width: 170px;
  }

  :is(body.printing-inventory, body.printing-beer-dispenser-inventory, body.printing-material-inventory, body.printing-gift-inventory) .inventory-table-wrap .inventory-notes-cell {
    display: none;
  }

  :is(body.printing-inventory, body.printing-beer-dispenser-inventory, body.printing-material-inventory, body.printing-gift-inventory) .inventory-table-wrap .inventory-actions-cell {
    display: none !important;
  }

  :is(body.printing-inventory, body.printing-beer-dispenser-inventory, body.printing-material-inventory, body.printing-gift-inventory) .inventory-table-wrap th.inventory-image-cell {
    width: 34px;
  }

  :is(body.printing-inventory, body.printing-beer-dispenser-inventory, body.printing-material-inventory, body.printing-gift-inventory) .inventory-image {
    width: 36px;
    height: 54px;
  }

  body.printing-material-inventory .material-stock-table-wrap th:nth-child(1) { width: 6%; }

  body.printing-material-inventory .material-stock-table-wrap th:nth-child(2),
  body.printing-material-inventory .material-stock-table-wrap td:nth-child(2) {
    width: 17%;
    min-width: 0;
    max-width: none;
  }

  body.printing-material-inventory .material-stock-table-wrap th:nth-child(3) { width: 6%; }
  body.printing-material-inventory .material-stock-table-wrap th:nth-child(4),
  body.printing-material-inventory .material-stock-table-wrap th:nth-child(5) { width: 6%; }
  body.printing-material-inventory .material-stock-table-wrap th:nth-child(6) { width: 8%; }
  body.printing-material-inventory .material-stock-table-wrap th:nth-child(7) { width: 9%; }
  body.printing-material-inventory .material-stock-table-wrap th:nth-child(8) { width: 6%; }
  body.printing-material-inventory .material-stock-table-wrap th:nth-child(9) { width: 9%; }
  body.printing-material-inventory .material-stock-table-wrap th:nth-child(10) { width: 8%; }
  body.printing-material-inventory .material-stock-table-wrap th:nth-child(11) { width: 12%; }

  body.printing-material-inventory .material-stock-table-wrap th.inventory-image-cell,
  body.printing-material-inventory .material-stock-table-wrap td.inventory-image-cell {
    width: 7%;
    min-width: 0;
    max-width: none;
  }

  body.printing-material-inventory .material-stock-table-wrap .inventory-image {
    margin-inline: auto;
  }

  :is(body.printing-inventory, body.printing-beer-dispenser-inventory, body.printing-material-inventory, body.printing-gift-inventory) .inventory-print-page-end:not(:last-child) {
    break-after: page;
    page-break-after: always;
  }

  body.printing-gift-inventory .gift-stock-model-group:not(:last-child) {
    break-after: page;
    page-break-after: always;
  }

  body.printing-turnover .app-shell,
  body.printing-turnover .main,
  body.printing-turnover #turnoverPrintView,
  body.printing-turnover .print-module,
  body.printing-turnover .turnover-workspace,
  body.printing-turnover .turnover-document {
    width: 287mm;
    max-width: 287mm;
    height: auto;
    min-height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: #fff;
    page: turnover;
  }

  body.printing-registration-turnover,
  body.printing-registration-turnover .app-shell,
  body.printing-registration-turnover .main,
  body.printing-registration-turnover #turnoverPrintView,
  body.printing-registration-turnover .print-module,
  body.printing-registration-turnover .turnover-workspace,
  body.printing-registration-turnover .turnover-document {
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  body.printing-registration-turnover .turnover-document.is-registration-turnover.has-registration-turnover-pages [data-turnover-source-sheet] {
    display: none !important;
  }

  body.printing-registration-turnover .registration-turnover-pages {
    display: block !important;
  }

  body.printing-registration-turnover .registration-turnover-sheet {
    width: 287mm;
    height: 199.5mm;
    min-height: 0;
    margin: 0;
    break-after: page;
    page-break-after: always;
  }

  body.printing-registration-turnover .registration-turnover-sheet:last-child {
    break-after: auto;
    page-break-after: auto;
  }

  .recollection-letter-page {
    width: 210mm;
    height: 297mm;
    min-height: 0;
    border: 0;
    box-shadow: none;
    margin: 0;
    overflow: hidden;
    page-break-after: avoid;
  }

  .comodato-document {
    display: block;
  }

  .comodato-page {
    width: 210mm;
    min-height: 297mm;
    border: 0;
    box-shadow: none;
    margin: 0;
    page-break-after: always;
  }

  .comodato-page:last-child {
    page-break-after: auto;
  }

  body.printing-proposal-only .comodato-page:not(.investment-proposal-page) {
    display: none !important;
  }

  body.printing-proposal-only .investment-proposal-page {
    page-break-after: auto;
  }
}

.kanban-card .sync-origin-badge {
  margin: 8px 0 0;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}

.comodato-items-continuation h2 { margin-bottom: 8mm; font-size: 15px; }
.comodato-items-continuation table { width: 100%; margin-top: 8mm; table-layout: fixed; }
.comodato-items-continuation td { overflow-wrap: anywhere; }
.comodato-continuation-note { font-size: 8px; }
.comodato-continuation-note { caption-side: bottom; text-align: left; }
