:root {
  --navy: #132242;
  --indigo: #2b2a6f;
  --violet: #6f1d77;
  --magenta: #a01878;
  --cyan: #53c7c3;
  --teal: #0d999a;
  --mint: #dcf7f4;
  --orange: #ff8a54;
  --green: #68a966;
  --ink: #223044;
  --muted: #66768a;
  --line: #dce2ea;
  --surface: #ffffff;
  --canvas: #f3f6f8;
  --shadow: 0 18px 40px rgba(26, 38, 58, 0.12);
  --radius: 8px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--canvas);
}

body {
  margin: 0;
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

.app-icon {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

button,
select,
input,
textarea {
  max-width: 100%;
  font: inherit;
}

button {
  cursor: pointer;
}
.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  background:
    linear-gradient(90deg, rgba(19, 34, 66, 0.06), transparent 28%),
    var(--canvas);
}

body.sales-mode .app-shell {
  height: 100vh;
  overflow: hidden;
}

body.sales-mode .sidebar-footer {
  display: none;
}

.sidebar {
  position: sticky;
  z-index: 70;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: visible;
  color: rgba(255, 255, 255, 0.88);
  background:
    linear-gradient(180deg, rgba(19, 34, 66, 0.98) 0%, rgba(39, 40, 112, 0.98) 43%, rgba(111, 29, 119, 0.98) 73%, rgba(119, 0, 110, 0.98) 100%),
    var(--navy);
  box-shadow: 8px 0 30px rgba(25, 28, 50, 0.22);
}

.brand {
  min-height: 108px;
  display: flex;
  align-items: center;
  padding: 22px 22px 14px;
  text-decoration: none;
}

.brand img {
  width: 168px;
  max-width: 100%;
  display: block;
}

.module-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 0 16px;
  overflow: visible;
}

.nav-group {
  position: relative;
  z-index: 1;
}

.nav-group:hover,
.nav-group:focus-within,
.nav-group.is-open {
  z-index: 90;
}

.nav-item {
  position: relative;
  min-height: 48px;
  display: grid;
  grid-template-columns: 48px 1fr 18px;
  align-items: center;
  border: 0;
  color: inherit;
  text-align: left;
  background: transparent;
  padding: 0 18px 0 22px;
  transition: background 180ms ease, transform 180ms ease, color 180ms ease;
}

.nav-item::before {
  content: "";
  position: absolute;
  inset: 6px 0 6px auto;
  width: 3px;
  border-radius: 8px 0 0 8px;
  background: transparent;
  transform-origin: center;
}

.nav-item:hover {
  transform: translateX(4px);
  background: rgba(255, 255, 255, 0.08);
}

.nav-item.is-active {
  color: #fff;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.06));
}

.nav-item.is-active .nav-label::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -14px;
  width: 3px;
  height: 36px;
  border-radius: 999px;
  background:
    linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, 0.95) 22%, var(--cyan) 45%, #36fff2 58%, transparent 100%),
    var(--cyan);
  background-size: 100% 220%, 100% 100%;
  box-shadow:
    0 0 10px rgba(83, 199, 195, 0.95),
    0 0 24px rgba(83, 199, 195, 0.9),
    -8px 0 28px rgba(83, 199, 195, 0.22);
  animation: neon-sidebar-pulse 1.85s ease-in-out infinite;
  transform-origin: center;
}

.nav-item.has-catalog-menu.is-active .nav-label::after {
  content: none;
}

.nav-item.has-catalog-menu.is-active .nav-chevron::after {
  content: "";
  position: absolute;
  top: 50%;
  left: calc(100% + 12px);
  width: 3px;
  height: 36px;
  border-radius: 999px;
  background:
    linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, 0.95) 22%, var(--cyan) 45%, #36fff2 58%, transparent 100%),
    var(--cyan);
  background-size: 100% 220%, 100% 100%;
  box-shadow:
    0 0 9px rgba(83, 199, 195, 0.92),
    0 0 18px rgba(83, 199, 195, 0.76),
    -6px 0 24px rgba(83, 199, 195, 0.2);
  animation: neon-sidebar-pulse 1.85s ease-in-out infinite;
  transform-origin: center;
}

@keyframes neon-sidebar-pulse {
  0%,
  100% {
    opacity: 0.72;
    transform: translateY(-50%) scaleY(0.9);
    background-position: 0 115%, 0 0;
    filter: saturate(1.05);
  }

  45% {
    opacity: 1;
    transform: translateY(-50%) scaleY(1);
    background-position: 0 15%, 0 0;
    filter: saturate(1.45);
  }

  65% {
    opacity: 0.92;
    box-shadow:
      0 0 14px rgba(83, 199, 195, 1),
      0 0 34px rgba(54, 255, 242, 0.92),
      -10px 0 36px rgba(83, 199, 195, 0.28);
  }
}

@media (prefers-reduced-motion: reduce) {
  .nav-item.is-active .nav-label::after,
  .nav-item.has-catalog-menu.is-active .nav-chevron::after {
    animation: none;
    opacity: 1;
    transform: translateY(-50%);
  }
}

.nav-label {
  position: relative;
  justify-self: start;
  min-width: 0;
  font-weight: 600;
  white-space: nowrap;
}

.nav-chevron {
  position: relative;
  display: grid;
  place-items: center;
  color: var(--cyan);
  opacity: 0.82;
}

.nav-item.has-catalog-menu .nav-chevron {
  margin-left: 14px;
}

.nav-chevron svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.catalog-submenu {
  position: absolute;
  z-index: 95;
  top: 0;
  left: calc(100% + 12px);
  width: 228px;
  padding: 8px 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  background: #181a1c;
  box-shadow: 0 20px 44px rgba(7, 11, 22, 0.32);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-8px) scale(0.98);
  transform-origin: left top;
  transition: opacity 160ms ease, transform 160ms ease;
}

.catalog-submenu::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  right: 100%;
  width: 14px;
}

.menu-group.is-open .catalog-submenu,
.menu-group:hover .catalog-submenu,
.menu-group:focus-within .catalog-submenu {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0) scale(1);
}

.catalog-submenu button {
  width: 100%;
  min-height: 46px;
  display: flex;
  align-items: center;
  border: 0;
  padding: 0 24px;
  color: rgba(255, 255, 255, 0.92);
  background: transparent;
  text-align: left;
  font-weight: 600;
}

.catalog-submenu button:hover,
.catalog-submenu button:focus-visible {
  color: #fff;
  outline: 0;
  background: rgba(83, 199, 195, 0.15);
}

.sidebar-footer {
  margin-top: auto;
  padding: 16px 20px 22px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
}

.branch-chip {
  width: fit-content;
  margin-bottom: 8px;
  padding: 7px 11px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.workspace {
  min-width: 0;
}

.topbar {
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 44px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(18px);
}

.eyebrow {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  margin-top: 4px;
  font-size: 24px;
}

h2 {
  margin-top: 4px;
  font-size: 22px;
}

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

.ghost-button,
.profile-button,
.icon-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius);
  color: var(--ink);
  background: transparent;
}

.ghost-button {
  color: #40546a;
  padding: 0 12px;
}

.ghost-button .icon img {
  width: 22px;
  height: 22px;
  display: block;
}

.ghost-button:hover,
.profile-button:hover,
.icon-button:hover {
  border-color: var(--line);
  background: #fff;
}

.icon-button {
  width: 42px;
}

.profile-button {
  padding: 0 10px;
  font-weight: 700;
}

.profile-button .icon.small {
  color: var(--teal);
}

.profile-button > span:first-child {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--magenta));
  font-size: 12px;
}

.content-frame {
  padding: 28px 44px 48px;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.date-filter,
.branch-select {
  min-height: 50px;
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 10px 24px rgba(28, 40, 60, 0.06);
}

.date-filter button {
  width: 48px;
  height: 48px;
  border: 0;
  border-right: 1px solid var(--line);
  color: var(--teal);
  background: transparent;
}

.date-filter select {
  min-width: 150px;
  min-height: 48px;
  border: 0;
  border-right: 1px solid var(--line);
  padding: 0 12px;
  color: #40546a;
  background: transparent;
  font-weight: 800;
}

.date-filter time {
  min-width: 142px;
  padding: 0 16px;
  color: #30465c;
  font-weight: 600;
}

.date-filter time + time {
  border-left: 1px solid var(--line);
}

.date-filter input {
  min-width: 142px;
  min-height: 48px;
  border: 0;
  border-left: 1px solid var(--line);
  padding: 0 12px;
  color: #30465c;
  background: transparent;
  font-weight: 700;
}

.date-filter .search-action {
  border-right: 0;
  border-left: 1px solid var(--line);
  color: var(--teal);
}

.branch-select {
  gap: 12px;
  min-width: 260px;
  padding: 0 16px;
  color: var(--teal);
}

.branch-select select {
  width: 100%;
  border: 0;
  outline: 0;
  color: #4051ff;
  background: transparent;
  font-weight: 700;
}

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

.metric-card {
  min-height: 108px;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(220, 226, 234, 0.82);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}

.metric-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 4px;
  background: var(--accent);
}

.metric-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 13%, white);
}

.metric-icon svg,
.module-icon svg {
  width: 48%;
  height: 48%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.metric-card strong {
  display: block;
  color: var(--accent);
  font-size: 14px;
}

.metric-card b {
  display: block;
  margin: 3px 0 6px;
  color: var(--ink);
  font-size: clamp(24px, 2.1vw, 30px);
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.metric-card small {
  color: #00b942;
  font-size: 12px;
  line-height: 1.28;
  font-weight: 700;
}

.chart-panel,
.module-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 16px 32px rgba(26, 38, 58, 0.08);
}

.chart-panel {
  position: relative;
  overflow: hidden;
  margin-bottom: 30px;
  padding: 0;
  color: #f7fbff;
  border-color: rgba(83, 199, 195, 0.35);
  background:
    linear-gradient(135deg, rgba(19, 34, 66, 0.98) 0%, rgba(43, 42, 111, 0.96) 48%, rgba(111, 29, 119, 0.95) 100%),
    var(--navy);
  box-shadow: 0 22px 52px rgba(19, 34, 66, 0.24);
}

.dashboard-chart-card::before {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(83, 199, 195, 0.11) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(222, 162, 255, 0.08) 1px, transparent 1px),
    linear-gradient(120deg, rgba(83, 199, 195, 0.18), transparent 42%, rgba(160, 24, 120, 0.18));
  background-size: 44px 44px, 44px 44px, 100% 100%;
}

.chart-card-header,
.chart-summary-row,
.chart-options,
.chart-data-grid {
  position: relative;
  z-index: 1;
}

.chart-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px 10px;
}

.chart-title-wrap {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.chart-title-wrap h2 {
  margin: 0;
  color: rgba(247, 251, 255, 0.78);
  font-size: 16px;
  font-weight: 700;
}

.chart-info {
  position: relative;
  display: inline-grid;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  place-items: center;
  color: rgba(247, 251, 255, 0.52);
  outline: none;
}

.chart-info svg {
  width: 20px;
  height: 20px;
}

.chart-tooltip {
  position: absolute;
  z-index: 5;
  top: 30px;
  left: -18px;
  width: min(280px, calc(100vw - 80px));
  padding: 10px 12px;
  color: #eaf8ff;
  font-size: 12px;
  line-height: 1.45;
  border: 1px solid rgba(83, 199, 195, 0.36);
  border-radius: 8px;
  background: rgba(15, 24, 50, 0.94);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.24);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}

.chart-info:hover .chart-tooltip,
.chart-info:focus .chart-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.chart-details-button {
  min-height: 34px;
  padding: 0 14px;
  color: #e8fbff;
  font-size: 13px;
  font-weight: 800;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.chart-details-button:hover {
  border-color: rgba(83, 199, 195, 0.7);
  background: rgba(83, 199, 195, 0.15);
}

.chart-summary-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 0 22px 14px;
}

.chart-summary-row strong {
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 800;
  line-height: 1.1;
  color: #ffffff;
  overflow-wrap: anywhere;
}

.chart-summary-row span {
  flex: 0 0 auto;
  padding: 6px 10px;
  color: #9af4de;
  font-size: 12px;
  font-weight: 800;
  border: 1px solid rgba(154, 244, 222, 0.22);
  border-radius: 999px;
  background: rgba(83, 199, 195, 0.14);
}

.chart-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-bottom: 0;
  padding: 0 22px 16px;
}

.chart-options label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: rgba(247, 251, 255, 0.78);
  font-size: 13px;
  font-weight: 800;
}

.chart-options input {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  accent-color: var(--cyan);
}

.chart-data-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 188px;
  min-height: 190px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.chart-canvas {
  position: relative;
  min-width: 0;
  min-height: 0;
  padding: 14px 16px 10px 18px;
  overflow: hidden;
}

.chart-canvas svg {
  position: relative;
  width: 100%;
  height: 170px;
  display: block;
}

.chart-grid-line {
  fill: none;
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 1;
}

.chart-area-fill {
  fill: var(--line-color, var(--cyan));
  opacity: 0.18;
}

.chart-line {
  fill: none;
  stroke: var(--line-color, var(--cyan));
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 6px 12px rgba(83, 199, 195, 0.38));
}

.dynamic-chart-line {
  stroke-width: 4;
}

.chart-series circle {
  fill: var(--line-color, var(--cyan));
  stroke: #fff;
  stroke-width: 2.5;
  opacity: 0.72;
}

.chart-empty-label {
  fill: rgba(247, 251, 255, 0.72);
  font-weight: 800;
}

.chart-side-stat {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 4px;
  padding: 18px 20px 22px;
  border-left: 2px solid var(--cyan);
  background: rgba(255, 255, 255, 0.06);
}

.chart-side-stat b {
  color: #ffffff;
  font-size: 22px;
  line-height: 1;
}

.chart-side-stat span,
.chart-side-stat small {
  max-width: 100%;
  color: rgba(247, 251, 255, 0.72);
  font-size: 12px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.chart-side-stat small {
  color: rgba(154, 244, 222, 0.82);
}

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

.dashboard-card {
  min-width: 0;
  min-height: 94px;
  display: grid;
  align-content: start;
  gap: 8px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--card-accent, var(--teal));
  border-radius: var(--radius);
  padding: 13px 16px;
  background: #fff;
  box-shadow: 0 16px 32px rgba(26, 38, 58, 0.08);
}

.dashboard-card-link {
  grid-template-columns: 46px minmax(0, 1fr) 24px;
  align-items: center;
  cursor: pointer;
}

.dashboard-card-link:hover {
  border-color: rgba(83, 199, 195, 0.7);
  box-shadow: 0 18px 36px rgba(26, 38, 58, 0.12);
}

.dashboard-card p {
  margin: 0;
  color: #40546a;
  font-size: 16px;
  font-weight: 800;
}

.dashboard-card strong {
  display: block;
  margin: 4px 0 1px;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.08;
}

.dashboard-card small,
.dashboard-empty {
  color: #718196;
  font-size: 13px;
  font-weight: 750;
}

.dashboard-card-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #ef4f64;
  background: #fff0f3;
}

.dashboard-card-icon.overdue {
  color: #ef4f64;
  background: #fff1f1;
}

.dashboard-card-icon svg,
.dashboard-card-title svg,
.dashboard-arrow svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dashboard-arrow {
  color: #8a98a9;
}

.dashboard-card-title {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 0 9px;
  align-items: center;
}

.dashboard-card-title span {
  grid-row: span 2;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--teal);
  background: #eefbf9;
}

.dashboard-card-title small {
  grid-column: 2;
}

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

.dashboard-list div {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border-top: 1px solid #edf1f5;
  padding-top: 6px;
}

.dashboard-list strong,
.dashboard-list span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-list strong {
  margin: 0;
  font-size: 13px;
}

.dashboard-list span {
  color: #607184;
  font-size: 12px;
  font-weight: 800;
}

.dashboard-more {
  margin-top: auto;
}

.chart-points circle {
  fill: var(--teal);
  stroke: #fff;
  stroke-width: 4;
}

.axis-labels {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 8px;
  padding: 0 2px 0 0;
  color: rgba(247, 251, 255, 0.58);
  font-size: 12px;
  font-weight: 700;
}

.axis-labels span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.module-section {
  padding-bottom: 16px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  margin-bottom: 18px;
}

.section-heading p {
  max-width: 520px;
  color: var(--muted);
  line-height: 1.5;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(190px, 1fr));
  gap: 18px;
}

.module-card {
  min-height: 168px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  overflow: hidden;
  position: relative;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.module-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--accent);
}

.module-card:hover {
  transform: translateY(-5px);
  border-color: color-mix(in srgb, var(--accent) 38%, var(--line));
  box-shadow: 0 24px 44px rgba(26, 38, 58, 0.14);
}

.module-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.module-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, white);
}

.module-card h3 {
  margin: 18px 0 6px;
  font-size: 17px;
}

.module-card p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.module-status {
  width: fit-content;
  margin-top: 18px;
  padding: 6px 9px;
  border-radius: 999px;
  color: color-mix(in srgb, var(--accent) 72%, black);
  background: color-mix(in srgb, var(--accent) 10%, white);
  font-size: 12px;
  font-weight: 800;
}

.icon {
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
}

.icon.small {
  width: 16px;
  height: 16px;
}

.icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.workspace.is-sales {
  height: 100vh;
  overflow: hidden;
}

.workspace.is-sales .topbar {
  min-height: 72px;
  padding-top: 12px;
  padding-bottom: 12px;
}

.workspace.is-sales .content-frame {
  height: calc(100vh - 72px);
  padding: 10px 28px 16px;
  overflow: hidden;
}

.workspace.is-sales h1 {
  font-size: 22px;
}

.sales-view {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
}

.sales-actions {
  min-height: 52px;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
}

.sale-tabs {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 100%;
}

.sale-tab-item {
  height: 100%;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-bottom: 3px solid transparent;
}

.sale-tab-item.is-active {
  border-bottom-color: #ff4b1f;
}

.sale-tab,
.sale-add-tab,
.sale-tab-close {
  border: 0;
  background: transparent;
}

.sale-tab {
  height: 100%;
  padding: 0 4px 0 0;
  color: #6b7d90;
  font-weight: 700;
}

.sale-tab-item.is-active .sale-tab,
.sale-tab-item.is-active .sale-tab-close {
  color: #ff4b1f;
}

.sale-tab-close {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  padding: 0;
  color: #6b7d90;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease;
}

.sale-tab-item:hover .sale-tab-close,
.sale-tab-item:focus-within .sale-tab-close {
  opacity: 1;
  pointer-events: auto;
}

.sale-tab-close svg {
  width: 14px;
  height: 14px;
}

.sale-add-tab {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #40546a;
  text-decoration: none;
}

.sale-tools {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: 12px;
}

.outline-action {
  min-width: min(210px, 100%);
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid var(--teal);
  border-radius: var(--radius);
  color: var(--teal);
  background: #fff;
  font-weight: 700;
  padding: 0 14px;
  text-align: center;
  white-space: nowrap;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.outline-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(13, 153, 154, 0.14);
}

.outline-action.compact,
.primary-action {
  min-width: 0;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: var(--radius);
  padding: 0 16px;
  font-weight: 800;
}

.outline-action.compact {
  border: 1px solid var(--teal);
  color: var(--teal);
  background: #fff;
}

.outline-action.is-disabled {
  cursor: not-allowed;
  opacity: 0.72;
  color: #6b7a8d;
  border-color: #cfd8e3;
  background: #f7fafc;
}

.outline-action.is-disabled:hover {
  transform: none;
  box-shadow: none;
}

.outline-action.compact svg,
.primary-action svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.primary-action {
  border: 1px solid #ff4b1f;
  color: #fff;
  background: #ff4b1f;
  box-shadow: 0 12px 24px rgba(255, 75, 31, 0.18);
}

.sale-panel {
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto auto minmax(220px, 1fr);
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 18px 42px rgba(26, 38, 58, 0.08);
  overflow: auto;
  overscroll-behavior: contain;
  container-type: inline-size;
}

.sale-panel.has-quote-banner {
  grid-template-rows: auto auto auto auto minmax(220px, 1fr);
}

.quote-banner {
  max-width: 100%;
  min-width: 0;
  min-height: 30px;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0 12px;
  border-radius: 999px;
  color: #25616a;
  background: #9ce7e3;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

.quote-banner button {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 0;
  color: inherit;
  background: transparent;
}

.quote-banner svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.client-band,
.product-band {
  min-width: 0;
  border: 1px solid rgba(255, 186, 94, 0.7);
  border-radius: var(--radius);
  background: #fff9ef;
}

.client-band {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 46px minmax(360px, 0.95fr);
  align-items: end;
  gap: 8px;
  padding: 8px 14px;
}

.client-info-slot {
  min-height: 20px;
  grid-column: 1 / 3;
  align-self: start;
  padding-left: 4px;
}

.client-sale-info {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px 72px;
  padding-top: 2px;
  color: #e98c58;
  font-size: 13px;
  font-weight: 900;
}

.client-birthday {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.client-birthday svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.product-band {
  display: grid;
  grid-template-columns: minmax(180px, 1.7fr) minmax(110px, 0.7fr) minmax(100px, 0.7fr) minmax(100px, 0.7fr) minmax(100px, 0.7fr) minmax(118px, 132px);
  gap: 7px 12px;
  align-items: end;
  padding: 8px 14px;
}

.field {
  min-width: 0;
  display: grid;
  gap: 4px;
  color: #40546a;
  font-size: 13px;
  font-weight: 700;
}

.field input,
.field textarea,
.sale-control-row select,
.sale-control-row button,
.input-shell {
  width: 100%;
  min-height: 34px;
  border: 1px solid #cdd7e4;
  border-radius: 6px;
  background: #fff;
  overflow: hidden;
}

.field input,
.field textarea {
  padding: 0 10px;
  outline: 0;
  color: var(--ink);
}

.input-shell {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
}

.input-shell input {
  min-width: 0;
  min-height: 30px;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: inherit;
}

.input-shell.is-locked,
.product-form .money-input {
  background: #f0f3f6;
}

.input-shell.editable-lock {
  cursor: pointer;
}

.input-shell.editable-lock input,
.input-shell.editable-lock .icon {
  cursor: pointer;
}

.input-shell.editable-lock:hover {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(13, 153, 154, 0.1);
}

.input-shell.is-locked input,
.money-input {
  text-align: right;
}

.money-input.is-tax {
  border-color: #23a03b;
  background: #fff;
}

.square-action {
  width: 46px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid #cdd7e4;
  border-radius: 6px;
  color: #40546a;
  background: #fff;
}

.square-action svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.add-client-button {
  border-color: #b9c8d9;
  color: #40546a;
  background: #fff;
}

.add-client-button:hover {
  border-color: var(--teal);
  color: var(--teal);
  background: #eefbf9;
}

.delivery-group {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(128px, 1fr) minmax(108px, 1fr) minmax(126px, 140px) minmax(108px, 128px);
  align-items: center;
  gap: 8px;
  color: #40546a;
  font-size: 13px;
  font-weight: 700;
}

.delivery-group > span {
  white-space: nowrap;
}

.delivery-input {
  min-height: 34px;
  border: 1px solid #cdd7e4;
  border-radius: 6px;
  padding: 0 8px;
  color: #40546a;
  background: #fff;
  font-weight: 700;
}

.delivery-input:disabled {
  color: #9ba8b7;
  background: #f5f7fa;
}

.check-pill {
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid #cdd7e4;
  border-radius: 6px;
  background: #fff;
  line-height: 1.1;
  white-space: normal;
}

.check-pill.is-muted {
  color: #9ba8b7;
  background: #f5f7fa;
}

.check-pill input,
.check-line input {
  width: 18px;
  height: 18px;
  accent-color: #4f6576;
}

.product-comment {
  grid-column: 1 / 2;
  grid-row: 2;
}

.check-line {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #708091;
  line-height: 1.1;
  white-space: nowrap;
}

.add-product {
  grid-column: 6;
  grid-row: 1 / span 2;
  align-self: stretch;
  min-height: 84px;
  border: 1px solid var(--teal);
  border-radius: var(--radius);
  color: var(--teal);
  background: #fff;
  font-weight: 800;
}

.sale-control-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
  min-width: 0;
}

.sale-control-row select,
.sale-control-row button {
  width: min(220px, 100%);
  padding: 0 12px;
  color: #3c4d60;
  font-weight: 600;
}

.sale-control-row button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
}

.sale-bottom-grid {
  min-height: 0;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(248px, 320px);
  grid-template-rows: minmax(180px, 1fr) auto;
  align-items: start;
  gap: 12px;
}

.products-table {
  grid-column: 1;
  grid-row: 1;
  min-height: 0;
  min-width: 0;
  height: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: auto;
  background: #fff;
}

.table-head {
  min-height: 38px;
  display: grid;
  border-bottom: 3px solid #00aeda;
}

.sale-line-grid {
  grid-template-columns: 54px 62px 84px minmax(140px, 1fr) 80px 92px 104px 112px 96px 46px;
}

.table-head span {
  display: flex;
  align-items: center;
  padding: 0 8px;
  border-right: 1px solid var(--line);
  color: #3c3f47;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.empty-state {
  min-height: 74px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  color: #9ca8b3;
  font-weight: 600;
}

.sale-line {
  min-height: 54px;
  display: grid;
  align-items: center;
  border-bottom: 1px solid var(--line);
  color: #314257;
  font-size: 12px;
  font-weight: 700;
}

.sale-line span,
.sale-line strong {
  min-width: 0;
  padding: 0 8px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sale-line button {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  color: #7a8999;
  background: transparent;
}

.sale-line button svg,
.line-icons svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sale-line strong {
  color: #ff4b1f;
}

.line-icons {
  display: inline-flex;
  gap: 8px;
  color: #627487;
}

.empty-state .icon {
  width: 30px;
  height: 30px;
}

.sale-notes {
  grid-column: 1;
  grid-row: 2;
  min-width: 0;
  display: grid;
  gap: 5px;
  color: #40546a;
  font-size: 13px;
  font-weight: 700;
}

.sale-notes textarea {
  resize: none;
  min-height: 64px;
  border: 1px solid #cdd7e4;
  border-radius: 6px;
  outline: 0;
  padding: 8px;
}

.totals-card {
  /* Anchor tall payment summaries from the top so they scroll down instead of overlapping the form above. */
  grid-column: 2;
  grid-row: 1 / span 2;
  min-width: 0;
  width: 100%;
  max-height: 100%;
  display: grid;
  grid-auto-rows: minmax(30px, auto);
  gap: 4px;
  align-self: start;
  overflow: auto;
  overscroll-behavior: contain;
}

.totals-card > div {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(112px, 116px);
  align-items: center;
  gap: 10px;
  color: #40546a;
  font-weight: 700;
}

.totals-card > div > span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.totals-card > div > strong {
  min-width: 0;
  min-height: 30px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 12px;
  border: 1px solid #cdd7e4;
  border-radius: 6px;
  background: #f0f3f6;
  color: var(--ink);
}

.grand-total strong {
  font-size: 18px;
}

.pay-button,
.credit-button,
.quote-button,
.production-button {
  min-width: 0;
  min-height: 34px;
  border-radius: 6px;
  font-weight: 800;
}

.pay-button {
  border: 1px solid #ff4b1f;
  color: #fff;
  background: #ff4b1f;
  box-shadow: 0 12px 24px rgba(255, 75, 31, 0.22);
}

.credit-button {
  border: 1px solid var(--magenta);
  color: #fff;
  background: linear-gradient(135deg, var(--magenta), var(--indigo));
  box-shadow: 0 12px 24px rgba(111, 29, 119, 0.18);
}

.quote-button {
  border: 1px solid var(--teal);
  color: var(--teal);
  background: #fff;
}

.production-button {
  border: 1px solid var(--orange);
  color: #fff;
  background: linear-gradient(135deg, #ff5a24, var(--orange));
  box-shadow: 0 12px 24px rgba(255, 90, 36, 0.2);
}

.production-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  box-shadow: none;
}

@container (max-width: 1320px) {
  .client-band {
    grid-template-columns: minmax(180px, 1fr) 46px;
  }

  .client-info-slot {
    grid-column: 1 / -1;
  }

  .delivery-group {
    grid-column: 1 / -1;
    grid-template-columns: auto minmax(128px, 1fr) minmax(108px, 1fr) minmax(126px, 1fr) minmax(108px, 0.8fr);
  }

  .product-band {
    grid-template-columns: minmax(190px, 1.6fr) repeat(4, minmax(96px, 1fr));
  }

  .add-product {
    grid-column: 5;
    grid-row: 2;
    min-height: 34px;
  }

  .sale-bottom-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(220px, auto) auto auto;
  }

  .products-table,
  .sale-notes,
  .totals-card {
    grid-column: 1;
  }

  .products-table {
    grid-row: 1;
  }

  .sale-notes {
    grid-row: 3;
  }

  .totals-card {
    grid-row: 2;
    width: min(360px, 100%);
    max-height: none;
    justify-self: end;
    overflow: visible;
  }
}

.ops-view {
  min-width: 0;
  display: grid;
  gap: 16px;
}

.ops-header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
}

.ops-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.ops-action-row {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.has-inline-actions .ops-actions {
  margin-left: auto;
  align-self: center;
}

.search-row.has-inline-actions,
.catalog-filter.has-inline-actions {
  justify-content: space-between;
  flex-wrap: wrap;
}

.search-row.has-inline-actions .ops-actions,
.catalog-filter.has-inline-actions .ops-actions {
  flex: 0 0 auto;
}

.catalog-filter.has-inline-actions .ops-actions :is(.outline-action.compact, .primary-action) {
  width: auto;
  min-width: max-content;
  white-space: nowrap;
}

.quote-filters.has-inline-actions {
  grid-template-columns: minmax(120px, 160px) minmax(180px, 1fr) minmax(140px, 160px) minmax(140px, 160px) minmax(170px, auto) 54px minmax(180px, auto);
}

@media (max-width: 1320px) {
  .quote-filters.has-inline-actions {
    grid-template-columns: minmax(120px, 160px) minmax(180px, 1fr) minmax(140px, 160px) minmax(140px, 160px) 54px;
  }

  .quote-filters.has-inline-actions .pending-toggle {
    grid-column: 1 / span 2;
  }

  .quote-filters.has-inline-actions .ops-actions {
    grid-column: 3 / -1;
  }
}

.cash-filters.has-inline-actions {
  grid-template-columns: minmax(170px, 220px) minmax(180px, 220px) minmax(180px, 240px) 54px minmax(420px, auto);
}

.history-filters.has-inline-actions {
  grid-template-columns: minmax(110px, 140px) minmax(120px, 150px) minmax(170px, 1fr) minmax(170px, 210px) minmax(140px, 160px) minmax(140px, 160px) 54px minmax(360px, auto);
}

.report-toolbar.has-inline-actions {
  width: 100%;
  grid-template-columns: minmax(140px, 160px) minmax(140px, 160px) 54px minmax(160px, 1fr);
}

.report-range-toolbar.has-inline-actions {
  width: 100%;
  grid-template-columns: minmax(140px, 1fr) minmax(130px, 160px) minmax(130px, 160px) 54px minmax(160px, auto);
}

.inventory-report-toolbar.has-inline-actions {
  grid-template-columns: minmax(150px, 180px) minmax(190px, 230px) minmax(150px, auto) minmax(190px, auto) 54px minmax(190px, auto);
}

.action-dropdown {
  position: relative;
}

.action-dropdown .outline-action svg {
  width: 16px;
  height: 16px;
}

.action-menu {
  position: absolute;
  z-index: 25;
  top: calc(100% + 6px);
  right: 0;
  width: 220px;
  display: none;
  padding: 8px 0;
  border-radius: var(--radius);
  background: #181a1c;
  box-shadow: 0 20px 44px rgba(7, 11, 22, 0.32);
}

.action-dropdown.is-open .action-menu,
.action-dropdown:hover .action-menu,
.action-dropdown:focus-within .action-menu {
  display: block;
}

.action-menu button {
  width: 100%;
  min-height: 42px;
  border: 0;
  padding: 0 16px;
  color: rgba(255, 255, 255, 0.92);
  background: transparent;
  text-align: left;
  font-weight: 700;
}

.action-menu button:hover {
  color: #fff;
  background: rgba(83, 199, 195, 0.15);
}

.ops-body {
  min-width: 0;
  display: grid;
  gap: 12px;
}

.ops-body.has-production-selection {
  padding-bottom: 86px;
}

.search-row,
.catalog-filter {
  position: relative;
  display: flex;
  gap: 8px;
  align-items: center;
}

.search-row input,
.catalog-filter input,
.catalog-filter select,
.catalog-filter > button,
.segment-tabs button {
  min-height: 42px;
  border: 1px solid #cdd7e4;
  border-radius: var(--radius);
  background: #fff;
}

.search-row input {
  width: min(360px, 100%);
  padding: 0 42px 0 14px;
}

.search-row .icon {
  position: absolute;
  left: min(324px, calc(100% - 40px));
  color: var(--teal);
}

.catalog-filter input {
  width: min(340px, 100%);
  padding: 0 14px;
}

.catalog-filter select {
  width: 210px;
  padding: 0 12px;
  color: #40546a;
}

.catalog-filter > button {
  width: 54px;
  flex: 0 0 54px;
  display: grid;
  place-items: center;
  color: var(--teal);
}

.segment-tabs {
  display: flex;
  gap: 8px;
}

.segment-tabs button {
  padding: 0 18px;
  color: #40546a;
  font-weight: 800;
}

.segment-tabs button.is-active {
  border-color: var(--teal);
  color: var(--teal);
  background: #eefbf9;
}

.data-table {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  overflow: auto;
}

.data-head,
.data-row {
  min-width: 720px;
  display: grid;
}

.data-head {
  min-height: 42px;
  border-bottom: 3px solid #00aeda;
  color: #3c3f47;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.data-head span,
.data-row span {
  min-width: 0;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border-right: 1px solid var(--line);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.data-row {
  min-height: 52px;
  color: #36485c;
  font-size: 13px;
  font-weight: 650;
  border-bottom: 1px solid #edf1f5;
}

.data-empty {
  min-height: 260px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: #9aa6b4;
  font-weight: 700;
}

.data-empty .icon {
  width: 34px;
  height: 34px;
}

.payable-summary-row {
  width: 100%;
  border: 0;
  border-bottom: 1px solid #edf1f5;
  border-radius: 0;
  background: transparent;
  text-align: left;
}

.payable-summary-row:focus-visible {
  outline: 2px solid rgba(83, 199, 195, 0.7);
  outline-offset: -2px;
}

.payable-detail-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.payable-detail-summary span,
.payable-line-total {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  color: #40546a;
  background: #fff;
  font-size: 13px;
  font-weight: 800;
}

.payable-detail-summary b {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.modal:has(.payable-order-form) {
  width: min(980px, calc(100vw - 56px));
  max-height: calc(100vh - 56px);
}

.payable-order-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(160px, 190px) minmax(140px, 170px);
  gap: 12px 14px;
}

.payable-order-form label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: #40546a;
  font-size: 13px;
  font-weight: 800;
}

.payable-order-form input {
  min-height: 40px;
  width: 100%;
  border: 1px solid #cdd7e4;
  border-radius: 6px;
  padding: 0 10px;
  color: var(--ink);
  background: #fff;
}

.payable-order-form .span-2 {
  grid-column: span 1;
}

.payable-order-form .span-3,
.payable-line-errors,
.payable-lines-table {
  grid-column: 1 / -1;
}

.payable-line-editor {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(130px, 160px) minmax(150px, 190px) 54px;
  gap: 10px;
  align-items: end;
  border: 1px solid rgba(255, 186, 94, 0.55);
  border-radius: var(--radius);
  padding: 12px;
  background: #fff9ef;
}

.money-field.compact {
  min-height: 40px;
}

.payable-add-line {
  min-height: 40px;
  width: 54px;
  padding: 0;
}

.payable-line-errors {
  min-height: 18px;
  color: #d43d4f;
  font-size: 12px;
  font-weight: 800;
}

.payable-order-form input.is-invalid,
.payable-order-form .money-field:has(input.is-invalid) {
  border-color: #e66a7a;
  box-shadow: 0 0 0 3px rgba(230, 106, 122, 0.12);
}

.payable-lines-table .data-table {
  max-height: 280px;
}

.payable-line-total {
  justify-content: flex-end;
  margin-top: 8px;
  background: #f8fbfd;
}

.payable-line-total span {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

body.theme-dark :is(.payable-summary-row, .payable-detail-summary span, .payable-line-total, .payable-line-editor) {
  border-color: #34465e;
  color: var(--ink);
  background: #172235;
}

body.theme-dark .payable-line-editor {
  background:
    linear-gradient(90deg, rgba(255, 186, 94, 0.1), rgba(83, 199, 195, 0.08)),
    #172235;
}

body.theme-dark :is(.payable-order-form label, .payable-detail-summary b) {
  color: #9fb0c4;
}

.quote-filters {
  display: grid;
  grid-template-columns: minmax(120px, 160px) minmax(180px, 1fr) minmax(140px, 160px) minmax(140px, 160px) minmax(170px, auto) 54px;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(255, 186, 94, 0.7);
  border-radius: var(--radius);
  background: #fff9ef;
}

.commission-filters.has-inline-actions {
  grid-template-columns: minmax(140px, 180px) minmax(140px, 180px) minmax(190px, 250px) 54px minmax(320px, 1fr);
}

.commission-filters.has-inline-actions .ops-actions {
  grid-column: 5;
  flex-wrap: nowrap;
  justify-self: end;
}

@media (max-width: 1320px) {
  .commission-filters.has-inline-actions {
    grid-template-columns: minmax(140px, 1fr) minmax(140px, 1fr) minmax(190px, 1fr) 54px;
  }

  .commission-filters.has-inline-actions .ops-actions {
    grid-column: 1 / -1;
    justify-self: stretch;
  }
}

.cash-filters,
.history-filters,
.report-toolbar {
  display: grid;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(255, 186, 94, 0.7);
  border-radius: var(--radius);
  background: #fff9ef;
}

.cash-filters {
  grid-template-columns: minmax(170px, 220px) minmax(180px, 220px) minmax(180px, 240px) 54px;
}

.history-filters {
  grid-template-columns: minmax(110px, 140px) minmax(120px, 150px) minmax(170px, 1fr) minmax(170px, 210px) minmax(140px, 160px) minmax(140px, 160px) 54px;
}

.report-toolbar {
  width: fit-content;
  grid-template-columns: minmax(140px, 160px) minmax(140px, 160px) 54px;
}

.report-range-toolbar {
  width: min(540px, 100%);
  grid-template-columns: minmax(140px, 1fr) minmax(130px, 160px) minmax(130px, 160px) 54px;
}

.inventory-report-toolbar {
  width: 100%;
  grid-template-columns: minmax(150px, 180px) minmax(190px, 230px) minmax(150px, auto) minmax(190px, auto) 54px;
}

.cash-filters label,
.history-filters label,
.report-toolbar label {
  min-width: 0;
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #cdd7e4;
  border-radius: 6px;
  padding: 0 10px;
  color: #40546a;
  background: #fff;
  font-size: 13px;
  font-weight: 800;
}

.cash-filters input,
.cash-filters select,
.history-filters input,
.history-filters select,
.report-toolbar input,
.report-toolbar select {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font: inherit;
}

.report-toolbar label > span {
  flex: 0 0 auto;
  color: #6b7b8f;
}

.report-toolbar .radio-field {
  justify-content: center;
}

.report-toolbar .radio-field input {
  width: auto;
}

.cash-summary-grid,
.expense-report-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 14px;
}

.cash-summary-grid article,
.expense-report-summary article {
  min-height: 74px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--accent, var(--teal));
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 12px 24px rgba(26, 38, 58, 0.06);
}

.expense-report-summary article {
  --accent: var(--orange);
}

.cash-summary-grid strong,
.expense-report-summary strong {
  font-size: 20px;
}

.cash-summary-grid span,
.expense-report-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.modal:has(.cash-closing-form),
.modal:has(.cash-closing-preview) {
  width: min(1480px, calc(100vw - 56px));
  max-height: calc(100vh - 48px);
}

.modal:has(.cash-closing-form) header,
.modal:has(.cash-closing-preview) header {
  background:
    linear-gradient(90deg, rgba(83, 199, 195, 0.16), rgba(214, 77, 171, 0.10)),
    #fff;
}

.modal:has(.cash-closing-form) .modal-body {
  padding: 0;
}

.cash-closing-form {
  min-width: 0;
}

.cash-closing-shell {
  display: grid;
  gap: 0;
  color: var(--navy);
  background: #f5f8fc;
}

.cash-closing-hero {
  min-height: 92px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 24px 28px;
  color: #fff;
  background:
    linear-gradient(100deg, rgba(16, 26, 49, 0.96), rgba(87, 77, 199, 0.96) 54%, rgba(214, 77, 171, 0.88)),
    var(--navy);
}

.cash-closing-hero h3 {
  margin: 0 0 8px;
  font-size: 24px;
}

.cash-closing-hero p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 850;
}

.cash-closing-hero > span {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius);
  color: var(--cyan);
  background: rgba(255, 255, 255, 0.10);
}

.cash-closing-hero svg {
  width: 26px;
  height: 26px;
}

.cash-closing-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 14px;
  padding: 18px 28px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.cash-closing-card {
  min-width: 0;
  min-height: 92px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid #dce6f2;
  border-left: 5px solid var(--card-accent, var(--teal));
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 12px 26px rgba(26, 38, 58, 0.06);
}

.cash-closing-card span {
  min-width: 0;
  color: #64758b;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.cash-closing-card strong {
  min-width: 0;
  color: var(--card-accent, var(--teal));
  font-size: 22px;
}

.cash-closing-card button {
  width: fit-content;
  border: 0;
  padding: 0;
  color: var(--indigo);
  background: transparent;
  font-size: 12px;
  font-weight: 900;
}

.cash-closing-grid {
  display: grid;
  grid-template-columns: minmax(360px, 1.04fr) minmax(420px, 0.96fr);
  gap: 28px;
  padding: 22px 28px 18px;
}

.cash-count-panel,
.cash-reconcile-panel,
.cash-connected-detail,
.cash-confirmed-panel {
  min-width: 0;
}

.cash-count-panel h4,
.cash-reconcile-panel h4,
.cash-connected-detail h4,
.cash-confirmed-panel h4 {
  margin: 0 0 10px;
  color: #0f315d;
  font-size: 17px;
  text-transform: uppercase;
}

.cash-count-panel p,
.cash-connected-detail p,
.cash-closing-muted {
  margin: 0 0 14px;
  color: #66778d;
  font-weight: 800;
}

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

.cash-denomination-grid label,
.cash-observations {
  min-width: 0;
  display: grid;
  gap: 7px;
  color: #34465e;
  font-size: 13px;
  font-weight: 900;
}

.cash-denomination-grid input,
.cash-observations textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #d6e1f0;
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

.cash-denomination-grid input {
  min-height: 38px;
  padding: 0 10px;
}

.cash-observations {
  margin-top: 16px;
}

.cash-observations textarea {
  min-height: 58px;
  padding: 10px;
  resize: vertical;
}

.cash-reconcile-main,
.cash-reconcile-breakdown {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 16px;
}

.cash-reconcile-main {
  margin-bottom: 12px;
}

.cash-reconcile-main span,
.cash-reconcile-main strong {
  min-height: 46px;
  display: flex;
  align-items: center;
  border: 1px solid #d9e4f2;
  background: #fff;
}

.cash-reconcile-main span {
  border-right: 0;
  border-radius: 8px 0 0 8px;
  padding-left: 14px;
  color: #3d4d63;
  font-weight: 900;
  text-transform: uppercase;
}

.cash-reconcile-main strong {
  min-width: 132px;
  justify-content: flex-end;
  border-left: 0;
  border-radius: 0 8px 8px 0;
  padding-right: 14px;
  color: #12355e;
  font-size: 18px;
}

.cash-reconcile-breakdown {
  padding: 0 8px 12px;
  border-bottom: 1px solid #d9e1ec;
}

.cash-reconcile-breakdown span {
  color: #53657b;
  font-weight: 800;
}

.cash-reconcile-breakdown strong {
  color: #12233d;
  text-align: right;
}

.cash-confirmed-panel {
  min-height: 132px;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid #dce6f2;
  border-radius: var(--radius);
  background: #fff;
}

.cash-confirmed-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 9px 0;
  border-top: 1px solid #edf1f5;
  color: #40546a;
  font-weight: 800;
}

.cash-connected-detail {
  display: grid;
  grid-template-columns: minmax(240px, 0.45fr) minmax(0, 1fr);
  gap: 24px;
  padding: 8px 28px 28px;
}

.cash-closing-detail-table {
  min-width: 0;
  overflow-x: auto;
  border: 1px solid #d8e2f0;
  border-radius: var(--radius);
  background: #fff;
}

.cash-closing-detail-head,
.cash-closing-detail-row {
  min-width: 720px;
  display: grid;
  grid-template-columns: 110px 120px minmax(260px, 1fr) 130px;
}

.cash-closing-detail-head {
  min-height: 42px;
  align-items: center;
  color: #fff;
  background: linear-gradient(90deg, var(--indigo), #397ff0);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.cash-closing-detail-head span,
.cash-closing-detail-row span,
.cash-closing-detail-row strong {
  min-width: 0;
  padding: 0 12px;
  display: flex;
  align-items: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cash-closing-detail-row {
  min-height: 42px;
  border-top: 1px solid #edf1f5;
  color: #34465e;
  font-weight: 750;
}

.cash-closing-detail-row strong {
  justify-content: flex-end;
}

.cash-closing-empty {
  min-height: 40px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  color: #66778d;
  font-weight: 800;
}

.cash-closing-preview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 350px);
  gap: 20px;
  align-items: start;
}

.cash-closing-preview h3 {
  margin: 10px 0 6px;
  color: var(--navy);
  font-size: 24px;
}

.cash-closing-preview p {
  max-width: 600px;
  color: #52657a;
  line-height: 1.5;
  font-weight: 750;
}

.report-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.report-tabs button {
  min-height: 38px;
  border: 1px solid #cdd7e4;
  border-radius: var(--radius);
  padding: 0 14px;
  color: #40546a;
  background: #fff;
  font-weight: 800;
}

.report-tabs button.is-active {
  border-color: var(--teal);
  color: var(--teal);
  background: #eefbf9;
}

.report-subtabs {
  display: flex;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}

.report-subtabs button {
  min-height: 34px;
  border: 0;
  border-bottom: 2px solid transparent;
  color: #6d7c8d;
  background: transparent;
  font-weight: 900;
}

.report-subtabs button.is-active {
  color: #ff4b1f;
  border-bottom-color: #ff4b1f;
}

.report-help {
  display: grid;
  gap: 6px;
  border: 1px solid rgba(255, 186, 94, 0.55);
  border-radius: var(--radius);
  padding: 14px 18px;
  color: #40546a;
  background: #fff9ef;
  font-size: 13px;
  font-weight: 700;
}

.report-help p {
  margin: 0;
}

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

.report-chart {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: #fff;
}

.report-chart h3 {
  margin: 0 0 10px;
  color: #40546a;
  font-size: 14px;
}

.report-chart svg {
  width: 100%;
  height: 170px;
}

.report-chart-grid {
  fill: none;
  stroke: #eef2f6;
  stroke-width: 1;
}

.report-chart polyline {
  fill: none;
  stroke: var(--line-color, var(--teal));
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.quote-filters label {
  min-width: 0;
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #cdd7e4;
  border-radius: 6px;
  padding: 0 10px;
  color: #40546a;
  background: #fff;
  font-size: 13px;
  font-weight: 800;
}

.quote-filters input,
.quote-filters select {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font: inherit;
}

.quote-filters .pending-toggle {
  justify-content: center;
  border-color: #8bd8c9;
  color: var(--teal);
  background: #eefbf9;
  text-align: center;
}

.quote-filters .pending-toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--teal);
}

.quote-filter-search {
  width: 54px;
  min-width: 0;
  padding: 0;
}

.production-filters {
  display: grid;
  grid-template-columns: minmax(98px, 0.65fr) minmax(128px, 0.8fr) minmax(150px, 0.92fr) minmax(150px, 0.92fr) repeat(4, minmax(118px, 0.72fr));
  gap: 6px;
  align-items: end;
  padding: 9px;
  border: 1px solid #dfe6ee;
  border-radius: var(--radius);
  background: #f8fafc;
  box-shadow: 0 12px 26px rgba(26, 38, 58, 0.05);
}

.production-filters.has-inline-actions {
  grid-template-columns: minmax(98px, 0.65fr) minmax(128px, 0.8fr) minmax(150px, 0.92fr) minmax(150px, 0.92fr) repeat(4, minmax(118px, 0.72fr)) minmax(120px, auto);
}

.production-filters label {
  min-width: 0;
  display: grid;
  gap: 4px;
  color: #40546a;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.production-filters input,
.production-filters select,
.production-status-select {
  min-width: 0;
  width: 100%;
  min-height: 34px;
  border: 1px solid #d4dde8;
  border-radius: 6px;
  padding: 0 8px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  font-weight: 800;
}

.production-list-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #607184;
  font-size: 13px;
  font-weight: 850;
}

.production-select-all {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #40546a;
  font-size: 13px;
  font-weight: 850;
}

.production-select-all input {
  width: 18px;
  height: 18px;
  accent-color: var(--teal);
}

.production-status-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.production-status-tab {
  --prod-bg: #eef3f8;
  --prod-border: #506174;
  --prod-text: #334154;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid color-mix(in srgb, var(--prod-border) 32%, #dce2ea);
  border-radius: 6px;
  padding: 0 10px;
  color: var(--prod-text);
  background: color-mix(in srgb, var(--prod-bg) 72%, #fff);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.production-status-tab:hover {
  transform: translateY(-1px);
  border-color: var(--prod-border);
  box-shadow: 0 12px 22px rgba(26, 38, 58, 0.08);
}

.production-status-tab svg {
  width: 13px;
  height: 13px;
}

.production-status-tab.is-active {
  border-color: var(--prod-border);
  color: var(--prod-text);
  background: var(--prod-bg);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--prod-border) 22%, transparent), 0 12px 22px rgba(26, 38, 58, 0.08);
}

.production-status-tab b {
  min-width: 20px;
  border-radius: 999px;
  padding: 1px 6px;
  color: var(--prod-text);
  background: rgba(255, 255, 255, 0.72);
  text-align: center;
}

.production-status-todos {
  --prod-bg: #18243a;
  --prod-border: #18243a;
  --prod-text: #fff;
  --prod-dot: #18243a;
}

.production-status-select {
  --prod-bg: #eef3f8;
  --prod-border: #506174;
  --prod-text: #334154;
  min-height: 40px;
  border-radius: 999px;
  border-color: var(--prod-border);
  color: var(--prod-text);
  background: var(--prod-bg);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.production-status-select option {
  color: var(--ink);
  background: #fff;
}

.production-status-pendiente {
  --prod-bg: #eef3f8;
  --prod-border: #506174;
  --prod-text: #334154;
  --prod-dot: #c5653a;
}

.production-status-diseno {
  --prod-bg: #f0ecff;
  --prod-border: #6a5ad7;
  --prod-text: #4e3fb4;
  --prod-dot: #c135d8;
}

.production-status-produccion {
  --prod-bg: #fff3df;
  --prod-border: #f59e0b;
  --prod-text: #aa5b00;
  --prod-dot: #e6bf3e;
}

.production-status-acabado,
.production-status-acabados {
  --prod-bg: #e7fbff;
  --prod-border: #0d999a;
  --prod-text: #087476;
  --prod-dot: #3b22d3;
}

.production-status-terminado {
  --prod-bg: #e5f8ff;
  --prod-border: #55d6f6;
  --prod-text: #0d8db2;
  --prod-dot: #5cc4df;
}

.production-status-entregado {
  --prod-bg: #ecf9ef;
  --prod-border: #59b66d;
  --prod-text: #2d7b3f;
  --prod-dot: #9ac945;
}

.production-section {
  display: grid;
  gap: 10px;
}

.production-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.production-section-title h3 {
  margin: 0;
  color: #334154;
  font-size: 16px;
}

.production-section-title span {
  min-width: 30px;
  border-radius: 999px;
  padding: 4px 9px;
  color: var(--teal);
  background: #eefbf9;
  text-align: center;
  font-size: 12px;
  font-weight: 900;
}

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

.production-order-card {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(170px, 0.9fr) minmax(0, 1.8fr) minmax(210px, auto);
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--teal);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 12px 26px rgba(26, 38, 58, 0.07);
}

.production-order-main,
.production-order-meta span {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.production-order-main strong,
.production-order-main small,
.production-order-meta span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.production-order-main strong {
  color: var(--navy);
  font-size: 18px;
}

.production-order-main small,
.production-order-meta span {
  color: #607184;
  font-size: 12px;
  font-weight: 800;
}

.production-order-badge {
  width: fit-content;
  border-radius: 999px;
  padding: 4px 9px;
  color: #0d7778;
  background: #dcf7f4;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.production-order-badge.is-complete {
  color: #435064;
  background: #eef1f5;
}

.production-order-badge.is-waiting {
  color: #8b3d20;
  background: #fff3ec;
}

.production-order-card.is-pending-sale {
  border-left-color: var(--orange);
}

.production-order-meta {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.production-order-meta b {
  display: block;
  margin-bottom: 2px;
  color: #334154;
  font-size: 10px;
  text-transform: uppercase;
}

.production-order-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.production-order-actions .status-select {
  width: 148px;
}

.production-board {
  display: grid;
  gap: 10px;
}

.production-sale-group {
  position: relative;
  z-index: 1;
  min-width: 0;
  display: grid;
  gap: 0;
  border: 1px solid #dfe6ee;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 14px 30px rgba(26, 38, 58, 0.07);
  overflow: visible;
}

.production-sale-group:has(.production-status-control.is-open),
.production-sale-group:has(.production-user-control.is-open) {
  z-index: 120;
}

.production-group-head {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(300px, 0.5fr) minmax(0, 1fr);
  align-items: center;
  gap: 10px 18px;
  padding: 12px;
  color: #607184;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.production-group-trigger {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  text-align: left;
}

.production-group-trigger:hover .production-group-title strong {
  color: #6f43cf;
}

.production-group-thumb {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #176d75;
  background: linear-gradient(135deg, rgba(83, 199, 195, 0.18), rgba(236, 111, 174, 0.14));
  box-shadow: inset 0 0 0 1px rgba(83, 199, 195, 0.24);
}

.production-group-thumb svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
}

.production-group-title {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.production-group-title strong,
.production-group-title small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.production-group-title strong {
  color: #26374a;
  font-size: 15px;
  transition: color 160ms ease;
}

.production-group-title small {
  color: #607184;
  font-size: 12px;
  font-weight: 820;
}

.production-group-count {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 4px 9px;
  color: #fff;
  background: linear-gradient(135deg, var(--teal), #7f4fd7);
  font-size: 11px;
  font-weight: 900;
}

.production-group-chevron {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  display: grid;
  place-items: center;
  color: #7f8da0;
  transition: transform 160ms ease;
}

.production-sale-group.is-expanded .production-group-chevron {
  transform: rotate(180deg);
}

.production-group-chevron svg {
  width: 16px;
  height: 16px;
}

.production-group-meta {
  min-width: 0;
  grid-column: 2;
  grid-row: 1 / span 3;
  align-self: center;
  display: grid;
  grid-template-columns: minmax(136px, 150px) repeat(3, minmax(92px, 1fr)) 58px minmax(82px, auto) 28px;
  gap: 8px;
  align-items: center;
  justify-items: center;
}

.production-group-meta.has-whatsapp {
  grid-template-columns: minmax(136px, 150px) repeat(3, minmax(92px, 1fr)) 58px 30px minmax(82px, auto) 28px;
}

.production-group-meta > span {
  width: 100%;
  min-width: 0;
  display: grid;
  gap: 3px;
  justify-items: center;
  justify-self: stretch;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  white-space: nowrap;
}

.production-group-meta > span b {
  color: #8a98a9;
  font-size: 9px;
  text-transform: uppercase;
}

.production-group-meta > button {
  justify-self: end;
}

.production-group-meta .production-order-user-control {
  width: 100%;
  display: grid;
  gap: 3px;
  justify-self: center;
}

.production-order-user-label {
  min-width: 0;
  color: #9aa7b5;
  font-size: 9px;
  font-weight: 850;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
}

.production-group-meta .production-order-user-trigger {
  min-height: 30px;
  padding-inline: 8px;
  font-size: 11px;
}

.production-order-user-control.is-mixed .production-user-avatar {
  background: linear-gradient(135deg, var(--teal), #7f4fd7);
}

.production-order-iconbar {
  min-width: 88px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.production-order-iconbar .icon-only,
.production-group-meta .production-whatsapp,
.production-group-meta .production-print {
  width: 26px;
  height: 26px;
  color: #7b8a9b;
  background: transparent;
  transition: color 160ms ease, transform 160ms ease, background 160ms ease;
}

.production-order-iconbar .icon-only:hover,
.production-order-iconbar .icon-only:focus-visible,
.production-group-meta .production-whatsapp:hover,
.production-group-meta .production-whatsapp:focus-visible,
.production-group-meta .production-print:hover,
.production-group-meta .production-print:focus-visible {
  transform: translateY(-1px);
  color: #506174;
  background: #f3f6fa;
}

.production-group-meta .production-whatsapp {
  justify-self: center;
  padding: 3px;
}

.production-group-meta .production-whatsapp img {
  width: 20px;
  height: 20px;
  display: block;
  object-fit: contain;
}

.production-order-iconbar svg,
.production-group-meta .production-print svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.2;
}

.modal:has(.production-whatsapp-form) {
  width: min(520px, calc(100vw - 36px));
}

.modal:has(.production-whatsapp-form) footer {
  justify-content: stretch;
}

.modal:has(.production-date-form) {
  width: min(710px, calc(100vw - 48px));
}

.modal:has(.production-history) {
  width: min(1710px, calc(100vw - 48px));
  max-height: min(820px, calc(100vh - 54px));
}

.modal:has(.production-indications) {
  width: min(1710px, calc(100vw - 48px));
  max-height: min(760px, calc(100vh - 54px));
}

.modal:has(.production-ticket-preview) {
  width: min(960px, calc(100vw - 48px));
  max-height: min(820px, calc(100vh - 54px));
}

.modal:has(.production-date-form) header h2 {
  color: #74889a;
  font-size: 20px;
  font-weight: 900;
}

.modal:has(.production-history) header h2,
.modal:has(.production-indications) header h2,
.modal:has(.production-ticket-preview) header h2 {
  color: #74889a;
  font-size: 20px;
  font-weight: 900;
}

.modal:has(.production-date-form) footer {
  justify-content: flex-end;
  padding: 18px 34px;
}

.modal:has(.production-history) .modal-body {
  padding: 14px 60px 50px;
}

.modal:has(.production-indications) .modal-body {
  padding: 28px 60px 52px;
}

.modal:has(.production-ticket-preview) .modal-body {
  padding: 24px 34px 30px;
}

.modal:has(.production-history) footer {
  min-height: 42px;
  padding: 0;
}

.modal:has(.production-indications) footer {
  justify-content: flex-end;
  padding: 20px 64px;
}

.modal:has(.production-ticket-preview) footer {
  justify-content: flex-end;
  padding: 18px 34px;
}

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

.production-date-form {
  display: grid;
  gap: 18px;
  padding: 0 10px 10px;
}

.production-date-summary {
  min-height: 86px;
  display: flex;
  align-items: center;
  border: 1px solid #ffd99d;
  border-radius: 5px;
  padding: 18px 16px;
  color: #40546a;
  background: #fff9ee;
  font-size: 15px;
  font-weight: 850;
  line-height: 1.45;
}

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

.production-date-form label {
  display: grid;
  gap: 7px;
  color: #40546a;
  font-size: 13px;
  font-weight: 900;
}

.production-date-form input,
.production-date-form select {
  width: 100%;
  min-height: 48px;
  border: 1px solid #cdd7e4;
  border-radius: 5px;
  padding: 0 14px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  font-weight: 700;
}

.production-date-form select {
  appearance: auto;
}

.production-date-submit {
  min-width: 204px;
  min-height: 50px;
  border-radius: 5px;
  font-size: 15px;
}

.production-history {
  display: grid;
  gap: 14px;
}

.production-history-summary {
  min-height: 84px;
  display: flex;
  align-items: center;
  border: 1px solid #ffd99d;
  border-radius: 5px;
  padding: 18px 14px;
  color: #40546a;
  background: #fff9ee;
  font-size: 15px;
  font-weight: 850;
  line-height: 1.45;
}

.production-history-table {
  min-height: 500px;
  border: 1px solid #d8dfe6;
  overflow: auto;
  background: #fff;
}

.production-history-head,
.production-history-row {
  min-width: 1180px;
  display: grid;
  grid-template-columns: 76px 128px 210px 190px minmax(320px, 1fr) 160px;
}

.production-history-head {
  min-height: 56px;
  border-bottom: 3px solid #00aeda;
  color: #2f3640;
  background: #fff;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.production-history-head span,
.production-history-row span {
  min-width: 0;
  display: flex;
  align-items: center;
  border-right: 1px solid #e5e9ee;
  padding: 0 18px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.production-history-row {
  min-height: 112px;
  color: #40546a;
  border-bottom: 1px solid #edf1f5;
  font-size: 14px;
  font-weight: 700;
}

.production-history-row.is-highlighted {
  background: #d0f7f8;
}

.production-history-row b,
.production-history-row small {
  display: block;
  font: inherit;
}

.production-history-row span:nth-child(2) {
  justify-content: center;
  flex-direction: column;
  text-align: center;
}

.production-history-row em {
  min-width: 0;
  overflow: hidden;
  color: #6b7b8c;
  font-size: 12px;
  font-style: italic;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.production-history-row .icon-only {
  color: #778699;
}

.production-indications {
  display: grid;
  gap: 0;
}

.production-indications-tabs {
  display: flex;
  min-height: 42px;
  align-items: end;
  gap: 20px;
}

.production-indications-tabs span {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  border-bottom: 2px solid transparent;
  padding: 0 20px;
  color: #ff4b1f;
  font-size: 15px;
  font-weight: 850;
}

.production-indications-tabs .is-active {
  border-bottom-color: #ff4b1f;
}

.production-indications-panel {
  min-height: 230px;
  display: grid;
  align-content: center;
  gap: 12px;
  border: 1px solid #d8dfe6;
  padding: 68px 26px 26px;
  background: #fff;
}

.production-general-indications {
  display: grid;
  gap: 4px;
  color: #40546a;
  font-size: 14px;
  font-weight: 900;
}

.production-general-indications textarea {
  width: 100%;
  min-height: 78px;
  border: 1px solid #cdd7e4;
  border-radius: 6px;
  padding: 10px 12px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  resize: vertical;
}

.production-general-indications textarea:focus,
.production-process-indication textarea:focus,
.production-process-indication select:focus {
  outline: 2px solid rgba(83, 131, 232, 0.3);
  border-color: #8fb1f6;
}

.production-add-process-link {
  width: fit-content;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 0;
  border-bottom: 1px solid #5a8df0;
  padding: 0;
  color: #5383e8;
  background: transparent;
  font-size: 15px;
  font-weight: 750;
}

.production-add-process-link svg {
  width: 18px;
  height: 18px;
  stroke-width: 3;
}

.production-process-indications {
  display: grid;
  gap: 10px;
}

.production-process-indication {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr) 38px;
  gap: 10px;
  align-items: end;
}

.production-process-indication label {
  display: grid;
  gap: 5px;
  color: #40546a;
  font-size: 12px;
  font-weight: 850;
}

.production-process-indication select,
.production-process-indication textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid #cdd7e4;
  border-radius: 6px;
  padding: 8px 10px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

.production-process-indication textarea {
  min-height: 42px;
  resize: vertical;
}

.production-process-indication .icon-only {
  width: 38px;
  height: 40px;
  color: #7b8a9b;
}

.production-indications-save {
  min-width: 256px;
  min-height: 50px;
  border-radius: 5px;
  font-size: 15px;
}

.production-ticket-preview {
  display: grid;
  grid-template-columns: minmax(320px, 380px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.production-ticket-preview-pane .thermal-ticket-wrap {
  min-height: 500px;
  align-items: start;
}

.production-thermal-ticket {
  width: min(100%, 302px);
}

.thermal-ticket-underlined {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.thermal-ticket-section-title {
  margin: 0 0 5px;
  font-weight: 900;
  text-align: left !important;
}

.production-ticket-product strong {
  display: none;
}

.production-ticket-product .production-ticket-staff-note strong {
  display: inline;
}

.production-ticket-comments {
  display: grid;
  gap: 8px;
  color: #40546a;
  font-size: 14px;
  font-weight: 900;
}

.production-ticket-comments textarea {
  width: 100%;
  min-height: 220px;
  border: 1px solid #cdd7e4;
  border-radius: 6px;
  padding: 12px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  resize: vertical;
}

.production-ticket-comments textarea:focus {
  outline: 2px solid rgba(83, 131, 232, 0.3);
  border-color: #8fb1f6;
}

.production-ticket-print {
  min-width: 170px;
  min-height: 48px;
  border-radius: 5px;
  font-size: 15px;
}

.production-whatsapp-form label {
  display: grid;
  gap: 7px;
  color: #40546a;
  font-size: 13px;
  font-weight: 850;
}

.production-whatsapp-form input,
.production-whatsapp-form textarea {
  width: 100%;
  border: 1px solid #cdd7e4;
  border-radius: 6px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

.production-whatsapp-form input {
  min-height: 46px;
  padding: 0 12px;
}

.production-whatsapp-form textarea {
  min-height: 280px;
  padding: 12px;
  resize: vertical;
  line-height: 1.45;
}

.production-whatsapp-help {
  margin: -4px 0 0;
  color: #7b8a9b;
  font-size: 12px;
  line-height: 1.4;
}

.production-whatsapp-send {
  width: 100%;
  min-height: 96px;
  display: grid;
  place-items: center;
  gap: 7px;
  border: 1px solid #25d366;
  border-radius: 6px;
  color: #40546a;
  background: #ecfff2;
  font-size: 15px;
  font-weight: 850;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.production-whatsapp-send:hover,
.production-whatsapp-send:focus-visible {
  transform: translateY(-1px);
  background: #e4ffed;
  box-shadow: 0 12px 24px rgba(37, 211, 102, 0.16);
}

.production-whatsapp-send img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.modal:has(.production-status-confirm) {
  width: min(560px, calc(100vw - 36px));
}

.production-status-confirm {
  display: grid;
  gap: 16px;
}

.production-status-confirm-badge {
  width: fit-content;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid color-mix(in srgb, var(--prod-border, #dbe3ed) 32%, #dbe3ed);
  border-radius: 999px;
  padding: 0 12px;
  color: var(--prod-text, #40546a);
  background: color-mix(in srgb, var(--prod-bg, #f7f9fc) 72%, #fff);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.production-status-confirm-badge i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--prod-dot, #9aa7b5);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--prod-dot, #9aa7b5) 14%, transparent);
}

.production-status-confirm h3 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
}

.production-status-confirm p {
  margin: 0;
  color: #637386;
  font-size: 14px;
  line-height: 1.5;
}

.production-status-confirm-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.production-status-confirm-summary div {
  min-width: 0;
  display: grid;
  gap: 5px;
  border: 1px solid #e1e7ef;
  border-radius: 8px;
  padding: 12px;
  background: #f8fafc;
}

.production-status-confirm-summary span {
  color: #8190a2;
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.production-status-confirm-summary strong {
  min-width: 0;
  color: #334154;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.production-status-confirm-list {
  max-height: 220px;
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  overflow: auto;
  list-style: none;
}

.production-status-confirm-list li {
  min-width: 0;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 3px 10px;
  border: 1px solid #e1e7ef;
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
}

.production-status-confirm-list strong {
  grid-row: span 2;
  color: #334154;
}

.production-status-confirm-list span,
.production-status-confirm-list small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.production-status-confirm-list span {
  color: #40546a;
  font-weight: 850;
}

.production-status-confirm-list small {
  color: #7b8a9b;
  font-size: 12px;
}

.production-progress-circle {
  --progress-color: #ff3b30;
  --progress-track: #ffd9d6;
  --progress-circumference: 119.38;
  --progress-offset: 119.38;
  position: relative;
  width: 58px;
  height: 58px;
  justify-self: center;
  display: inline-grid;
  place-items: center;
  color: var(--progress-color);
}

.production-progress-circle.is-middle {
  --progress-color: #ff9500;
  --progress-track: #ffe2b8;
}

.production-progress-circle.is-complete {
  --progress-color: #25d366;
  --progress-track: #c9f7dc;
}

.production-progress-circle svg {
  position: absolute;
  inset: 0;
  transform: rotate(-90deg);
  filter: drop-shadow(0 4px 9px color-mix(in srgb, var(--progress-color) 18%, transparent));
}

.production-progress-track {
  stroke: var(--progress-track);
  animation: productionProgressTrackPulse 1.8s ease-in-out infinite;
}

.production-progress-indicator {
  stroke: var(--progress-color);
  stroke-dasharray: var(--progress-circumference);
  stroke-dashoffset: var(--progress-offset);
  animation: productionProgressDraw 720ms cubic-bezier(0.22, 1, 0.36, 1) both;
  transition: stroke-dashoffset 300ms ease-in-out, stroke 180ms ease;
}

.production-progress-circle span {
  position: relative;
  z-index: 1;
  color: #334154;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  animation: productionProgressLabelIn 360ms ease both;
}

.production-progress-circle::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--progress-color) 10%, transparent);
  opacity: 0.7;
  animation: productionProgressGlow 1.9s ease-in-out infinite;
}

@keyframes productionProgressDraw {
  from {
    stroke-dashoffset: var(--progress-circumference);
  }
  to {
    stroke-dashoffset: var(--progress-offset);
  }
}

@keyframes productionProgressTrackPulse {
  0%,
  100% {
    opacity: 0.72;
  }
  50% {
    opacity: 1;
  }
}

@keyframes productionProgressGlow {
  0%,
  100% {
    transform: scale(0.9);
    opacity: 0.38;
  }
  50% {
    transform: scale(1.04);
    opacity: 0.72;
  }
}

@keyframes productionProgressLabelIn {
  from {
    opacity: 0;
    transform: scale(0.82);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .production-progress-track,
  .production-progress-indicator,
  .production-progress-circle::after,
  .production-progress-circle span,
  .production-process-node i {
    animation: none;
  }
}

.production-group-statuses,
.production-group-preview {
  grid-column: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.production-group-statuses span,
.production-group-preview span {
  max-width: 260px;
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid color-mix(in srgb, var(--prod-border, #dbe3ed) 28%, #e5ebf2);
  border-radius: 999px;
  padding: 0 9px;
  color: var(--prod-text, #607184);
  background: color-mix(in srgb, var(--prod-bg, #f6f8fb) 72%, #fff);
  font-size: 11px;
  font-weight: 850;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.production-group-statuses i {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--prod-dot, var(--prod-border, #9aa6b2));
}

.production-group-preview {
  color: #7c8998;
}

.production-items {
  display: grid;
  gap: 6px;
  max-height: 0;
  padding: 0 8px;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  transform: translateY(-4px);
  transition: max-height 260ms ease, opacity 180ms ease, padding 220ms ease, transform 220ms ease;
}

.production-sale-group.is-expanded .production-items {
  max-height: 2400px;
  padding: 0 8px 8px;
  opacity: 1;
  overflow: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.production-item-card {
  --prod-bg: #eef3f8;
  --prod-border: #506174;
  --prod-text: #334154;
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: 30px 64px minmax(190px, 1.48fr) minmax(108px, 0.62fr) minmax(172px, 190px) minmax(148px, 168px) minmax(112px, auto);
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius);
  background: linear-gradient(180deg, #fff, color-mix(in srgb, var(--prod-bg) 18%, #fff));
  overflow: visible;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.production-item-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(90deg, var(--orange) 50%, transparent 0) 0 0 / 18px 2px repeat-x,
    linear-gradient(90deg, var(--orange) 50%, transparent 0) 0 100% / 18px 2px repeat-x,
    linear-gradient(0deg, var(--orange) 50%, transparent 0) 0 0 / 2px 18px repeat-y,
    linear-gradient(0deg, var(--orange) 50%, transparent 0) 100% 0 / 2px 18px repeat-y;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}

.production-item-card:hover,
.production-item-card.is-selected {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(26, 38, 58, 0.1);
}

.production-item-card:has(.production-status-control.is-open) {
  z-index: 100;
}

.production-item-card:has(.production-user-control.is-open) {
  z-index: 70;
}

.production-item-card:has(.production-user-control.is-open) .production-user-stack {
  z-index: 85;
}

.production-item-card.is-selected {
  background: linear-gradient(180deg, color-mix(in srgb, var(--prod-bg) 44%, #fff), #fff);
}

.production-item-card.is-selected::before {
  opacity: 1;
  animation: productionMarch 850ms linear infinite;
}

@keyframes productionMarch {
  to {
    background-position: 18px 0, -18px 100%, 0 -18px, 100% 18px;
  }
}

.production-item-select input {
  width: 18px;
  height: 18px;
  accent-color: #4b5f70;
}

.production-item-card > * {
  position: relative;
  z-index: 1;
}

.production-item-code strong {
  color: #4b5f70;
  font-size: 13px;
}

.production-item-copy,
.production-item-date {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.production-item-copy strong,
.production-item-copy small,
.production-item-date strong,
.production-item-date span,
.production-item-date small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.production-item-copy strong {
  color: #34485e;
  font-size: 13px;
  line-height: 1.18;
}

.production-item-copy small {
  color: #607184;
  font-size: 11px;
  font-weight: 850;
}

.production-item-copy small b {
  margin-left: 6px;
  color: #7c8998;
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.production-item-notes {
  display: grid;
  gap: 2px;
  color: #7c8998;
  font-size: 11px;
  font-weight: 750;
}

.production-item-notes span {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.production-item-notes svg {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
}

.production-item-notes .production-instructions {
  color: #d4692c;
}

.production-product-progress {
  grid-column: 3 / -1;
  min-width: 0;
  display: grid;
  gap: 8px;
  border: 1px solid color-mix(in srgb, var(--process-color) 24%, #dbe3ed);
  border-radius: 8px;
  padding: 9px 10px 8px;
  background:
    radial-gradient(circle at var(--process-progress) 100%, color-mix(in srgb, var(--process-color) 14%, transparent) 0, transparent 42%),
    linear-gradient(180deg, #fff, color-mix(in srgb, var(--process-track) 32%, #fff));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--process-color) 8%, transparent);
}

.production-product-progress-summary {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.production-product-progress-summary span {
  min-width: 0;
  color: var(--process-color);
  font-size: 11px;
  font-weight: 950;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.production-product-progress-summary strong {
  min-width: 42px;
  border-radius: 999px;
  padding: 3px 8px;
  color: #fff;
  background: var(--process-color);
  box-shadow: 0 0 18px color-mix(in srgb, var(--process-color) 28%, transparent);
  font-size: 11px;
  font-weight: 950;
  text-align: center;
}

.production-process-rail {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0;
  padding: 4px 6px;
}

.production-process-step {
  min-width: 0;
  flex: 1 1 0;
  display: flex;
  align-items: center;
}

.production-process-step:last-child {
  flex: 0 0 auto;
}

.production-process-node {
  position: relative;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  padding: 0;
  background: transparent;
  cursor: pointer;
  transition: transform 160ms ease;
}

.production-process-node:hover,
.production-process-node:focus-visible {
  transform: scale(1.16);
  outline: 0;
}

.production-process-node span {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: #9ca3af;
  box-shadow: none;
  transition: background 180ms ease, box-shadow 180ms ease;
}

.production-process-node.is-reached span {
  background: var(--step-color);
  box-shadow: 0 0 18px color-mix(in srgb, var(--step-color) 38%, transparent), 0 0 34px color-mix(in srgb, var(--step-color) 18%, transparent);
}

.production-process-node.is-current span {
  background: linear-gradient(135deg, var(--step-from), var(--step-to));
  box-shadow: 0 0 22px color-mix(in srgb, var(--step-color) 46%, transparent), 0 0 42px color-mix(in srgb, var(--step-color) 24%, transparent);
}

.production-process-node em,
.production-process-node i {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.production-process-node i {
  left: 50%;
  top: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--dot-color);
  opacity: 0;
  transform: translate(calc(-50% + var(--dot-x)), calc(-50% + var(--dot-y))) scale(0.35);
  animation: productionProcessDotIn 600ms cubic-bezier(0.04, 0.62, 0.23, 0.98) var(--dot-delay) forwards;
}

.production-process-line {
  height: 7px;
  min-width: 26px;
  flex: 1 1 42px;
  border-radius: 999px;
  background: #9ca3af;
  transition: background 240ms ease, box-shadow 180ms ease;
}

.production-process-line.is-reached {
  background: linear-gradient(90deg, var(--line-from), var(--line-to));
  box-shadow: 0 0 16px color-mix(in srgb, var(--line-to) 24%, transparent);
}

.production-process-labels {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 4px;
}

.production-process-labels button {
  min-width: 0;
  border: 0;
  padding: 0;
  color: #7c8998;
  background: transparent;
  cursor: pointer;
  font-size: 9px;
  font-weight: 950;
  line-height: 1.1;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
  transition: color 160ms ease, transform 160ms ease;
}

.production-process-labels button:hover,
.production-process-labels button:focus-visible,
.production-process-labels button.is-reached {
  color: var(--step-color);
  outline: 0;
}

.production-process-labels button:hover,
.production-process-labels button:focus-visible {
  transform: translateY(-1px);
}

@keyframes productionProcessDotIn {
  to {
    opacity: 1;
    transform: translate(calc(-50% + var(--dot-x)), calc(-50% + var(--dot-y))) scale(1);
  }
}

.production-item-date strong {
  color: #334154;
  font-size: 12px;
}

.production-item-date span {
  color: #708091;
  font-size: 15px;
  font-weight: 800;
}

.production-item-date small {
  display: block;
  color: #28b957;
  font-size: 12px;
  font-weight: 900;
}

.production-user-pill {
  min-width: 0;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #dce2ea;
  border-radius: 999px;
  padding: 0 14px;
  color: #607184;
  background: #fff;
  font-size: 13px;
  font-weight: 850;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.production-user-control {
  position: relative;
  min-width: 0;
  width: min(190px, 100%);
  justify-self: start;
}

.production-user-stack {
  min-width: 0;
  width: min(190px, 100%);
  display: grid;
  gap: 5px;
  justify-self: start;
}

.production-user-stack .production-user-control {
  width: 100%;
}

.production-user-trigger {
  width: 100%;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid #dce2ea;
  border-radius: 999px;
  padding: 0 10px;
  color: #607184;
  background: #fff;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(26, 38, 58, 0.04);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.production-user-trigger:hover,
.production-user-control.is-open .production-user-trigger {
  transform: translateY(-1px);
  border-color: #cbd6e2;
  box-shadow: 0 12px 24px rgba(26, 38, 58, 0.1);
}

.production-user-trigger > span:nth-child(2),
.production-user-option > span:nth-child(2) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.production-user-avatar {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #ff8a00;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0;
}

.production-user-avatar.is-empty {
  color: #8a98a9;
  background: #eef3f8;
}

.production-user-avatar svg {
  width: 15px;
  height: 15px;
}

.production-user-caret {
  width: 16px;
  height: 16px;
  display: inline-grid;
  place-items: center;
  margin-left: auto;
  color: #708091;
}

.production-user-caret svg {
  width: 16px;
  height: 16px;
}

.production-user-control.is-open .production-user-caret {
  transform: rotate(180deg);
}

.production-user-menu {
  position: absolute;
  z-index: 50;
  top: calc(100% + 8px);
  right: 0;
  width: min(360px, 82vw);
  max-height: min(340px, 58vh);
  display: grid;
  align-content: start;
  gap: 4px;
  padding: 10px;
  border: 1px solid #dbe3ed;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.2);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.production-user-option {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0;
  border-radius: 8px;
  padding: 0 10px;
  color: #52657a;
  background: transparent;
  font-size: 13px;
  font-weight: 780;
  text-align: left;
  transition: background 140ms ease, color 140ms ease;
}

.production-user-option:hover,
.production-user-option.is-active {
  color: #26374a;
  background: #f5f8fb;
}

.production-status-control {
  --prod-bg: #eef3f8;
  --prod-border: #506174;
  --prod-text: #334154;
  position: relative;
  z-index: 8;
  min-width: 0;
  width: min(168px, 100%);
  justify-self: start;
}

.production-status-control.is-open {
  z-index: 130;
}

.production-status-trigger {
  width: 100%;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--prod-border);
  border-radius: 999px;
  padding: 0 10px;
  color: var(--prod-text);
  background: var(--prod-bg);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(26, 38, 58, 0.04);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.production-status-trigger:hover,
.production-status-control.is-open .production-status-trigger {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(26, 38, 58, 0.1);
}

.production-status-dot {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--prod-dot, var(--prod-border));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--prod-dot, var(--prod-border)) 16%, transparent);
}

.production-status-caret {
  width: 16px;
  height: 16px;
  display: inline-grid;
  place-items: center;
  color: color-mix(in srgb, var(--prod-text) 72%, #fff);
}

.production-status-caret svg {
  width: 16px;
  height: 16px;
}

.production-status-control.is-open .production-status-caret {
  transform: rotate(180deg);
}

.production-status-menu {
  position: absolute;
  z-index: 140;
  top: calc(100% + 8px);
  left: 0;
  width: min(170px, 80vw);
  display: grid;
  gap: 2px;
  padding: 8px 0;
  border: 1px solid #dbe3ed;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.2);
}

.production-status-option {
  min-height: 36px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 0;
  padding: 0 10px;
  color: #52657a;
  background: transparent;
  font-size: 12px;
  font-weight: 850;
  text-align: left;
  text-transform: uppercase;
  transition: background 140ms ease, color 140ms ease;
}

.production-status-option:hover,
.production-status-option.is-active {
  color: #26374a;
  background: #f5f8fb;
}

.production-item-actions {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 4px;
}

.production-resource-action {
  width: 100%;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid rgba(83, 199, 195, 0.45);
  border-radius: 999px;
  padding: 0 10px;
  color: #176d75;
  background: linear-gradient(135deg, rgba(220, 247, 244, 0.92), rgba(245, 241, 255, 0.96));
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(83, 199, 195, 0.12);
}

.production-resource-action svg {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  color: #087476;
  stroke: currentColor;
  filter: drop-shadow(0 0 4px rgba(83, 199, 195, 0.28));
}

.production-resource-action span {
  min-width: 19px;
  border-radius: 999px;
  padding: 1px 6px;
  color: #fff;
  background: linear-gradient(135deg, var(--teal), #7f4fd7);
  text-align: center;
  font-size: 10px;
}

.production-item-actions .icon-only,
.production-print {
  width: 24px;
  height: 24px;
  color: #7c8998;
  background: transparent;
}

.production-bulk-toolbar {
  position: fixed;
  z-index: 75;
  left: calc(240px + (100vw - 240px) / 2);
  bottom: 22px;
  width: fit-content;
  max-width: calc(100vw - 288px);
  min-height: 62px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 22px;
  color: #fff;
  background: linear-gradient(180deg, #191d24, #080a0e);
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.24);
  transform: translateX(-50%);
  animation: productionBulkIn 180ms ease both;
}

.production-bulk-toolbar.has-uploads {
  width: min(760px, calc(100vw - 288px));
  align-items: stretch;
  flex-direction: column;
  gap: 14px;
  padding: 14px;
  border-radius: 24px;
}

.production-bulk-actions {
  width: max-content;
  max-width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
}

.production-bulk-toolbar.has-uploads .production-bulk-actions {
  width: 100%;
  justify-content: center;
  flex-wrap: wrap;
}

.production-bulk-dot {
  position: relative;
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ff9094 0 24%, #ff3844 58%, #b30f1d 100%);
  box-shadow:
    0 0 0 5px rgba(255, 56, 68, 0.18),
    0 0 12px rgba(255, 56, 68, 0.9),
    0 0 24px rgba(255, 56, 68, 0.5);
  animation: productionBulkPulse 1.35s ease-in-out infinite;
}

.production-bulk-dot::after {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: inherit;
  border: 1px solid rgba(255, 72, 82, 0.56);
  opacity: 0.68;
  transform: scale(0.72);
  animation: productionBulkPulseRing 1.35s ease-out infinite;
}

.production-bulk-toolbar strong {
  padding-right: 8px;
  border-right: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 13px;
  letter-spacing: 0.06em;
}

.production-bulk-count {
  min-width: 28px;
  border-radius: 999px;
  padding: 3px 8px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  text-align: center;
  font-size: 12px;
  font-weight: 900;
}

.production-bulk-actions button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 0 18px;
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
  font-weight: 850;
  white-space: nowrap;
}

.production-bulk-actions button svg,
.production-upload-name svg,
.production-upload-remove svg,
.production-upload-node svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: currentColor;
  stroke: currentColor;
}

.production-bulk-actions button svg {
  color: #fff;
  stroke: #fff;
}

.production-bulk-upload {
  border-color: rgba(55, 210, 204, 0.56) !important;
  background: linear-gradient(135deg, rgba(66, 179, 178, 0.95), rgba(129, 73, 214, 0.9)) !important;
  box-shadow: 0 10px 22px rgba(66, 179, 178, 0.24);
}

.production-upload-timeline {
  max-height: 232px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  padding: 2px 2px 0;
}

.production-upload-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
}

.production-upload-rail {
  display: flex;
  align-items: center;
  flex-direction: column;
  padding-top: 11px;
}

.production-upload-node {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 2px solid #55b9ff;
  border-radius: 50%;
  background: rgba(85, 185, 255, 0.14);
  box-shadow: 0 0 16px rgba(85, 185, 255, 0.32);
}

.production-upload-item.is-done .production-upload-node {
  border-color: #55d98b;
  color: #55d98b;
  background: rgba(85, 217, 139, 0.13);
  box-shadow: 0 0 18px rgba(85, 217, 139, 0.28);
}

.production-upload-line {
  width: 1px;
  min-height: 26px;
  flex: 1;
  margin-top: 7px;
  background: linear-gradient(180deg, rgba(85, 185, 255, 0.5), rgba(255, 255, 255, 0.12));
}

.production-upload-card {
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.055));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.production-upload-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 28px;
  align-items: center;
  gap: 10px;
}

.production-upload-name {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 13px;
  font-weight: 760;
  overflow-wrap: anywhere;
}

.production-upload-name svg {
  color: #fff;
  opacity: 0.96;
}

.production-upload-state {
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
  font-weight: 760;
  white-space: nowrap;
}

.production-upload-item.is-done .production-upload-state {
  color: #8ee7ac;
}

.production-upload-remove {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  padding: 0;
  color: #fff;
  background: rgba(255, 113, 124, 0.18);
}

.production-upload-remove:hover,
.production-upload-remove:focus-visible {
  color: #fff;
  background: rgba(255, 113, 124, 0.34);
}

.production-upload-progress {
  height: 6px;
  overflow: hidden;
  margin-top: 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.production-upload-progress span {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, #55d9d1, #7c5fe7, #55d98b);
  transition: width 260ms ease;
}

.production-upload-item.is-done .production-upload-progress {
  display: none;
}

@keyframes productionBulkIn {
  from {
    opacity: 0;
    transform: translate(-50%, 12px);
  }
}

@keyframes productionBulkPulse {
  0%,
  100% {
    transform: scale(1);
    filter: saturate(1);
  }

  50% {
    transform: scale(1.14);
    filter: saturate(1.35);
  }
}

@keyframes productionBulkPulseRing {
  0% {
    opacity: 0.72;
    transform: scale(0.72);
  }

  70%,
  100% {
    opacity: 0;
    transform: scale(1.34);
  }
}

@media (prefers-reduced-motion: reduce) {
  .production-item-card::before {
    animation: none;
  }

  .production-bulk-toolbar,
  .production-bulk-dot,
  .production-bulk-dot::after {
    animation: none;
  }
}

.production-empty {
  border: 1px dashed #cdd7e4;
  border-radius: var(--radius);
  background: #fff;
}

.quote-row {
  background: #fff;
  transition: background 160ms ease;
}

#quotesTable .data-table,
#quoteSearchResults .data-table {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-gutter: stable;
}

#quotesTable,
#quoteSearchResults {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

#quotesTable .data-head,
#quotesTable .data-row {
  width: max-content;
  min-width: 1640px;
}

#quoteSearchResults .data-head,
#quoteSearchResults .data-row {
  width: max-content;
  min-width: 1564px;
}

#quotesTable .data-head span,
#quotesTable .data-row span,
#quoteSearchResults .data-head span,
#quoteSearchResults .data-row span {
  justify-content: flex-start;
}

#quotesTable .data-head span:nth-child(n+5):nth-child(-n+9),
#quotesTable .data-row span:nth-child(n+5):nth-child(-n+9),
#quoteSearchResults .data-head span:nth-child(n+5):nth-child(-n+9),
#quoteSearchResults .data-row span:nth-child(n+5):nth-child(-n+9) {
  justify-content: flex-end;
}

#quotesTable .data-head span:last-child,
#quotesTable .data-row span:last-child,
#quoteSearchResults .data-head span:last-child,
#quoteSearchResults .data-row span:last-child {
  justify-content: center;
  position: sticky;
  right: 0;
  z-index: 1;
  border-left: 1px solid var(--line);
  background: inherit;
}

#quotesTable .data-head span:last-child,
#quoteSearchResults .data-head span:last-child {
  z-index: 2;
  background: #fff;
}

.quote-row:hover {
  background: #dff8f7;
}

.quote-status-dot {
  color: var(--teal);
}

.quote-actions {
  display: inline-flex !important;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.row-actions {
  display: inline-flex !important;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.row-hover:hover {
  background: #dff8f7;
}

.amount-positive {
  color: #25854d;
}

.amount-negative {
  color: #cf4b3f;
}

.type-pill {
  min-width: 74px;
  display: inline-flex;
  justify-content: center;
  border-radius: 999px;
  padding: 5px 8px;
  color: #fff;
  background: var(--teal);
  font-size: 11px;
  text-transform: uppercase;
}

.type-pill.gasto {
  background: #ef6b6b;
}

.type-pill.retiro {
  background: #8f74d8;
}

.type-pill.venta {
  background: #53a76d;
}

.commission-row.is-paid {
  color: #758596;
  background: #f4f7fa;
}

.commission-status {
  width: fit-content;
  min-width: 86px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.commission-status.is-pending {
  color: #b85a00;
  background: #fff4dc;
}

.commission-status.is-paid {
  color: #28714a;
  background: #e7f7ed;
}

.icon-only {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border: 0;
  color: #758596;
  background: transparent;
}

.icon-only:hover {
  color: var(--teal);
}

.quote-pay-action {
  color: #0d999a;
  background: #eefbf9;
  border-radius: 8px;
}

.quote-pay-action:hover {
  color: #fff;
  background: #0d999a;
}

.icon-only svg,
.quote-filters svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.table-footer {
  display: flex;
  justify-content: space-between;
  color: #65758a;
  font-size: 13px;
  font-weight: 800;
}

.modal:has(.quote-filters) {
  width: min(1180px, calc(100vw - 56px));
}

.modal:has(.admiprint-payment) {
  width: min(1120px, calc(100vw - 56px));
}

.modal:has(.credit-form),
.modal:has(.debt-detail),
.modal:has(.debt-payment-form) {
  width: min(980px, calc(100vw - 56px));
}

.modal:has(.dispatch-form),
.modal:has(.send-production-form),
.modal:has(.sale-ticket-decision),
.modal:has(.production-decision),
.modal:has(.production-detail) {
  width: min(1120px, calc(100vw - 56px));
}

.modal:has(.admiprint-payment) header,
.modal:has(.credit-form) header,
.modal:has(.debt-detail) header,
.modal:has(.debt-payment-form) header {
  background:
    linear-gradient(90deg, rgba(83, 199, 195, 0.14), rgba(160, 24, 120, 0.08)),
    #fff;
}

.modal:has(.dispatch-form) header,
.modal:has(.send-production-form) header,
.modal:has(.sale-ticket-decision) header,
.modal:has(.production-decision) header,
.modal:has(.production-detail) header {
  background:
    linear-gradient(90deg, rgba(83, 199, 195, 0.14), rgba(160, 24, 120, 0.08)),
    #fff;
}

.modal:has(.admiprint-payment) header h2,
.modal:has(.credit-form) header h2,
.modal:has(.debt-detail) header h2,
.modal:has(.debt-payment-form) header h2 {
  color: var(--navy);
}

.payment-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, 230px);
  gap: 16px;
}

.payment-methods {
  display: grid;
  gap: 10px;
}

.payment-method-row {
  --method-accent: var(--teal);
  --method-soft: rgba(83, 199, 195, 0.12);
  display: grid;
  grid-template-columns: 58px repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-items: end;
  padding: 10px;
  border: 1px solid color-mix(in srgb, var(--method-accent) 22%, #dfe6ef);
  border-left: 4px solid var(--method-accent);
  background:
    linear-gradient(90deg, var(--method-soft), transparent 42%),
    #fff;
}

.payment-method-row:focus-within {
  border-color: color-mix(in srgb, var(--method-accent) 72%, white);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--method-accent) 18%, transparent);
}

.payment-method-row:not(.cash-payment-row) {
  background:
    linear-gradient(90deg, var(--method-soft), transparent 42%),
    #fafdff;
}

.payment-cash {
  --method-accent: var(--teal);
  --method-soft: rgba(83, 199, 195, 0.16);
}

.payment-card {
  --method-accent: var(--indigo);
  --method-soft: rgba(43, 42, 111, 0.12);
}

.payment-qr {
  --method-accent: var(--magenta);
  --method-soft: rgba(160, 24, 120, 0.11);
}

.payment-transfer {
  --method-accent: var(--cyan);
  --method-soft: rgba(83, 199, 195, 0.12);
}

.payment-method-icon {
  align-self: stretch;
  display: grid;
  place-items: center;
  min-height: 54px;
  color: var(--method-accent);
  border: 1px solid color-mix(in srgb, var(--method-accent) 20%, white);
  border-radius: 6px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--method-accent) 16%, white), #fff);
}

.payment-method-icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.extra-payment-methods {
  display: grid;
  gap: 10px;
}

.extra-payment-methods[hidden] {
  display: none;
}

.payment-summary {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid rgba(111, 29, 119, 0.12);
  background:
    linear-gradient(180deg, rgba(83, 199, 195, 0.13), rgba(160, 24, 120, 0.09)),
    #f8f6ff;
}

.payment-form label,
.payment-summary label {
  display: grid;
  gap: 6px;
  color: #40546a;
  font-size: 13px;
  font-weight: 800;
}

.payment-form label.is-required {
  position: relative;
  color: var(--magenta);
}

.payment-form label.is-required::after {
  content: "*";
  position: absolute;
  top: 0;
  right: 0;
}

.money-field {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  min-height: 40px;
  border: 1px solid #cdd7e4;
  border-radius: 6px;
  background: #fff;
  overflow: hidden;
}

.money-field > span {
  display: grid;
  place-items: center;
  height: 100%;
  color: var(--method-accent, #5b6c80);
  border-right: 1px solid #e3e9f2;
  background: color-mix(in srgb, var(--method-accent, var(--teal)) 8%, #fbfdff);
}

.payment-form input,
.payment-form select {
  min-height: 40px;
  border: 1px solid #cdd7e4;
  border-radius: 6px;
  padding: 0 10px;
  color: var(--ink);
  background: #fff;
  text-align: right;
}

.money-field input {
  border: 0;
  border-radius: 0;
}

.payment-form select,
.payment-form input[placeholder="Referencia"],
.payment-form input[placeholder="Banco"],
.payment-form input[placeholder="Nro de comprobante"] {
  text-align: left;
}

.text-link {
  justify-self: start;
  border: 0;
  color: var(--teal);
  background: transparent;
  font-weight: 800;
  text-decoration: underline;
}

.sale-credit-summary {
  min-width: 0;
  overflow: hidden;
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(83, 199, 195, 0.22);
  border-left: 4px solid var(--teal);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(83, 199, 195, 0.13), rgba(160, 24, 120, 0.07)),
    #fff;
}

.sale-credit-summary div,
.sale-credit-summary strong,
.sale-credit-summary small,
.sale-credit-installments {
  min-height: 0;
}

.sale-credit-summary div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.sale-credit-summary strong {
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
}

.sale-credit-summary small,
.sale-credit-installments span {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.credit-status-pill {
  width: max-content;
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  color: var(--teal);
  background: rgba(83, 199, 195, 0.13);
  font-size: 11px;
  font-weight: 900;
}

.sale-credit-installments {
  display: grid;
  gap: 3px;
}

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

.credit-summary-grid,
.debt-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.credit-summary-grid article,
.debt-metrics span {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid rgba(83, 199, 195, 0.18);
  border-radius: 8px;
  background: #fafdff;
}

.credit-summary-grid span,
.debt-metrics b {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.credit-summary-grid strong,
.debt-metrics span {
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
}

.credit-controls {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 150px 160px 210px;
  gap: 14px;
}

.credit-controls label,
.credit-control-field,
.debt-payment-form label {
  display: grid;
  gap: 6px;
  color: #40546a;
  font-size: 13px;
  font-weight: 800;
}

.credit-controls input,
.credit-controls select,
.debt-payment-form input,
.debt-payment-form select {
  min-height: 40px;
  border: 1px solid #cdd7e4;
  border-radius: 6px;
  padding: 0 10px;
  color: var(--ink);
  background: #fff;
}

.credit-controls input[readonly] {
  color: var(--muted);
  background: #f4f8fb;
}

.credit-period-control {
  display: grid;
  grid-template-columns: 38px minmax(52px, 1fr) 38px;
  min-width: 0;
  min-height: 40px;
  overflow: hidden;
  border: 1px solid #cdd7e4;
  border-radius: 6px;
  background: #fff;
}

.credit-period-control input {
  min-width: 0;
  min-height: 38px;
  border: 0;
  border-radius: 0;
  padding: 0 6px;
  text-align: center;
}

.credit-period-control input::-webkit-outer-spin-button,
.credit-period-control input::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.credit-period-control input[type="number"] {
  -moz-appearance: textfield;
}

.credit-period-control button {
  display: grid;
  place-items: center;
  min-width: 0;
  border: 0;
  color: var(--teal);
  background: #f6fbfd;
  cursor: pointer;
}

.credit-period-control button:first-child {
  border-right: 1px solid #dbe6ee;
}

.credit-period-control button:last-child {
  border-left: 1px solid #dbe6ee;
}

.credit-period-control button:hover {
  color: #fff;
  background: var(--teal);
}

.credit-period-control .app-icon {
  width: 16px;
  height: 16px;
}

.credit-alert {
  padding: 10px 12px;
  border: 1px solid rgba(239, 107, 107, 0.28);
  border-radius: 8px;
  color: #9d2d2d;
  background: #fff6f6;
  font-size: 13px;
  font-weight: 800;
}

.credit-alert[hidden] {
  display: none;
}

.credit-preview {
  display: grid;
  gap: 10px;
}

.credit-preview h3 {
  font-size: 16px;
}

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

.debt-card {
  display: grid;
  gap: 0;
  padding: 0;
  border: 1px solid rgba(111, 29, 119, 0.13);
  border-left: 4px solid var(--teal);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(11, 18, 32, 0.05);
  overflow: hidden;
}

.debt-card.is-paid {
  border-left-color: #68a966;
  background: #fbfffc;
}

.debt-card-head {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  cursor: pointer;
}

.debt-card-trigger {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(180px, 1.2fr) minmax(104px, 0.58fr) minmax(132px, 0.72fr) 24px;
  gap: 10px;
  align-items: center;
  border: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.debt-card-head:hover,
.debt-card-trigger:focus-visible {
  background: linear-gradient(90deg, rgba(83, 199, 195, 0.08), rgba(214, 77, 171, 0.04));
}

.debt-card-title {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.debt-card-title strong,
.debt-card-title small,
.debt-card-total,
.debt-card-next {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.debt-card-title strong {
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
}

.debt-card-title small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 820;
}

.debt-card-total,
.debt-card-next {
  display: grid;
  gap: 2px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.debt-card-total b,
.debt-card-next b {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.debt-card-chevron {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  color: #7f8da0;
  transition: transform 160ms ease;
}

.debt-card.is-expanded .debt-card-chevron {
  transform: rotate(180deg);
}

.debt-card-chevron svg {
  width: 16px;
  height: 16px;
}

.debt-quick-actions {
  display: flex;
  justify-content: flex-end;
}

.debt-quick-actions .primary-action {
  min-height: 34px;
  padding: 0 12px;
  font-size: 12px;
  white-space: nowrap;
}

.debt-card-detail {
  display: grid;
  gap: 10px;
  max-height: 0;
  padding: 0 12px;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  transform: translateY(-4px);
  transition: max-height 260ms ease, opacity 180ms ease, padding 220ms ease, transform 220ms ease;
}

.debt-card.is-expanded .debt-card-detail {
  max-height: 1600px;
  padding: 0 12px 12px;
  opacity: 1;
  overflow: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.debt-card-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.debt-card-main > div {
  display: grid;
  gap: 4px;
}

.debt-card-main strong {
  color: var(--ink);
  font-size: 17px;
}

.debt-card-main small {
  color: var(--muted);
  font-weight: 800;
}

.debt-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.debt-metrics span {
  padding: 9px 10px;
  font-size: 12px;
}

.debt-installments {
  display: grid;
  gap: 6px;
}

.debt-installment {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) 120px 100px auto;
  gap: 10px;
  align-items: center;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid #e1e8f0;
  border-radius: 8px;
  background: #fafdff;
}

.debt-installment span {
  display: grid;
  gap: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.debt-installment b,
.debt-installment strong {
  color: var(--ink);
  font-size: 13px;
}

.installment-status {
  width: max-content;
  padding: 5px 9px;
  border-radius: 999px;
  color: #a15b14;
  background: #fff3e3;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.installment-status.paid {
  color: #2d7546;
  background: #eaf8ef;
}

.debt-detail,
.debt-payment-form {
  display: grid;
  gap: 14px;
}

.send-production-form,
.dispatch-form {
  display: grid;
  gap: 14px;
}

.send-production-top {
  display: grid;
  grid-template-columns: minmax(190px, 0.8fr) minmax(240px, 1fr) minmax(240px, 1fr);
  gap: 12px;
  align-items: end;
  padding: 12px;
  border: 1px solid rgba(255, 186, 94, 0.72);
  border-radius: var(--radius);
  background: #fff9ef;
}

.send-production-folio,
.send-production-top label,
.send-production-line label {
  min-width: 0;
  display: grid;
  gap: 5px;
  color: #40546a;
  font-size: 12px;
  font-weight: 850;
}

.send-production-folio {
  align-content: center;
  min-height: 42px;
  padding: 0 16px;
}

.send-production-folio span,
.send-production-top label,
.send-production-line label {
  color: #607184;
}

.send-production-folio strong {
  color: #334154;
  font-size: 15px;
}

.send-production-top select,
.send-production-line select,
.send-production-line input,
.send-production-line textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid #cdd7e4;
  border-radius: 6px;
  padding: 0 10px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  font-weight: 760;
}

.send-production-lines {
  display: grid;
  gap: 10px;
}

.send-production-line {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(190px, 1.05fr) minmax(122px, 150px) minmax(128px, 160px) minmax(150px, 180px) minmax(170px, 1fr) minmax(150px, 190px);
  gap: 12px;
  align-items: end;
  padding: 14px;
  border: 1px solid #edf1f5;
  border-radius: var(--radius);
  background: #fbfdff;
}

.send-production-product {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.send-production-product strong,
.send-production-product small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.send-production-product strong {
  color: var(--navy);
}

.send-production-product small {
  color: #607184;
  font-size: 12px;
  font-weight: 820;
}

.send-production-comments textarea {
  resize: vertical;
  min-height: 52px;
  padding: 8px 10px;
  line-height: 1.25;
}

.send-production-file {
  min-height: 40px;
  align-content: end;
  cursor: pointer;
}

.send-production-file span {
  min-height: 40px;
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--teal);
  border-radius: 6px;
  padding: 0 14px;
  color: var(--teal);
  background: linear-gradient(180deg, #ffffff 0%, #f1fbfa 100%);
  box-shadow: 0 8px 18px rgba(13, 153, 154, 0.12);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: border-color 180ms ease, box-shadow 180ms ease, color 180ms ease, transform 180ms ease;
}

.send-production-file span:hover,
.send-production-file:focus-within span {
  border-color: #0b8a8b;
  color: #087f80;
  box-shadow: 0 12px 24px rgba(13, 153, 154, 0.18);
  transform: translateY(-1px);
}

.send-production-file svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  stroke-width: 2.4;
}

.send-production-file b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 850;
}

.send-production-file input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.send-production-submit {
  min-width: min(260px, 100%);
  border-color: #ff4b1f;
  background: #ff4b1f;
  box-shadow: 0 14px 28px rgba(255, 75, 31, 0.22);
}

.production-decision {
  display: grid;
  gap: 14px;
}

.sale-ticket-decision + .production-decision {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.sale-ticket-decision {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  gap: 18px;
  align-items: start;
}

.ticket-choice {
  display: grid;
  gap: 14px;
  align-content: start;
}

.ticket-choice h3 {
  margin: 10px 0 6px;
  color: var(--navy);
  font-size: 22px;
}

.ticket-choice p {
  max-width: 560px;
  color: #52657a;
  line-height: 1.5;
  font-weight: 700;
}

.thermal-ticket-wrap {
  display: flex;
  justify-content: center;
  padding: 14px;
  border: 1px solid #d8dde5;
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.03) 1px, transparent 1px) 0 0 / 8px 8px,
    #f4f5f7;
}

.thermal-ticket {
  width: min(100%, 286px);
  padding: 18px 16px 20px;
  color: #050505;
  border: 1px solid #111;
  background: #fff;
  box-shadow: 0 16px 32px rgba(17, 24, 39, 0.14);
  font-family: "Courier New", monospace;
  font-size: 11px;
}

.thermal-ticket-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 8px;
}

.thermal-ticket-logo img {
  width: 128px;
  max-width: 76%;
  filter: brightness(0);
}

.thermal-ticket h4,
.thermal-ticket p {
  margin: 0;
  text-align: center;
}

.thermal-ticket h4 {
  font-size: 15px;
  letter-spacing: 1px;
}

.thermal-ticket-separator {
  border-top: 1px dashed #000;
  margin: 9px 0;
}

.thermal-ticket-meta,
.thermal-ticket-totals {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 8px;
}

.thermal-ticket-meta span,
.thermal-ticket-totals span,
.thermal-ticket-line small {
  color: #000;
}

.thermal-ticket-meta strong,
.thermal-ticket-totals strong,
.thermal-ticket-line strong {
  color: #000;
  text-align: right;
}

.thermal-ticket-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 8px;
  margin-bottom: 7px;
}

.thermal-ticket-line span,
.thermal-ticket-line small {
  grid-column: 1 / -1;
  min-width: 0;
  overflow-wrap: anywhere;
}

.thermal-ticket-line strong {
  grid-column: 2;
}

.thermal-ticket-note {
  margin-top: 8px;
}

.production-decision h3 {
  margin: 0;
  color: var(--navy);
  font-size: 22px;
}

.production-decision p {
  max-width: 780px;
  color: #52657a;
  line-height: 1.5;
  font-weight: 700;
}

.dispatch-heading {
  display: grid;
  gap: 4px;
}

.dispatch-heading span {
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.dispatch-heading h3 {
  margin: 0;
  color: var(--navy);
  font-size: 22px;
}

.dispatch-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.dispatch-summary div,
.production-detail-summary div {
  min-width: 0;
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdff;
}

.dispatch-summary span,
.production-detail-summary span {
  color: #66768a;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.dispatch-summary strong,
.production-detail-summary strong {
  min-width: 0;
  color: #223044;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dispatch-controls {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(220px, 320px);
  gap: 10px;
  align-items: end;
  padding: 10px;
  border: 1px solid rgba(255, 186, 94, 0.7);
  border-radius: var(--radius);
  background: #fff9ef;
}

.dispatch-controls label,
.dispatch-material label {
  min-width: 0;
  display: grid;
  gap: 5px;
  color: #40546a;
  font-size: 12px;
  font-weight: 850;
}

.dispatch-check,
.dispatch-material-check {
  display: flex !important;
  align-items: center;
  gap: 8px;
}

.dispatch-check input,
.dispatch-material-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--teal);
}

.dispatch-controls select,
.dispatch-material select,
.dispatch-material textarea,
.production-stage select {
  width: 100%;
  min-height: 38px;
  border: 1px solid #cdd7e4;
  border-radius: 6px;
  padding: 0 10px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  font-weight: 750;
}

.dispatch-material select:disabled {
  color: #7c8998;
  background: #f0f3f6;
}

.dispatch-alert {
  padding: 10px 12px;
  border: 1px solid rgba(255, 138, 84, 0.45);
  border-radius: var(--radius);
  color: #8b3d20;
  background: #fff3ec;
  font-weight: 800;
}

.dispatch-materials {
  display: grid;
  gap: 10px;
}

.dispatch-material {
  display: grid;
  grid-template-columns: 94px minmax(180px, 1fr) minmax(170px, 220px) minmax(220px, 1fr);
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--teal);
  border-radius: var(--radius);
  background: #fff;
}

.dispatch-material-info {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.dispatch-material-info strong,
.dispatch-material-info span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dispatch-material-info strong {
  color: var(--navy);
}

.dispatch-material-info span,
.dispatch-material-info small {
  color: #607184;
  font-size: 12px;
  font-weight: 800;
}

.dispatch-material-info small {
  color: var(--magenta);
}

.dispatch-comment textarea {
  resize: vertical;
  min-height: 38px;
  padding: 9px 10px;
}

.production-detail {
  display: grid;
  gap: 16px;
}

.production-detail-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(83, 199, 195, 0.2);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(83, 199, 195, 0.12), rgba(160, 24, 120, 0.06)),
    #fbfdff;
}

.production-detail-tools span {
  color: #607184;
  font-size: 13px;
  font-weight: 850;
}

.production-detail-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.production-detail-block {
  display: grid;
  gap: 10px;
}

.production-detail-block h3 {
  margin: 0;
  color: var(--navy);
  font-size: 16px;
}

.production-material-readonly,
.production-stage-list {
  display: grid;
  gap: 9px;
}

.production-material-readonly article {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.production-material-readonly article div,
.production-stage {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.production-material-readonly strong,
.production-material-readonly span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.production-material-readonly span {
  color: #607184;
  font-size: 12px;
  font-weight: 800;
}

.production-material-readonly b {
  color: var(--teal);
}

.production-stage {
  grid-template-columns: minmax(130px, 1fr) minmax(160px, 220px);
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--teal);
  border-radius: var(--radius);
  background: #fbfdff;
  color: #334154;
  font-weight: 850;
}

.production-stage.production-status-pendiente {
  border-left-color: #334154;
}

.production-stage.production-status-en-proceso {
  border-left-color: var(--teal);
}

.production-stage.production-status-completado {
  border-left-color: #53a76d;
  background: #f4fbf6;
}

.resource-library {
  display: grid;
  gap: 12px;
}

.resource-library-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
}

.resource-library-head h3 {
  margin: 4px 0 0;
  color: var(--navy);
  font-size: 20px;
}

.resource-library-head strong {
  width: max-content;
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--teal);
  background: #eefbf9;
  font-size: 12px;
  font-weight: 900;
}

.resource-upload-form {
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(220px, 1fr) minmax(150px, 190px) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid rgba(83, 199, 195, 0.42);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(220, 247, 244, 0.88), rgba(245, 241, 255, 0.88));
}

.resource-picker-control {
  min-width: 0;
  display: grid;
  grid-template-columns: 46px minmax(134px, auto);
  align-items: center;
  gap: 10px;
}

.resource-picker-preview {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(83, 199, 195, 0.46);
  border-radius: 12px;
  color: var(--teal);
  background: rgba(255, 255, 255, 0.88);
}

.resource-picker-preview svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
}

.resource-picker-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.resource-picker-trigger {
  width: fit-content;
  min-height: 36px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 0 16px;
  color: #fff !important;
  background: linear-gradient(135deg, var(--teal), #7f4fd7);
  box-shadow: 0 10px 20px rgba(83, 199, 195, 0.22);
  font-size: 13px !important;
  font-weight: 900 !important;
  cursor: pointer;
}

.resource-picker-trigger input {
  display: none;
}

.resource-picked-file {
  grid-column: 2;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #40546a;
  font-size: 12px;
  font-weight: 850;
}

.resource-picked-file[hidden] {
  display: none;
}

.resource-picked-file span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resource-picked-file button {
  border: 0;
  padding: 0;
  color: #c94755;
  background: transparent;
  font-size: 12px;
  font-weight: 900;
}

.resource-upload-form label {
  min-width: 0;
  display: grid;
  gap: 6px;
  color: #40546a;
  font-size: 12px;
  font-weight: 850;
}

.resource-upload-form input,
.resource-upload-form textarea,
.resource-upload-form select {
  width: 100%;
  min-height: 40px;
  border: 1px solid #cdd7e4;
  border-radius: 6px;
  padding: 8px 10px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

.resource-upload-form textarea {
  resize: vertical;
  min-height: 40px;
}

.resource-upload-form .primary-action {
  min-height: 40px;
  white-space: nowrap;
}

.resource-upload-form .dispatch-alert {
  grid-column: 1 / -1;
}

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

.resource-card {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) minmax(112px, auto);
  gap: 10px;
  align-items: start;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--prod-border, var(--teal));
  border-radius: var(--radius);
  background: #fff;
}

.resource-preview {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid #dfe7f0;
  border-radius: 8px;
  color: var(--teal);
  background: #f7fbff;
  overflow: hidden;
}

.resource-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.resource-file-icon {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
}

.resource-file-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
}

.resource-info {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.resource-info strong,
.resource-info span,
.resource-info small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.resource-info strong {
  color: var(--navy);
}

.resource-title-row {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.resource-title-row strong {
  min-width: 160px;
  flex: 1 1 220px;
}

.resource-stage-chip {
  --prod-bg: #eef3f8;
  --prod-border: #506174;
  --prod-text: #334154;
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid color-mix(in srgb, var(--prod-border) 48%, #dce2ea);
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--prod-text);
  background: color-mix(in srgb, var(--prod-bg) 82%, #fff);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}

.resource-stage-chip i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--prod-dot, var(--prod-border));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--prod-dot, var(--prod-border)) 15%, transparent);
}

.resource-info span {
  color: #40546a;
  font-size: 13px;
  font-weight: 800;
}

.resource-info small {
  color: #708091;
  font-size: 12px;
  font-weight: 800;
}

.resource-description-edit {
  min-width: 0;
  display: grid;
  gap: 4px;
  color: #607184;
  font-size: 11px;
  font-weight: 900;
}

.resource-description-box {
  position: relative;
  display: block;
}

.resource-description-edit textarea {
  width: 100%;
  min-height: 44px;
  resize: vertical;
  border: 1px solid #d7e0eb;
  border-radius: 7px;
  padding: 7px 76px 7px 9px;
  color: var(--ink);
  background: #fbfdff;
  font: inherit;
  font-size: 12px;
  font-weight: 760;
}

.resource-description-edit.is-locked textarea {
  color: #52657a;
  background: #f4f7fa;
}

.resource-description-box button {
  position: absolute;
  right: 6px;
  bottom: 6px;
  min-height: 24px;
  border: 1px solid rgba(13, 153, 154, 0.42);
  border-radius: 6px;
  padding: 0 8px;
  color: var(--teal);
  background: #fff;
  font-size: 10px;
  font-weight: 900;
}

.resource-description-box button:hover,
.resource-description-box button:focus-visible {
  color: #fff;
  background: var(--teal);
}

.resource-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.resource-virtual-tag {
  border-radius: 999px;
  padding: 6px 9px;
  color: #176d75;
  background: #dcf7f4;
  font-size: 11px;
  font-weight: 900;
}

.resource-fullscreen-viewer {
  min-height: min(74vh, 760px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
}

.resource-fullscreen-viewer > header {
  min-height: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: 0;
}

.resource-fullscreen-viewer > header strong {
  min-width: 0;
  overflow: hidden;
  color: var(--navy);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resource-viewer-stage {
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid #d8e2ee;
  border-radius: var(--radius);
  background: #0d1420;
}

.resource-fullscreen-viewer img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.resource-fullscreen-viewer iframe {
  width: 100%;
  height: 100%;
  min-height: min(74vh, 760px);
  border: 0;
  background: #fff;
}

.resource-viewer-modal {
  width: calc(100vw - 36px);
  max-height: calc(100vh - 36px);
}

.resource-viewer-modal .modal-body {
  padding: 14px;
}

.modal-backdrop {
  position: fixed;
  z-index: 80;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(20, 26, 36, 0.42);
}

.modal {
  width: min(980px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 30px 70px rgba(11, 18, 32, 0.32);
  overflow: hidden;
}

.modal header,
.modal footer {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--line);
}

.modal footer {
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.modal header h2 {
  font-size: 18px;
}

.modal header button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  color: #7c8998;
  background: transparent;
  font-weight: 900;
}

.modal-body {
  min-height: 0;
  padding: 22px;
  overflow: auto;
}

.modal-subtitle {
  margin: 0 0 12px;
  color: #40546a;
  font-size: 15px;
}

.modal:has(.client-form) {
  width: min(1120px, calc(100vw - 56px));
  max-height: calc(100vh - 64px);
}

.modal:has(.branch-form) {
  width: min(760px, calc(100vw - 56px));
}

.modal:has(.client-form) .modal-body {
  padding: 18px 22px 14px;
  overflow: auto;
}

.modal:has(.client-form) header,
.modal:has(.client-form) footer {
  min-height: 56px;
  padding: 12px 22px;
}

.modal:has(.auth-form) {
  width: min(520px, calc(100vw - 48px));
}

.modal:has(.auth-form) header,
.modal:has(.auth-form) footer {
  min-height: 58px;
  padding: 12px 30px;
}

.modal:has(.auth-form) header h2 {
  color: #7890a0;
  font-size: 18px;
  font-weight: 800;
}

.modal:has(.auth-form) .modal-body {
  padding: 26px 30px 34px;
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-form label {
  display: grid;
  gap: 6px;
  color: #40546a;
  font-size: 13px;
  font-weight: 800;
}

.auth-form input {
  min-height: 42px;
  border: 1px solid #cdd7e4;
  border-radius: 6px;
  padding: 0 10px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

.modal:has(.commission-payment-form) {
  width: min(980px, calc(100vw - 48px));
}

.commission-payment-form select {
  min-height: 42px;
  border: 1px solid #cdd7e4;
  border-radius: 6px;
  padding: 0 10px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

.commission-payment-list {
  min-width: 0;
  display: grid;
  gap: 10px;
}

.commission-payment-list .data-table {
  max-height: 300px;
  overflow: auto;
}

.commission-select-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--teal);
}

.commission-required-user {
  min-height: 90px;
  display: grid;
  place-items: center;
  border: 1px dashed #cdd7e4;
  border-radius: var(--radius);
  color: #7c8998;
  font-weight: 800;
  text-align: center;
}

.commission-payment-total {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  padding: 10px 12px;
  border: 1px solid #dce4ee;
  border-radius: var(--radius);
  color: #40546a;
  background: #f8fafc;
  font-weight: 900;
}

.commission-payment-total small {
  color: #7c8998;
  font-size: 12px;
}

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

.commission-detail article {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid #dce4ee;
  border-radius: var(--radius);
  background: #f8fafc;
}

.commission-detail span {
  color: #7c8998;
  font-size: 12px;
  font-weight: 800;
}

.commission-detail strong {
  color: #26364d;
  font-size: 14px;
}

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

.modal:has(.product-form) {
  width: min(1120px, calc(100vw - 56px));
  max-height: calc(100vh - 56px);
}

.modal:has(.product-form) header,
.modal:has(.product-form) footer {
  min-height: 58px;
  padding: 12px 34px;
  background: #fff;
}

.modal:has(.product-form) header h2 {
  color: #7890a0;
  font-size: 18px;
  font-weight: 800;
}

.modal:has(.product-form) .modal-body {
  padding: 0 34px 18px;
  background: #fff;
}

.product-form {
  display: grid;
  gap: 0;
}

.product-tabs {
  display: flex;
  gap: 22px;
  min-height: 46px;
  align-items: end;
  border-bottom: 1px solid #d8dee6;
  color: #7f8d9c;
  font-weight: 800;
}

.product-tabs span {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  border-bottom: 2px solid transparent;
  padding: 0 14px;
}

.product-tabs .is-active {
  color: #ff4b1f;
  border-bottom-color: #ff4b1f;
}

.product-modal-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
  gap: 16px 48px;
  border: 1px solid #d8dee6;
  border-top: 0;
  padding: 22px 30px 30px;
}

.product-modal-section {
  min-width: 0;
  display: grid;
  gap: 12px;
  align-content: start;
}

.product-modal-section h3 {
  margin: 0 0 2px;
  border-bottom: 2px solid #12b9b0;
  padding-bottom: 4px;
  color: #00aaa4;
  font-size: 18px;
  font-weight: 700;
}

.product-form label {
  min-width: 0;
  display: grid;
  gap: 5px;
  color: #40546a;
  font-size: 13px;
  font-weight: 800;
}

.product-form input,
.product-form select {
  min-width: 0;
  min-height: 38px;
  border: 1px solid #cbd4df;
  border-radius: 5px;
  padding: 0 10px;
  color: #25384d;
  background: #fff;
  font: inherit;
}

.product-form select {
  color: #33485f;
}

.product-form .span-2 {
  grid-column: 1 / -1;
}

.field-row.two,
.cost-grid {
  display: grid;
  gap: 12px;
}

.field-row.two {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.cost-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.product-form .money-input {
  min-width: 0;
  min-height: 38px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid #cbd4df;
  border-radius: 5px;
  background: #fff;
}

.product-form .money-input > span {
  display: grid;
  place-items: center;
  color: #40546a;
  background: #f7f9fb;
  border-right: 1px solid #d9e0e8;
  font-weight: 800;
}

.product-form .money-input input {
  min-height: 36px;
  border: 0;
  border-radius: 0;
  text-align: right;
}

.product-form .money-input.compact {
  width: min(210px, 100%);
}

.product-form .money-input.has-action {
  grid-template-columns: 36px minmax(0, 1fr) 34px;
}

.product-form .money-input.has-action input {
  cursor: pointer;
}

.money-edit-button {
  min-width: 0;
  min-height: 36px;
  display: grid;
  place-items: center;
  border: 0;
  border-left: 1px solid #d9e0e8;
  color: #40546a;
  background: #f7f9fb;
}

.money-edit-button:hover {
  color: #0d999a;
  background: #eefbf9;
}

.money-edit-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.product-total-cost {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  border: 1px solid #cbd4df;
  border-radius: 5px;
  padding: 0 10px;
  color: #40546a;
  background: #f7f9fb;
  font-weight: 800;
}

.product-total-cost strong {
  color: #25384d;
}

.location-field {
  width: min(240px, 100%);
}

.empty-price-box {
  min-height: 74px;
  display: grid;
  place-items: center;
  gap: 8px;
  border: 1px solid #dde2e8;
  background: #fff;
  color: #8a8f96;
  text-align: center;
  font-weight: 700;
}

.empty-price-box p {
  margin: 0;
}

.price-link {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-bottom: 2px solid #ff4b1f;
  color: #ff4b1f;
  background: transparent;
  font-weight: 800;
}

.price-link svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
}

.price-scale-summary {
  display: grid;
  gap: 8px;
}

.price-scale-head,
.price-scale-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) 112px 112px;
  align-items: center;
  gap: 0;
}

.price-scale-head {
  color: #40546a;
  font-size: 14px;
  font-weight: 900;
}

.price-scale-head span + span,
.price-scale-row span + span {
  border-left: 1px solid #d9dee6;
  text-align: right;
}

.price-scale-row {
  min-height: 24px;
  border: 1px solid #d9dee6;
  border-radius: 999px;
  overflow: hidden;
  color: #40546a;
  background: #fffdee;
  font-weight: 700;
}

.price-scale-row span {
  min-width: 0;
  padding: 2px 12px;
  overflow-wrap: anywhere;
}

.price-scale-edit {
  justify-self: center;
  margin-top: 8px;
}

.price-scale-backdrop {
  position: fixed;
  z-index: 130;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(20, 26, 36, 0.38);
}

.price-scale-modal {
  width: min(820px, calc(100vw - 48px));
  max-height: min(720px, calc(100vh - 48px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  border: 1px solid #d4dce6;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 28px 70px rgba(11, 18, 32, 0.3);
}

.price-scale-modal header,
.price-scale-modal footer {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 34px;
  border-bottom: 1px solid #dde3ea;
  background: #fff;
}

.price-scale-modal footer {
  justify-content: flex-end;
  border-top: 1px solid #dde3ea;
  border-bottom: 0;
}

.price-scale-modal h2 {
  margin: 0;
  color: #7890a0;
  font-size: 18px;
  font-weight: 800;
}

.price-scale-modal header button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  color: #7890a0;
  background: transparent;
  font-weight: 900;
}

.price-scale-form {
  min-height: 0;
  display: grid;
  gap: 18px;
  padding: 16px 34px 28px;
  overflow: auto;
}

.price-scale-note {
  border: 1px solid #ffd38d;
  border-radius: 5px;
  padding: 14px 12px;
  color: #40546a;
  background: #fffaf0;
  font-weight: 700;
  line-height: 1.45;
}

.price-scale-audience {
  margin: -4px 0 0;
  color: #00aaa4;
  font-weight: 900;
}

.price-scale-form-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(190px, 1fr) minmax(170px, 1fr);
  gap: 18px;
  align-items: end;
}

.price-scale-form-row label {
  min-width: 0;
  color: #40546a;
  font-weight: 800;
}

.price-scale-form-row input[type="number"] {
  width: 100%;
  min-height: 42px;
  margin-top: 4px;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  padding: 0 12px;
  text-align: right;
  color: #223044;
  background: #fff;
}

.price-scale-form-row input:disabled {
  color: #8c99aa;
  background: #eef2f5;
}

.price-scale-form-row .check-inline {
  align-self: end;
  min-height: 42px;
}

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

.product-form .check-inline {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #40546a;
}

.product-form .check-inline input[type="checkbox"] {
  width: 20px;
  height: 20px;
  min-height: 0;
  flex: 0 0 auto;
  accent-color: #00aaa4;
}

.print-count {
  grid-template-columns: auto 1fr auto;
}

.product-form .small-number {
  width: 84px;
  min-height: 38px;
  margin-left: auto;
  text-align: right;
  background: #f7f9fb;
}

.special-price-box {
  min-height: 62px;
  display: grid;
  place-items: center;
  border: 2px dashed #d8d8d8;
  color: #8a8f96;
  background: #fff;
  font-weight: 800;
}

.special-edit {
  justify-self: end;
  min-width: 128px;
}

.product-flow-warning,
.modal:has(.product-form) #productFlowWarning,
.modal:has(.product-form) #productCostWarning,
.modal:has(.product-form) #supplyAssignPanel {
  margin-top: 12px;
}

.assign-modal-backdrop {
  position: fixed;
  z-index: 120;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(20, 26, 36, 0.38);
}

.assign-modal {
  width: min(880px, calc(100vw - 48px));
  max-height: min(720px, calc(100vh - 48px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  border: 1px solid #d4dce6;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 28px 70px rgba(11, 18, 32, 0.3);
}

.assign-modal header,
.assign-modal footer {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 34px;
  border-bottom: 1px solid #dde3ea;
  background: #fff;
}

.assign-modal footer {
  justify-content: flex-end;
  border-top: 1px solid #dde3ea;
  border-bottom: 0;
}

.assign-modal h2 {
  margin: 0;
  color: #7890a0;
  font-size: 18px;
  font-weight: 800;
}

.assign-modal header button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  color: #7890a0;
  background: transparent;
  font-weight: 900;
}

.assign-modal-body {
  min-height: 0;
  display: grid;
  gap: 12px;
  padding: 16px 34px 24px;
  overflow: auto;
}

.assign-entry {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 180px 150px;
  gap: 10px;
  align-items: end;
  border: 1px solid #ffd38d;
  border-radius: 5px;
  padding: 18px 12px;
  background: #fff9ef;
}

.assign-entry label {
  display: grid;
  gap: 6px;
  color: #40546a;
  font-size: 13px;
  font-weight: 800;
}

.assign-entry input,
.assign-entry select {
  min-width: 0;
  min-height: 40px;
  border: 1px solid #cbd4df;
  border-radius: 5px;
  padding: 0 10px;
  color: #25384d;
  background: #fff;
  font: inherit;
}

.assign-table {
  min-height: 360px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  border: 1px solid #d8dee6;
  background: #fff;
}

.assign-head,
.assign-row {
  display: grid;
  grid-template-columns: 110px minmax(220px, 1fr) 180px 180px 64px;
}

.assign-head {
  min-height: 48px;
  align-items: center;
  border-bottom: 3px solid #00aeda;
  color: #2f3540;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.assign-head span,
.assign-row span {
  min-width: 0;
  display: flex;
  align-items: center;
  border-right: 1px solid #edf1f5;
  padding: 0 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assign-row {
  min-height: 58px;
  color: #40546a;
  font-size: 13px;
  font-weight: 700;
  border-bottom: 1px solid #edf1f5;
}

.assign-row span:nth-child(3),
.assign-row span:nth-child(4) {
  justify-content: flex-end;
}

.assign-row input {
  width: 72px;
  min-height: 32px;
  border: 1px solid #cbd4df;
  border-radius: 5px;
  padding: 0 8px;
  color: #25384d;
}

.assign-remove {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  color: #747b84;
  background: transparent;
}

.assign-remove svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.6;
}

.assign-empty {
  min-height: 190px;
  display: grid;
  place-items: center;
  color: #8a98aa;
  font-weight: 800;
}

.assign-total {
  min-height: 58px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 64px;
  align-items: center;
  border-top: 1px solid #edf1f5;
  color: #40546a;
  font-size: 14px;
  font-weight: 900;
}

.assign-total strong {
  justify-self: end;
  padding-right: 14px;
}

.unit-cost-modal-backdrop {
  position: fixed;
  z-index: 120;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(20, 26, 36, 0.38);
}

.unit-cost-modal {
  width: min(900px, calc(100vw - 48px));
  max-height: min(700px, calc(100vh - 48px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  border: 1px solid #d4dce6;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 28px 70px rgba(11, 18, 32, 0.3);
}

.unit-cost-modal header,
.unit-cost-modal footer {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 34px;
  border-bottom: 1px solid #dde3ea;
  background: #fff;
}

.unit-cost-modal footer {
  justify-content: flex-end;
  border-top: 1px solid #dde3ea;
  border-bottom: 0;
}

.unit-cost-modal h2,
.cost-form-modal h2 {
  margin: 0;
  color: #7890a0;
  font-size: 18px;
  font-weight: 800;
}

.unit-cost-modal header button,
.cost-form-modal header button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  color: #7890a0;
  background: transparent;
  font-weight: 900;
}

.unit-cost-body {
  min-height: 0;
  display: grid;
  gap: 12px;
  padding: 16px 34px 24px;
  overflow: auto;
}

.unit-cost-add {
  width: 150px;
}

.unit-cost-table {
  min-height: 340px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  border: 1px solid #d8dee6;
  background: #fff;
}

.unit-cost-head,
.unit-cost-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 220px 96px;
}

.unit-cost-head {
  min-height: 48px;
  align-items: center;
  border-bottom: 3px solid #00aeda;
  color: #2f3540;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.unit-cost-head span,
.unit-cost-row span {
  min-width: 0;
  display: flex;
  align-items: center;
  border-right: 1px solid #edf1f5;
  padding: 0 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.unit-cost-row {
  min-height: 58px;
  color: #40546a;
  font-size: 13px;
  font-weight: 700;
  border-bottom: 1px solid #edf1f5;
}

.unit-cost-row span:nth-child(2) {
  justify-content: flex-end;
}

.unit-cost-row .row-actions {
  justify-content: center;
  gap: 4px;
}

.unit-cost-empty {
  min-height: 190px;
  display: grid;
  place-items: center;
  color: #8a98aa;
  font-weight: 800;
}

.unit-cost-total {
  min-height: 58px;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 220px 96px;
  align-items: center;
  border-top: 1px solid #edf1f5;
  color: #40546a;
  font-size: 14px;
  font-weight: 900;
}

.unit-cost-total span:first-child {
  justify-self: end;
  padding-right: 14px;
}

.unit-cost-total strong {
  justify-self: end;
  padding-right: 14px;
}

.cost-form-backdrop {
  position: fixed;
  z-index: 140;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(20, 26, 36, 0.34);
}

.cost-form-modal {
  width: min(620px, calc(100vw - 48px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  border: 1px solid #d4dce6;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 28px 70px rgba(11, 18, 32, 0.3);
}

.cost-form-modal header,
.cost-form-modal footer {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 34px;
  border-bottom: 1px solid #dde3ea;
  background: #fff;
}

.cost-form-modal footer {
  justify-content: flex-end;
  border-top: 1px solid #dde3ea;
  border-bottom: 0;
}

.cost-form {
  display: grid;
  gap: 16px;
  padding: 24px 34px 34px;
}

.cost-form label {
  display: grid;
  gap: 6px;
  color: #40546a;
  font-size: 13px;
  font-weight: 800;
}

.cost-form input {
  min-height: 40px;
  border: 1px solid #cbd4df;
  border-radius: 5px;
  padding: 0 10px;
  color: #25384d;
  background: #fff;
  font: inherit;
}

.cost-form input[name="value"] {
  width: min(180px, 100%);
  text-align: right;
}

.user-form {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.branch-form .span-2 {
  grid-column: 1 / -1;
}

.permission-wrapper {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
  margin-top: 2px;
}

.permission-section {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: linear-gradient(135deg, rgba(83, 199, 195, 0.08), rgba(236, 111, 174, 0.07));
}

.permission-section h3 {
  margin: 0;
  color: #17263a;
  font-size: 14px;
}

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

.permission-check {
  min-height: 42px;
  align-items: flex-start;
  border: 1px solid rgba(205, 215, 228, 0.78);
  border-radius: 6px;
  padding: 10px 12px;
  color: #26384d;
  background: rgba(255, 255, 255, 0.82);
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.permission-check input {
  flex: 0 0 auto;
  margin-top: 1px;
}

.profile-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.client-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 16px 14px;
}

.client-form .form-tabs {
  grid-column: 1 / -1;
  display: flex;
  gap: 22px;
  min-height: 30px;
  align-items: end;
  color: #6d7c8d;
  font-weight: 800;
}

.client-form .form-tabs span {
  height: 30px;
  display: inline-flex;
  align-items: center;
  border-bottom: 2px solid transparent;
}

.client-form .form-tabs .is-active {
  color: #ff4b1f;
  border-bottom-color: #ff4b1f;
}

.client-form .span-2 {
  grid-column: span 2;
}

.form-grid label,
.client-form label,
.purchase-form label,
.expense-form label,
.inline-form label {
  display: grid;
  gap: 6px;
  color: #40546a;
  font-size: 13px;
  font-weight: 800;
}

.form-grid input,
.form-grid select,
.form-grid textarea,
.client-form input,
.client-form select,
.purchase-form input,
.purchase-form select,
.expense-form input,
.expense-form select,
.inline-form input,
.inline-form select {
  min-height: 40px;
  border: 1px solid #cdd7e4;
  border-radius: 6px;
  padding: 0 10px;
  color: var(--ink);
  background: #fff;
}

.form-grid textarea {
  min-height: 94px;
  padding: 10px;
  resize: vertical;
}

.client-form input,
.client-form select {
  min-height: 34px;
}

.check-inline {
  min-height: 40px;
  display: flex !important;
  align-items: center;
  flex-direction: row;
  gap: 10px !important;
}

.check-inline input {
  width: 18px;
  height: 18px;
  min-height: 0;
  accent-color: var(--teal);
}

.branch-image-field {
  gap: 8px;
}

.branch-image-drop {
  min-height: 74px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 8px 12px;
  align-items: center;
  border: 1px dashed #b8c7d8;
  border-radius: var(--radius);
  padding: 12px;
  background: linear-gradient(135deg, rgba(83, 199, 195, 0.08), rgba(236, 111, 174, 0.06));
}

.branch-image-drop .icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #0d999a;
  background: #fff;
  border: 1px solid var(--line);
}

.branch-image-drop input {
  min-width: 0;
  border: 0;
  padding: 0;
  background: transparent;
}

.branch-image-drop small {
  grid-column: 2;
  color: #718196;
  font-weight: 700;
}

.branch-price-source select:disabled {
  color: #8c99aa;
  background: #f3f6fa;
}

.confirm-text {
  margin: 4px 0 2px;
  color: #26384d;
  font-size: 15px;
  font-weight: 800;
}

.inline-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 160px auto;
  gap: 12px;
  align-items: end;
  padding: 14px;
  border: 1px solid rgba(255, 186, 94, 0.7);
  border-radius: var(--radius);
  background: #fff9ef;
}

.inline-submit {
  align-self: end;
  min-height: 40px;
}

.mini-summary {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px dashed #cdd7e4;
  border-radius: var(--radius);
  color: #65758a;
  background: #f8fafc;
  font-weight: 700;
}

.inventory-warning,
.price-warning {
  border-style: solid;
  color: #7a4a08;
  background: #fff8e8;
}

.recipe-summary {
  display: grid;
  gap: 8px;
}

.recipe-line {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 110px 110px 36px;
  gap: 8px;
  align-items: center;
}

.recipe-line span,
.recipe-line strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.recipe-line input {
  min-height: 34px;
}

.suggestions {
  position: absolute;
  z-index: 20;
  top: calc(100% - 1px);
  left: 0;
  right: 0;
  border: 1px solid #dce2ea;
  border-radius: 0 0 6px 6px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(26, 38, 58, 0.12);
  overflow: hidden;
}

.suggestions:empty {
  display: none;
}

.suggestions button,
.suggestions span {
  width: 100%;
  min-height: 36px;
  display: flex;
  align-items: center;
  border: 0;
  padding: 0 12px;
  color: #40546a;
  background: #fff;
  text-align: left;
  font-weight: 700;
}

.suggestions button:hover {
  color: var(--teal);
  background: #eefbf9;
}

.product-name {
  position: relative;
}

.product-name small {
  position: absolute;
  top: 1px;
  right: 4px;
  color: #c05f47;
  font-size: 11px;
  font-weight: 800;
}

.client-field {
  position: relative;
}

.toast {
  position: fixed;
  z-index: 100;
  right: 24px;
  bottom: 24px;
  max-width: min(420px, calc(100vw - 48px));
  padding: 13px 16px;
  border-radius: var(--radius);
  color: #fff;
  background: #18243a;
  box-shadow: 0 18px 40px rgba(11, 18, 32, 0.22);
  font-weight: 800;
}

:root.theme-dark {
  --navy: #101a31;
  --indigo: #574dc7;
  --violet: #8e2d9a;
  --magenta: #d64dab;
  --cyan: #62e0dc;
  --teal: #33cbc5;
  --mint: #123935;
  --orange: #ff8b61;
  --green: #78d48a;
  --ink: #e7eef8;
  --muted: #9aabc0;
  --line: #2a3950;
  --surface: #121b2d;
  --canvas: #08111f;
  --shadow: 0 20px 44px rgba(0, 0, 0, 0.34);
}

html.theme-dark,
body.theme-dark {
  background: var(--canvas);
}

body.theme-dark {
  color: var(--ink);
}

body.theme-dark .app-shell {
  background:
    radial-gradient(circle at 18% 12%, rgba(83, 199, 195, 0.12), transparent 30%),
    linear-gradient(90deg, rgba(83, 199, 195, 0.06), transparent 34%),
    var(--canvas);
}

body.theme-dark .sidebar {
  color: rgba(235, 244, 255, 0.9);
  background:
    linear-gradient(180deg, rgba(10, 18, 36, 0.99) 0%, rgba(29, 34, 88, 0.99) 43%, rgba(87, 26, 96, 0.98) 73%, rgba(108, 0, 100, 0.98) 100%),
    #0b1326;
  box-shadow: 10px 0 34px rgba(0, 0, 0, 0.42);
}

body.theme-dark .nav-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

body.theme-dark .nav-item.is-active {
  background: linear-gradient(90deg, rgba(98, 224, 220, 0.24), rgba(255, 255, 255, 0.07));
}

body.theme-dark .topbar {
  border-bottom-color: var(--line);
  background: rgba(12, 20, 35, 0.9);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.18);
}

body.theme-dark .eyebrow,
body.theme-dark .section-heading p,
body.theme-dark .module-card p,
body.theme-dark .dashboard-card small,
body.theme-dark .dashboard-empty,
body.theme-dark .table-footer,
body.theme-dark .data-empty,
body.theme-dark .empty-state,
body.theme-dark .debt-card-main small,
body.theme-dark .sale-credit-summary small,
body.theme-dark .sale-credit-installments span,
body.theme-dark .credit-summary-grid span,
body.theme-dark .debt-card-title small,
body.theme-dark .debt-card-total b,
body.theme-dark .debt-card-next b,
body.theme-dark .debt-metrics b,
body.theme-dark .debt-installment span {
  color: var(--muted);
}

body.theme-dark :is(.ghost-button, .profile-button, .icon-button) {
  border-color: var(--line);
  color: var(--ink);
  background: rgba(18, 27, 45, 0.72);
}

body.theme-dark :is(.ghost-button, .profile-button, .icon-button):hover {
  border-color: rgba(98, 224, 220, 0.48);
  background: rgba(26, 38, 61, 0.96);
}

body.theme-dark .ghost-button {
  color: #d5e0ef;
}

body.theme-dark .theme-toggle {
  color: #aeecea;
}

body.theme-dark :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea),
body.theme-dark :is(.input-shell, .money-input, .money-field, .delivery-input, .check-pill, .square-action, .add-client-button, .sale-control-row button) {
  border-color: #34465e;
  color: var(--ink);
  background: #0f192a;
}

body.theme-dark :is(input:not([type="checkbox"]):not([type="radio"]), textarea)::placeholder {
  color: #718299;
}

body.theme-dark :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea):focus,
body.theme-dark :is(.input-shell.editable-lock:hover, .square-action:hover, .add-client-button:hover) {
  border-color: rgba(98, 224, 220, 0.7);
  box-shadow: 0 0 0 3px rgba(98, 224, 220, 0.12);
}

body.theme-dark :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea):disabled,
body.theme-dark :is(.input-shell.is-locked, .product-form .money-input, .delivery-input:disabled, .check-pill.is-muted, .outline-action.is-disabled) {
  color: #748398;
  border-color: #2f3e54;
  background: #172235;
}

body.theme-dark :is(.date-filter, .branch-select, .metric-card, .dashboard-card, .module-card, .chart-panel, .sale-panel, .products-table, .data-table, .debt-card, .credit-summary-grid article, .debt-metrics span, .debt-installment, .commission-detail article, .production-empty, .resource-card, .production-order-card, .production-item-card, .production-detail-block, .production-upload-card, .production-indications-panel, .production-ticket-preview-pane, .production-date-summary, .dispatch-summary, .ticket-choice, .mini-summary, .recipe-summary, .report-help, .empty-price-box, .special-price-box) {
  border-color: var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}

body.theme-dark :is(.client-band, .product-band, .quote-filters, .cash-filters, .history-filters, .report-toolbar, .production-filters, .send-production-top, .inline-form) {
  border-color: rgba(255, 186, 94, 0.42);
  background: linear-gradient(180deg, rgba(255, 186, 94, 0.1), rgba(255, 139, 97, 0.055));
}

body.theme-dark :is(.cash-summary-grid article, .expense-report-summary article) {
  border-color: var(--line);
  border-left-color: var(--accent, var(--teal));
  color: var(--ink);
  background: var(--surface);
  box-shadow: var(--shadow);
}

body.theme-dark :is(.cash-summary-grid strong, .expense-report-summary strong) {
  color: var(--ink);
}

body.theme-dark :is(.segment-tabs button, .production-filters input, .production-filters select, .production-status-select) {
  border-color: #34465e;
  color: var(--ink);
  background: #0f192a;
}

body.theme-dark .segment-tabs button.is-active {
  border-color: rgba(98, 224, 220, 0.7);
  color: #67e4df;
  background: rgba(98, 224, 220, 0.12);
}

body.theme-dark :is(.totals-card > div, .sale-notes) {
  color: #c9d5e5;
}

body.theme-dark .totals-card > div > strong {
  border-color: #cbd6e4;
  color: #223044;
  background: #f4f7fb;
  box-shadow: none;
}

body.theme-dark :is(.payment-summary, .sale-credit-summary, .payment-method-row, .payment-method-row:not(.cash-payment-row), .send-production-line, .resource-upload-form, .resource-picker-control, .resource-description-box, .production-general-indications, .production-process-indication, .dispatch-material, .dispatch-alert) {
  border-color: rgba(98, 224, 220, 0.2);
  background:
    linear-gradient(90deg, rgba(98, 224, 220, 0.08), rgba(214, 77, 171, 0.055)),
    #111b2d;
}

body.theme-dark :is(.outline-action, .outline-action.compact, .add-product, .quote-pay-action, .send-production-file span) {
  border-color: rgba(51, 203, 197, 0.78);
  color: #67e4df;
  background: #101b2d;
  box-shadow: none;
}

body.theme-dark :is(.outline-action, .outline-action.compact, .add-product, .quote-pay-action, .send-production-file span):hover {
  color: #06131f;
  background: #67e4df;
  box-shadow: 0 14px 28px rgba(51, 203, 197, 0.18);
}

body.theme-dark :is(.primary-action, .pay-button, .credit-button, .quote-button) {
  box-shadow: 0 14px 30px rgba(255, 75, 31, 0.2);
}

body.theme-dark :is(.field, .delivery-group, .check-line, .payment-form label, .payment-summary label, .credit-controls label, .credit-control-field, .debt-payment-form label, .send-production-folio, .send-production-top label, .send-production-line label, .product-form label, .form-grid label, .purchase-form label, .expense-form label, .client-form label, .branch-form label, .commission-payment-form label, .auth-form label) {
  color: #c9d5e5;
}

body.theme-dark .permission-section {
  border-color: rgba(98, 224, 220, 0.22);
  background:
    linear-gradient(135deg, rgba(98, 224, 220, 0.08), rgba(214, 77, 171, 0.08)),
    #101b2d;
}

body.theme-dark .permission-section h3 {
  color: #d9e6f5;
}

body.theme-dark .permission-check {
  border-color: #34465e;
  color: #dce7f5;
  background: #172235;
}

body.theme-dark .permission-check:hover {
  border-color: rgba(98, 224, 220, 0.55);
  background: #1a2a42;
}

body.theme-dark .credit-period-control {
  border-color: #34465e;
  background: #0f192a;
}

body.theme-dark .credit-period-control button {
  color: #67e4df;
  background: #132033;
}

body.theme-dark .credit-period-control button:first-child {
  border-right-color: #34465e;
}

body.theme-dark .credit-period-control button:last-child {
  border-left-color: #34465e;
}

body.theme-dark :is(.date-filter select, .date-filter time, .date-filter input, .branch-select select, .catalog-filter select, .segment-tabs button, .sale-control-row select, .sale-control-row button, .field input, .field textarea, .input-shell input, .delivery-input, .table-head span, .data-head, .data-row, .sale-line, .dashboard-card p, .dashboard-card strong, .module-card h3, .debt-card-main strong, .debt-card-title strong, .debt-card-total, .debt-card-next, .debt-metrics span, .debt-installment b, .debt-installment strong, .sale-credit-summary strong, .credit-summary-grid strong, .send-production-product strong, .commission-detail strong, .product-form input, .product-form select, .product-form .money-input > span, .money-field > span) {
  color: var(--ink);
}

body.theme-dark :is(.table-head, .data-head) {
  border-bottom-color: #0dbed0;
  background: #101b2d;
  color: #d6e2f1;
}

body.theme-dark :is(.sale-line, .data-row, .dashboard-list div) {
  border-color: var(--line);
}

body.theme-dark :is(.quote-row:hover, .row-hover:hover) {
  background: rgba(98, 224, 220, 0.1);
}

body.theme-dark .quote-row {
  background: var(--surface);
}

body.theme-dark :is(#quotesTable, #quoteSearchResults) .data-head span:last-child {
  background: #101b2d;
}

body.theme-dark .commission-row.is-paid {
  color: #8fa1b7;
  background: #111b2c;
}

body.theme-dark :is(.dashboard-card-icon, .dashboard-card-title span, .module-icon, .payment-method-icon) {
  color: #67e4df;
  background: rgba(98, 224, 220, 0.12);
}

body.theme-dark .module-status {
  color: color-mix(in srgb, var(--accent) 74%, #ffffff);
  background: color-mix(in srgb, var(--accent) 18%, #121b2d);
}

body.theme-dark :is(.modal, .assign-modal, .unit-cost-modal, .cost-form-modal, .price-scale-modal) {
  color: var(--ink);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.52);
}

body.theme-dark .modal-backdrop {
  background: rgba(2, 6, 14, 0.72);
}

body.theme-dark :is(.modal header, .modal footer, .modal-body, .assign-modal header, .assign-modal footer, .assign-modal-body, .unit-cost-modal header, .unit-cost-modal footer, .unit-cost-body, .cost-form-modal header, .cost-form-modal footer, .cost-form, .price-scale-modal header, .price-scale-modal footer, .price-scale-form, .modal:has(.product-form) header, .modal:has(.product-form) footer, .modal:has(.product-form) .modal-body) {
  border-color: var(--line);
  color: var(--ink);
  background: var(--surface);
}

body.theme-dark :is(.modal:has(.admiprint-payment) header, .modal:has(.credit-form) header, .modal:has(.debt-detail) header, .modal:has(.debt-payment-form) header, .modal:has(.dispatch-form) header, .modal:has(.send-production-form) header, .modal:has(.sale-ticket-decision) header, .modal:has(.production-decision) header, .modal:has(.production-detail) header) {
  background:
    linear-gradient(90deg, rgba(98, 224, 220, 0.12), rgba(214, 77, 171, 0.08)),
    var(--surface);
}

body.theme-dark :is(.modal header h2, .modal:has(.product-form) header h2, .modal:has(.admiprint-payment) header h2, .modal:has(.credit-form) header h2, .modal:has(.debt-detail) header h2, .modal:has(.debt-payment-form) header h2) {
  color: var(--ink);
}

body.theme-dark :is(.product-tabs, .product-modal-grid, .price-scale-head, .price-scale-row, .assign-head, .assign-row, .unit-cost-head, .unit-cost-row, .unit-cost-total, .production-history-head, .production-history-row, .production-ticket-product, .thermal-ticket-line, .resource-list, .resource-library-head) {
  border-color: var(--line);
}

body.theme-dark :is(.product-form .money-input > span, .money-field > span, .money-edit-button) {
  border-color: #34465e;
  background: #172235;
}

body.theme-dark .money-edit-button:hover {
  color: #67e4df;
  background: rgba(98, 224, 220, 0.12);
}

body.theme-dark :is(.suggestions, .action-menu, .production-status-menu, .production-user-menu) {
  border-color: var(--line);
  background: #0c1524;
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.48);
}

body.theme-dark :is(.suggestions button, .suggestions span, .production-status-option, .production-user-option, .action-menu button) {
  color: #d7e1ef;
  background: transparent;
}

body.theme-dark :is(.suggestions button, .production-status-option, .production-user-option, .action-menu button):hover {
  color: #67e4df;
  background: rgba(98, 224, 220, 0.12);
}

body.theme-dark :is(.icon-only, .sale-line button, .dashboard-arrow, .sale-add-tab, .sale-tab-close) {
  color: #8fa1b7;
}

body.theme-dark :is(.icon-only:hover, .sale-line button:hover, .sale-add-tab:hover) {
  color: #67e4df;
}

body.theme-dark :is(.credit-alert, .inventory-warning, .product-flow-warning, .price-warning) {
  color: #ffbbb2;
  border-color: rgba(239, 107, 107, 0.42);
  background: rgba(239, 107, 107, 0.12);
}

body.theme-dark .installment-status {
  color: #ffd39d;
  background: rgba(255, 139, 97, 0.15);
}

body.theme-dark .installment-status.paid,
body.theme-dark .commission-status.is-paid {
  color: #a8f0ba;
  background: rgba(120, 212, 138, 0.14);
}

body.theme-dark .commission-status.is-pending {
  color: #ffd39d;
  background: rgba(255, 139, 97, 0.15);
}

body.theme-dark :is(.amount-positive, .quote-status-dot) {
  color: #78d48a;
}

body.theme-dark .amount-negative {
  color: #ff8b83;
}

body.theme-dark :is(.chart-points circle, .chart-series circle) {
  stroke: #09111e;
}

body.theme-dark .toast {
  color: #eaf6ff;
  background: #0f192a;
  border: 1px solid var(--line);
}

body.theme-dark :is(.cash-closing-shell, .cash-closing-cards, .cash-closing-card, .cash-confirmed-panel, .cash-closing-detail-table, .cash-reconcile-main span, .cash-reconcile-main strong, .cash-denomination-grid input, .cash-observations textarea) {
  color: var(--ink);
  border-color: var(--line);
  background: var(--surface);
}

body.theme-dark :is(.cash-count-panel h4, .cash-reconcile-panel h4, .cash-connected-detail h4, .cash-confirmed-panel h4, .cash-reconcile-main strong, .cash-reconcile-breakdown strong, .cash-closing-preview h3) {
  color: var(--ink);
}

body.theme-dark :is(.cash-count-panel p, .cash-connected-detail p, .cash-closing-muted, .cash-closing-preview p, .cash-reconcile-breakdown span, .cash-denomination-grid label, .cash-observations) {
  color: var(--muted);
}

body.theme-dark .cash-closing-shell {
  background: #0b1423;
}

body.theme-dark .cash-closing-cards {
  background: #0f192a;
}

body.theme-dark :is(.cash-closing-detail-row, .cash-confirmed-row) {
  color: #d7e1ef;
  border-color: var(--line);
}

@media (max-width: 1180px) {
  .module-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .chart-options {
    gap: 10px 18px;
  }
}

@media (max-width: 1420px) {
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workspace.is-sales .content-frame {
    overflow: auto;
  }

  .sale-panel {
    min-height: 0;
  }

  .client-band {
    grid-template-columns: minmax(180px, 1fr) 46px;
  }

  .delivery-group {
    grid-column: 1 / -1;
    grid-template-columns: auto minmax(128px, 1fr) minmax(108px, 1fr) minmax(126px, 1fr) minmax(108px, 0.8fr);
  }

  .product-band {
    grid-template-columns: minmax(190px, 1.6fr) repeat(4, minmax(96px, 1fr));
  }

  .add-product {
    grid-column: 5;
    grid-row: 2;
    min-height: 34px;
  }

  .sale-bottom-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(180px, auto) auto auto;
  }

  .totals-card {
    grid-column: 1;
    grid-row: auto;
    justify-self: end;
    width: min(320px, 100%);
  }
}

@media (max-width: 1280px) {
  .app-shell {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .topbar,
  .content-frame {
    padding-left: 28px;
    padding-right: 28px;
  }

  body.sales-mode .app-shell,
  .workspace.is-sales,
  .workspace.is-sales .content-frame {
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .workspace.is-sales .content-frame {
    padding-bottom: 28px;
  }

  .sales-view {
    height: auto;
    min-height: calc(100vh - 142px);
    grid-template-rows: auto minmax(0, 1fr);
  }

  .sales-actions {
    align-items: stretch;
    gap: 12px;
  }

  .sale-tools .outline-action {
    flex: 1 1 210px;
  }

  .sale-panel {
    min-height: 0;
  }

  .client-band {
    grid-template-columns: minmax(180px, 1fr) 46px;
  }

  .delivery-group {
    grid-column: 1 / -1;
    grid-template-columns: auto minmax(128px, 1fr) minmax(108px, 1fr) minmax(126px, 1fr) minmax(108px, 0.8fr);
  }

  .product-band {
    grid-template-columns: minmax(190px, 1.6fr) repeat(4, minmax(96px, 1fr));
  }

  .add-product {
    grid-column: 5;
    grid-row: 2;
    min-height: 34px;
  }

  .sale-bottom-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(180px, auto) auto auto;
  }

  .products-table {
    overflow-x: auto;
  }

  .totals-card {
    grid-column: 1;
    grid-row: auto;
    justify-self: end;
    width: min(320px, 100%);
  }

  .sale-notes {
    grid-row: auto;
  }

  .quote-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .production-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .production-item-card {
    grid-template-columns: 38px 72px minmax(240px, 1fr) minmax(130px, 0.8fr) minmax(190px, 230px) 188px;
  }

  .production-user-pill,
  .production-user-stack,
  .production-user-control,
  .production-status-control,
  .production-item-actions {
    grid-column: auto;
  }

  .production-item-actions {
    grid-column: 1 / -1;
  }

  .production-item-actions {
    justify-content: flex-start;
  }

  .production-product-progress {
    grid-column: 1 / -1;
  }

  .send-production-line {
    grid-template-columns: minmax(220px, 1fr) repeat(2, minmax(140px, 0.6fr));
  }

  .production-order-card {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .production-order-actions {
    justify-content: flex-start;
  }

  .cash-filters,
  .history-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .report-range-toolbar,
  .inventory-report-toolbar {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .report-range-toolbar button,
  .inventory-report-toolbar button {
    min-height: 40px;
  }

  .quote-filter-search {
    width: 100%;
  }

  .modal:has(.quote-filters),
  .modal:has(.admiprint-payment),
  .modal:has(.credit-form),
  .modal:has(.debt-detail),
  .modal:has(.debt-payment-form),
    .modal:has(.dispatch-form),
    .modal:has(.send-production-form),
    .modal:has(.production-date-form),
    .modal:has(.production-history),
    .modal:has(.production-indications),
    .modal:has(.production-ticket-preview),
    .modal:has(.sale-ticket-decision),
    .modal:has(.production-decision),
    .modal:has(.production-detail),
  .modal:has(.client-form),
  .modal:has(.branch-form),
  .modal:has(.product-form) {
    width: calc(100vw - 32px);
  }
}

@media (max-width: 1040px) {
  .app-shell {
    grid-template-columns: 190px minmax(0, 1fr);
  }

  .brand {
    padding-left: 18px;
    padding-right: 18px;
  }

  .nav-item {
    grid-template-columns: 42px 1fr 16px;
    padding-left: 16px;
    padding-right: 14px;
  }

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

  .topbar-actions {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .sales-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .sale-tools {
    justify-content: stretch;
  }

  .client-band,
  .product-band,
  .delivery-group,
  .sale-control-row,
  .payment-form,
  .credit-controls,
  .dispatch-controls,
  .dispatch-material,
  .send-production-top,
  .send-production-line,
  .production-group-head,
  .production-item-card,
  .production-date-grid,
  .production-detail-summary,
  .resource-upload-form,
  .production-material-readonly article {
    grid-template-columns: 1fr 1fr;
  }

  .payment-methods,
  .extra-payment-methods {
    grid-template-columns: 1fr;
  }

  .client-field,
  .delivery-group,
  .product-name,
  .product-comment,
  .sale-control-row,
  .payment-summary {
    grid-column: 1 / -1;
  }

  .dispatch-summary,
  .credit-summary-grid,
  .debt-metrics,
  .production-order-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .debt-card-head {
    grid-template-columns: 1fr;
  }

  .debt-card-trigger {
    grid-template-columns: auto minmax(160px, 1fr) minmax(96px, auto) 24px;
  }

  .debt-card-next {
    grid-column: 2 / -2;
  }

  .debt-quick-actions {
    justify-content: flex-start;
    padding-left: 0;
  }

  .production-group-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr)) 62px auto 32px;
  }

  .production-group-meta.has-whatsapp {
    grid-template-columns: repeat(2, minmax(0, 1fr)) 62px 34px auto 32px;
  }

  .production-product-progress {
    grid-column: 1 / -1;
  }

  .add-client-button {
    align-self: end;
  }

  .add-product {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .quote-filters,
  .quote-filters.has-inline-actions,
  .credit-controls,
  .credit-summary-grid,
  .debt-metrics,
  .production-filters,
  .production-filters.has-inline-actions,
  .production-group-head,
  .cash-filters,
  .cash-filters.has-inline-actions,
  .history-filters,
  .history-filters.has-inline-actions,
  .report-toolbar,
  .report-toolbar.has-inline-actions,
  .report-range-toolbar.has-inline-actions,
  .inventory-report-toolbar.has-inline-actions,
  .product-form,
  .user-form,
  .client-form,
  .branch-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .has-inline-actions .ops-actions {
    grid-column: 1 / -1;
    width: 100%;
    justify-content: flex-end;
  }

  .report-chart-grid-wrap {
    grid-template-columns: 1fr;
  }

  .dashboard-insights {
    grid-template-columns: 1fr;
  }

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

  .client-form .span-2 {
    grid-column: 1 / -1;
  }

  .product-modal-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

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

  .assign-entry {
    grid-template-columns: 1fr 160px;
  }

  .assign-entry #assignAdd {
    grid-column: 1 / -1;
  }

  .assign-head,
  .assign-row {
    grid-template-columns: 100px minmax(180px, 1fr) 150px 150px 54px;
  }

  .unit-cost-head,
  .unit-cost-row,
  .unit-cost-total {
    grid-template-columns: minmax(220px, 1fr) 160px 86px;
  }
}

@media (max-width: 860px) {
  .app-shell {
    grid-template-columns: 1fr;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }

  .sidebar {
    position: relative;
    height: auto;
    width: 100%;
    max-width: 100vw;
    overflow: hidden;
  }

  .brand {
    min-height: 84px;
    width: 100%;
  }

  .module-nav {
    width: 100%;
    max-width: 100vw;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 14px 16px;
  }

  .nav-item {
    min-width: 150px;
    border-radius: var(--radius);
    padding: 0 14px;
    grid-template-columns: 34px 1fr;
  }

  .nav-label {
    white-space: normal;
    line-height: 1.12;
  }

  .sidebar-footer {
    display: none;
  }

  .topbar,
  .toolbar,
  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar,
  .content-frame {
    width: 100%;
    max-width: 100vw;
    padding-left: 20px;
    padding-right: 20px;
  }

  .workspace.is-sales {
    width: 100%;
    max-width: 100vw;
    height: auto;
    overflow: visible;
  }

  .workspace.is-sales .content-frame {
    width: 100%;
    max-width: 100vw;
    height: auto;
    overflow: visible;
  }

  .sales-view,
  .sale-panel {
    height: auto;
    display: block;
  }

  .sales-actions,
  .sale-tools,
  .sale-ticket-decision,
  .client-band,
  .product-band,
  .delivery-group,
  .sale-control-row,
  .sale-bottom-grid,
  .quote-filters,
  .quote-filters.has-inline-actions,
  .credit-controls,
  .credit-summary-grid,
  .debt-metrics,
  .debt-installment,
  .debt-card-head,
  .debt-card-trigger,
  .production-filters,
  .production-filters.has-inline-actions,
  .production-order-card,
  .production-order-meta,
  .production-order-actions,
  .cash-filters,
  .cash-filters.has-inline-actions,
  .history-filters,
  .history-filters.has-inline-actions,
  .report-toolbar,
  .report-toolbar.has-inline-actions,
  .report-range-toolbar.has-inline-actions,
  .inventory-report-toolbar.has-inline-actions,
  .payment-form,
  .dispatch-summary,
  .dispatch-controls,
  .dispatch-material,
  .send-production-top,
  .send-production-line,
  .production-group-head,
  .production-item-card,
  .production-date-grid,
  .production-detail-summary,
  .resource-upload-form,
  .resource-card,
  .production-material-readonly article,
  .production-stage,
  .product-form,
  .expense-form,
  .user-form,
  .client-form,
  .branch-form {
    display: grid;
    grid-template-columns: 1fr;
  }

  .ops-actions,
  .has-inline-actions .ops-actions {
    width: 100%;
    justify-content: stretch;
  }

  .ops-actions > * {
    flex: 1 1 180px;
  }

  .debt-card-next {
    grid-column: auto;
  }

  .production-group-meta {
    grid-column: 1;
    grid-row: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr)) 62px auto 32px;
  }

  .production-group-meta.has-whatsapp {
    grid-template-columns: repeat(2, minmax(0, 1fr)) 62px 34px auto 32px;
  }

  .production-group-meta > span:nth-of-type(3) {
    grid-column: 1 / -1;
  }

  .production-detail-tools,
  .resource-library-head,
  .resource-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .resource-preview {
    width: 100%;
    height: 88px;
  }

  .report-range-toolbar,
  .inventory-report-toolbar {
    width: 100%;
    grid-template-columns: 1fr;
  }

  .report-subtabs,
  .report-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 2px;
  }

  .report-subtabs button,
  .report-tabs button {
    flex: 0 0 auto;
  }

  .payment-methods,
  .extra-payment-methods {
    grid-template-columns: 1fr;
  }

  .payment-method-row {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .payment-method-icon {
    grid-row: span 3;
  }

  .client-form .span-2 {
    grid-column: auto;
  }

  .sale-panel > * + *,
  .sales-actions > * + * {
    margin-top: 12px;
  }

  .totals-card {
    grid-column: auto;
    grid-row: auto;
  }

  .products-table {
    overflow-x: auto;
  }

  .table-head {
    min-width: 920px;
  }

  .sale-line-grid {
    min-width: 920px;
  }

  .totals-card {
    width: 100%;
    justify-self: stretch;
  }

  .modal-backdrop {
    padding: 12px;
  }

  .modal,
  .modal:has(.quote-filters),
  .modal:has(.admiprint-payment),
  .modal:has(.credit-form),
  .modal:has(.debt-detail),
  .modal:has(.debt-payment-form),
  .modal:has(.dispatch-form),
  .modal:has(.send-production-form),
  .modal:has(.production-date-form),
  .modal:has(.production-history),
  .modal:has(.production-indications),
  .modal:has(.production-ticket-preview),
  .modal:has(.sale-ticket-decision),
  .modal:has(.production-decision),
  .modal:has(.production-detail),
  .modal:has(.client-form),
  .modal:has(.branch-form),
  .modal:has(.product-form) {
    width: 100%;
    max-height: calc(100vh - 24px);
  }

  .modal:has(.product-form) header,
  .modal:has(.product-form) footer {
    padding-left: 16px;
    padding-right: 16px;
  }

  .modal:has(.product-form) .modal-body {
    padding: 0 16px 14px;
  }

  .modal:has(.production-history) .modal-body {
    padding: 14px 16px 28px;
  }

  .modal:has(.production-indications) .modal-body {
    padding: 14px 12px 22px;
  }

  .modal:has(.production-indications) footer {
    align-items: stretch;
    flex-direction: column;
    padding: 14px 12px;
  }

  .production-ticket-preview {
    grid-template-columns: 1fr;
  }

  .modal:has(.production-ticket-preview) .modal-body,
  .modal:has(.production-ticket-preview) footer {
    padding-left: 12px;
    padding-right: 12px;
  }

  .product-modal-grid {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .field-row.two,
  .cost-grid,
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .assign-modal-backdrop,
  .unit-cost-modal-backdrop,
  .cost-form-backdrop,
  .price-scale-backdrop {
    padding: 12px;
  }

  .assign-modal,
  .unit-cost-modal,
  .cost-form-modal,
  .price-scale-modal {
    width: 100%;
    max-height: calc(100vh - 24px);
  }

  .assign-modal header,
  .assign-modal footer,
  .assign-modal-body,
  .unit-cost-modal header,
  .unit-cost-modal footer,
  .unit-cost-body,
  .cost-form-modal header,
  .cost-form-modal footer,
  .cost-form,
  .price-scale-modal header,
  .price-scale-modal footer,
  .price-scale-form {
    padding-left: 16px;
    padding-right: 16px;
  }

  .assign-entry {
    grid-template-columns: 1fr;
  }

  .price-scale-form-row,
  .price-scale-head,
  .price-scale-row {
    grid-template-columns: 1fr;
  }

  .price-scale-head span + span,
  .price-scale-row span + span {
    border-left: 0;
    text-align: left;
  }

  .price-scale-row {
    border-radius: 6px;
  }

  .assign-table {
    overflow-x: auto;
  }

  .assign-head,
  .assign-row {
    min-width: 680px;
  }

  .unit-cost-table {
    overflow-x: auto;
  }

  .unit-cost-head,
  .unit-cost-row,
  .unit-cost-total {
    min-width: 520px;
  }

  .topbar-actions {
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .production-bulk-toolbar {
    left: 50%;
    width: fit-content;
    max-width: calc(100vw - 24px);
    flex-wrap: wrap;
    justify-content: center;
    bottom: 12px;
    border-radius: 18px;
  }

  .production-bulk-toolbar.has-uploads {
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
  }

  .production-upload-head {
    grid-template-columns: minmax(0, 1fr) 28px;
  }

  .production-upload-state {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .ghost-button span:last-child {
    display: none;
  }

  .client-sale-info {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .branch-select {
    min-width: 0;
  }

  .cash-summary-grid,
  .expense-report-summary {
    grid-template-columns: 1fr;
  }

  .recipe-line {
    grid-template-columns: 1fr 92px 36px;
  }

  .recipe-line span:first-child,
  .recipe-line strong {
    display: none;
  }

  .dashboard-list div {
    grid-template-columns: 1fr;
    gap: 3px;
  }
}

@media (max-width: 620px) {
  .metric-grid,
  .module-grid {
    grid-template-columns: 1fr;
  }

  .date-filter {
    display: grid;
    grid-template-columns: 1fr 1fr 48px;
    width: 100%;
  }

  .date-filter select {
    grid-column: 1 / -1;
    width: 100%;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .date-filter time {
    min-width: 0;
    padding: 0 10px;
    font-size: 13px;
  }

  .date-filter input {
    min-width: 0;
    padding: 0 8px;
    font-size: 12px;
  }

  .dashboard-card-link {
    grid-template-columns: 44px minmax(0, 1fr) 24px;
  }

  .dashboard-card-icon {
    width: 42px;
    height: 42px;
  }

  .metric-card {
    grid-template-columns: 50px minmax(0, 1fr);
    min-height: 96px;
    padding: 12px 14px;
  }

  .metric-icon {
    width: 50px;
    height: 50px;
  }

  .metric-card b {
    font-size: 24px;
  }

  .chart-panel {
    padding: 0;
  }

  .chart-card-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .chart-details-button {
    width: 100%;
  }

  .chart-summary-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .chart-options {
    gap: 10px;
    justify-content: flex-start;
    font-size: 13px;
  }

  .chart-data-grid {
    grid-template-columns: 1fr;
  }

  .chart-side-stat {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    border-left: 0;
  }

  .axis-labels {
    font-size: 11px;
    gap: 2px;
    padding-left: 0;
  }
}

@media (max-width: 1180px) {
  .cash-closing-grid,
  .cash-connected-detail,
  .cash-closing-preview {
    grid-template-columns: 1fr;
  }

  .cash-closing-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .modal:has(.cash-closing-form),
  .modal:has(.cash-closing-preview) {
    width: 100%;
    max-height: calc(100vh - 24px);
  }

  .cash-closing-hero,
  .cash-closing-cards,
  .cash-closing-grid,
  .cash-connected-detail {
    padding-left: 16px;
    padding-right: 16px;
  }

  .cash-closing-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .cash-closing-cards,
  .cash-denomination-grid {
    grid-template-columns: 1fr;
  }

  .cash-reconcile-main {
    grid-template-columns: 1fr;
  }

  .cash-reconcile-main span,
  .cash-reconcile-main strong {
    min-height: 38px;
    border: 1px solid #d9e4f2;
    border-radius: 8px;
  }

  .cash-reconcile-main strong {
    min-width: 0;
    justify-content: flex-start;
    padding-left: 14px;
  }

  .cash-reconcile-breakdown,
  .cash-confirmed-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .payable-detail-summary,
  .payable-order-form,
  .payable-line-editor {
    grid-template-columns: 1fr;
  }

  .payable-add-line {
    width: 100%;
  }

  .modal:has(.payable-order-form) {
    width: 100%;
    max-height: calc(100vh - 24px);
  }
}
