:root {
  --font-sans: var(--ds-font-sans);
  --nx-ink: var(--ds-heading);
  --nx-green: var(--ds-primary);
  --nx-green-2: var(--ds-primary-hover);
  --nx-green-3: var(--ds-sidebar);
  --nx-accent: var(--ds-primary);
  --nx-accent-soft: rgba(74, 127, 167, 0.16);
  --nx-white: var(--ds-card);
  --nx-bg: var(--ds-bg);
  --nx-bg-2: var(--ds-disabled-bg);
  --nx-card: var(--ds-card);
  --nx-text: var(--ds-heading);
  --nx-soft: var(--ds-text-light);
  --nx-muted: var(--ds-placeholder);
  --nx-line: var(--ds-border);
  --nx-line-strong: var(--ds-disabled);
  --nx-red: var(--ds-danger);
  --nx-red-soft: var(--ds-danger-bg);
  --nx-orange: var(--ds-warning);
  --nx-yellow: var(--ds-warning);
  --nx-yellow-soft: var(--ds-warning-bg);
  --nx-blue: var(--ds-info);
  --nx-blue-soft: var(--ds-info-bg);
  --radius-xs: 10px;
  --radius-sm: var(--ds-radius-input);
  --radius-md: var(--ds-radius-card);
  --radius-lg: var(--ds-radius-modal);
  --shadow-card: var(--ds-shadow-card);
  --shadow-hover: var(--ds-shadow-hover);
  --shadow-line: inset 0 1px 0 rgba(255, 255, 255, 0.78);
  color: var(--nx-text);
  background: var(--nx-bg);
  font-family: var(--font-sans);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
}

body,
input,
select,
textarea,
button {
  font-family: var(--font-sans);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(179, 207, 229, 0.25);
  outline-offset: 2px;
}

svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  flex: 0 0 auto;
}

.app-shell {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(246, 247, 245, 0.98) 48%, #f0f3f1 100%),
    radial-gradient(circle at 78% 10%, rgba(179, 207, 229, 0.08), transparent 30%);
}

.sidebar {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 34px;
  min-height: 100vh;
  padding: 28px 26px 30px;
  color: var(--nx-white);
  background:
    linear-gradient(155deg, rgba(179, 207, 229, 0.08), transparent 32%),
    linear-gradient(180deg, #0a1931, var(--nx-green) 50%, #0a1931 100%);
  box-shadow: 10px 0 28px rgba(10, 25, 49, 0.12);
}

.sidebar::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.035) 100%),
    radial-gradient(circle at 20% 8%, rgba(179, 207, 229, 0.1), transparent 24%);
}

.sidebar::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.sidebar > * {
  position: relative;
  z-index: 1;
}

.brand {
  display: flex;
  align-items: center;
}

.image-brand img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.brand.large {
  justify-content: center;
  border-radius: 24px;
  padding: 28px 26px;
  margin-bottom: 34px;
  background:
    linear-gradient(155deg, rgba(179, 207, 229, 0.18), transparent 38%),
    linear-gradient(180deg, #0a1931, var(--nx-green) 60%, #0a1931);
  box-shadow: 0 18px 42px rgba(10, 25, 49, 0.14);
}

.brand.large img {
  max-width: 330px;
}

.sidebar-brand {
  width: 100%;
  margin: 4px 0 8px;
}

.sidebar-brand img {
  max-width: 268px;
}

.company-picker {
  display: grid;
  gap: 12px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 13px;
  font-weight: 600;
}

.company-picker span {
  color: rgba(255, 255, 255, 0.84);
}

.company-picker select,
.login-panel input,
input,
select,
textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--nx-line);
  border-radius: var(--radius-sm);
  padding: 13px 15px;
  color: var(--nx-text);
  background: var(--nx-card);
  box-shadow: var(--shadow-line);
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease, transform 150ms ease;
}

.company-picker select {
  border-color: rgba(255, 255, 255, 0.18);
  color: var(--nx-white);
  background: rgba(255, 255, 255, 0.055);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.company-picker select option {
  color: var(--nx-text);
  background: var(--nx-white);
}

.company-picker select:hover,
.login-panel input:hover,
input:hover,
select:hover,
textarea:hover {
  border-color: rgba(179, 207, 229, 0.58);
}

.nav-list {
  display: grid;
  gap: 12px;
}

.nav-list button,
.sidebar-footer button,
.primary-button,
.secondary-button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 13px;
  min-height: 50px;
  border-radius: var(--radius-sm);
  padding: 0 16px;
  font-weight: 600;
  letter-spacing: 0;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.nav-list button,
.sidebar-footer button {
  width: 100%;
  border: 1px solid transparent;
  color: rgba(255, 255, 255, 0.82);
  background: transparent;
  text-align: left;
  font-size: 15px;
  font-weight: 600;
}

.nav-list button svg,
.sidebar-footer button svg {
  width: 19px;
  height: 19px;
  opacity: 0.92;
}

.nav-list button.active {
  color: var(--nx-white);
  border-color: rgba(179, 207, 229, 0.3);
  background:
    linear-gradient(90deg, rgba(179, 207, 229, 0.5), rgba(255, 255, 255, 0.065)),
    rgba(255, 255, 255, 0.055);
  box-shadow: inset 4px 0 0 rgba(179, 207, 229, 0.86), 0 10px 22px rgba(0, 0, 0, 0.08);
}

.nav-list button:hover,
.sidebar-footer button:hover {
  color: var(--nx-white);
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-1px);
}

.sidebar-footer {
  display: grid;
  gap: 12px;
  margin-top: auto;
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.76);
  font-size: 14px;
}

.user-chip {
  display: block;
  color: var(--nx-white);
  font-weight: 600;
}

.content {
  min-width: 0;
  padding: 42px 44px 32px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 34px;
}

.title-block p,
.title-block h1,
.title-block span {
  margin: 0;
}

.title-block p {
  color: var(--nx-green);
  font-size: 13px;
  font-weight: 600;
}

.title-block h1 {
  margin-top: 14px;
  color: var(--nx-text);
  font-size: clamp(36px, 4vw, 46px);
  font-weight: 650;
  letter-spacing: 0;
  line-height: 1.02;
}

.title-block span {
  display: block;
  margin-top: 14px;
  color: var(--nx-soft);
  font-size: 15px;
  line-height: 1.6;
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 12px;
}

.icon-button {
  position: relative;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--nx-line);
  border-radius: 999px;
  color: var(--nx-text);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-card);
}

.icon-button i {
  position: absolute;
  top: -4px;
  right: -1px;
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 999px;
  color: var(--ds-card);
  background: var(--ds-primary);
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}

.profile-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--nx-text);
  font-weight: 600;
}

.profile-chip span {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 999px;
  color: var(--ds-card);
  background: var(--nx-ink);
  font-size: 13px;
}

.profile-chip svg {
  width: 16px;
  height: 16px;
}

.status-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  border: 1px solid var(--nx-line);
  border-radius: 999px;
  padding: 0 16px;
  color: var(--nx-text);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-card);
  white-space: nowrap;
  font-size: 14px;
  font-weight: 600;
}

.status-pill svg {
  width: 12px;
  height: 12px;
  color: var(--ds-primary);
}

.dashboard-layout {
  display: grid;
  gap: 22px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.dashboard-panels {
  display: grid;
  grid-template-columns: minmax(360px, 0.9fr) minmax(460px, 1.25fr);
  gap: 22px;
  align-items: stretch;
}

.metric-card,
.wide-panel,
.recent-panel,
.quick-panel,
.analytics-panel,
.settings-grid article,
.table-shell,
.empty-state,
.login-panel,
.modal-panel {
  border: 1px solid var(--nx-line);
  border-radius: var(--radius-md);
  background: var(--nx-card);
  box-shadow: var(--shadow-card);
}

.metric-card {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  min-height: 160px;
  padding: 24px 20px;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.metric-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.metric-icon {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 999px;
  color: var(--nx-green-2);
  background: var(--nx-accent-soft);
}

.metric-icon svg {
  width: 26px;
  height: 26px;
}

.metric-content span {
  display: block;
  color: var(--nx-text);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.35;
}

.metric-content strong {
  display: block;
  margin-top: 12px;
  color: var(--nx-text);
  font-size: 31px;
  font-weight: 650;
  line-height: 1;
}

.metric-content small {
  display: block;
  margin-top: 12px;
  color: var(--nx-muted);
  font-size: 13px;
  font-weight: 400;
}

.trend {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 18px;
  color: var(--nx-soft);
  font-size: 13px;
  font-style: normal;
  font-weight: 500;
}

.trend svg {
  width: 14px;
  height: 14px;
}

.trend.good {
  color: var(--ds-primary);
}

.trend.danger {
  color: var(--nx-red);
}

.trend.warn {
  color: var(--nx-orange);
}

.tone-red .metric-icon {
  color: var(--nx-red);
  background: var(--nx-red-soft);
}

.tone-amber .metric-icon {
  color: var(--nx-yellow);
  background: var(--nx-yellow-soft);
}

.tone-green .metric-icon,
.tone-blue .metric-icon {
  color: #1a3d63;
}

.wide-panel {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 330px;
  padding: 28px;
  overflow: hidden;
}

.wide-panel h2,
.recent-panel h2,
.quick-panel h2,
.settings-grid h2,
.empty-state h2 {
  margin: 0 0 12px;
  color: var(--nx-text);
  font-size: 20px;
  font-weight: 650;
}

.wide-panel p,
.settings-grid p,
.empty-state p {
  margin: 0;
  color: var(--nx-soft);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.7;
}

.production-visual {
  position: relative;
  width: min(420px, 80%);
  min-height: 140px;
  margin: 24px auto 4px;
  opacity: 0.58;
}

.visual-rail {
  position: absolute;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(10, 25, 49, 0.05), rgba(179, 207, 229, 0.18));
}

.rail-a {
  left: 8%;
  right: 22%;
  top: 58%;
}

.rail-b {
  left: 43%;
  right: 8%;
  top: 34%;
}

.visual-node {
  position: absolute;
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  border: 1px solid rgba(179, 207, 229, 0.2);
  border-radius: 18px;
  color: var(--nx-green-2);
  background: rgba(179, 207, 229, 0.08);
}

.visual-node svg {
  width: 30px;
  height: 30px;
}

.node-a {
  left: 6%;
  top: 30%;
}

.node-b {
  left: 45%;
  top: 8%;
}

.node-c {
  right: 7%;
  top: 48%;
}

.panel-note {
  display: grid;
  gap: 8px;
  justify-items: center;
  margin-top: 8px;
  color: var(--nx-soft);
  text-align: center;
}

.panel-note strong {
  color: #26312c;
  font-size: 16px;
  font-weight: 600;
}

.panel-note span {
  color: var(--nx-muted);
  font-size: 14px;
}

.recent-panel,
.quick-panel {
  padding: 0;
  overflow: hidden;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 24px 16px;
}

.panel-header h2 {
  margin: 0;
}

.secondary-button.compact {
  min-height: 40px;
  padding: 0 16px;
  font-size: 14px;
}

.compact-table {
  min-width: 100%;
  table-layout: fixed;
}

.compact-table th,
.compact-table td {
  padding: 16px 16px;
  font-size: 12px;
  line-height: 1.35;
}

.status-tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 9px;
  color: #424946;
  background: #eef0ef;
  font-size: 12px;
  font-weight: 500;
}

.tag-blue {
  color: var(--ds-info);
  background: var(--nx-blue-soft);
}

.quick-panel {
  padding: 24px 22px;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(138px, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.quick-grid button {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 70px;
  border: 1px solid var(--nx-line);
  border-radius: var(--radius-sm);
  padding: 14px 13px;
  color: var(--nx-text);
  background: linear-gradient(180deg, var(--ds-card), var(--ds-card));
  text-align: left;
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.quick-grid button:hover {
  border-color: rgba(179, 207, 229, 0.34);
  box-shadow: var(--shadow-card);
  transform: translateY(-1px);
}

.quick-grid svg {
  width: 24px;
  height: 24px;
}

.quick-grid strong,
.quick-grid small {
  display: block;
}

.quick-grid strong {
  font-size: 13px;
  font-weight: 650;
}

.quick-grid small {
  margin-top: 4px;
  color: var(--nx-soft);
  font-size: 11px;
}

.table-shell {
  overflow: hidden;
}

.stations-screen {
  display: grid;
  gap: 24px;
}

.stations-card {
  overflow: hidden;
  border: 1px solid var(--nx-line);
  border-radius: var(--radius-md);
  background: var(--nx-card);
  box-shadow: var(--shadow-card);
}

.stations-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 34px 34px 26px;
}

.stations-card-header h2 {
  margin: 0;
  color: var(--nx-text);
  font-size: 22px;
}

.stations-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  min-width: min(100%, 560px);
}

.station-search {
  position: relative;
  display: block;
  min-width: 260px;
  flex: 1 1 280px;
}

.station-search svg {
  position: absolute;
  top: 50%;
  right: 16px;
  width: 20px;
  height: 20px;
  color: var(--nx-green-2);
  transform: translateY(-50%);
  pointer-events: none;
}

.station-search input {
  padding-right: 48px;
}

.stations-tools select {
  width: 190px;
}

.station-view-toggle {
  border-color: var(--nx-line);
  background: var(--nx-card);
}

.station-view-toggle.active {
  color: var(--nx-green-2);
  border-color: var(--ds-primary-border);
  background: var(--ds-primary-light);
}

.stations-table-wrap {
  border-top: 1px solid var(--nx-line);
}

.stations-table {
  min-width: 960px;
}

.stations-table th {
  background: var(--ds-bg);
  color: var(--nx-text);
  font-weight: 700;
  text-transform: none;
}

.stations-table td {
  color: var(--ds-text);
}

.stations-empty-state {
  display: grid;
  place-items: center;
  gap: 14px;
  min-height: 520px;
  padding: 56px 24px 70px;
  text-align: center;
}

.stations-empty-state h2 {
  margin: 4px 0 0;
  color: var(--nx-text);
  font-size: clamp(24px, 3vw, 32px);
}

.stations-empty-state p {
  margin: 0 0 12px;
  color: var(--ds-text);
  font-size: 17px;
}

.stations-empty-state small {
  color: var(--nx-text);
  font-style: italic;
}

.stations-empty-illustration {
  position: relative;
  width: 260px;
  height: 172px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 48%, rgba(179, 207, 229, 0.38), transparent 64%),
    linear-gradient(180deg, rgba(246, 250, 253, 0.96), rgba(179, 207, 229, 0.28));
}

.machine-body,
.machine-belt,
.machine-arm,
.machine-dot,
.machine-spark {
  position: absolute;
  color: var(--nx-green);
}

.machine-body {
  left: 58px;
  bottom: 40px;
  width: 56px;
  height: 62px;
  border: 3px solid currentColor;
  border-radius: 12px;
  box-shadow: inset 0 0 0 8px rgba(179, 207, 229, 0.35);
}

.machine-body::after {
  content: "";
  position: absolute;
  left: 10px;
  bottom: 12px;
  width: 34px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 16px 0 rgba(74, 127, 167, 0.6);
}

.machine-belt {
  left: 92px;
  bottom: 36px;
  width: 122px;
  height: 26px;
  border: 3px solid currentColor;
  border-radius: 14px;
}

.machine-belt::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 30px 0 0 currentColor, 60px 0 0 currentColor, 90px 0 0 currentColor;
}

.machine-arm.arm-a {
  left: 128px;
  bottom: 82px;
  width: 62px;
  height: 42px;
  border-top: 4px solid currentColor;
  border-left: 4px solid currentColor;
  transform: skewY(-24deg);
}

.machine-arm.arm-b {
  left: 174px;
  bottom: 78px;
  width: 4px;
  height: 48px;
  background: currentColor;
}

.machine-dot {
  width: 16px;
  height: 16px;
  border: 3px solid currentColor;
  border-radius: 50%;
  background: var(--nx-card);
}

.machine-dot.dot-a {
  left: 120px;
  bottom: 112px;
}

.machine-dot.dot-b {
  left: 166px;
  bottom: 100px;
}

.machine-spark {
  font-weight: 800;
  font-size: 24px;
}

.machine-spark.spark-a {
  left: 30px;
  top: 32px;
}

.machine-spark.spark-b {
  right: 26px;
  top: 40px;
}

.stations-tip-card {
  display: grid;
  grid-template-columns: 52px minmax(170px, 0.7fr) minmax(0, 1.8fr);
  align-items: center;
  gap: 18px;
  margin: 0 34px 34px;
  padding: 18px;
  border: 1px solid rgba(179, 207, 229, 0.42);
  border-radius: var(--radius-md);
  background: linear-gradient(90deg, rgba(179, 207, 229, 0.26), rgba(246, 250, 253, 0.95));
}

.stations-tip-icon {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 18px;
  color: var(--nx-green);
  background: rgba(179, 207, 229, 0.42);
}

.stations-tip-card strong {
  color: var(--nx-text);
}

.stations-tip-card p {
  margin: 6px 0 0;
  color: var(--ds-text);
}

.stations-tip-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.stations-tip-chips span {
  min-height: 38px;
  padding: 9px 18px;
  border: 1px solid var(--nx-line);
  border-radius: 10px;
  color: var(--nx-text);
  background: var(--nx-card);
  box-shadow: var(--shadow-line);
  font-weight: 700;
}

.stations-tip-chips small {
  color: var(--ds-text-light);
}

.station-create-modal {
  width: min(1120px, calc(100vw - 48px));
  max-height: min(900px, calc(100vh - 48px));
  overflow: hidden;
  padding: 0;
}

.station-modal-header {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 34px 34px 26px;
  border-bottom: 1px solid var(--nx-line);
}

.station-modal-header h2 {
  margin: 0;
  color: var(--nx-text);
  font-size: 26px;
  font-weight: 800;
}

.station-modal-header p {
  margin: 6px 0 0;
  color: var(--ds-text-light);
}

.station-modal-body {
  display: grid;
  gap: 22px;
  max-height: calc(100vh - 260px);
  overflow-y: auto;
  padding: 28px 34px 26px;
}

.station-modal-section,
.station-usage-card {
  position: relative;
  border: 1px solid var(--nx-line);
  border-radius: var(--radius-md);
  background: var(--nx-card);
  box-shadow: var(--shadow-line);
}

.station-modal-section {
  padding: 24px;
}

.station-modal-section.compact-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px 22px;
  align-items: start;
}

.station-section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.station-section-title span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: var(--ds-primary);
  font-weight: 800;
}

.station-section-title h3,
.station-section-title p {
  margin: 0;
}

.station-section-title h3 {
  color: var(--nx-text);
  font-size: 18px;
}

.station-section-title p {
  margin-top: 4px;
  color: var(--ds-text-light);
}

.station-form-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.8fr);
  gap: 22px 28px;
}

.station-form-grid .field,
.station-form-grid .field span {
  display: grid;
  gap: 8px;
}

.station-form-grid .field input,
.station-form-grid .field select,
.station-form-grid .field textarea {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--nx-line);
  border-radius: var(--radius-sm);
  padding: 0 16px;
  color: var(--ds-heading);
  background: var(--nx-card);
  font: inherit;
  outline: none;
}

.station-form-grid .field textarea {
  min-height: 96px;
  padding: 14px 16px;
  resize: vertical;
}

.station-form-grid .field input:focus,
.station-form-grid .field select:focus,
.station-form-grid .field textarea:focus {
  border-color: var(--ds-primary);
  box-shadow: 0 0 0 4px rgba(74, 127, 167, 0.14);
}

.station-form-grid .field small {
  color: var(--ds-text-light);
}

.station-form-grid .wide-field,
.station-form-grid .full-field {
  grid-column: span 1;
}

.station-form-grid .full-field {
  grid-column: 1 / -1;
}

.field-error {
  color: var(--ds-danger) !important;
  font-weight: 700;
}

.station-info-note {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 50px;
  padding: 12px 16px;
  border: 1px solid rgba(179, 207, 229, 0.72);
  border-radius: var(--radius-sm);
  color: var(--ds-primary-hover);
  background: rgba(246, 250, 253, 0.78);
}

.station-info-note svg {
  flex: 0 0 auto;
  width: 19px;
  height: 19px;
  color: var(--ds-primary);
}

.station-machines-empty {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 90px;
  border: 1px dashed var(--nx-line);
  border-radius: var(--radius-sm);
  color: var(--ds-text);
  background: var(--ds-bg);
}

.station-machines-empty strong,
.station-machines-empty small {
  display: block;
}

.station-machines-empty small {
  margin-top: 4px;
  color: var(--ds-text-light);
}

.station-machines-cell strong,
.station-machines-cell small {
  display: block;
}

.station-machines-cell small,
.muted-cell {
  margin-top: 4px;
  color: var(--ds-text-light);
}

.station-row-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.station-machine-list {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
}

.station-machine-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--nx-line);
  border-radius: var(--radius-sm);
  background: var(--ds-bg);
}

.station-machine-row strong,
.station-machine-row small {
  display: block;
}

.station-machine-row small {
  margin-top: 4px;
  color: var(--ds-text-light);
}

.station-machine-backdrop {
  z-index: 60;
}

.station-machine-modal {
  width: min(980px, calc(100vw - 56px));
  max-height: min(820px, calc(100vh - 56px));
  overflow: hidden;
  padding: 0;
}

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

.machine-note-field {
  display: grid;
  gap: 8px;
}

.machine-note-field textarea {
  width: 100%;
  min-height: 130px;
  border: 1px solid var(--nx-line);
  border-radius: var(--radius-sm);
  padding: 16px;
  color: var(--ds-heading);
  background: var(--nx-card);
  font: inherit;
  resize: vertical;
  outline: none;
}

.machine-note-field textarea:focus {
  border-color: var(--ds-primary);
  box-shadow: 0 0 0 4px rgba(74, 127, 167, 0.14);
}

.station-usage-card {
  display: grid;
  grid-template-columns: 54px minmax(180px, 0.75fr) minmax(0, 1.7fr);
  align-items: center;
  gap: 18px;
  padding: 18px;
  background: linear-gradient(90deg, rgba(179, 207, 229, 0.22), rgba(246, 250, 253, 0.94));
}

.station-usage-icon {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 18px;
  color: var(--ds-primary);
  background: rgba(179, 207, 229, 0.44);
}

.station-usage-card strong {
  color: var(--nx-text);
}

.station-usage-card p {
  margin: 5px 0 0;
  color: var(--ds-text-light);
}

.station-usage-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.station-usage-chips span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 8px 13px;
  border: 1px solid var(--nx-line);
  border-radius: 10px;
  color: var(--ds-primary-hover);
  background: var(--nx-card);
  font-weight: 700;
}

.station-usage-chips svg {
  width: 15px;
  height: 15px;
  color: var(--ds-primary);
}

.team-empty-screen {
  display: grid;
  min-height: clamp(520px, calc(100vh - 250px), 760px);
  padding-top: 10px;
}

.team-empty-card {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 20px;
  min-height: clamp(500px, 58vh, 680px);
  padding: clamp(42px, 6vw, 78px);
  border: 1px solid var(--ds-primary-border);
  border-radius: var(--ds-radius-card);
  background: radial-gradient(circle at 50% 20%, color-mix(in srgb, var(--ds-primary-border) 28%, transparent), transparent 38%), var(--ds-card);
  box-shadow: var(--ds-shadow-card);
  text-align: center;
}

.team-empty-illustration {
  width: min(360px, 72vw);
  color: var(--ds-primary);
}

.team-empty-illustration svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.team-orbit {
  fill: none;
  stroke: var(--ds-primary-border);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 7 10;
}

.team-spark,
.team-mini-dot {
  fill: var(--ds-primary-border);
}

.team-id-card {
  fill: var(--ds-card);
  stroke: var(--ds-primary-border);
  stroke-width: 2;
  filter: drop-shadow(0 12px 22px color-mix(in srgb, var(--ds-heading) 8%, transparent));
}

.team-id-avatar,
.team-id-avatar-fill,
.team-person {
  fill: color-mix(in srgb, var(--ds-primary) 58%, var(--ds-card));
}

.team-id-line {
  fill: none;
  stroke: var(--ds-primary-border);
  stroke-width: 8;
  stroke-linecap: round;
}

.team-plus-circle {
  fill: var(--ds-primary);
  filter: drop-shadow(0 10px 18px color-mix(in srgb, var(--ds-heading) 12%, transparent));
}

.team-plus {
  fill: none;
  stroke: var(--ds-card);
  stroke-width: 6;
  stroke-linecap: round;
}

.team-empty-card h2 {
  margin: 0;
  color: var(--ds-heading);
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 800;
  line-height: 1.15;
}

.team-empty-card p {
  max-width: 680px;
  margin: 0;
  color: var(--ds-text-light);
  font-size: 18px;
  line-height: 1.65;
}

.team-first-member-button {
  margin-top: 8px;
  min-width: 250px;
  justify-content: center;
}

.team-first-member-button svg + svg {
  width: 14px;
  height: 14px;
  margin-left: -11px;
  margin-right: 4px;
}

.team-overview {
  display: grid;
  gap: 28px;
}

.team-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.team-stat-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 24px;
  border: 1px solid var(--nx-line);
  border-radius: var(--ds-radius-card);
  background: var(--nx-card);
  box-shadow: var(--ds-shadow-card);
}

.team-stat-card > span {
  display: grid;
  flex: 0 0 54px;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 18px;
  color: var(--ds-primary);
  background: color-mix(in srgb, var(--ds-primary-border) 35%, transparent);
}

.team-stat-card svg {
  width: 24px;
  height: 24px;
}

.team-stat-card em,
.team-stat-card small {
  display: block;
  color: var(--ds-text-light);
  font-style: normal;
}

.team-stat-card strong {
  display: block;
  margin: 4px 0;
  color: var(--ds-heading);
  font-size: 30px;
  line-height: 1;
}

.team-table-card {
  overflow: hidden;
  border: 1px solid var(--nx-line);
  border-radius: var(--ds-radius-card);
  background: var(--nx-card);
  box-shadow: var(--ds-shadow-card);
}

.team-filter-bar {
  display: grid;
  grid-template-columns: minmax(260px, 1.5fr) repeat(3, minmax(170px, 1fr)) auto;
  gap: 18px;
  padding: 26px;
  border-bottom: 1px solid var(--nx-line);
}

.team-search-field {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid var(--nx-line);
  border-radius: var(--ds-radius-input);
  background: var(--nx-card);
  color: var(--ds-text-light);
}

.team-search-field:focus-within {
  border-color: var(--ds-primary);
  box-shadow: var(--ds-focus-ring);
}

.team-search-field input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
}

.team-filter-bar select {
  min-height: 52px;
}

.has-active-filter {
  position: relative;
}

.has-active-filter::after {
  content: "";
  position: absolute;
  top: 10px;
  right: 10px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--ds-primary);
}

.team-table-wrap {
  overflow-x: auto;
}

.team-data-table {
  min-width: 1080px;
}

.team-data-table td strong,
.team-data-table td small {
  display: block;
}

.team-data-table td small {
  margin-top: 6px;
  color: var(--ds-text-light);
}

.team-phone-cell,
.team-role-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.team-phone-cell svg {
  width: 17px;
  height: 17px;
  color: var(--ds-primary);
}

.team-role-badge {
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 10px;
  font-weight: 700;
}

.team-role-badge svg {
  width: 16px;
  height: 16px;
}

.team-role-badge.director {
  color: var(--ds-success);
  background: var(--ds-success-bg);
}

.team-role-badge.admin {
  color: var(--ds-info);
  background: var(--ds-info-bg);
}

.team-role-badge.worker {
  color: var(--ds-warning);
  background: var(--ds-warning-bg);
}

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

.team-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 26px;
  border-top: 1px solid var(--nx-line);
  color: var(--ds-text-light);
}

.team-pagination > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.active-page {
  color: var(--ds-card) !important;
  border-color: var(--ds-primary) !important;
  background: var(--ds-primary) !important;
}

.team-compact-empty {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 22px 26px;
  padding: 18px;
  border: 1px solid var(--ds-primary-border);
  border-radius: var(--ds-radius-card);
  background: color-mix(in srgb, var(--ds-primary-light) 45%, var(--ds-card));
}

.team-compact-empty > svg {
  width: 24px;
  height: 24px;
  color: var(--ds-primary);
}

.team-compact-empty span {
  display: grid;
  flex: 1;
  gap: 4px;
}

.team-member-modal {
  width: min(1180px, calc(100vw - 56px));
  max-height: min(900px, calc(100vh - 48px));
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.team-member-header {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 30px 34px 24px;
  border-bottom: 1px solid var(--nx-line);
}

.team-member-header h2 {
  margin: 0;
}

.team-member-header p {
  margin: 6px 0 0;
  color: var(--ds-text-light);
}

.team-member-body {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(330px, 0.85fr);
  gap: 26px;
  overflow: auto;
  padding: 26px 34px;
}

.team-form-card,
.team-access-card,
.team-invite-card {
  border: 1px solid var(--nx-line);
  border-radius: var(--ds-radius-card);
  background: var(--nx-card);
  box-shadow: var(--ds-shadow-card);
}

.team-form-card {
  padding: 24px;
}

.team-form-card h3,
.team-access-card h3,
.team-invite-card h3 {
  margin: 0 0 16px;
  color: var(--ds-heading);
}

.team-form-card h3:not(:first-child) {
  margin-top: 28px;
}

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

.team-full-field {
  margin-top: 18px;
}

.field b {
  color: var(--ds-danger);
}

.field em {
  display: block;
  margin-top: 7px;
  color: var(--ds-danger);
  font-style: normal;
  font-weight: 600;
}

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

.team-role-card {
  display: grid;
  gap: 10px;
  min-height: 132px;
  padding: 16px;
  border: 1px solid var(--nx-line);
  border-radius: var(--ds-radius-input);
  background: var(--nx-card);
  color: var(--ds-text);
  text-align: left;
  cursor: pointer;
}

.team-role-card.selected {
  border-color: var(--ds-primary);
  background: color-mix(in srgb, var(--ds-primary-light) 54%, var(--ds-card));
  box-shadow: var(--ds-focus-ring);
}

.team-role-card span {
  color: var(--ds-primary);
}

.team-role-card svg {
  width: 22px;
  height: 22px;
}

.team-role-card small,
.team-muted {
  color: var(--ds-text-light);
  line-height: 1.5;
}

.team-role-note {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid var(--ds-info-bg);
  border-radius: var(--ds-radius-input);
  color: var(--ds-info);
  background: color-mix(in srgb, var(--ds-info-bg) 70%, var(--ds-card));
  font-weight: 600;
}

.team-role-note svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.team-password-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto auto;
  gap: 10px;
}

.team-password-row label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 13px;
  border: 1px solid var(--nx-line);
  border-radius: var(--ds-radius-input);
}

.team-password-row label input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-weight: 700;
}

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

.team-access-card,
.team-invite-card {
  padding: 22px;
}

.team-access-block {
  display: grid;
  gap: 9px;
  padding: 16px 0;
  border-top: 1px solid var(--nx-line);
}

.team-access-block:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.team-access-block strong,
.team-access-block span {
  display: flex;
  align-items: center;
  gap: 10px;
}

.team-access-block strong svg,
.team-access-block span svg {
  width: 16px;
  height: 16px;
  color: var(--ds-primary);
}

.team-access-block span {
  color: var(--ds-text-light);
}

.team-link-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin: 16px 0;
}

.team-link-row code {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  overflow: hidden;
  border: 1px solid var(--nx-line);
  border-radius: var(--ds-radius-input);
  color: var(--ds-primary-hover);
  background: var(--ds-bg);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.team-invite-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 1180px) {
  .team-stats-grid,
  .team-filter-bar,
  .team-member-body {
    grid-template-columns: 1fr;
  }

  .team-two-col,
  .team-role-grid,
  .team-password-row,
  .team-link-row,
  .team-invite-actions {
    grid-template-columns: 1fr;
  }
}

.station-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 14px;
  padding: 22px 34px 28px;
  border-top: 1px solid var(--nx-line);
  background: var(--nx-card);
}

.station-modal-actions .primary-button,
.station-modal-actions .secondary-button {
  min-width: 180px;
}

@media (max-width: 920px) {
  .station-form-grid,
  .machine-form-grid,
  .station-modal-section.compact-section,
  .station-usage-card {
    grid-template-columns: 1fr;
  }

  .station-usage-chips {
    justify-content: flex-start;
  }
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 780px;
}

th,
td {
  border-bottom: 1px solid #edf0ee;
  padding: 20px 22px;
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--nx-text);
  background: var(--ds-bg);
  font-size: 13px;
  font-weight: 650;
  text-transform: capitalize;
}

td {
  color: #26312c;
  font-size: 14px;
  font-weight: 400;
}

tbody tr {
  transition: background 150ms ease;
}

tbody tr:hover {
  background: rgba(179, 207, 229, 0.06);
}

tbody tr:last-child td {
  border-bottom: 0;
}

.analytics-panel {
  display: grid;
  gap: 24px;
  padding: 34px;
}

.bar-row {
  display: grid;
  grid-template-columns: 190px minmax(140px, 1fr) 64px;
  align-items: center;
  gap: 18px;
}

.bar-row span {
  color: var(--nx-soft);
  font-weight: 500;
}

.bar-row div {
  height: 14px;
  border-radius: 999px;
  background: #eef1ef;
  overflow: hidden;
}

.bar-row i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--nx-accent);
}

.bar-row strong {
  color: var(--nx-text);
  font-weight: 600;
  text-align: right;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.settings-grid article {
  padding: 30px;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 320px;
  padding: 42px;
  color: var(--nx-soft);
  text-align: center;
}

.empty-state svg {
  width: 38px;
  height: 38px;
  margin-bottom: 16px;
  color: var(--nx-accent);
}

.content-signature {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 36px;
  opacity: 0.82;
}

.content-signature img {
  width: 72px;
  height: auto;
}

.login-screen {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 22% 18%, rgba(179, 207, 229, 0.1), transparent 32%),
    linear-gradient(135deg, #ffffff, var(--nx-bg));
}

.login-panel {
  width: min(100%, 470px);
  padding: 40px;
}

.login-panel form {
  display: grid;
  gap: 20px;
}

.login-panel label {
  display: grid;
  gap: 10px;
  color: var(--nx-soft);
  font-size: 14px;
  font-weight: 600;
}

.primary-button {
  justify-content: center;
  min-height: 52px;
  border: 1px solid var(--nx-green);
  color: var(--nx-white);
  background: var(--nx-green);
  box-shadow: 0 12px 24px rgba(10, 25, 49, 0.14);
}

.primary-button:hover {
  background: var(--nx-green-2);
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(10, 25, 49, 0.18);
}

.secondary-button {
  border: 1px solid var(--nx-line);
  color: var(--nx-text);
  background: var(--nx-white);
}

.secondary-button:hover {
  border-color: rgba(179, 207, 229, 0.34);
  background: rgba(179, 207, 229, 0.06);
  transform: translateY(-1px);
}

.error-box {
  border: 1px solid rgba(194, 58, 58, 0.26);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  color: var(--nx-red);
  background: var(--nx-red-soft);
  font-weight: 500;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(10, 25, 49, 0.38);
  backdrop-filter: blur(10px);
}

.modal-panel {
  width: min(100%, 580px);
  padding: 34px;
}

.unsaved-modal-guard {
  z-index: 140;
  background: rgba(10, 25, 49, 0.28);
}

.unsaved-modal-panel {
  width: min(calc(100vw - 48px), 520px);
}

.unsaved-modal-panel h2 {
  margin: 0 0 12px;
}

.unsaved-modal-panel p {
  margin: 0 0 24px;
  color: var(--nx-soft);
  line-height: 1.6;
}

.unsaved-modal-panel .modal-actions {
  justify-content: flex-end;
}

.content-wide {
  overflow-x: hidden;
  padding: 36px 34px 24px;
  min-width: 0;
}

.topbar-compact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 24px;
}

.topbar-compact .topbar-actions {
  justify-content: flex-end;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--nx-soft);
  font-size: 13px;
  font-weight: 500;
}

.breadcrumb button,
.plain-icon {
  border: 0;
  color: inherit;
  background: transparent;
}

.breadcrumb strong {
  color: var(--nx-text);
}

.detail-heading {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
}

.detail-heading h1 {
  margin-top: 14px;
  font-size: clamp(30px, 3vw, 42px);
  overflow-wrap: anywhere;
}

.detail-action {
  min-height: 50px;
  border-color: var(--nx-line-strong);
  padding: 0 18px;
}

.danger-action {
  border-color: rgba(194, 58, 58, 0.28);
  color: var(--ds-danger);
}

.danger-action:hover {
  border-color: rgba(194, 58, 58, 0.4);
  background: rgba(194, 58, 58, 0.06);
}

.danger-button {
  border-color: rgba(194, 58, 58, 0.34);
  color: var(--nx-red);
  background: var(--nx-white);
  box-shadow: none;
}

.danger-button:hover {
  border-color: rgba(194, 58, 58, 0.5);
  color: var(--nx-red);
  background: var(--nx-red-soft);
  box-shadow: 0 10px 22px rgba(194, 58, 58, 0.08);
}

.success-action {
  border-color: rgba(74, 127, 167, 0.24);
  color: var(--ds-primary);
  background: rgba(74, 127, 167, 0.08);
}

.work-order-detail {
  display: grid;
  gap: 26px;
  min-width: 0;
  max-width: 100%;
}

.back-overview-button {
  margin-bottom: 16px;
}

.edit-code-shortcut {
  width: 34px;
  height: 34px;
  color: #0a1931;
}

.work-order-info-panel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  border: 1px solid var(--nx-line);
  border-radius: var(--radius-md);
  padding: 16px 22px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-card);
}

.work-order-info-panel .soft-icon {
  width: 60px;
  height: 60px;
}

.work-order-info-panel dl {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  margin: 0;
}

.work-order-info-panel dl div {
  display: grid;
  gap: 10px;
  min-height: 58px;
  padding: 0 28px;
  border-left: 1px solid var(--nx-line);
}

.work-order-info-panel dt {
  color: var(--nx-soft);
  font-size: 13px;
  font-weight: 600;
}

.work-order-info-panel dd {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: #0a1931;
  font-size: 15px;
  font-weight: 760;
}

.work-order-info-panel dd svg {
  width: 16px;
  height: 16px;
}

.info-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.info-dot.good {
  background: var(--ds-primary);
}

.info-dot.warn {
  background: #f2a400;
}

.work-order-qr {
    display: grid;
    width: 98px;
    height: 98px;
  place-items: center;
  border: 1px solid var(--nx-line);
  border-radius: 12px;
  background: var(--ds-card);
}

.work-order-qr span {
  display: grid;
  grid-template-columns: repeat(7, 10px);
  gap: 3px;
}

.work-order-qr i {
  width: 10px;
  height: 10px;
  background: var(--ds-card);
}

.work-order-qr i.on {
  background: #0a1931;
}

.work-order-qr .valid-qr {
  width: 82px;
  height: 82px;
    display: block;
  }

.work-order-qr-stack {
    display: grid;
    justify-items: center;
    gap: 8px;
  }

.qr-download-button {
    border: 0;
    background: transparent;
    color: var(--nx-green);
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
  }

.qr-download-button svg {
    width: 14px;
    height: 14px;
  }

.detail-tabs {
  display: flex;
  gap: 28px;
  border-bottom: 1px solid var(--nx-line);
}

.detail-tabs button {
  min-height: 52px;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 0 10px;
  color: var(--nx-soft);
  background: transparent;
  font-weight: 600;
}

.detail-tabs button.active {
  color: var(--ds-primary);
  border-bottom-color: var(--ds-primary);
}

.detail-card {
  border: 1px solid var(--nx-line);
  border-radius: var(--radius-md);
  background: var(--nx-card);
  box-shadow: var(--shadow-card);
}

.general-card,
.summary-card,
.items-table-card,
.operation-card,
.status-card,
.problem-cta,
.problem-list,
.problem-thread,
.problem-side .detail-card,
.support-panels .detail-card {
  padding: 26px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.section-title h2,
.detail-card h2 {
  margin: 0;
  color: var(--nx-text);
  font-size: 18px;
  font-weight: 700;
}

.soft-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  color: #4a7fa7;
  background: rgba(179, 207, 229, 0.14);
}

.general-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 24px 30px;
}

.field {
  display: grid;
  gap: 10px;
  color: var(--nx-text);
  font-size: 14px;
  font-weight: 500;
}

.field span,
.qr-block span {
  color: #26312c;
  font-size: 13px;
  font-weight: 600;
}

.wide-field {
  grid-column: 1 / -1;
}

.field textarea {
  min-height: 82px;
  resize: vertical;
}

.inline-edit-control {
  position: relative;
  display: block;
}

.inline-edit-control button {
  position: absolute;
  right: 12px;
  top: 50%;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 0;
  border-radius: 9px;
  color: #0a1931;
  background: transparent;
  transform: translateY(-50%);
}

.inline-edit-control button:hover {
  background: rgba(179, 207, 229, 0.1);
}

.inline-edit-control button svg {
  width: 17px;
  height: 17px;
}

.code-edit-field input {
  padding-right: 54px;
}

.autosave-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 28px;
  border-top: 1px solid var(--nx-line);
  padding-top: 26px;
}

.autosave-state {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 14px;
  align-items: center;
}

.autosave-state .soft-icon {
  grid-row: span 2;
}

.autosave-state strong {
  font-size: 15px;
}

.autosave-state small {
  color: var(--ds-primary);
  font-size: 13px;
}

.comments-card {
  padding: 26px;
}

.compact-command,
.secondary-button.compact,
.primary-button.compact {
  min-height: 38px;
  padding: 0 14px;
  font-size: 13px;
}

.summary-strip,
.work-kpis,
.problem-kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}

.summary-item,
.work-kpi {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.summary-item + .summary-item {
  border-left: 1px solid var(--nx-line);
  padding-left: 16px;
}

.summary-item span,
.work-kpi {
  min-width: 0;
}

.summary-item strong,
.summary-item em,
.summary-item small,
.work-kpi span,
.work-kpi strong {
  display: block;
}

.summary-item em {
  margin-top: 7px;
  color: var(--nx-soft);
  font-style: normal;
}

.summary-item small {
  margin-top: 7px;
  color: var(--nx-muted);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 12px;
  color: var(--ds-info);
  background: var(--nx-blue-soft);
  font-size: 12px;
  font-weight: 700;
}

.status-zavrsen,
.status-zavrseno,
.status-reseno {
  color: #1a3d63;
  background: #eef6fb;
}

.status-u-toku {
  color: var(--ds-info);
  background: #e8f3ff;
}

.status-planirano,
.status-zapocni-rad {
  color: #4f5652;
  background: #eef0ef;
}

.status-pauzirano,
.status-zavrseno-privremeno {
  color: #7a4b0f;
  background: var(--ds-warning-bg);
}

.status-nije-reseno {
  color: var(--ds-danger);
  background: var(--ds-danger-bg);
}

.status-neaktivan {
  color: #5f6763;
  background: #ecefed;
}

.work-kpis,
.problem-kpis {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-items: stretch;
}

.work-kpi,
.problem-kpis .work-kpi {
  border: 1px solid var(--nx-line);
  border-radius: var(--radius-sm);
  padding: 18px;
  background: var(--nx-card);
  box-shadow: var(--shadow-card);
}

.work-kpi strong {
  margin-top: 5px;
  font-size: 17px;
}

.work-kpi em {
  color: var(--nx-muted);
  font-style: normal;
}

.work-kpi.good em {
  color: var(--ds-primary);
}

.work-kpi.danger em,
.danger-text {
  color: var(--ds-danger);
}

.work-kpi.warn em {
  color: var(--nx-orange);
}

.good-text {
  color: var(--ds-primary);
}

.items-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 22px;
}

.table-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.table-tools input {
  min-height: 38px;
  width: 220px;
}

.hierarchy-table-wrap {
  overflow-x: auto;
  margin: 0 -26px;
}

.hierarchy-table {
  min-width: 1060px;
}

.hierarchy-table th,
.hierarchy-table td {
  padding: 13px 16px;
  font-size: 12px;
}

.hierarchy-table tbody tr.selected-row {
  background: rgba(179, 207, 229, 0.1);
}

.hierarchy-name {
  display: grid;
  grid-template-columns: 24px 42px minmax(140px, 1fr);
  align-items: center;
  gap: 8px;
}

.hierarchy-name strong {
  color: var(--nx-text);
}

.hierarchy-name small {
  grid-column: 3;
  color: var(--nx-muted);
}

.level-1 .hierarchy-name {
  padding-left: 22px;
}

.level-2 .hierarchy-name {
  padding-left: 44px;
}

.row-toggle,
.row-spacer {
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 999px;
  background: #f2f5f3;
}

.row-code {
  color: #3c4742;
  font-weight: 600;
}

.doc-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--nx-line);
  border-radius: 8px;
  padding: 5px 8px;
  color: var(--nx-text);
  background: var(--ds-card);
  font-size: 11px;
  font-weight: 600;
}

.scrap-number {
  color: var(--ds-danger);
  font-weight: 700;
}

.progress-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.progress-cell i {
  display: block;
  width: 72px;
  height: 5px;
  border-radius: 999px;
  background: #e7ece9;
}

.progress-cell b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--ds-primary);
}

.progress-cell em {
  color: var(--nx-soft);
  font-style: normal;
}

.table-footer {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--nx-line);
  padding-top: 14px;
  color: var(--nx-soft);
  font-size: 12px;
}

.operation-side,
.problem-side {
  display: grid;
  gap: 14px;
  align-content: start;
}

.operation-title {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  border-radius: 999px;
  padding: 7px 12px;
  background: #f2f5f3;
}

.detail-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 18px;
  margin: 18px 0 0;
}

.detail-list dt {
  color: var(--nx-soft);
}

.detail-list dd {
  margin: 0;
  font-weight: 600;
}

.full-button {
  width: 100%;
  justify-content: flex-start;
  margin-top: 10px;
}

.active-soft {
  color: var(--ds-info);
  background: var(--ds-info-bg);
}

.warn-soft {
  color: #a05d0b;
  background: var(--ds-warning-bg);
}

.purple-soft {
  color: var(--ds-info);
  background: var(--ds-info-bg);
}

.support-panels {
  display: grid;
  grid-template-columns: 270px minmax(280px, 1fr) 390px 320px;
  gap: 18px;
  align-items: end;
}

.drawing-list,
.drawing-preview,
.finish-panel {
  min-height: 190px;
}

.drawing-file {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--nx-line);
  padding: 10px 0;
  color: var(--nx-text);
  background: transparent;
  text-align: left;
}

.drawing-file small,
.drawing-file em {
  color: var(--nx-muted);
  font-size: 11px;
  font-style: normal;
}

.blueprint-demo {
  min-height: 150px;
  border: 1px solid var(--nx-line);
  border-radius: 8px;
  background:
    linear-gradient(28deg, transparent 46%, #aab3ae 47%, #aab3ae 48%, transparent 49%),
    linear-gradient(154deg, transparent 45%, #c6ceca 46%, #c6ceca 47%, transparent 48%),
    repeating-linear-gradient(0deg, transparent 0 18px, rgba(7,31,24,0.05) 19px),
    repeating-linear-gradient(90deg, transparent 0 18px, rgba(7,31,24,0.05) 19px),
    var(--ds-card);
}

.modal-blueprint {
  min-height: 280px;
}

.mini-form {
  display: grid;
  gap: 12px;
}

.mini-form label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
}

.mini-form div {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.scrap-callout {
  display: flex;
  gap: 12px;
  border: 1px solid var(--ds-primary-border);
  border-radius: var(--radius-sm);
  padding: 18px;
  color: var(--ds-primary);
  background: var(--ds-primary-light);
}

.problem-kpis {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.problems-layout {
  display: grid;
  grid-template-columns: 380px minmax(420px, 1fr) 320px;
  gap: 18px;
}

.filters {
  display: grid;
  grid-template-columns: 1fr 1fr 44px;
  gap: 10px;
  margin-bottom: 14px;
}

.filters select {
  min-height: 40px;
}

.problem-list-item {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  gap: 12px;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--nx-line);
  padding: 14px;
  color: var(--nx-text);
  background: transparent;
  text-align: left;
}

.problem-list-item.active {
  border: 1px solid rgba(194, 58, 58, 0.28);
  border-radius: 12px;
  background: var(--ds-danger-bg);
}

.problem-id {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  color: var(--ds-danger);
  background: var(--ds-danger-bg);
  font-weight: 800;
}

.problem-id.large {
  width: 58px;
  height: 48px;
  font-size: 18px;
}

.problem-list-item small {
  display: block;
  margin: 7px 0;
  color: var(--nx-soft);
  line-height: 1.5;
}

.problem-list-item em {
  color: var(--nx-soft);
  font-style: normal;
  line-height: 2;
}

.problem-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.problem-head h2 {
  font-size: 22px;
}

.problem-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.problem-tags span {
  border: 1px solid var(--nx-line);
  border-radius: 9px;
  padding: 9px 12px;
  color: var(--nx-soft);
  background: var(--ds-card);
}

.thread-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 18px;
}

.messages {
  display: grid;
  gap: 14px;
}

.message {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.avatar {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 999px;
  color: var(--ds-card);
  background: var(--ds-success);
  font-size: 12px;
  font-weight: 800;
}

.message > div:last-child {
  border: 1px solid var(--nx-line);
  border-radius: 14px;
  padding: 12px;
  background: var(--ds-card);
}

.message.blue > div:last-child {
  background: var(--ds-info-bg);
}

.message.system > div:last-child {
  background: var(--ds-warning-bg);
}

.message header {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--nx-soft);
  font-size: 12px;
}

.message header time {
  margin-left: auto;
}

.message p {
  margin: 8px 0 0;
  line-height: 1.5;
}

.message-photos,
.photo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.message-photos button,
.photo-grid button {
  min-height: 76px;
  border: 0;
  border-radius: 8px;
  background:
    radial-gradient(circle at 45% 40%, #303833, transparent 18%),
    linear-gradient(135deg, #d5d9d6, #777f79);
}

.history-item {
  border-left: 2px solid var(--nx-line);
  padding: 0 0 16px 14px;
}

.history-item span {
  display: block;
  width: 10px;
  height: 10px;
  margin-left: -20px;
  border-radius: 999px;
  background: var(--ds-primary);
}

.history-item small {
  color: var(--nx-soft);
}

.message-input {
  display: grid;
  grid-template-columns: 1fr 36px 36px 82px;
  gap: 8px;
  align-items: center;
}

.message-input button {
  min-height: 40px;
}

.modal-panel h2 {
  margin: 0 0 12px;
}

.modal-panel p {
  color: var(--nx-soft);
  line-height: 1.6;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 22px;
}

.modal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.modal-grid .wide-field {
  grid-column: 1 / -1;
}

.scrap-note {
  margin-top: 14px;
  border-radius: 12px;
  padding: 12px;
  color: var(--ds-primary);
  background: var(--ds-primary-light);
}

.toast {
  position: fixed;
  right: 26px;
  bottom: 26px;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--nx-line);
  border-radius: 999px;
  padding: 13px 16px;
  color: var(--nx-text);
  background: var(--ds-card);
  box-shadow: var(--shadow-hover);
  font-weight: 600;
}

.sr-file-input {
  position: fixed;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.photo-source-modal {
  width: min(100%, 620px);
}

.photo-source-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.source-option {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  border: 1px solid var(--nx-line);
  border-radius: 12px;
  padding: 16px;
  color: var(--nx-text);
  background: var(--ds-card);
  text-align: left;
}

.source-option:hover {
  border-color: rgba(74, 127, 167, 0.32);
  background: rgba(179, 207, 229, 0.06);
}

.source-option svg {
  width: 22px;
  height: 22px;
  color: var(--nx-green);
}

.source-option strong,
.source-option small {
  display: block;
}

.source-option small {
  margin-top: 5px;
  color: var(--nx-soft);
  line-height: 1.45;
}

.work-order-list .panel-header {
  padding: 24px;
}

.work-orders-screen {
  display: grid;
  gap: 22px;
}

.work-order-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.work-order-kpi {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 118px;
  border: 1px solid var(--nx-line);
  border-radius: var(--radius-md);
  padding: 22px 24px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-card);
}

.work-order-kpi .soft-icon {
  width: 58px;
  height: 58px;
}

.work-order-kpi div {
  display: grid;
  gap: 3px;
}

.work-order-kpi strong {
  color: #0a1931;
  font-size: 30px;
  line-height: 1;
  font-weight: 780;
}

.work-order-kpi span {
  color: #14231d;
  font-size: 15px;
  font-weight: 720;
}

.work-order-kpi small {
  color: var(--nx-soft);
  font-size: 13.5px;
  font-weight: 520;
}

.work-order-kpi.tone-blue .soft-icon {
  color: #1c6ecb;
  background: var(--ds-info-bg);
}

.work-order-kpi.tone-amber .soft-icon {
  color: #d97706;
  background: var(--ds-warning-bg);
}

.work-order-kpi.tone-red .soft-icon {
  color: var(--ds-danger);
  background: var(--ds-danger-bg);
}

.work-order-kpi.tone-purple .soft-icon {
  color: var(--ds-info);
  background: var(--ds-info-bg);
}

.work-orders-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1.4fr) repeat(3, minmax(170px, 1fr));
  align-items: end;
  gap: 18px 20px;
  border: 1px solid var(--nx-line);
  border-radius: var(--radius-md);
  padding: 22px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-card);
}

.work-orders-toolbar label {
  display: grid;
  gap: 8px;
  min-width: 0;
  color: #14231d;
  font-size: 13px;
  font-weight: 720;
}

.work-orders-toolbar select,
.work-orders-toolbar input {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--nx-line);
  border-radius: 10px;
  padding: 0 14px;
  color: var(--nx-text);
  background: var(--nx-white);
  font: inherit;
  font-size: 14px;
  outline: 0;
}

.work-orders-toolbar select:focus,
.work-orders-toolbar input:focus {
  border-color: rgba(74, 127, 167, 0.44);
  box-shadow: 0 0 0 3px rgba(179, 207, 229, 0.1);
}

.view-toggle {
  display: inline-grid;
  grid-template-columns: repeat(2, 1fr);
  align-self: end;
  border: 1px solid rgba(74, 127, 167, 0.18);
  border-radius: 9px;
  padding: 3px;
  background: rgba(179, 207, 229, 0.05);
}

.view-toggle button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  border: 0;
  border-radius: 7px;
  padding: 0 10px;
  color: var(--nx-soft);
  background: transparent;
  font-size: 11px;
  font-weight: 650;
}

.view-toggle button.active {
  color: var(--nx-green);
  background: var(--nx-white);
  box-shadow: 0 6px 14px rgba(10, 25, 49, 0.08);
}

.work-search {
  position: relative;
}

.work-search svg {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 18px;
  height: 18px;
  color: var(--nx-soft);
  pointer-events: none;
}

.work-search input {
  padding-right: 44px;
}

.sort-filter {
  grid-column: span 2;
}

.clear-filter-button {
  justify-self: stretch;
  min-height: 50px;
}

.work-order-list-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.work-order-table-wrap {
  overflow-x: auto;
}

.work-orders-table {
  min-width: 1340px;
}

.work-orders-table th,
.work-orders-table td {
  padding: 18px 18px;
  font-size: 14px;
}

.work-orders-table th {
  color: #1b2a24;
  background: var(--ds-bg);
  font-size: 13px;
  text-transform: none;
  white-space: nowrap;
}

.work-orders-table td {
  color: #24302b;
  white-space: nowrap;
}

.work-orders-table tbody tr {
  cursor: pointer;
}

.work-orders-table tbody tr:hover {
  background: rgba(179, 207, 229, 0.055);
}

.sort-header {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  font-weight: 700;
}

.sort-header svg {
  width: 13px;
  height: 13px;
  color: var(--nx-soft);
}

.sort-header.active {
  color: var(--nx-green);
}

.sort-header.active.desc svg {
  transform: rotate(180deg);
}

.row-chevron,
.icon-mini {
  display: inline-grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--nx-green);
  background: transparent;
}

.row-chevron svg,
.icon-mini svg {
  width: 14px;
  height: 14px;
}

.icon-mini:hover {
  border-color: rgba(74, 127, 167, 0.2);
  background: rgba(179, 207, 229, 0.07);
}

.icon-mini.danger {
  color: var(--ds-danger);
}

.icon-mini.danger:hover {
  border-color: rgba(225, 29, 46, 0.18);
  background: rgba(225, 29, 46, 0.06);
}

.row-chevron.expanded svg {
  transform: rotate(90deg);
}

.row-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.icon-action,
.open-row-button,
.open-card-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid rgba(6, 56, 40, 0.08);
  border-radius: 7px;
  color: var(--ds-card);
  background: var(--nx-green);
  font-size: 10.5px;
  font-weight: 750;
  box-shadow: 0 8px 16px rgba(6, 56, 40, 0.12);
}

.open-row-button {
  height: 26px;
  padding: 0 10px;
}

.open-card-button {
  height: 28px;
  min-width: 94px;
  padding: 0 12px;
}

.open-row-button svg,
.open-card-button svg {
  width: 13px;
  height: 13px;
}

.open-row-button:hover,
.open-card-button:hover {
  background: #073e2d;
  box-shadow: 0 10px 20px rgba(6, 56, 40, 0.16);
}

.icon-action {
  width: 40px;
  height: 40px;
  border: 1px solid var(--nx-line);
  border-radius: 10px;
  color: #24302b;
  background: var(--ds-card);
}

.icon-action svg {
  width: 18px;
  height: 18px;
}

.icon-action.primary {
  color: var(--ds-card);
  background: var(--nx-green);
  border-color: var(--nx-green);
  box-shadow: 0 10px 20px rgba(6, 56, 40, 0.16);
}

.icon-action.shipment:not(:disabled) {
  color: var(--nx-green);
}

.icon-action:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.icon-action.danger {
  color: var(--ds-danger);
  border-color: rgba(225, 29, 46, 0.18);
}

.icon-action:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(10, 25, 49, 0.1);
}

.owner-cell {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 650;
}

.owner-cell svg {
  width: 14px;
  height: 14px;
  color: var(--nx-green);
}

.priority-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 9.5px;
  font-weight: 750;
}

.priority-nizak {
  color: #476153;
  background: #edf3ef;
}

.priority-srednji {
  color: #9a5a00;
  background: var(--ds-warning-bg);
}

.priority-visok {
  color: var(--ds-danger);
  background: var(--ds-danger-bg);
}

.due-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 8px;
  font-weight: 700;
}

.due-chip.is-today,
.card-dates.is-today strong {
  color: var(--ds-warning);
}

.due-chip.is-overdue,
.card-dates.is-overdue strong {
  color: var(--ds-danger);
}

.work-order-code {
  color: #0a1931;
  font-size: 11.5px;
  font-weight: 850;
  letter-spacing: 0;
}

.problem-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--nx-line);
  border-radius: 999px;
  padding: 6px 11px;
  color: var(--nx-text);
  background: var(--nx-white);
  font-size: 12.5px;
  font-weight: 750;
  white-space: nowrap;
}

.problem-count.has-problems {
  color: var(--ds-warning);
  border-color: rgba(234, 88, 12, 0.24);
  background: var(--ds-warning-bg);
}

.problem-count.no-problems {
  color: #247346;
  border-color: rgba(36, 115, 70, 0.22);
  background: #edf8f1;
}

.wo-progress {
  display: grid;
  gap: 7px;
  min-width: 84px;
}

.wo-progress em {
  color: #203029;
  font-size: 13px;
  font-style: normal;
  font-weight: 760;
}

.wo-progress i {
  overflow: hidden;
  display: block;
  width: 76px;
  height: 7px;
  border-radius: 999px;
  background: #e8ece9;
}

.wo-progress b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0d6b43, #53965b);
}

.work-order-preview-row td {
  color: #53625a;
  background: var(--ds-bg);
  font-size: 13.5px;
}

.work-order-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  color: #53625a;
  border-top: 1px solid var(--nx-line);
  font-size: 14px;
}

.work-order-pagination > div,
.work-order-pagination label,
.work-order-pagination nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.work-order-pagination select {
  min-height: 38px;
  border: 1px solid var(--nx-line);
  border-radius: 9px;
  padding: 0 12px;
  background: var(--ds-card);
}

.work-order-pagination button {
  display: inline-grid;
  min-width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--nx-line);
  border-radius: 9px;
  color: #1d2b25;
  background: var(--ds-card);
  font-weight: 760;
}

.work-order-pagination button svg {
  width: 14px;
  height: 14px;
}

.work-order-pagination button.active {
  color: var(--ds-card);
  background: var(--nx-green);
  border-color: var(--nx-green);
}

.work-order-pagination button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.page-gap {
  color: var(--nx-soft);
  padding: 0 2px;
}

@media (max-width: 1500px) {
  .work-order-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .work-orders-toolbar {
    grid-template-columns: repeat(3, minmax(180px, 1fr));
  }

  .sort-filter {
    grid-column: span 1;
  }
}

@media (max-width: 1180px) {
  .work-order-kpis,
  .work-orders-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .work-order-pagination,
  .work-order-pagination > div {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 760px) {
  .work-order-kpis,
  .work-orders-toolbar {
    grid-template-columns: 1fr;
  }

  .work-order-kpi {
    min-height: 104px;
  }
}

.problem-count:hover {
  border-color: rgba(74, 127, 167, 0.24);
  background: rgba(179, 207, 229, 0.06);
}

.work-order-card-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(190px, 1fr));
  gap: 12px;
}

.work-order-card {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 7px;
  border: 1px solid var(--nx-line);
  border-radius: 8px;
  padding: 12px 13px;
  background: var(--nx-white);
  box-shadow: 0 12px 24px rgba(10, 25, 49, 0.075);
  cursor: pointer;
}

.work-order-card.is-overdue::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: var(--ds-danger);
}

.work-order-card:hover {
  border-color: rgba(74, 127, 167, 0.3);
  box-shadow: 0 18px 34px rgba(10, 25, 49, 0.1);
  transform: translateY(-1px);
}

.work-order-card header,
.work-order-card footer,
.work-order-card > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.work-order-card h2 {
  margin: 0;
  color: #081812;
  font-size: 12.5px;
  line-height: 1.25;
}

.work-order-card dl {
  display: grid;
  gap: 4px;
  margin: 0;
}

.work-order-card dl div,
.card-dates {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 8px;
}

.work-order-card dt,
.card-dates span {
  color: #738078;
  font-size: 9px;
  font-weight: 600;
}

.work-order-card dd,
.card-dates strong {
  min-width: 0;
  margin: 0;
  color: #17231e;
  font-size: 9.8px;
  font-weight: 650;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.work-order-card dd .priority-badge,
.work-order-card dd .problem-count {
  justify-self: end;
}

.work-order-card footer {
  margin-top: 2px;
  justify-content: center;
}

.work-order-card .icon-mini {
  width: 42px;
  height: 28px;
  border-color: var(--nx-line);
  background: var(--nx-white);
}

.work-order-card .icon-mini.danger {
  border-color: rgba(225, 29, 46, 0.18);
}

.work-order-card .status-badge {
  font-size: 8.5px;
  padding: 3px 7px;
}

.work-order-card span,
.work-order-card em {
  font-style: normal;
}

/* Build 003.1 products overview. */
.products-overview {
  display: grid;
  gap: 22px;
}

.product-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.product-kpi {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 106px;
  border: 1px solid var(--nx-line);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  background: var(--nx-card);
  box-shadow: var(--shadow-card);
}

.product-kpi span,
.product-kpi strong,
.product-kpi em {
  display: block;
}

.product-kpi span {
  color: var(--nx-text);
  font-size: 13px;
  font-weight: 760;
}

.product-kpi strong {
  margin-top: 8px;
  color: #050d09;
  font-size: 27px;
  line-height: 1;
}

.product-kpi em {
  margin-top: 12px;
  color: var(--nx-soft);
  font-size: 13px;
  font-style: normal;
  font-weight: 650;
}

.tone-purple .metric-icon {
  color: var(--ds-info);
  background: var(--ds-info-bg);
}

.tone-orange .metric-icon {
  color: #f97316;
  background: var(--ds-warning-bg);
}

.products-table-card {
  overflow: hidden;
  border-radius: var(--radius-md);
  padding: 0;
}

.products-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) repeat(3, minmax(150px, 0.56fr)) auto auto;
  gap: 14px;
  align-items: end;
  border-bottom: 1px solid var(--nx-line);
  padding: 20px 24px 18px;
  background: rgba(255, 255, 255, 0.88);
}

.products-toolbar label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--nx-soft);
  font-size: 11px;
  font-weight: 700;
}

.products-toolbar select,
.products-toolbar input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--nx-line);
  border-radius: 10px;
  padding: 0 13px;
  color: var(--nx-text);
  background: var(--nx-white);
  font: inherit;
  font-size: 13px;
  outline: 0;
}

.products-toolbar select:focus,
.products-toolbar input:focus {
  border-color: rgba(74, 127, 167, 0.44);
  box-shadow: 0 0 0 3px rgba(179, 207, 229, 0.1);
}

.product-search {
  position: relative;
}

.product-search svg {
  position: absolute;
  right: 13px;
  bottom: 12px;
  width: 17px;
  height: 17px;
  color: var(--nx-soft);
  pointer-events: none;
}

.product-search input {
  padding-right: 40px;
}

.products-table-wrap {
  overflow-x: auto;
}

.products-table {
  width: 100%;
  min-width: 1120px;
}

.products-table th,
.products-table td {
  padding: 15px 14px;
  font-size: 12px;
  vertical-align: middle;
}

.products-table th {
  color: #1b2a24;
  background: var(--ds-bg);
  font-size: 12px;
  white-space: nowrap;
}

.products-table td {
  border-top: 1px solid var(--nx-line);
  color: #24302b;
}

.products-table tbody tr {
  cursor: pointer;
}

.products-table tbody tr:hover {
  background: rgba(179, 207, 229, 0.055);
}

.check-cell {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 1px solid #b9c4bf;
  border-radius: 4px;
  background: var(--ds-card);
}

.product-code-cell {
  display: grid;
  grid-template-columns: 42px auto;
  align-items: center;
  gap: 12px;
}

.product-code-cell strong {
  color: var(--nx-text);
  font-weight: 800;
  white-space: nowrap;
}

.product-thumb {
  display: block;
  width: 48px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid rgba(10, 25, 49, 0.08);
  box-shadow: inset 0 -8px 18px rgba(10, 25, 49, 0.12);
}

.product-thumb.simple {
  background:
    linear-gradient(145deg, rgba(255,255,255,.55), transparent 42%),
    linear-gradient(25deg, #8b9690, #d5dbd7 46%, #53615a);
}

.product-thumb.assembled {
  background:
    radial-gradient(circle at 70% 28%, rgba(255,255,255,.45), transparent 16%),
    linear-gradient(145deg, #2c332f, #9d6b39 45%, #1f4a37);
}

.product-type-badge,
.product-type-note {
  display: inline-flex;
}

.product-type-badge {
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
}

.type-finished {
  color: #14723a;
  background: #e6f4e8;
}

.type-assembled {
  color: var(--ds-info);
  background: #e8f1ff;
}

.product-type-note {
  margin-top: 6px;
  color: var(--nx-soft);
  font-size: 12px;
  font-weight: 650;
}

.sort-header.active svg {
  color: var(--nx-green);
}

.sort-header.active.desc svg {
  transform: rotate(180deg);
}

.mini-progress {
  display: block !important;
}

.mini-progress i {
  display: block;
  height: 4px;
  border-radius: 999px;
  background: #e8eeeb;
  overflow: hidden;
}

.mini-progress b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--nx-green);
}

.mini-progress.tone-active b {
  background: #2f6fe4;
}

.mini-progress.tone-success b {
  background: #12843c;
}

.mini-progress.tone-warning b {
  background: #e47d22;
}

.mini-progress.tone-muted b {
  background: #a8b0aa;
}

.work-order-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 150px;
  gap: 14px 16px;
}

.work-order-form-grid label {
  display: grid;
  gap: 6px;
  color: #17231e;
  font-size: 11px;
  font-weight: 650;
}

.work-order-form-grid label span b {
  color: var(--ds-danger);
}

.work-order-form-grid input,
.work-order-form-grid select,
.work-order-form-grid textarea {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--nx-line);
  border-radius: 7px;
  padding: 8px 10px;
  color: var(--nx-text);
  background: var(--nx-white);
  font: inherit;
  font-size: 12px;
  outline: 0;
}

.work-order-form-grid input[readonly] {
  color: var(--nx-soft);
  background: var(--ds-bg);
}

.empty-work-items {
  min-height: 280px;
  align-content: center;
  justify-items: center;
  text-align: center;
}

.empty-work-items p {
  max-width: 560px;
  margin: 0 0 18px;
  color: var(--nx-soft);
  line-height: 1.7;
}

.work-order-items-start {
  display: grid;
  gap: 26px;
}

.items-start-kpis {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.initial-items-card {
  overflow: hidden;
  padding: 26px;
}

.initial-items-card .panel-header {
  margin-bottom: 22px;
}

.initial-items-card .table-tools {
  gap: 14px;
}

.initial-items-card .primary-button,
.initial-items-card .secondary-button {
  min-height: 50px;
  border-radius: 11px;
  padding: 0 22px;
  font-size: 15px;
}

.initial-items-table {
  border: 1px solid var(--nx-line);
  border-radius: 14px;
  background: var(--ds-card);
}

.initial-items-table .hierarchy-table {
  min-width: 980px;
}

.initial-items-table .hierarchy-table th {
  padding: 18px 22px;
  background: var(--ds-card);
  font-size: 14px;
}

.items-empty-row td {
  padding: 0;
  border-bottom: 0;
}

.items-empty-state {
  display: grid;
  justify-items: center;
  gap: 16px;
  min-height: 420px;
  padding: 70px 24px;
  text-align: center;
}

.items-empty-icon {
  display: grid;
  width: 78px;
  height: 78px;
  place-items: center;
  border-radius: 18px;
  color: #7f9690;
  background: #edf3f1;
}

.items-empty-icon svg {
  width: 42px;
  height: 42px;
}

.items-empty-state h3 {
  margin: 4px 0 0;
  color: #0a1931;
  font-size: 24px;
  line-height: 1.2;
}

.items-empty-state p {
  margin: 0;
  color: #536172;
  font-size: 17px;
}

.items-empty-state div {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  margin-top: 18px;
}

.items-help-note {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 22px;
  color: #536172;
  font-size: 15px;
}

.items-help-note svg {
  width: 22px;
  height: 22px;
}

.work-item-stub-modal {
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 18px 0 4px;
  text-align: center;
}

.work-item-stub-modal p {
  max-width: 420px;
  margin: 0;
  color: var(--nx-soft);
}

.work-order-form-grid textarea {
  min-height: 58px;
  resize: vertical;
}

.work-order-form-grid small {
  color: var(--nx-soft);
  font-size: 10px;
  font-weight: 500;
}

.work-order-form-grid .wide-field {
  grid-column: 1 / -1;
}

.work-order-form-grid .name-field {
  grid-column: span 2;
}

.new-customer-button {
  align-self: end;
  min-height: 36px;
  white-space: nowrap;
}

.input-suffix {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 46px;
}

.input-suffix input {
  border-radius: 7px 0 0 7px;
}

.input-suffix em {
  display: grid;
  place-items: center;
  border: 1px solid var(--nx-line);
  border-left: 0;
  border-radius: 0 7px 7px 0;
  color: var(--nx-soft);
  background: var(--ds-card);
  font-size: 11px;
  font-style: normal;
  font-weight: 650;
}

.work-order-create-modal {
  width: min(100%, 1450px);
  max-height: min(92vh, 920px);
  overflow: auto;
  border: 1px solid rgba(228, 233, 230, 0.92);
  border-radius: 16px;
  padding: 46px 50px 40px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 26px 70px rgba(10, 25, 49, 0.22);
}

.work-order-create-backdrop {
  padding: 28px;
  background: rgba(10, 25, 49, 0.34);
  backdrop-filter: blur(10px);
}

.work-order-modal-header {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-bottom: 54px;
}

.work-order-modal-header .soft-icon {
  width: 72px;
  height: 72px;
}

.work-order-modal-header h2 {
  margin: 0;
  color: #0a1931;
  font-size: clamp(30px, 2.4vw, 42px);
  line-height: 1.08;
  font-weight: 780;
}

.work-order-modal-header p {
  margin: 12px 0 0;
  color: #647386;
  font-size: 18px;
  font-weight: 560;
}

.work-order-create-modal .modal-close {
  top: 42px;
  right: 42px;
  width: 44px;
  height: 44px;
  color: #536172;
}

.work-order-create-modal .modal-close svg {
  width: 26px;
  height: 26px;
}

.work-order-create-modal .work-order-form-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr 0.95fr;
  gap: 32px 28px;
}

.wo-modal-field {
  display: grid;
  gap: 11px;
  min-width: 0;
  color: #0c1a14;
  font-size: 17px;
  font-weight: 760;
}

.wo-modal-field b {
  color: var(--ds-danger);
}

.wo-modal-field input,
.wo-modal-field select,
.wo-modal-field textarea {
  width: 100%;
  min-height: 68px;
  border: 1px solid #d6dee3;
  border-radius: 10px;
  padding: 0 22px;
  color: #0a1931;
  background: var(--ds-card);
  font-size: 20px;
  font-weight: 520;
  outline: 0;
  box-shadow: inset 0 1px 0 rgba(10, 25, 49, 0.02);
}

.wo-modal-field input::placeholder,
.wo-modal-field textarea::placeholder {
  color: #8a97a6;
}

.wo-modal-field input:focus,
.wo-modal-field select:focus,
.wo-modal-field textarea:focus {
  border-color: rgba(74, 127, 167, 0.52);
  box-shadow: 0 0 0 4px rgba(179, 207, 229, 0.11);
}

.wo-modal-field input[readonly] {
  color: #0a1931;
  background: var(--ds-bg);
  font-weight: 780;
}

.wo-modal-field small {
  color: #68778a;
  font-size: 15px;
  font-weight: 520;
}

.wo-modal-field em {
  color: var(--ds-danger);
  font-size: 14px;
  font-style: normal;
  font-weight: 700;
}

.wo-modal-field.has-error input,
.wo-modal-field.has-error select,
.wo-modal-field.has-error textarea {
  border-color: rgba(211, 23, 34, 0.55);
  background: var(--ds-danger-bg);
}

.work-order-create-modal .name-field {
  grid-column: span 2;
}

.work-order-create-modal .wide-field {
  grid-column: 1 / -1;
}

.work-order-create-modal textarea {
  min-height: 112px;
  padding-top: 18px;
  line-height: 1.5;
  resize: vertical;
}

.work-order-create-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  gap: 28px;
  align-items: stretch;
}

.work-order-create-main {
  display: grid;
  gap: 22px;
}

.wo-create-card,
.wo-number-card {
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-card);
  background: var(--ds-card);
  box-shadow: var(--ds-shadow-card);
}

.wo-create-card {
  padding: 26px;
}

.wo-create-card h3 {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 22px;
  color: var(--ds-heading);
  font-size: 21px;
  font-weight: 700;
}

.wo-create-card h3 svg {
  width: 26px;
  height: 26px;
  color: var(--ds-primary);
}

.wo-create-card-grid {
  display: grid;
  gap: 20px 24px;
}

.wo-create-card-grid.two-columns,
.wo-create-card-grid.deadline-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.wo-modal-field.span-all {
  grid-column: 1 / -1;
}

.wo-modal-field.note-field {
  gap: 10px;
}

.wo-priority-field {
  display: grid;
  gap: 11px;
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.wo-priority-field legend {
  margin: 0;
  padding: 0;
  color: var(--ds-heading);
  font-size: 17px;
  font-weight: 760;
}

.wo-priority-field b {
  color: var(--ds-danger);
}

.wo-priority-segments {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  min-height: 68px;
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-input);
  background: var(--ds-card);
}

.wo-priority-segment {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 0;
  border-right: 1px solid var(--ds-border);
  color: var(--ds-text);
  font-size: 17px;
  font-weight: 650;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.wo-priority-segment:last-child {
  border-right: 0;
}

.wo-priority-segment input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.wo-priority-segment:hover {
  background: var(--ds-bg);
}

.wo-priority-segment.active {
  color: var(--ds-heading);
  background: var(--ds-primary-light);
  box-shadow: inset 0 0 0 1px var(--ds-primary-border);
}

.priority-dot {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  border-radius: 999px;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.42);
}

.priority-dot.low {
  background: var(--ds-success);
}

.priority-dot.medium {
  background: var(--ds-warning);
}

.priority-dot.high {
  background: #f97316;
}

.priority-dot.critical {
  background: var(--ds-danger);
}

.wo-priority-field.has-error .wo-priority-segments {
  border-color: rgba(220, 38, 38, 0.52);
  background: var(--ds-danger-bg);
}

.wo-priority-field em {
  color: var(--ds-danger);
  font-size: 14px;
  font-style: normal;
  font-weight: 700;
}

.work-order-create-side {
  min-width: 0;
}

.wo-number-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100%;
  padding: 44px 32px;
  text-align: center;
}

.wo-number-card > .soft-icon {
  width: 86px;
  height: 86px;
  margin-bottom: 28px;
}

.wo-number-card > p {
  margin: 0 0 12px;
  color: var(--ds-secondary);
  font-size: 17px;
  font-weight: 700;
}

.wo-number-card > strong {
  display: block;
  margin-bottom: 22px;
  color: var(--ds-primary);
  font-size: clamp(32px, 2.4vw, 42px);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: 0;
}

.wo-generated-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  margin-bottom: 26px;
  border-radius: 12px;
  padding: 0 16px;
  color: var(--ds-primary);
  background: var(--ds-primary-light);
  font-size: 15px;
  font-weight: 800;
}

.wo-generated-badge svg {
  width: 20px;
  height: 20px;
}

.wo-number-note {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  width: 100%;
  margin: 0 0 34px;
  border: 1px solid var(--ds-primary-border);
  border-radius: var(--ds-radius-card);
  padding: 20px;
  color: var(--ds-text);
  background: rgba(220, 252, 231, 0.32);
  text-align: left;
}

.wo-number-note svg {
  width: 24px;
  height: 24px;
  color: var(--ds-primary);
}

.wo-number-note p {
  margin: 0;
  font-size: 15px;
  line-height: 1.75;
  font-weight: 500;
}

.wo-created-date {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  margin-top: auto;
  text-align: left;
}

.wo-created-date .soft-icon {
  width: 54px;
  height: 54px;
  border: 1px solid var(--ds-border);
  color: var(--ds-heading);
  background: var(--ds-card);
}

.wo-created-date span {
  display: block;
  color: var(--ds-secondary);
  font-size: 15px;
  font-weight: 650;
}

.wo-created-date strong {
  display: block;
  margin-top: 5px;
  color: var(--ds-primary);
  font-size: 17px;
  font-weight: 800;
}

.work-order-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 18px;
  margin-top: 48px;
  border-top: 1px solid var(--nx-line);
  padding-top: 34px;
}

.work-order-modal-actions .secondary-button,
.work-order-modal-actions .primary-button {
  min-width: 118px;
  min-height: 58px;
  border-radius: 12px;
  padding: 0 30px;
  font-size: 17px;
  font-weight: 780;
}

.work-order-modal-actions .primary-button {
  min-width: 228px;
}

@media (max-width: 1180px) {
  .work-order-create-layout {
    grid-template-columns: 1fr;
  }

  .wo-number-card {
    min-height: auto;
  }

  .work-order-create-modal .work-order-form-grid {
    grid-template-columns: 1fr 1fr;
  }

  .work-order-create-modal .name-field {
    grid-column: span 1;
  }
}

@media (max-width: 760px) {
  .work-order-create-backdrop {
    padding: 12px;
  }

  .work-order-create-modal {
    padding: 30px 22px 24px;
  }

  .work-order-create-modal .work-order-form-grid {
    grid-template-columns: 1fr;
  }

  .wo-create-card {
    padding: 22px;
  }

  .wo-create-card-grid.two-columns,
  .wo-create-card-grid.deadline-grid {
    grid-template-columns: 1fr;
  }

  .wo-priority-segments {
    grid-template-columns: 1fr 1fr;
  }

  .wo-priority-segment:nth-child(2) {
    border-right: 0;
  }

  .wo-priority-segment:nth-child(-n + 2) {
    border-bottom: 1px solid var(--ds-border);
  }

  .wo-number-card {
    padding: 30px 22px;
  }

  .work-order-modal-header {
    align-items: flex-start;
    margin-bottom: 32px;
  }

  .work-order-modal-actions {
    flex-direction: column-reverse;
  }

  .work-order-modal-actions .secondary-button,
  .work-order-modal-actions .primary-button {
    width: 100%;
  }
}

.delete-confirm-modal {
  width: min(100%, 480px);
  padding: 24px;
}

.delete-confirm-modal h2 .soft-icon {
  color: var(--ds-danger);
  background: rgba(217, 31, 47, 0.08);
}

.modal-panel {
  position: relative;
}

.modal-panel h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-right: 34px;
  color: var(--nx-text);
  font-size: 15px;
  line-height: 1.25;
}

.modal-panel h2 .soft-icon {
  width: 28px;
  height: 28px;
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 0;
  border-radius: 8px;
  color: var(--nx-soft);
  background: transparent;
}

.modal-close:hover {
  color: var(--nx-text);
  background: rgba(10, 25, 49, 0.06);
}

.warning-strip {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 14px;
  border: 1px solid rgba(228, 125, 34, 0.16);
  border-radius: 8px;
  padding: 12px;
  color: var(--ds-warning);
  background: var(--ds-warning-bg);
  font-size: 12px;
  font-weight: 600;
}

.warning-strip svg {
  width: 17px;
  height: 17px;
}

@media (max-width: 1540px) {
  .work-orders-toolbar {
    grid-template-columns: auto minmax(170px, 1fr) repeat(4, minmax(106px, 1fr)) auto;
  }
}

@media (max-width: 1420px) {
  .items-layout,
  .problems-layout,
  .support-panels {
    grid-template-columns: 1fr;
  }

  .general-grid,
  .summary-strip,
  .work-kpis,
  .problem-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .qr-block {
    grid-row: auto;
  }
}

/* Build 002 compact density for work-order detail screens. */
.content-wide {
  padding: 16px 20px 14px;
  font-size: 11px;
}

.content-wide .topbar-compact {
  gap: 8px;
  margin-bottom: 10px;
}

.content-wide .topbar-actions {
  gap: 7px;
}

.content-wide .breadcrumb {
  gap: 7px;
  font-size: 10px;
}

.content-wide .detail-heading {
  gap: 10px;
}

.content-wide .detail-heading h1 {
  margin-top: 4px;
  font-size: clamp(22px, 1.75vw, 30px);
  line-height: 1.02;
}

.content-wide .detail-action {
  min-height: 32px;
  padding: 0 10px;
  font-size: 10.5px;
}

.content-wide .icon-button,
.content-wide .profile-chip {
  width: 32px;
  height: 32px;
  min-height: 32px;
}

.content-wide .profile-chip span {
  width: 28px;
  height: 28px;
  font-size: 10px;
}

.work-order-detail {
  gap: 10px;
}

.detail-tabs {
  gap: 16px;
}

.detail-tabs button {
  min-height: 30px;
  padding: 0 7px;
  font-size: 10.5px;
}

.general-card,
.summary-card,
.items-table-card,
.operation-card,
.status-card,
.problem-cta,
.problem-list,
.problem-thread,
.problem-side .detail-card,
.support-panels .detail-card {
  padding: 11px;
}

.detail-card h2,
.section-title h2 {
  font-size: 13px;
}

.section-title {
  gap: 8px;
  margin-bottom: 9px;
}

.soft-icon {
  width: 26px;
  height: 26px;
  border-radius: 8px;
}

.soft-icon svg {
  width: 14px;
  height: 14px;
}

.general-grid {
  grid-template-columns: repeat(3, minmax(130px, 1fr)) 160px;
  gap: 12px 14px;
}

.field {
  gap: 5px;
  font-size: 12px;
}

.field span,
.qr-block span {
  font-size: 11px;
}

.field input,
.field select,
.field textarea,
.table-tools input,
.filters select {
  min-height: 30px;
  padding: 6px 9px;
  font-size: 10.5px;
}

.field textarea {
  min-height: 46px;
}

.qr-demo {
  width: 118px;
}

.summary-strip,
.work-kpis,
.problem-kpis {
  gap: 7px;
}

.work-kpis,
.problem-kpis {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.summary-item,
.work-kpi {
  gap: 7px;
}

.work-kpi,
.problem-kpis .work-kpi {
  min-height: 42px;
  padding: 7px 9px;
}

.work-kpi strong {
  margin-top: 1px;
  font-size: 12px;
}

.work-kpi span,
.work-kpi em,
.summary-item small,
.summary-item em {
  font-size: 9.5px;
}

.status-badge {
  padding: 3px 7px;
  font-size: 9.5px;
}

.items-layout {
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 9px;
}

.table-tools {
  gap: 7px;
}

.table-tools input {
  width: 138px;
}

.hierarchy-table-wrap {
  margin: 0 -11px;
}

.hierarchy-table {
  min-width: 720px;
}

.hierarchy-table th,
.hierarchy-table td {
  padding: 5px 6px;
  font-size: 9px;
}

.hierarchy-name {
  grid-template-columns: 15px 24px minmax(96px, 1fr);
  gap: 4px;
}

.hierarchy-name small {
  font-size: 8.5px;
}

.level-1 .hierarchy-name {
  padding-left: 9px;
}

.level-2 .hierarchy-name {
  padding-left: 18px;
}

.row-toggle,
.row-spacer {
  width: 15px;
  height: 15px;
}

.doc-chip {
  gap: 4px;
  padding: 2px 4px;
  font-size: 8.5px;
}

.progress-cell {
  gap: 5px;
}

.progress-cell i {
  width: 34px;
  height: 3px;
}

.detail-list {
  gap: 6px 8px;
  margin-top: 8px;
  font-size: 9.5px;
}

.full-button {
  min-height: 29px;
  margin-top: 5px;
  font-size: 10px;
}

.support-panels {
  grid-template-columns: 180px minmax(200px, 1fr) 250px 210px;
  gap: 8px;
}

.drawing-list,
.drawing-preview,
.finish-panel {
  min-height: 112px;
}

.blueprint-demo {
  min-height: 86px;
}

.scrap-callout {
  gap: 7px;
  padding: 8px;
  font-size: 9.5px;
}

.problems-layout {
  grid-template-columns: 250px minmax(310px, 1fr) 220px;
  gap: 9px;
}

.problem-list-item {
  grid-template-columns: 30px 1fr 32px;
  gap: 8px;
  padding: 9px;
}

.problem-id {
  width: 26px;
  height: 26px;
  font-size: 11px;
}

.thread-grid {
  grid-template-columns: minmax(0, 1fr) 200px;
  gap: 10px;
}

.message {
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
}

.avatar {
  width: 26px;
  height: 26px;
  font-size: 10px;
}

.message > div:last-child {
  padding: 8px;
}

.message p,
.message header,
.problem-tags span,
.problem-list-item small {
  font-size: 11px;
}

.message-input {
  grid-template-columns: 1fr 28px 28px 66px;
  gap: 6px;
}

.message-input button {
  min-height: 30px;
}

@media (max-width: 1420px) {
  .content-wide .items-layout {
    grid-template-columns: minmax(0, 1fr) 230px;
  }

  .content-wide .problems-layout {
    grid-template-columns: 270px minmax(320px, 1fr) 230px;
  }

  .content-wide .support-panels {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .content-wide .work-kpis,
  .content-wide .problem-kpis {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

@media (max-width: 1240px) {
  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-panels {
    grid-template-columns: 1fr;
  }

  .quick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1360px) {
  .compact-table th:nth-child(6),
  .compact-table td:nth-child(6),
  .compact-table th:nth-child(7),
  .compact-table td:nth-child(7) {
    display: none;
  }
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    min-height: auto;
    box-shadow: none;
  }

  .sidebar-brand img {
    max-width: 300px;
  }

  .nav-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .settings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .content,
  .sidebar {
    padding: 20px;
  }

  .topbar,
  .bar-row {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .topbar {
    display: grid;
    margin-bottom: 30px;
  }

  .topbar-actions {
    justify-content: flex-start;
  }

  .kpi-grid,
  .settings-grid,
  .nav-list,
  .quick-grid {
    grid-template-columns: 1fr;
  }

  .production-visual {
    width: 100%;
  }

  .status-pill {
    white-space: normal;
  }
}

/* Build 002.2 readability fix for work-order detail screens only. */
.content-wide {
  font-size: 13px;
}

.content-wide .detail-heading h1 {
  font-size: clamp(28px, 2.25vw, 40px);
  line-height: 1.08;
}

.work-order-detail {
  gap: 18px;
}

.detail-tabs {
  gap: 24px;
}

.detail-tabs button {
  min-height: 44px;
  padding: 0 10px;
  font-size: 13.5px;
}

.general-card,
.summary-card,
.items-table-card,
.operation-card,
.status-card,
.problem-cta,
.problem-list,
.problem-thread,
.problem-side .detail-card,
.support-panels .detail-card {
  padding: 22px;
}

.detail-card h2,
.section-title h2,
.panel-header h2 {
  font-size: 17px;
}

.work-kpis,
.problem-kpis {
  gap: 12px;
}

.work-kpi,
.problem-kpis .work-kpi {
  min-height: 72px;
  padding: 14px 16px;
}

.work-kpi strong {
  font-size: 16px;
}

.work-kpi span,
.work-kpi em {
  font-size: 12px;
}

.items-layout {
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
}

.hierarchy-table-wrap {
  margin: 0 -22px;
}

.hierarchy-table {
  min-width: 860px;
}

.hierarchy-table th,
.hierarchy-table td {
  padding: 14px 16px;
  font-size: 13px;
  line-height: 1.35;
}

.hierarchy-name {
  grid-template-columns: 24px 46px minmax(180px, 1fr);
  gap: 10px;
}

.hierarchy-name strong {
  font-size: 13.5px;
}

.hierarchy-name small {
  font-size: 12px;
}

.row-toggle,
.row-spacer {
  width: 22px;
  height: 22px;
}

.doc-chip {
  padding: 7px 10px;
  font-size: 12px;
}

.progress-cell i {
  width: 78px;
  height: 6px;
}

.progress-cell em {
  font-size: 12px;
}

.status-badge {
  padding: 6px 10px;
  font-size: 11.5px;
}

.operation-side,
.problem-side {
  gap: 16px;
}

.operation-title {
  padding: 9px 13px;
  font-size: 13px;
}

.detail-list {
  gap: 12px 16px;
  margin-top: 16px;
  font-size: 13px;
}

.full-button {
  min-height: 42px;
  margin-top: 8px;
  padding: 0 14px;
  font-size: 13px;
}

.support-panels {
  grid-template-columns: minmax(280px, 420px);
  gap: 14px;
  align-items: start;
}

.drawing-list {
  min-height: auto;
}

.drawing-file {
  grid-template-columns: 24px 1fr auto;
  gap: 12px;
  padding: 13px 0;
  font-size: 13px;
}

.drawing-file small,
.drawing-file em {
  font-size: 12px;
}

.problems-layout {
  grid-template-columns: 340px minmax(520px, 1fr) 300px;
  gap: 18px;
}

.problem-list-item {
  grid-template-columns: 42px 1fr 48px;
  gap: 12px;
  padding: 14px;
}

.problem-list-item strong {
  font-size: 13.5px;
}

.problem-list-item small {
  font-size: 12.5px;
  line-height: 1.55;
}

.problem-id {
  width: 34px;
  height: 34px;
  font-size: 12px;
}

.problem-id.large {
  width: 54px;
  height: 46px;
  font-size: 17px;
}

.problem-head {
  gap: 14px;
}

.problem-head h2 {
  font-size: 22px;
}

.problem-tags {
  gap: 9px;
  margin-bottom: 18px;
}

.problem-tags span {
  padding: 8px 11px;
  font-size: 12.5px;
}

.thread-grid {
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 16px;
}

.messages {
  gap: 14px;
}

.message {
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 12px;
}

.avatar {
  width: 36px;
  height: 36px;
  font-size: 12px;
}

.message > div:last-child {
  padding: 13px;
}

.message header {
  font-size: 12.5px;
}

.message p {
  font-size: 13px;
  line-height: 1.6;
}

.message-input {
  grid-template-columns: 1fr 40px 40px 92px;
  gap: 8px;
}

.message-input input {
  min-height: 44px;
  padding: 0 13px;
  font-size: 13px;
}

.message-input button {
  min-height: 42px;
}

.message-photos,
.photo-grid {
  gap: 10px;
}

.message-photos button,
.photo-grid button {
  min-height: 118px;
  border: 1px solid rgba(10, 25, 49, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.45);
}

.problem-side .detail-card {
  font-size: 13px;
}

.modal-panel {
  width: min(100%, 720px);
  padding: 30px;
}

.modal-panel h2 {
  font-size: 21px;
}

.modal-panel p {
  font-size: 14px;
}

.modal-grid {
  gap: 18px;
}

.modal-grid .field input,
.modal-grid .field select,
.modal-grid .field textarea {
  min-height: 44px;
  padding: 10px 12px;
  font-size: 14px;
}

.modal-grid .field textarea {
  min-height: 96px;
}

.modal-actions button {
  min-height: 42px;
  padding: 0 18px;
  font-size: 14px;
}

.scrap-note {
  margin-top: 16px;
  border: 1px solid var(--ds-primary-border);
  border-radius: 12px;
  padding: 14px 16px;
  color: var(--ds-primary);
  background: var(--ds-primary-light);
  font-size: 13px;
  font-weight: 650;
}

.preview-modal {
  width: min(100%, 900px);
}

.modal-blueprint {
  min-height: 520px;
}

.photo-preview-demo {
  min-height: 520px;
  border: 1px solid var(--nx-line);
  border-radius: 14px;
  background:
    radial-gradient(circle at 52% 42%, rgba(18,24,22,0.9) 0 5%, transparent 6%),
    linear-gradient(135deg, rgba(232,235,232,0.95), rgba(133,142,136,0.9)),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.16) 0 12px, transparent 12px 24px);
  box-shadow: inset 0 0 70px rgba(7,31,24,0.16);
}

@media (max-width: 1420px) {
  .content-wide .items-layout {
    grid-template-columns: minmax(0, 1fr) 340px;
  }

  .content-wide .problems-layout {
    grid-template-columns: 320px minmax(460px, 1fr);
  }

  .content-wide .problem-side {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .content-wide .support-panels {
    grid-template-columns: minmax(280px, 420px);
  }
}

/* Build 002.3 workflow: progressive detail, full-width table and action drawer. */
.content-wide .items-layout {
  grid-template-columns: 1fr;
}

.content-wide .items-table-card {
  overflow: hidden;
}

.content-wide .hierarchy-table {
  width: 100%;
  min-width: 1080px;
}

.content-wide .hierarchy-table th,
.content-wide .hierarchy-table td {
  padding: 14px 12px;
  font-size: 13px;
}

.content-wide .hierarchy-table th:nth-child(2),
.content-wide .hierarchy-table td:nth-child(2) {
  min-width: 190px;
}

.content-wide .hierarchy-table th:nth-child(10),
.content-wide .hierarchy-table td:nth-child(10) {
  min-width: 110px;
}

.content-wide .hierarchy-table th:nth-child(11),
.content-wide .hierarchy-table td:nth-child(11) {
  min-width: 112px;
}

.position-cell {
  display: inline-grid;
  grid-template-columns: 24px 42px;
  align-items: center;
  gap: 10px;
}

.operation-progress {
  display: grid;
  grid-template-columns: minmax(76px, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  min-width: 160px;
}

.operation-progress i {
  display: block;
  height: 7px;
  border-radius: 999px;
  background: #e7ece9;
  overflow: hidden;
}

.operation-progress b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--ds-primary);
}

.operation-progress em,
.operation-progress strong {
  color: var(--nx-soft);
  font-size: 12px;
  font-style: normal;
  white-space: nowrap;
}

.operation-progress strong {
  color: var(--nx-text);
}

.action-drawer-button {
  gap: 7px;
}

.operation-info-panel {
  border-color: rgba(74, 127, 167, 0.38);
}

.operation-info-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.8fr) minmax(280px, 0.9fr);
  gap: 18px;
}

.operation-info-grid h3,
.problem-detail-stack h3 {
  margin: 0 0 12px;
  color: var(--nx-text);
  font-size: 14px;
}

.compact-drawings {
  min-height: auto;
}

.muted-note {
  margin: 0;
  color: var(--nx-soft);
  line-height: 1.6;
}

.operation-history {
  display: grid;
  gap: 0;
}

.operation-history div {
  border-left: 2px solid var(--nx-line);
  padding: 0 0 16px 16px;
}

.operation-history span {
  display: block;
  width: 10px;
  height: 10px;
  margin-left: -22px;
  border-radius: 999px;
  background: var(--ds-primary);
}

.operation-history strong,
.operation-history small {
  display: block;
}

.operation-history small {
  margin-top: 4px;
  color: var(--nx-soft);
  line-height: 1.45;
}

.drawer-scrim {
  position: fixed;
  inset: 0;
  z-index: 34;
  background: rgba(10, 25, 49, 0.14);
  backdrop-filter: blur(2px);
}

.operation-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 35;
  display: grid;
  width: min(420px, 92vw);
  height: 100vh;
  align-content: start;
  gap: 20px;
  border-left: 1px solid var(--nx-line);
  padding: 28px;
  background: var(--nx-white);
  box-shadow: -24px 0 60px rgba(10, 25, 49, 0.16);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--nx-text);
  font-size: 18px;
  font-weight: 750;
}

.operation-drawer .modal-close {
  position: static;
}

.drawer-actions {
  display: grid;
  gap: 10px;
}

.content-wide .problems-layout {
  grid-template-columns: 360px minmax(0, 1fr);
  align-items: start;
}

.problem-thread {
  min-height: 640px;
}

.problem-detail-stack {
  display: grid;
  gap: 20px;
}

.problem-detail-stack .detail-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 0;
}

.problem-detail-stack .photo-grid {
  grid-template-columns: repeat(4, minmax(130px, 1fr));
}

.problem-detail-stack .message-photos {
  grid-template-columns: repeat(2, minmax(180px, 240px));
}

.problem-status-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 1420px) {
  .content-wide .items-layout {
    grid-template-columns: 1fr;
  }

  .operation-info-grid {
    grid-template-columns: 1fr;
  }

  .content-wide .problems-layout {
    grid-template-columns: 1fr;
  }
}

/* Build 002.4 documents workflow: horizontal document strip for selected work-order line. */
.document-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.document-badges button {
  border: 1px solid var(--nx-line);
  border-radius: 9px;
  padding: 7px 10px;
  color: var(--nx-text);
  background: #f9fbfa;
  font-size: 12px;
  font-weight: 700;
}

.document-badges button:hover {
  border-color: rgba(74, 127, 167, 0.36);
  background: rgba(179, 207, 229, 0.08);
}

.no-documents {
  color: var(--nx-muted);
}

.documents-panel {
  border-color: rgba(74, 127, 167, 0.44);
  overflow: hidden;
}

.documents-panel-header {
  align-items: start;
  margin-bottom: 16px;
}

.documents-panel-header p {
  margin: 6px 0 0;
  color: var(--nx-soft);
  font-size: 13px;
}

.documents-panel-header p span {
  display: inline-flex;
  margin-left: 8px;
  border-radius: 999px;
  padding: 3px 9px;
  color: #136c35;
  background: rgba(179, 207, 229, 0.12);
  font-weight: 750;
}

.documents-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(210px, 240px);
  gap: 14px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding: 4px 2px 12px;
  scrollbar-width: thin;
}

.document-card,
.document-add-card,
.document-empty-card {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 230px;
  border: 1px solid var(--nx-line);
  border-radius: 14px;
  padding: 12px;
  background: var(--ds-card);
  box-shadow: 0 12px 30px rgba(10, 25, 49, 0.06);
}

.document-thumb {
  position: relative;
  overflow: hidden;
  min-height: 86px;
  border: 1px solid var(--nx-line);
  border-radius: 10px;
  background: #f7faf8;
}

.document-thumb span {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 1;
  border-radius: 7px;
  padding: 5px 7px;
  color: var(--nx-text);
  background: rgba(255, 255, 255, 0.88);
  font-size: 11px;
  font-weight: 800;
}

.document-thumb i {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 86px;
}

.photo-document-demo {
  background:
    linear-gradient(135deg, rgba(10, 25, 49, 0.15), rgba(22, 129, 62, 0.14)),
    linear-gradient(30deg, transparent 44%, rgba(255, 255, 255, 0.65) 45% 50%, transparent 51%),
    linear-gradient(145deg, #5d6b64, #d9dfdc 52%, #79857e);
}

.document-card strong button {
  max-width: 100%;
  border: 0;
  padding: 0;
  color: var(--nx-text);
  background: transparent;
  overflow-wrap: anywhere;
  text-align: left;
  font-size: 13px;
  font-weight: 800;
}

.document-card small {
  color: var(--nx-soft);
  line-height: 1.45;
}

.document-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  gap: 8px;
  margin-top: auto;
}

.document-add-card,
.document-empty-card {
  place-items: center;
  border-style: dashed;
  color: var(--nx-soft);
  text-align: center;
}

.document-add-card svg,
.document-empty-card svg {
  width: 34px;
  height: 34px;
  color: var(--ds-primary);
}

.document-add-card strong,
.document-empty-card strong {
  color: var(--nx-text);
}

.documents-panel footer {
  padding-top: 4px;
  color: var(--nx-soft);
  font-size: 12px;
}

.document-modal {
  width: min(100%, 720px);
}

.document-source-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
}

.document-modal-grid {
  margin-top: 0;
}

.file-state {
  border: 1px solid var(--nx-line);
  border-radius: 10px;
  padding: 11px 12px;
  color: var(--nx-soft);
  background: var(--ds-bg);
  font-size: 13px;
}

.document-preview-modal {
  width: min(100%, 820px);
}

.document-preview-demo {
  display: grid;
  place-items: center;
  min-height: 430px;
  border: 1px solid var(--nx-line);
  border-radius: 16px;
  color: var(--ds-card);
  text-align: center;
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.32), transparent 28%),
    linear-gradient(135deg, #24362f, #7b887f 54%, #1c5f38);
}

.document-preview-demo span {
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 12px;
  font-weight: 800;
}

.document-preview-demo strong {
  margin-top: 12px;
  font-size: 22px;
}

.camera-unavailable-modal {
  width: min(100%, 520px);
}

/* Build 003.2 new product modal. */
.product-modal-backdrop {
  align-items: start;
  overflow-y: auto;
}

.product-create-modal {
  width: min(calc(100vw - 48px), 1120px);
  max-height: calc(100vh - 68px);
  margin: 34px 0;
  padding: 0;
  overflow: auto;
}

.product-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  border-bottom: 1px solid var(--nx-line);
  padding: 28px 30px 22px;
}

.product-modal-header h2 {
  margin: 0;
  color: var(--nx-text);
  font-size: 24px;
  font-weight: 760;
}

.product-modal-header p {
  margin: 8px 0 0;
  color: var(--nx-soft);
}

.product-modal-header .modal-close {
  position: static;
}

.product-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--nx-line);
  background: var(--ds-card);
}

.product-steps button {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 70px;
  border: 0;
  border-bottom: 3px solid transparent;
  padding: 0 28px;
  color: var(--nx-soft);
  background: transparent;
  font-weight: 760;
}

.product-steps span {
  display: inline-grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border: 1px solid #b9c4bf;
  border-radius: 999px;
  font-size: 12px;
}

.product-steps button.active {
  border-bottom-color: var(--nx-green);
  color: var(--nx-green);
  background: var(--ds-card);
}

.product-steps button.active span {
  border-color: var(--nx-green);
  color: var(--ds-card);
  background: var(--nx-green);
}

.product-steps button.locked {
  opacity: 0.72;
}

.product-error {
  margin: 18px 24px 0;
}

.product-modal-grid {
  display: grid;
  grid-template-columns: minmax(360px, 1.16fr) minmax(260px, 0.72fr) minmax(320px, 0.92fr);
  align-items: stretch;
  gap: 22px;
  padding: 28px;
  background:
    radial-gradient(circle at 12% 4%, rgba(76, 143, 86, 0.055), transparent 28%),
    linear-gradient(180deg, var(--ds-card) 0%, var(--ds-card) 100%);
}

.product-middle-column {
  display: grid;
  gap: 16px;
  align-content: start;
}

.product-form-card {
  border: 1px solid var(--nx-line);
  border-radius: 16px;
  padding: 26px;
  background: var(--ds-card);
  box-shadow: 0 18px 42px rgba(11, 39, 29, 0.065);
}

.product-form-card h3 {
  margin: 0 0 24px;
  color: var(--nx-text);
  font-size: 17px;
  font-weight: 760;
}

.product-form-card .field {
  margin-bottom: 20px;
}

.product-form-card .field:last-child {
  margin-bottom: 0;
}

.product-form-card .field b,
.product-radio-group b {
  color: var(--ds-danger);
}

.product-radio-group {
  display: grid;
  gap: 14px;
  border: 0;
  margin: 0 0 22px;
  padding: 0;
}

.product-radio-group legend {
  margin-bottom: 10px;
  color: var(--nx-text);
  font-size: 13px;
  font-weight: 720;
}

.product-radio-group label {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--nx-text);
  font-size: 14px;
  font-weight: 560;
}

.product-type-cards > div {
  display: grid;
  gap: 10px;
}

.product-type-cards label {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 12px;
  border: 1px solid var(--nx-line);
  border-radius: 13px;
  padding: 14px 15px;
  background: var(--ds-card);
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.product-type-cards label:hover {
  border-color: rgba(41, 126, 68, 0.32);
  background: #f7fbf8;
}

.product-type-cards label.active {
  border-color: rgba(13, 107, 67, 0.58);
  background: linear-gradient(180deg, rgba(49, 132, 75, 0.1), rgba(49, 132, 75, 0.035));
  box-shadow: 0 10px 24px rgba(13, 107, 67, 0.08);
}

.product-type-cards label strong {
  display: block;
  color: var(--nx-text);
  font-size: 14.5px;
  font-weight: 760;
}

.product-type-cards label small {
  display: block;
  margin-top: 4px;
  color: var(--nx-soft);
  font-size: 12.5px;
  font-weight: 520;
  line-height: 1.45;
}

.product-radio-group input {
  width: 19px;
  height: 19px;
  accent-color: var(--nx-green);
}

.product-form-card textarea {
  min-height: 146px;
  resize: vertical;
}

.textarea-counter {
  display: block;
  margin-top: -24px;
  padding-right: 8px;
  color: var(--nx-soft);
  text-align: right;
}

.product-photo-card {
  display: grid;
  align-content: start;
}

.product-photo-dropzone {
  display: grid;
  place-items: center;
  min-height: 350px;
  border: 1px dashed #bac4bf;
  border-radius: 15px;
  padding: 30px;
  color: var(--nx-soft);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(248, 251, 249, 0.95)),
    repeating-linear-gradient(135deg, rgba(13, 107, 67, 0.025) 0 10px, transparent 10px 20px);
  text-align: center;
}

.product-photo-dropzone:hover {
  border-color: rgba(74, 127, 167, 0.46);
  background: rgba(179, 207, 229, 0.045);
}

.product-photo-dropzone svg {
  width: 48px;
  height: 48px;
  color: #8b9690;
}

.product-photo-dropzone strong {
  margin-top: 18px;
  color: var(--nx-text);
  font-size: 15px;
}

.product-photo-dropzone span,
.product-photo-dropzone small {
  display: block;
  margin-top: 12px;
  line-height: 1.55;
}

.product-photo-preview {
  display: grid;
  gap: 14px;
}

.product-photo-preview img {
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--nx-line);
  border-radius: 10px;
  object-fit: cover;
  background: var(--ds-bg);
}

.product-photo-preview strong {
  color: var(--nx-text);
  overflow-wrap: anywhere;
}

.product-photo-preview div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.product-placeholder-step {
  display: grid;
  place-items: center;
  min-height: 430px;
  padding: 42px;
  text-align: center;
}

.product-placeholder-step svg {
  width: 44px;
  height: 44px;
  color: var(--nx-green);
}

.product-placeholder-step h3 {
  margin: 16px 0 8px;
  color: var(--nx-text);
}

.product-placeholder-step p {
  max-width: 430px;
  color: var(--nx-soft);
}

.product-assemblies-step {
  display: grid;
  gap: 24px;
  padding: 24px;
  background: var(--ds-card);
}

.assembly-explainer {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: center;
  border: 1px solid rgba(74, 127, 167, 0.18);
  border-radius: var(--radius-sm);
  padding: 22px 24px;
  background: linear-gradient(135deg, rgba(179, 207, 229, 0.07), rgba(255, 255, 255, 0.82));
}

.assembly-explainer div {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
  color: var(--nx-green);
  background: rgba(179, 207, 229, 0.12);
}

.assembly-explainer svg {
  width: 26px;
  height: 26px;
}

.assembly-explainer strong,
.assembly-explainer small {
  display: block;
}

.assembly-explainer strong {
  margin-bottom: 7px;
  color: var(--nx-text);
  font-size: 16px;
}

.assembly-explainer small {
  color: var(--nx-muted);
  font-size: 14px;
  line-height: 1.55;
}

.product-assembly-card {
  display: grid;
  gap: 18px;
}

.product-assembly-card > header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.product-assembly-card h3 {
  margin: 0;
  color: var(--nx-text);
  font-size: 18px;
  font-weight: 780;
}

.product-assembly-card p {
  margin: 7px 0 0;
  color: var(--nx-soft);
}

.assembly-table-wrap {
  overflow: hidden;
  border: 1px solid var(--nx-line);
  border-radius: var(--radius-sm);
  background: var(--ds-card);
}

.assembly-table {
  width: 100%;
  border-collapse: collapse;
}

.assembly-table th {
  padding: 17px 20px;
  color: var(--nx-text);
  background: var(--ds-card);
  font-size: 13px;
  font-weight: 780;
  text-align: left;
}

.assembly-table td {
  border-top: 1px solid var(--nx-line);
  padding: 18px 20px;
  color: var(--nx-text);
  font-size: 14px;
}

.assembly-table tbody tr[data-action] {
  cursor: pointer;
}

.assembly-table tbody tr[data-action]:hover {
  background: rgba(179, 207, 229, 0.045);
}

.assembly-table .row-actions {
  justify-content: flex-start;
}

.assembly-inline-input,
.assembly-inline-select {
  width: min(100%, 320px);
  min-height: 38px;
  border: 1px solid var(--nx-line);
  border-radius: 10px;
  padding: 8px 11px;
  color: var(--nx-text);
  background: var(--ds-card);
  font: inherit;
  font-weight: 560;
}

.assembly-inline-input:focus,
.assembly-inline-select:focus {
  border-color: rgba(74, 127, 167, 0.42);
  outline: none;
  box-shadow: 0 0 0 3px rgba(179, 207, 229, 0.1);
}

.assembly-inline-select {
  width: 82px;
  color: var(--nx-green);
  font-weight: 760;
}

.assembly-position-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  border-radius: 8px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 760;
}

.assembly-position-badge.yes {
  color: var(--ds-primary);
  background: rgba(74, 127, 167, 0.17);
}

.assembly-position-badge.no {
  color: #c23a3a;
  background: rgba(194, 58, 58, 0.13);
}

.assembly-table .empty-row td {
  padding: 34px 20px;
  color: var(--nx-soft);
  text-align: center;
}

.product-inline-confirm {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(10, 25, 49, 0.28);
  backdrop-filter: blur(8px);
}

.product-create-modal {
  position: relative;
}

.product-inline-confirm-panel {
  position: relative;
  width: min(100%, 440px);
  border: 1px solid var(--nx-line);
  border-radius: var(--radius-md);
  padding: 24px;
  background: var(--ds-card);
  box-shadow: var(--shadow-hover);
}

.product-inline-confirm-panel h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  color: var(--nx-text);
  font-size: 17px;
}

.product-inline-confirm-panel p {
  margin: 0 0 16px;
  color: var(--nx-muted);
  line-height: 1.5;
}

.product-inline-confirm-panel footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.product-stations-step {
  display: grid;
  gap: 18px;
  padding: 24px;
  background: var(--ds-card);
}

.stations-step-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.stations-step-heading h3 {
  margin: 0 0 8px;
  color: var(--nx-text);
  font-size: 22px;
  font-weight: 780;
}

.stations-step-heading p {
  margin: 0;
  color: var(--nx-soft);
  font-size: 14px;
}

.station-scope-tabs {
  display: inline-grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: min(100%, 620px);
  overflow: hidden;
  border: 1px solid var(--nx-line);
  border-radius: 12px;
  background: var(--ds-card);
}

.station-scope-tabs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 50px;
  border: 0;
  border-right: 1px solid var(--nx-line);
  color: var(--nx-soft);
  background: var(--ds-card);
  font-weight: 760;
}

.station-scope-tabs button:last-child {
  border-right: 0;
}

.station-scope-tabs button.active {
  color: var(--nx-green);
  background: rgba(74, 127, 167, 0.08);
  box-shadow: inset 0 0 0 1px rgba(74, 127, 167, 0.26);
}

.station-scope-tabs button.locked {
  color: #a1aaa5;
  background: #f7f9f8;
}

.station-scope-tabs svg {
  width: 18px;
  height: 18px;
}

.station-target-list {
  display: grid;
  gap: 14px;
  border: 1px solid var(--nx-line);
  border-radius: var(--radius-sm);
  padding: 18px;
  background: var(--ds-card);
}

.station-target-list header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.station-target-list h4 {
  margin: 0;
  color: var(--nx-text);
  font-size: 16px;
  font-weight: 780;
}

.station-target-list p {
  margin: 4px 0 0;
  color: var(--nx-soft);
}

.station-target-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
}

.station-target-grid button {
  display: grid;
  gap: 4px;
  border: 1px solid var(--nx-line);
  border-radius: 12px;
  padding: 13px 14px;
  color: var(--nx-text);
  background: var(--ds-card);
  text-align: left;
}

.station-target-grid button.active {
  border-color: rgba(74, 127, 167, 0.46);
  background: rgba(74, 127, 167, 0.08);
}

.station-target-grid button.locked {
  border-style: dashed;
  color: var(--nx-soft);
  background: #fafbfa;
}

.station-target-grid span,
.station-target-grid small {
  color: var(--nx-soft);
}

.station-table-card {
  overflow: hidden;
  border: 1px solid var(--nx-line);
  border-radius: var(--radius-sm);
  background: var(--ds-card);
}

.station-table {
  width: 100%;
  border-collapse: collapse;
}

.station-table th {
  padding: 17px 20px;
  color: var(--nx-text);
  background: var(--ds-card);
  font-size: 13px;
  font-weight: 780;
  text-align: left;
}

.station-table td {
  border-top: 1px solid var(--nx-line);
  padding: 17px 20px;
  color: var(--nx-text);
  font-size: 14px;
}

.station-table tbody tr[data-action] {
  cursor: pointer;
}

.station-table tbody tr[data-action]:hover,
.station-table tbody tr.selected {
  background: #f3f5f3;
}

.station-summary-row td {
  background: var(--ds-card);
  font-size: 15px;
  font-weight: 780;
}

.station-empty-row td {
  padding: 42px 20px;
}

.station-empty-state {
  display: grid;
  gap: 10px;
  justify-items: center;
  color: var(--nx-soft);
  text-align: center;
}

.station-empty-state svg,
.station-details-empty svg {
  width: 42px;
  height: 42px;
  color: #b6c2bd;
}

.station-empty-state strong {
  color: var(--nx-text);
}

.station-details-card {
  border: 1px solid var(--nx-line);
  border-radius: var(--radius-sm);
  background: var(--ds-card);
}

.station-details-card > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--nx-line);
  padding: 22px 24px 18px;
}

.station-details-card h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--nx-text);
  font-size: 20px;
  font-weight: 780;
}

.station-details-card h4 {
  margin: 0 0 18px;
  color: var(--nx-text);
  font-size: 15px;
  font-weight: 780;
}

.station-details-card p {
  margin: 7px 0 0;
  color: var(--nx-soft);
}

.station-details-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 0;
  padding: 22px 24px;
}

.station-details-grid > section {
  border-right: 1px solid var(--nx-line);
  padding: 0 24px;
}

.station-details-grid > section:first-child {
  padding-left: 0;
}

.station-details-grid > section:last-child {
  border-right: 0;
  padding-right: 0;
}

.station-details-grid .field {
  margin-bottom: 18px;
}

.station-warning {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 12px;
  border: 1px solid rgba(212, 135, 43, 0.24);
  border-radius: 12px;
  margin-bottom: 16px;
  padding: 12px 14px;
  color: var(--nx-text);
  background: rgba(212, 135, 43, 0.08);
}

.station-warning svg {
  width: 20px;
  height: 20px;
  color: var(--nx-orange);
}

.station-warning span {
  display: grid;
  gap: 3px;
}

.station-warning small {
  color: var(--nx-soft);
}

.station-details-grid textarea {
  min-height: 104px;
}

.station-people-list {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.station-person-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  border: 1px solid var(--nx-line);
  border-radius: 11px;
  padding: 9px 11px;
  background: var(--ds-card);
}

.station-person-row svg {
  width: 18px;
  height: 18px;
  color: var(--nx-green);
}

.station-muted {
  border: 1px dashed var(--nx-line);
  border-radius: 11px;
  padding: 14px;
  background: var(--ds-card);
}

.station-add-person {
  width: 170px;
}

.station-details-empty {
  display: grid;
  min-height: 210px;
  place-items: center;
  padding: 28px;
  text-align: center;
}

.station-person-picker {
  width: min(100%, 520px);
}

.station-person-options {
  display: grid;
  gap: 10px;
  margin: 18px 0 4px;
}

.station-person-options label {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--nx-line);
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
}

.station-person-options label:has(input:checked) {
  border-color: rgba(74, 127, 167, 0.34);
  background: rgba(74, 127, 167, 0.07);
}

.station-person-options input {
  width: 18px;
  height: 18px;
  accent-color: var(--nx-green);
}

.station-person-options span,
.station-person-options small {
  display: block;
}

.station-person-options small {
  margin-top: 3px;
  color: var(--nx-soft);
}

.product-assembly-detail-modal {
  width: min(calc(100vw - 48px), 1180px);
  max-height: calc(100vh - 34px);
  margin: 17px 0;
}

.assembly-detail-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--nx-line);
  padding: 16px 24px;
}

.assembly-detail-top .modal-close {
  position: static;
}

.assembly-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: var(--nx-soft);
  font-size: 13px;
  font-weight: 640;
}

.assembly-breadcrumb button {
  border: 0;
  padding: 0;
  color: var(--nx-soft);
  background: transparent;
  font: inherit;
}

.assembly-breadcrumb strong {
  color: var(--nx-text);
}

.assembly-detail-body {
  display: grid;
  gap: 16px;
  padding: 18px 24px;
  background: var(--ds-card);
}

.assembly-detail-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.assembly-detail-heading h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 8px;
  color: var(--nx-text);
  font-size: 30px;
  font-weight: 760;
}

.assembly-detail-heading p {
  margin: 0;
  color: var(--nx-soft);
}

.product-heading-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  padding: 7px 10px;
  color: var(--ds-primary);
  background: rgba(74, 127, 167, 0.18);
  font-size: 13px;
  font-weight: 760;
}

.assembly-positions-button {
  border-color: rgba(74, 127, 167, 0.46);
  color: var(--nx-green);
  background: rgba(179, 207, 229, 0.07);
}

.assembly-detail-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(250px, 0.86fr) minmax(300px, 1.1fr);
  gap: 18px;
}

.product-assembly-detail-modal .product-form-card {
  padding: 18px;
}

.product-assembly-detail-modal .product-form-card h3 {
  margin-bottom: 16px;
}

.product-assembly-detail-modal .product-form-card .field {
  margin-bottom: 14px;
}

.product-assembly-detail-modal .product-form-card textarea {
  min-height: 108px;
}

.assembly-doc-card p {
  margin: -10px 0 16px;
  color: var(--nx-soft);
  font-size: 13px;
}

.assembly-doc-dropzone {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 118px;
  border: 1px dashed #bac4bf;
  border-radius: 12px;
  padding: 14px;
  color: var(--nx-soft);
  background: var(--ds-card);
  text-align: center;
}

.assembly-doc-dropzone:hover {
  border-color: rgba(74, 127, 167, 0.46);
  background: rgba(179, 207, 229, 0.045);
}

.assembly-doc-dropzone svg {
  width: 24px;
  height: 24px;
  color: var(--nx-green);
}

.assembly-doc-dropzone strong {
  margin-top: 10px;
  color: var(--nx-text);
}

.assembly-doc-dropzone span,
.assembly-doc-dropzone small {
  display: block;
  margin-top: 7px;
}

.assembly-doc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.product-doc-empty {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  gap: 7px;
  min-height: 112px;
  border: 1px dashed var(--nx-line-strong);
  border-radius: 12px;
  color: var(--nx-soft);
  background: var(--ds-card);
  text-align: center;
}

.product-doc-empty svg {
  color: var(--nx-muted);
}

.product-doc-empty strong {
  color: var(--nx-text);
}

.product-doc-empty span {
  font-size: 13px;
}

.assembly-doc-item {
  display: grid;
  gap: 8px;
}

.assembly-doc-preview {
  display: grid;
  width: 100%;
  aspect-ratio: 1.45 / 1;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--nx-line);
  border-radius: 10px;
  background: var(--ds-bg);
}

.assembly-doc-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.assembly-doc-preview span {
  display: grid;
  gap: 8px;
  justify-items: center;
  color: var(--nx-soft);
}

.assembly-doc-preview svg {
  width: 34px;
  height: 34px;
}

.assembly-doc-item strong {
  color: var(--nx-text);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.assembly-doc-item small {
  color: var(--nx-soft);
}

.assembly-doc-item div {
  display: flex;
  gap: 8px;
  align-items: center;
}

.modal-action-spacer {
  flex: 1;
}

.assembly-preview-panel {
  position: relative;
  width: min(100%, 820px);
  border: 1px solid var(--nx-line);
  border-radius: var(--radius-md);
  padding: 24px;
  background: var(--ds-card);
  box-shadow: var(--shadow-hover);
}

.assembly-preview-panel h3 {
  margin: 0 34px 16px 0;
  color: var(--nx-text);
}

.assembly-preview-panel img {
  width: 100%;
  max-height: 68vh;
  border: 1px solid var(--nx-line);
  border-radius: 12px;
  object-fit: contain;
  background: var(--ds-bg);
}

.product-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 14px;
  border-top: 1px solid var(--nx-line);
  padding: 22px 24px;
  background: var(--ds-card);
}

.product-assembly-detail-modal .product-modal-actions {
  padding: 16px 24px;
}

.product-positions-modal {
  width: min(calc(100vw - 40px), 1260px);
  max-height: calc(100vh - 34px);
  margin: 17px 0;
}

.positions-screen-body {
  display: grid;
  gap: 10px;
  padding: 12px 24px;
  background: var(--ds-card);
}

.positions-back-button {
  width: fit-content;
}

.positions-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.positions-heading h2 {
  margin: 0 0 5px;
  color: var(--nx-text);
  font-size: 26px;
  font-weight: 760;
}

.positions-heading p {
  margin: 0;
  color: var(--nx-soft);
}

.positions-table-card,
.position-details-card {
  border: 1px solid var(--nx-line);
  border-radius: var(--radius-sm);
  background: var(--ds-card);
  overflow: hidden;
}

.positions-table {
  width: 100%;
  border-collapse: collapse;
}

.positions-table th {
  padding: 10px 18px;
  border-bottom: 1px solid var(--nx-line);
  color: var(--nx-text);
  background: var(--ds-card);
  font-size: 13px;
  font-weight: 760;
  text-align: left;
}

.positions-table td {
  padding: 6px 18px;
  border-bottom: 1px solid var(--nx-line);
  color: var(--nx-text);
  font-size: 13px;
  vertical-align: middle;
}

.positions-table tr:last-child td {
  border-bottom: 0;
}

.positions-table tbody tr {
  cursor: pointer;
}

.positions-table tbody tr:hover,
.positions-table tbody tr.selected {
  background: #f2f3f1;
}

.positions-table tbody tr.positions-empty-row,
.positions-table tbody tr.positions-empty-row:hover {
  cursor: default;
  background: var(--ds-card);
}

.positions-empty-row td {
  padding: 30px 18px 34px;
}

.positions-empty-state {
  display: grid;
  justify-items: center;
  gap: 9px;
  min-height: 190px;
  place-content: center;
  color: var(--nx-soft);
  text-align: center;
}

.positions-empty-state strong {
  color: var(--nx-text);
  font-size: 15px;
  font-weight: 760;
}

.positions-empty-state span {
  margin-bottom: 8px;
  font-size: 13px;
}

.empty-box-illustration {
  position: relative;
  display: grid;
  width: 92px;
  height: 68px;
  place-items: center;
  color: #9aa8a0;
}

.empty-box-illustration svg {
  width: 54px;
  height: 54px;
  opacity: 0.68;
}

.empty-box-illustration i {
  position: absolute;
  top: 3px;
  right: 10px;
  width: 42px;
  border-top: 1px dashed #9eb0a6;
  transform: rotate(-18deg);
}

.empty-box-illustration i::after {
  content: "";
  position: absolute;
  right: -4px;
  top: -4px;
  width: 8px;
  height: 8px;
  border-top: 1px solid #4a7fa7;
  border-right: 1px solid #4a7fa7;
  transform: rotate(42deg);
}

.position-inline-input {
  width: 100%;
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 10px;
  background: transparent;
  color: var(--nx-text);
  font: inherit;
  font-weight: 620;
}

.position-inline-input.small {
  max-width: 120px;
  font-weight: 520;
}

.position-inline-input:focus {
  border-color: rgba(74, 127, 167, 0.42);
  background: var(--ds-card);
  outline: none;
}

.qr-mini svg {
  width: 18px;
  height: 18px;
}

.position-details-card {
  display: grid;
  gap: 10px;
  padding: 12px 16px;
}

.positions-detail-empty {
  min-height: 190px;
  place-items: center;
  justify-content: center;
  color: var(--nx-soft);
  text-align: center;
}

.positions-detail-empty svg {
  width: 44px;
  height: 44px;
  opacity: 0.35;
}

.positions-detail-empty p {
  max-width: 520px;
  font-weight: 650;
}

.position-details-card > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.position-details-card h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 5px;
  color: var(--nx-text);
  font-size: 20px;
  font-weight: 760;
}

.position-details-card h4 {
  margin: 0 0 12px;
  color: var(--nx-text);
  font-size: 14px;
  font-weight: 760;
}

.position-details-card p {
  margin: 0;
  color: var(--nx-soft);
}

.position-details-grid {
  display: grid;
  grid-template-columns: minmax(230px, 0.85fr) minmax(250px, 0.95fr) minmax(320px, 1.2fr);
  gap: 18px;
}

.position-details-grid > section {
  min-width: 0;
  border-right: 1px solid var(--nx-line);
  padding-right: 18px;
}

.position-details-grid > section:last-child {
  border-right: 0;
  padding-right: 0;
}

.position-details-grid .field {
  margin-bottom: 9px;
}

.position-details-grid textarea {
  min-height: 76px;
}

.position-doc-card p {
  margin: -4px 0 10px;
  color: var(--nx-soft);
  font-size: 12px;
}

.position-doc-dropzone {
  display: grid;
  place-items: center;
  min-height: 76px;
  border: 1px dashed #bac4bf;
  border-radius: 12px;
  padding: 10px;
  color: var(--nx-soft);
  background: var(--ds-card);
  text-align: center;
}

.position-doc-dropzone svg {
  width: 21px;
  height: 21px;
  color: var(--nx-green);
}

.position-doc-dropzone strong {
  margin-top: 5px;
  color: var(--nx-text);
}

.position-doc-dropzone span,
.position-doc-dropzone small {
  display: block;
  margin-top: 4px;
}

.position-doc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.position-doc-item {
  display: grid;
  gap: 6px;
}

.position-doc-preview {
  display: grid;
  width: 100%;
  height: 78px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--nx-line);
  border-radius: 10px;
  background: var(--ds-bg);
}

.position-doc-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.position-doc-preview span {
  display: grid;
  gap: 7px;
  justify-items: center;
  color: var(--nx-soft);
}

.position-doc-preview svg {
  width: 30px;
  height: 30px;
}

.position-doc-item strong {
  color: var(--nx-text);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.position-doc-item small {
  color: var(--nx-soft);
  font-size: 11px;
}

.position-doc-item div {
  display: flex;
  gap: 8px;
}

.position-label-preview {
  width: min(94vw, 980px);
}

.position-label-modal {
  width: min(calc(100vw - 42px), 1060px);
}

.position-label-modal > h2,
.position-label-modal > p {
  display: none;
}

.position-label-card {
  overflow: hidden;
  border: 1px solid #aab4ae;
  border-radius: 22px;
  background: var(--ds-card);
  box-shadow: 0 20px 46px rgba(10, 25, 49, 0.12);
}

.position-label-card header {
  display: grid;
  grid-template-columns: 250px 1fr 250px;
  align-items: center;
  min-height: 104px;
  border-bottom: 1px solid #aeb7b1;
  padding: 24px 32px;
}

.position-label-card header img {
  width: 220px;
  max-width: 100%;
}

.position-label-card header h3 {
  margin: 0;
  color: #030705;
  font-size: 54px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-align: center;
}

.position-label-content {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  min-height: 500px;
}

.position-label-data {
  display: grid;
  align-content: stretch;
  border-right: 1px solid #aeb7b1;
  padding: 16px 28px;
}

.position-label-row {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 24px;
  align-items: center;
  border-bottom: 1px solid #c7cfca;
  padding: 22px 0;
}

.position-label-row:last-child {
  border-bottom: 0;
}

.position-label-row > span {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border: 1px solid #d9dfdc;
  border-radius: 14px;
  color: #4f5954;
  background: var(--ds-card);
}

.position-label-row svg {
  width: 36px;
  height: 36px;
}

.position-label-row small {
  display: block;
  margin-bottom: 12px;
  color: #555f5a;
  font-size: 21px;
  font-weight: 760;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.position-label-row strong {
  display: block;
  color: #050807;
  font-size: 31px;
  font-weight: 800;
  line-height: 1.18;
}

.position-label-qr {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 26px;
  padding: 34px;
}

.qr-box .valid-qr {
  display: block;
  width: 330px;
  height: 330px;
}

.position-label-qr span {
  color: #5d6661;
  font-size: 25px;
  font-weight: 650;
  text-align: center;
}

@media print {
  body:has(.position-label-modal) .app-shell,
  body:has(.position-label-modal) .modal-close,
  body:has(.position-label-modal) .modal-actions {
    display: none !important;
  }

  body:has(.position-label-modal) .modal-backdrop,
  body:has(.position-label-modal) .modal-panel {
    position: static;
    display: block;
    width: auto;
    min-height: 0;
    padding: 0;
    background: var(--ds-card);
    box-shadow: none;
  }

  body:has(.position-label-modal) .position-label-preview {
    width: 100%;
  }

  body:has(.position-label-modal) .position-label-card {
    box-shadow: none;
  }
}

.product-positions-modal .product-modal-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  padding: 15px 24px;
}

.product-modal-actions .primary-button,
.product-modal-actions .secondary-button {
  min-width: 170px;
}

@media (max-width: 1180px) {
  .product-modal-grid {
    grid-template-columns: 1fr;
  }

  .product-photo-dropzone {
    min-height: 260px;
  }
}

/* Build 002.3 problem workflow: table first, selected problem details below. */
.problems-workflow {
  display: grid;
  gap: 14px;
}

.problem-table-card {
  overflow: hidden;
  padding: 0;
}

.problem-toolbar {
  display: grid;
  grid-template-columns: auto minmax(260px, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 18px 18px 0;
}

.problem-search {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 42px;
  border: 1px solid var(--nx-line);
  border-radius: 10px;
  padding: 0 12px;
  background: var(--ds-card);
}

.problem-search input {
  border: 0;
  outline: 0;
  font: inherit;
  font-size: 13px;
  background: transparent;
}

.mini-toggle {
  justify-self: end;
}

.problem-table-wrap {
  overflow-x: auto;
  margin-top: 14px;
}

.problem-table {
  width: 100%;
  min-width: 1080px;
  border-collapse: collapse;
}

.problem-table th,
.problem-table td {
  border-bottom: 1px solid var(--nx-line);
  padding: 14px 18px;
  color: var(--nx-text);
  font-size: 13px;
  text-align: left;
  vertical-align: middle;
}

.problem-table th {
  color: #25332d;
  background: var(--ds-card);
  font-size: 12px;
  font-weight: 750;
}

.problem-table tbody tr {
  cursor: pointer;
}

.problem-table tbody tr:hover,
.problem-table tbody tr.selected-row {
  background: rgba(179, 207, 229, 0.08);
}

.problem-table td strong,
.problem-table td small {
  display: block;
}

.problem-table td small {
  margin-top: 4px;
  color: var(--nx-soft);
  line-height: 1.4;
}

.problem-code {
  color: var(--ds-danger);
  font-weight: 850;
}

.problem-type {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.problem-type svg {
  width: 15px;
  height: 15px;
  color: var(--nx-soft);
}

.problem-bottom-panel {
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(270px, 0.9fr) minmax(330px, 1.05fr) minmax(210px, 0.65fr);
  gap: 18px;
  border-color: rgba(74, 127, 167, 0.45);
  padding: 20px;
}

.problem-bottom-panel h3 {
  margin: 0 0 12px;
  color: var(--nx-text);
  font-size: 14px;
}

.problem-bottom-details {
  padding-right: 14px;
  border-right: 1px solid var(--nx-line);
}

.problem-detail-pairs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.problem-detail-pairs div {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.problem-detail-pairs .soft-icon {
  width: 30px;
  height: 30px;
  border-radius: 10px;
}

.problem-detail-pairs small,
.problem-detail-pairs strong {
  display: block;
}

.problem-detail-pairs small {
  color: var(--nx-soft);
  font-size: 11.5px;
}

.problem-detail-pairs strong {
  margin-top: 3px;
  color: var(--nx-text);
  font-size: 13px;
  line-height: 1.35;
}

.large-photos {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.large-photos button {
  min-height: 190px;
}

.compact-messages {
  max-height: 244px;
  overflow: auto;
  gap: 10px;
}

.compact-messages .message {
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 10px;
}

.compact-messages .avatar {
  width: 30px;
  height: 30px;
}

.compact-messages .message > div:last-child {
  padding: 10px 12px;
}

.compact-messages .message-photos {
  display: none;
}

.problem-bottom-comments .message-input {
  margin-top: 12px;
}

.problem-bottom-status {
  display: grid;
  align-content: start;
  gap: 10px;
}

@media (max-width: 1500px) {
  .problem-bottom-panel {
    grid-template-columns: minmax(280px, 1fr) minmax(270px, 1fr);
  }

  .problem-bottom-details {
    border-right: 0;
  }
}

@media (max-width: 980px) {
  .problem-toolbar,
  .problem-bottom-panel,
  .problem-detail-pairs {
    grid-template-columns: 1fr;
  }
}

/* Build 003 readability pass: keep the Design System, restore desktop legibility. */
html {
  font-size: 16px;
}

body {
  font-size: 16px;
  line-height: 1.5;
}

.content {
  padding: 46px 52px 40px;
}

.content-wide {
  padding: 26px 34px 30px;
}

.title-block p,
.content-wide .title-block p,
.breadcrumb,
.assembly-breadcrumb {
  font-size: 14px;
}

.title-block h1,
.content-wide .title-block h1 {
  font-size: clamp(38px, 3vw, 48px);
  line-height: 1.08;
}

.title-block span {
  font-size: 16px;
  line-height: 1.65;
}

input,
select,
textarea,
.company-picker select,
.login-panel input,
.field input,
.field select,
.field textarea,
.table-tools input,
.filters select,
.work-orders-toolbar select,
.work-orders-toolbar input,
.products-toolbar select,
.products-toolbar input,
.work-order-form-grid input,
.work-order-form-grid select,
.work-order-form-grid textarea,
.modal-grid .field input,
.modal-grid .field select,
.modal-grid .field textarea,
.assembly-inline-input,
.assembly-inline-select,
.position-inline-input,
.problem-search,
.message-input input {
  min-height: 46px;
  padding: 11px 14px;
  font-size: 15px;
  line-height: 1.35;
}

textarea,
.field textarea,
.modal-grid .field textarea {
  min-height: 92px;
  line-height: 1.55;
}

.work-search input,
.product-search input,
.problem-search input {
  font-size: 15px;
}

.primary-button,
.secondary-button,
.compact-command,
.secondary-button.compact,
.primary-button.compact,
.detail-action,
.modal-actions button,
.product-modal-actions .primary-button,
.product-modal-actions .secondary-button,
.view-toggle button {
  min-height: 44px;
  padding: 0 18px;
  font-size: 14.5px;
  font-weight: 700;
}

.primary-button,
.secondary-button {
  min-height: 52px;
}

.compact-command,
.secondary-button.compact,
.primary-button.compact {
  min-height: 42px;
}

.icon-button {
  width: 48px;
  height: 48px;
}

.icon-mini {
  width: 34px;
  height: 34px;
  border-radius: 10px;
}

.icon-mini svg {
  width: 16px;
  height: 16px;
}

.row-actions {
  gap: 10px;
}

.open-row-button,
.open-card-button {
  min-height: 34px;
  height: auto;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 750;
}

.open-row-button svg,
.open-card-button svg {
  width: 15px;
  height: 15px;
}

.status-badge,
.status-tag,
.priority-badge,
.product-type-badge,
.assembly-position-badge,
.product-heading-badge {
  min-height: 28px;
  padding: 6px 11px;
  border-radius: 10px;
  font-size: 12.5px;
  line-height: 1.15;
  font-weight: 760;
}

.work-order-card .status-badge {
  font-size: 12px;
  padding: 6px 10px;
}

.problem-count {
  min-height: 30px;
  padding: 5px 11px;
  font-size: 12.5px;
}

table {
  font-size: 15px;
}

.compact-table th,
.compact-table td,
.hierarchy-table th,
.hierarchy-table td,
.work-orders-table th,
.work-orders-table td,
.products-table th,
.products-table td,
.assembly-table th,
.assembly-table td,
.station-table th,
.station-table td,
.positions-table th,
.positions-table td,
.problem-table th,
.problem-table td {
  padding: 17px 18px;
  font-size: 14px;
  line-height: 1.45;
}

.compact-table th,
.hierarchy-table th,
.work-orders-table th,
.products-table th,
.assembly-table th,
.station-table th,
.positions-table th,
.problem-table th {
  font-size: 13px;
  font-weight: 800;
}

.work-orders-table tbody tr,
.products-table tbody tr,
.hierarchy-table tbody tr,
.assembly-table tbody tr,
.station-table tbody tr,
.positions-table tbody tr,
.problem-table tbody tr {
  min-height: 58px;
}

.work-orders-table td,
.products-table td {
  height: 62px;
}

.work-orders-toolbar,
.products-toolbar,
.problem-toolbar,
.table-tools,
.filters {
  gap: 14px;
}

.work-orders-toolbar select,
.work-orders-toolbar input,
.products-toolbar select,
.products-toolbar input {
  min-width: 150px;
  min-height: 46px;
}

.work-search,
.product-search,
.problem-search {
  min-height: 46px;
}

.work-search input,
.product-search input {
  padding-right: 44px;
}

.product-kpi {
  min-height: 126px;
  padding: 22px 24px;
}

.metric-card {
  min-height: 174px;
  padding: 28px 24px;
}

.metric-content span,
.product-kpi span {
  font-size: 15px;
}

.metric-content small,
.product-kpi em {
  font-size: 14px;
}

.work-card-grid {
  gap: 20px;
}

.work-order-card {
  min-height: 236px;
  padding: 18px 18px 16px;
}

.work-order-card dt {
  font-size: 12px;
}

.work-order-card dd,
.work-order-card header strong,
.work-order-card footer button {
  font-size: 13.5px;
}

.detail-tabs button {
  min-height: 50px;
  padding: 0 16px;
  font-size: 15px;
}

.items-table-card,
.detail-card,
.status-card,
.products-table-card,
.product-assembly-card,
.station-table-card,
.station-details-card,
.positions-table-card,
.position-details-card,
.problem-table-card,
.problem-bottom-panel {
  border-radius: var(--radius-md);
}

.items-table-card,
.status-card,
.detail-card {
  padding: 24px;
}

.hierarchy-table-wrap,
.work-order-table-wrap,
.products-table-wrap,
.problem-table-wrap {
  overflow-x: auto;
}

.progress-text,
.document-badges button,
.table-footer,
.problem-detail-pairs small,
.problem-detail-pairs strong,
.compact-messages .message > div:last-child,
.message p {
  font-size: 13px;
  line-height: 1.5;
}

.problem-bottom-panel {
  grid-template-columns: minmax(360px, 0.9fr) minmax(420px, 1.1fr);
  gap: 22px;
  padding: 24px;
}

.problem-bottom-details {
  border-right: 0;
}

.problem-bottom-status,
.problem-bottom-photos {
  grid-column: span 1;
}

.large-photos button {
  min-height: 210px;
}

.compact-messages {
  max-height: 320px;
}

.product-create-modal {
  width: min(calc(100vw - 48px), 1240px);
}

.product-modal-header h2 {
  font-size: 26px;
}

.product-modal-header p,
.product-form-card h3,
.product-radio-group label,
.assembly-explainer small,
.product-assembly-card p,
.stations-step-heading p {
  font-size: 15px;
}

.product-steps button {
  min-height: 76px;
  font-size: 15px;
}

.product-form-card {
  padding: 26px;
}

.product-modal-grid {
  gap: 22px;
}

.assembly-table th,
.assembly-table td,
.station-table th,
.station-table td {
  padding: 18px 22px;
}

.positions-table th,
.positions-table td {
  padding: 13px 20px;
}

.position-inline-input {
  min-height: 38px;
  font-size: 14px;
}

.position-details-grid,
.station-details-grid {
  gap: 0;
}

.position-doc-item strong,
.assembly-doc-item strong,
.document-card strong,
.station-person-row strong {
  font-size: 14px;
}

.position-doc-item small,
.assembly-doc-item small,
.document-card small {
  font-size: 12.5px;
}

/* Sprint Radni nalozi: large creation modal keeps its premium density after global readability rules. */
.work-order-create-modal .wo-modal-field input,
.work-order-create-modal .wo-modal-field select,
.work-order-create-modal .wo-modal-field textarea {
  min-height: 68px;
  padding: 0 22px;
  font-size: 20px;
}

.work-order-create-modal .wo-modal-field textarea {
  min-height: 112px;
  padding-top: 18px;
}

.work-order-create-modal .work-order-modal-actions .secondary-button,
.work-order-create-modal .work-order-modal-actions .primary-button {
  min-height: 58px;
  padding: 0 30px;
  font-size: 17px;
}

/* Sprint Radni nalozi: initial work-order items tab. */
.content-wide .work-order-items-start {
  gap: 26px;
}

.content-wide .items-start-kpis {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
}

.content-wide .items-start-kpis .work-kpi {
  min-height: 98px;
  padding: 20px 24px;
}

.content-wide .items-start-kpis .work-kpi strong {
  font-size: 24px;
}

.content-wide .initial-items-card {
  padding: 26px;
}

.content-wide .initial-items-card .panel-header {
  align-items: center;
  margin-bottom: 22px;
}

.content-wide .initial-items-table .hierarchy-table th,
.content-wide .initial-items-table .hierarchy-table td {
  padding: 18px 22px;
  font-size: 14px;
}

.content-wide .items-empty-state {
  min-height: 420px;
  padding: 70px 24px;
}

@media (max-width: 1420px) {
  .content-wide .items-start-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .content-wide .items-start-kpis {
    grid-template-columns: 1fr;
  }

  .initial-items-card .panel-header,
  .initial-items-card .table-tools {
    align-items: stretch;
    flex-direction: column;
  }
}

/* Sprint Radni nalozi: detail general tab final layout. */
.content-wide .work-order-detail {
  gap: 26px;
}

.content-wide .detail-tabs {
  gap: 34px;
}

.content-wide .detail-tabs button {
  min-height: 54px;
  padding: 0 12px;
  font-size: 16px;
  font-weight: 700;
}

.content-wide .general-card {
  padding: 28px;
}

.content-wide .general-grid {
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 24px 30px;
}

.content-wide .general-grid .wide-field {
  grid-column: 1 / -1;
}

.content-wide .field {
  gap: 10px;
  font-size: 15px;
}

.content-wide .field span {
  font-size: 14px;
  font-weight: 700;
}

.content-wide .field input,
.content-wide .field select,
.content-wide .field textarea {
  min-height: 54px;
  border-radius: 10px;
  font-size: 16px;
}

.content-wide .field textarea {
  min-height: 112px;
}

.content-wide .section-title {
  gap: 14px;
  margin-bottom: 24px;
}

.content-wide .section-title h2 {
  font-size: 20px;
}

.content-wide .section-title .soft-icon,
.content-wide .autosave-state .soft-icon {
  width: 46px;
  height: 46px;
  border-radius: 15px;
}

.content-wide .work-order-info-panel {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

@media (max-width: 1420px) {
  .content-wide .work-order-info-panel dl,
  .content-wide .general-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .content-wide .work-order-info-panel {
    grid-template-columns: 1fr;
  }

  .content-wide .work-order-qr {
    justify-self: start;
  }
}

@media (max-width: 760px) {
  .content-wide .work-order-info-panel dl,
  .content-wide .general-grid {
    grid-template-columns: 1fr;
  }

  .content-wide .autosave-row {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Sprint Radni nalozi: modal Dodaj iz baze. */
.add-base-item-modal {
  width: min(1440px, calc(100vw - 64px));
  max-height: calc(100vh - 56px);
  overflow: auto;
  padding: 0;
}

.add-base-item-modal .modal-close {
  top: 26px;
  right: 28px;
}

.base-modal-header {
  padding: 30px 34px 22px;
  border-bottom: 1px solid var(--border);
}

.base-modal-header h2 {
  margin: 0 0 8px;
  font-size: 28px;
}

.base-modal-header p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.base-item-grid {
  display: grid;
  grid-template-columns: 430px minmax(0, 1fr);
  gap: 24px;
  padding: 26px 34px 18px;
}

.base-product-picker,
.base-product-preview {
  min-width: 0;
}

.base-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 52px;
  gap: 10px;
  margin-bottom: 14px;
}

.base-search-row label {
  position: relative;
  display: block;
}

.base-search-row label svg {
  position: absolute;
  left: 16px;
  top: 50%;
  width: 20px;
  height: 20px;
  color: var(--muted);
  transform: translateY(-50%);
}

.base-search-row input,
.base-filter-row select,
.base-entry-row input,
.base-entry-row textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--ds-card);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
}

.base-search-row input {
  min-height: 52px;
  padding: 0 16px 0 48px;
}

.base-filter-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.base-filter-row label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  min-height: 52px;
  border: 1px solid var(--border);
  border-radius: 11px;
  overflow: hidden;
}

.base-filter-row span {
  padding: 0 14px;
  border-right: 1px solid var(--border);
  font-weight: 700;
}

.base-filter-row select {
  min-height: 50px;
  border: 0;
  border-radius: 0;
  padding: 0 14px;
}

.base-mode-toggle {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.base-mode-toggle button {
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--ds-card);
  padding: 0 16px;
  color: var(--ink);
  font-weight: 700;
}

.base-mode-toggle button.active {
  border-color: rgba(74, 127, 167, .45);
  background: rgba(74, 127, 167, .08);
  color: var(--nx-green);
}

.base-product-list {
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}

.base-product-list table {
  width: 100%;
  border-collapse: collapse;
}

.base-product-list th,
.base-product-list td {
  padding: 17px 22px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 15px;
}

.base-product-list th {
  background: var(--ds-card);
  color: var(--muted);
  font-weight: 800;
}

.base-product-list tr[data-action] {
  cursor: pointer;
}

.base-product-list tr[data-action]:hover,
.base-product-list tr.selected-row {
  background: rgba(74, 127, 167, .07);
}

.base-product-list tr:last-child td {
  border-bottom: 0;
}

.base-empty-list {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 240px;
  color: var(--muted);
  text-align: center;
}

.base-empty-list strong {
  color: var(--ink);
  font-size: 17px;
}

.base-list-footer {
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
}

.base-product-main {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 26px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
}

.base-product-photo {
  display: grid;
  place-items: center;
  min-height: 252px;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: linear-gradient(180deg, var(--ds-card), #f5f7f5);
  overflow: hidden;
}

.base-product-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.placeholder-photo svg {
  width: 54px;
  height: 54px;
  color: rgba(10, 25, 49, .35);
}

.placeholder-photo figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-weight: 700;
}

.base-product-info h3 {
  margin: 12px 0 14px;
  font-size: 28px;
}

.base-preview-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.base-preview-badges span {
  border-radius: 999px;
  background: rgba(74, 127, 167, .1);
  padding: 6px 12px;
  color: var(--nx-green);
  font-size: 13px;
  font-weight: 800;
}

.base-product-info dl {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 12px 18px;
  margin: 0;
  font-size: 15px;
}

.base-product-info dt {
  color: var(--muted);
}

.base-product-info dd {
  margin: 0;
  font-weight: 700;
}

.base-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin: 20px 0;
}

.base-stat {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px 12px;
  align-items: center;
  min-height: 86px;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  background: var(--ds-card);
}

.base-stat .soft-icon {
  grid-row: span 2;
  width: 38px;
  height: 38px;
}

.base-stat span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.base-stat strong {
  font-size: 22px;
}

.base-stat small {
  grid-column: 2;
  color: var(--nx-green);
  font-size: 12px;
  font-weight: 700;
}

.planned-time-card {
  background: rgba(74, 127, 167, .06);
}

.base-structure-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
}

.base-structure-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.plain-link {
  border: 0;
  background: transparent;
  color: var(--nx-green);
  font-weight: 800;
}

.base-tree {
  display: grid;
  gap: 4px;
}

.tree-line {
  display: grid;
  grid-template-columns: 28px 96px minmax(0, 1fr);
  align-items: center;
  width: 100%;
  min-height: 36px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

button.tree-line:hover {
  background: rgba(74, 127, 167, .06);
}

.tree-line em {
  font-style: normal;
  font-weight: 900;
}

.tree-line span {
  color: var(--muted);
  font-weight: 800;
}

.tree-children {
  margin-left: 30px;
  padding-left: 18px;
  border-left: 1px solid var(--border);
}

.position-line {
  grid-template-columns: 28px 124px minmax(0, 1fr);
}

.muted-tree,
.base-tree-empty {
  padding: 18px;
  border-radius: 12px;
  background: var(--ds-card);
  color: var(--muted);
}

.base-entry-row {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 16px;
  margin-top: 16px;
}

.base-entry-row label {
  display: grid;
  gap: 9px;
  font-weight: 800;
}

.base-entry-row label > span b {
  color: var(--danger);
}

.base-quantity-field div {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 64px 52px;
  min-height: 54px;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.base-quantity-field button {
  border: 0;
  border-right: 1px solid var(--border);
  background: var(--ds-card);
  font-size: 22px;
  font-weight: 800;
}

.base-quantity-field button:last-child {
  border-right: 0;
  border-left: 1px solid var(--border);
}

.base-quantity-field input {
  min-height: 52px;
  border: 0;
  border-radius: 0;
  text-align: center;
  font-weight: 800;
}

.base-quantity-field em {
  display: grid;
  place-items: center;
  border-left: 1px solid var(--border);
  color: var(--muted);
  font-style: normal;
}

.base-note-field textarea {
  min-height: 88px;
  padding: 14px 16px;
  resize: vertical;
}

.base-note-field small {
  justify-self: end;
  color: var(--muted);
  font-weight: 600;
}

.base-no-product {
  display: grid;
  place-items: center;
  min-height: 620px;
  border: 1px dashed var(--border);
  border-radius: 16px;
  color: var(--muted);
  text-align: center;
}

.base-no-product h3 {
  margin: 12px 0 0;
  color: var(--ink);
  font-size: 22px;
}

.base-no-product p {
  max-width: 420px;
  margin: 0;
}

.base-modal-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 34px 28px;
  border-top: 1px solid var(--border);
}

.base-modal-footer .primary-button,
.base-modal-footer .secondary-button {
  min-height: 52px;
  padding: 0 34px;
  font-size: 16px;
}

.base-modal-footer .primary-button {
  min-width: 360px;
}

@media (max-width: 1240px) {
  .base-item-grid,
  .base-product-main,
  .base-entry-row {
    grid-template-columns: 1fr;
  }

  .base-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .add-base-item-modal {
    width: calc(100vw - 24px);
  }

  .base-modal-header,
  .base-item-grid,
  .base-modal-footer {
    padding-left: 18px;
    padding-right: 18px;
  }

  .base-filter-row,
  .base-stats {
    grid-template-columns: 1fr;
  }

  .base-modal-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .base-modal-footer .primary-button {
    min-width: 0;
  }
}

/* Sprint Radni nalozi: modal Kreiraj custom stavku. */
.custom-item-modal {
  width: min(1460px, calc(100vw - 56px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 24px;
}

.custom-item-modal .modal-close {
  top: 24px;
  right: 24px;
}

.custom-modal-title {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 14px;
}

.custom-modal-title > span {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--ds-primary-light);
  color: var(--ds-primary);
}

.custom-modal-title svg {
  width: 22px;
  height: 22px;
}

.custom-modal-title h2 {
  margin: 0;
  font-size: 25px;
}

.custom-info-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(730px, 100%);
  min-height: 44px;
  margin-bottom: 18px;
  border-radius: 10px;
  background: var(--ds-info-bg);
  color: var(--ds-info);
  padding: 0 18px;
  font-weight: 700;
}

.custom-info-banner svg {
  width: 19px;
  height: 19px;
}

.custom-error {
  margin-bottom: 16px;
}

.custom-top-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 18px;
  margin-bottom: 18px;
}

.custom-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--ds-card);
  padding: 20px;
}

.custom-card h3 {
  margin: 0 0 16px;
  font-size: 17px;
}

.custom-card h3 small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.custom-basic-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 18px;
}

.custom-basic-grid .wide-field {
  grid-column: 1 / -1;
}

.custom-item-modal .field {
  display: grid;
  gap: 9px;
}

.custom-item-modal .field span {
  font-weight: 800;
}

.custom-item-modal .field b {
  color: var(--danger);
}

.custom-item-modal .field input,
.custom-item-modal .field textarea,
.custom-operation-table input,
.custom-operation-table select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--ds-card);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
}

.custom-item-modal .field input {
  min-height: 48px;
  padding: 0 14px;
}

.custom-item-modal .field input[readonly] {
  background: #f7f8f7;
  font-weight: 900;
}

.custom-item-modal .field textarea {
  min-height: 108px;
  padding: 14px;
  resize: vertical;
}

.custom-item-modal .field small,
.custom-card p,
.custom-drag-note {
  color: var(--muted);
  font-size: 13px;
}

.custom-quantity-control {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  border: 1px solid var(--border);
  border-radius: 9px;
  overflow: hidden;
}

.custom-quantity-control button {
  border: 0;
  background: #f9faf9;
  font-size: 22px;
  font-weight: 800;
}

.custom-quantity-control input {
  border: 0 !important;
  border-left: 1px solid var(--border) !important;
  border-right: 1px solid var(--border) !important;
  border-radius: 0 !important;
  text-align: center;
  font-weight: 900;
}

.custom-attachments-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(250px, .95fr);
  gap: 16px;
  margin-bottom: 16px;
}

.custom-drop-zone {
  display: grid;
  place-items: center;
  gap: 9px;
  min-height: 190px;
  border: 1px dashed #b8c2c0;
  border-radius: 12px;
  background: var(--ds-card);
  color: var(--muted);
  text-align: center;
}

.custom-drop-zone svg {
  width: 42px;
  height: 42px;
  color: rgba(10, 25, 49, .55);
}

.custom-drop-zone strong {
  color: var(--ink);
}

.custom-file-list {
  display: grid;
  align-content: start;
  min-height: 190px;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.custom-empty-files {
  display: grid;
  place-items: center;
  min-height: 188px;
  color: var(--muted);
}

.custom-file-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 36px;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border-bottom: 1px solid var(--border);
}

.custom-file-row:last-child {
  border-bottom: 0;
}

.file-type {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: #f1f3f2;
  color: var(--ink);
  font-size: 11px;
  font-weight: 900;
}

.file-type.jpg,
.file-type.png {
  background: rgba(74, 127, 167, .1);
  color: var(--nx-green);
}

.file-type.pdf {
  background: rgba(220, 38, 38, .1);
  color: var(--ds-danger);
}

.custom-file-open {
  display: grid;
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
}

.custom-file-open small {
  color: var(--muted);
}

.custom-note-field textarea {
  min-height: 74px;
}

.custom-operations-card {
  padding-bottom: 14px;
}

.custom-operations-card p {
  margin: -6px 0 14px;
}

.custom-operation-table-wrap {
  border: 1px solid var(--border);
  border-radius: 13px;
  overflow-x: auto;
}

.custom-operation-table {
  width: 100%;
  min-width: 1060px;
  border-collapse: collapse;
}

.custom-operation-table th,
.custom-operation-table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}

.custom-operation-table th {
  background: var(--ds-card);
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.custom-operation-table tbody tr {
  cursor: grab;
}

.custom-operation-table tbody tr:active {
  cursor: grabbing;
}

.custom-operation-table tbody tr:hover {
  background: rgba(74, 127, 167, .04);
}

.custom-operation-table tr:last-child td {
  border-bottom: 0;
}

.custom-operation-table select,
.custom-operation-table input {
  min-height: 42px;
  padding: 0 12px;
}

.drag-handle {
  color: var(--muted);
}

.drag-handle svg {
  width: 18px;
  height: 18px;
}

.minutes-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 58px;
  border: 1px solid var(--border);
  border-radius: 9px;
  overflow: hidden;
}

.minutes-input input {
  border: 0;
  border-radius: 0;
  font-weight: 900;
  text-align: center;
}

.minutes-input span {
  display: grid;
  place-items: center;
  border-left: 1px solid var(--border);
  background: var(--ds-card);
  color: var(--muted);
  font-weight: 800;
}

.danger-icon {
  color: var(--danger);
}

.add-custom-operation {
  margin-top: 10px;
}

.custom-drag-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.custom-drag-note svg {
  width: 17px;
  height: 17px;
}

.custom-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 12px;
}

.custom-modal-footer > div {
  display: flex;
  gap: 14px;
}

.custom-total-time {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 3px 14px;
  min-width: 350px;
  border-radius: 14px;
  background: linear-gradient(90deg, #f8faf8, var(--ds-card));
  padding: 16px 22px;
}

.custom-total-time svg {
  grid-row: span 3;
  align-self: center;
  width: 34px;
  height: 34px;
}

.custom-total-time span,
.custom-total-time small {
  color: var(--muted);
}

.custom-total-time strong {
  font-size: 24px;
}

.custom-modal-footer .primary-button,
.custom-modal-footer .secondary-button {
  min-height: 56px;
  padding: 0 34px;
  font-size: 16px;
}

.custom-modal-footer .primary-button {
  min-width: 320px;
}

.custom-image-preview img {
  display: block;
  max-width: min(760px, 80vw);
  max-height: 70vh;
  border-radius: 14px;
  object-fit: contain;
}

@media (max-width: 1280px) {
  .custom-top-grid,
  .custom-basic-grid,
  .custom-attachments-grid {
    grid-template-columns: 1fr;
  }

  .custom-modal-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .custom-total-time,
  .custom-modal-footer .primary-button {
    min-width: 0;
  }
}

@media (max-width: 760px) {
  .custom-item-modal {
    width: calc(100vw - 24px);
    padding: 18px;
  }

  .custom-modal-footer > div {
    flex-direction: column;
  }
}

/* Sprint Radni nalozi: pregled stavki radnog naloga. */
.work-items-overview {
  display: grid;
  gap: 22px;
  min-width: 0;
  max-width: 100%;
}

.work-items-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--ds-card);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.items-summary-metric {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 5px 16px;
  min-height: 116px;
  padding: 22px 26px;
  border-right: 1px solid var(--border);
}

.items-summary-metric:last-child {
  border-right: 0;
}

.items-summary-metric .soft-icon {
  grid-row: span 3;
  width: 38px;
  height: 38px;
  border-radius: 10px;
}

.items-summary-metric span,
.items-summary-metric small {
  color: var(--muted);
  font-weight: 700;
}

.items-summary-metric strong {
  font-size: 23px;
  line-height: 1.15;
}

.items-summary-metric.good strong,
.items-summary-metric.good small {
  color: #1a3d63;
}

.items-summary-metric.bad strong,
.items-summary-metric.bad small {
  color: var(--ds-danger);
}

.done-total i {
  grid-column: 2;
  display: block;
  height: 8px;
  border-radius: 999px;
  background: #e7ece9;
  overflow: hidden;
}

.done-total i b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--ds-primary);
}

.items-overview-card {
  padding: 0;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.items-overview-card .panel-header {
  align-items: center;
  padding: 24px 28px;
  border-bottom: 1px solid var(--border);
}

.custom-purple-button {
  border-color: var(--nx-green);
  background: linear-gradient(180deg, var(--nx-green-2), var(--nx-green));
  color: var(--ds-card);
  box-shadow: 0 12px 24px rgba(10, 25, 49, .18);
}

.custom-purple-button:hover {
  background: linear-gradient(180deg, var(--nx-green-3), var(--nx-green-2));
}

.items-overview-table-wrap {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
  padding-bottom: 8px;
}

.items-overview-table-wrap::-webkit-scrollbar {
  height: 10px;
}

.items-overview-table-wrap::-webkit-scrollbar-track {
  border-radius: 999px;
  background: var(--ds-disabled-bg);
}

.items-overview-table-wrap::-webkit-scrollbar-thumb {
  border: 2px solid var(--ds-disabled-bg);
  border-radius: 999px;
  background: rgba(10, 25, 49, 0.34);
}

.items-overview-table {
  width: 100%;
  min-width: 1480px;
  border-collapse: collapse;
}

.items-overview-table th,
.items-overview-table td {
  padding: 17px 18px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
  font-size: 14px;
}

.items-overview-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--ds-card);
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.items-overview-table tbody tr:hover {
  background: rgba(74, 127, 167, .035);
}

.overview-row.level-1 td:nth-child(2) {
  padding-left: 34px;
}

.overview-row.level-2 td:nth-child(2) {
  padding-left: 58px;
}

.overview-row.level-3 td:nth-child(2) {
  padding-left: 82px;
}

.overview-number {
  white-space: nowrap;
}

.overview-number .row-toggle,
.overview-number .row-spacer {
  margin-right: 10px;
}

.overview-item-cell {
  position: relative;
  min-width: 270px;
}

.overview-item-cell > div {
  display: flex;
  align-items: center;
  gap: 13px;
}

.overview-item-cell strong,
.overview-item-cell small {
  display: block;
}

.overview-item-cell small {
  margin-top: 3px;
  color: var(--muted);
}

.item-type-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: rgba(74, 127, 167, .08);
  color: var(--nx-green);
}

.item-type-icon svg {
  width: 17px;
  height: 17px;
}

.hierarchy-rail {
  position: absolute;
  top: -18px;
  bottom: -18px;
  left: calc((var(--level) * -24px) + 6px);
  width: 1px;
  background: #dbe4df;
}

.time-stack {
  display: grid;
  gap: 3px;
  white-space: nowrap;
}

.time-stack em {
  font-style: normal;
  font-weight: 800;
  font-size: 12px;
}

.time-stack em.good {
  color: #1a3d63;
}

.time-stack em.bad,
.scrap-stack em,
.scrap-stack strong {
  color: var(--ds-danger);
}

.overview-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  border-radius: 8px;
  padding: 5px 12px;
  font-weight: 850;
  white-space: nowrap;
}

.overview-status svg {
  width: 15px;
  height: 15px;
}

.overview-status.u-toku {
  background: var(--ds-success-bg);
  color: #1a3d63;
}

.overview-status.pauzirano {
  background: var(--ds-warning-bg);
  color: var(--ds-warning);
}

.overview-status.zavrseno {
  background: var(--ds-success-bg);
  color: #1a3d63;
}

.overview-status.planirano,
.overview-status.nije-zapoceto {
  background: #f1f3f2;
  color: #425047;
}

.overview-status.zavrseno-privremeno {
  background: var(--ds-warning-bg);
  color: var(--ds-warning);
}

.overview-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 148px;
  white-space: nowrap;
}

.mini-status-action {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 12px;
  font-weight: 850;
}

.mini-status-action svg {
  width: 14px;
  height: 14px;
}

.mini-status-action.start {
  border-color: #d8eaf6;
  background: #f6fafd;
  color: #1a3d63;
}

.mini-status-action.pause {
  border-color: var(--ds-warning);
  background: var(--ds-warning-bg);
  color: var(--ds-warning);
}

.problem-report-icon,
.item-detail-icon {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border: 1px solid rgba(220, 38, 38, .24);
  border-radius: 9px;
  background: var(--ds-danger-bg);
  color: var(--ds-danger);
}

.item-detail-icon {
  border-color: rgba(74, 127, 167, .22);
  background: #f6fafd;
  color: var(--nx-green);
}

.problem-report-icon svg,
.item-detail-icon svg {
  width: 17px;
  height: 17px;
}

.problem-report-icon:hover {
  border-color: rgba(220, 38, 38, .45);
  background: var(--ds-danger-bg);
}

.item-detail-icon:hover {
  border-color: rgba(74, 127, 167, .42);
  background: var(--ds-success-bg);
}

.report-problem-modal {
  width: min(620px, calc(100vw - 32px));
  max-height: calc(100vh - 42px);
  overflow: auto;
  padding: 26px;
}

.report-problem-modal h2 {
  margin: 0 0 22px;
  font-size: 22px;
}

.problem-context-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 24px;
  margin-bottom: 22px;
  border: 1px solid rgba(74, 127, 167, .14);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(74, 127, 167, .05), rgba(74, 127, 167, .025));
  padding: 18px;
}

.problem-context-card div {
  display: flex;
  gap: 12px;
  min-width: 0;
}

.problem-context-card svg {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  color: var(--nx-green);
}

.problem-context-card small,
.problem-context-card strong {
  display: block;
}

.problem-context-card small {
  color: var(--muted);
  font-size: 12px;
}

.problem-context-card strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.problem-choice-section {
  margin-bottom: 18px;
}

.problem-choice-section h3,
.problem-attachments-section h3 {
  margin: 0 0 10px;
  font-size: 14px;
}

.problem-choice-section b,
.problem-description-field b {
  color: var(--danger);
}

.problem-card-options,
.priority-card-options {
  display: grid;
  gap: 10px;
}

.problem-card-options {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.priority-card-options {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.problem-card-options button,
.priority-card-options button,
.stop-work-options button {
  min-height: 62px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--ds-card);
  color: var(--ink);
  font-weight: 800;
}

.problem-card-options button {
  display: grid;
  place-items: center;
  gap: 6px;
  font-size: 12px;
}

.problem-card-options svg {
  width: 20px;
  height: 20px;
}

.problem-card-options button.active {
  border-color: rgba(220, 38, 38, .42);
  background: var(--ds-danger-bg);
  color: var(--ds-danger);
}

.priority-card-options button {
  min-height: 38px;
  font-size: 12px;
}

.priority-card-options button.active {
  border-color: rgba(74, 127, 167, .44);
  background: rgba(74, 127, 167, .08);
  color: var(--nx-green);
}

.stop-work-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.stop-work-options button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0 16px;
  background: var(--ds-card);
  color: var(--ink);
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(10, 25, 49, .04);
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease, color .18s ease, transform .18s ease;
}

.stop-work-options button:hover {
  transform: translateY(-1px);
}

.stop-work-options button svg {
  width: 18px;
  height: 18px;
}

.stop-work-options .stop-yes {
  border-color: rgba(220, 38, 38, .2);
  color: var(--ds-danger);
}

.stop-work-options .stop-no {
  border-color: rgba(74, 127, 167, .2);
  color: var(--nx-green);
}

.stop-work-options .stop-yes.active {
  border-color: rgba(220, 38, 38, .58);
  background: var(--ds-danger-bg);
  box-shadow: 0 12px 28px rgba(220, 38, 38, .12);
}

.stop-work-options .stop-no.active {
  border-color: rgba(74, 127, 167, .58);
  background: rgba(74, 127, 167, .1);
  box-shadow: 0 12px 28px rgba(74, 127, 167, .1);
}

.problem-description-field {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  font-weight: 800;
}

.problem-description-field textarea {
  width: 100%;
  min-height: 118px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  font: inherit;
  resize: vertical;
}

.problem-description-field small {
  justify-self: end;
  color: var(--muted);
  font-weight: 600;
}

.problem-attachment-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.problem-upload-card {
  display: grid;
  place-items: center;
  min-height: 118px;
  border: 1px dashed #cfd8d4;
  border-radius: 12px;
  background: var(--ds-card);
  color: var(--muted);
  padding: 14px;
  text-align: center;
}

.problem-upload-card svg {
  width: 30px;
  height: 30px;
  color: var(--nx-green);
}

.problem-upload-card strong {
  color: var(--ink);
  font-size: 13px;
}

.problem-upload-card small {
  font-size: 12px;
}

.problem-file-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.problem-file-card {
  position: relative;
  min-height: 92px;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--ds-card);
}

.problem-file-card > button:first-child {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--ink);
  font-weight: 800;
}

.problem-file-card img {
  width: 100%;
  height: 92px;
  object-fit: cover;
}

.problem-file-card svg {
  width: 30px;
  height: 30px;
  color: var(--ds-danger);
}

.problem-file-card span {
  max-width: 100%;
  padding: 6px 8px;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.remove-problem-file {
  position: absolute;
  top: 6px;
  right: 6px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--ds-card);
}

.remove-problem-file svg {
  width: 13px;
  height: 13px;
  color: var(--ink);
}

.problem-add-more-card {
  display: grid;
  place-items: center;
  min-height: 92px;
  border: 1px dashed #cfd8d4;
  border-radius: 10px;
  background: var(--ds-card);
  color: var(--ink);
  font-weight: 800;
}

.problem-add-more-card svg {
  width: 24px;
  height: 24px;
}

.problem-modal-actions {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 20px;
}

.problem-modal-actions .primary-button,
.problem-modal-actions .secondary-button {
  min-height: 48px;
  padding: 0 24px;
}

@media (max-width: 680px) {
  .problem-context-card,
  .problem-attachment-actions,
  .problem-file-grid {
    grid-template-columns: 1fr;
  }

  .problem-card-options,
  .priority-card-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stop-work-options {
    grid-template-columns: 1fr;
  }

  .problem-modal-actions {
    flex-direction: column;
  }
}

/* Modul Problemi: centralni pregled svih prijavljenih problema. */
.global-problems-page {
  display: grid;
  gap: 18px;
}

.global-problem-tabs {
  display: inline-flex;
  align-items: center;
  width: max-content;
  overflow: hidden;
  border: 1px solid var(--ds-border);
  border-radius: var(--radius-sm);
  background: var(--ds-card);
  box-shadow: var(--shadow-card);
}

.global-problem-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 0 24px;
  border: 0;
  border-right: 1px solid var(--ds-border);
  background: transparent;
  color: var(--ds-text);
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}

.global-problem-tabs button:last-child {
  border-right: 0;
}

.global-problem-tabs button.active {
  color: var(--ds-primary);
  box-shadow: inset 0 -3px 0 var(--ds-primary);
}

.global-problem-tabs strong {
  font-weight: 800;
}

.global-problem-filters {
  display: grid;
  grid-template-columns: minmax(230px, 1.2fr) repeat(4, minmax(160px, .85fr)) minmax(220px, 1.1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 22px;
  border: 1px solid var(--ds-border);
  border-radius: var(--radius-md);
  background: var(--ds-card);
  box-shadow: var(--shadow-card);
}

.global-problem-filters select,
.global-problem-filters input {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--ds-border);
  border-radius: var(--radius-input);
  background: var(--ds-card);
  color: var(--ds-text);
  font: inherit;
}

.global-problem-filters select {
  padding: 0 14px;
}

.date-range-filter,
.global-problem-search {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 50px;
  border: 1px solid var(--ds-border);
  border-radius: var(--radius-input);
  background: var(--ds-card);
}

.date-range-filter input,
.global-problem-search input {
  min-height: 48px;
  border: 0;
  background: transparent;
}

.date-range-filter svg:first-child,
.global-problem-search svg {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-left: 14px;
  color: var(--ds-primary);
}

.date-range-filter svg:last-child {
  width: 16px;
  height: 16px;
  margin-right: 10px;
  color: var(--ds-text-light);
}

.date-range-filter span {
  color: var(--ds-text-light);
}

.global-problem-search input {
  padding: 0 14px;
}

.global-problems-empty-card {
  display: grid;
  place-items: center;
  min-height: 470px;
  padding: 54px 24px;
  border: 1px solid var(--ds-border);
  border-radius: var(--radius-md);
  background: var(--ds-card);
  box-shadow: var(--shadow-card);
  text-align: center;
}

.global-problems-illustration {
  position: relative;
  width: 210px;
  height: 170px;
  margin-bottom: 20px;
}

.global-problems-illustration::before {
  content: "";
  position: absolute;
  inset: 18px 28px 8px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(179, 207, 229, .45), rgba(246, 250, 253, .7));
}

.global-problems-illustration span {
  position: absolute;
  left: 62px;
  top: 42px;
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border: 2px solid rgba(74, 127, 167, .45);
  border-radius: 24px;
  background: var(--ds-card);
  color: var(--ds-primary);
  box-shadow: var(--shadow-card);
}

.global-problems-illustration span svg {
  width: 42px;
  height: 42px;
}

.global-problems-illustration i,
.global-problems-illustration b,
.global-problems-illustration em {
  position: absolute;
  display: block;
  border-radius: 999px;
  background: var(--ds-primary-light);
}

.global-problems-illustration i {
  left: 42px;
  bottom: 22px;
  width: 48px;
  height: 8px;
}

.global-problems-illustration b {
  right: 40px;
  bottom: 22px;
  width: 56px;
  height: 8px;
}

.global-problems-illustration em {
  right: 44px;
  top: 34px;
  width: 14px;
  height: 14px;
}

.global-problems-empty-card h2,
.global-problem-table-empty h2 {
  margin: 0;
  color: var(--ds-heading);
  font-size: 26px;
}

.global-problems-empty-card p,
.global-problem-table-empty p {
  max-width: 620px;
  margin: 12px auto 0;
  color: var(--ds-text-light);
  font-size: 17px;
  line-height: 1.6;
}

.global-problem-table-card {
  overflow: hidden;
  border: 1px solid var(--ds-border);
  border-radius: var(--radius-md);
  background: var(--ds-card);
  box-shadow: var(--shadow-card);
}

.global-problem-table-wrap {
  overflow-x: auto;
}

.global-problem-table {
  width: 100%;
  min-width: 1220px;
  border-collapse: collapse;
}

.global-problem-table th,
.global-problem-table td {
  padding: 20px 24px;
  border-bottom: 1px solid var(--ds-border);
  color: var(--ds-text);
  font-size: 15px;
  text-align: left;
  vertical-align: middle;
}

.global-problem-table th {
  background: var(--ds-background);
  color: var(--ds-heading);
  font-size: 13px;
  font-weight: 800;
}

.global-problem-table th button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.global-problem-table tr[data-action] {
  cursor: pointer;
}

.global-problem-table tbody tr:hover {
  background: rgba(179, 207, 229, .16);
}

.global-problem-table td small {
  display: block;
  margin-top: 5px;
  color: var(--ds-text-light);
  font-size: 13px;
}

.global-problem-operator {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
}

.global-problem-operator i {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--ds-sidebar);
  color: #fff;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.problem-status-badge.processing {
  background: var(--ds-warning-bg);
  color: var(--ds-warning);
}

.global-problem-table-empty {
  display: grid;
  place-items: center;
  min-height: 260px;
  text-align: center;
}

.global-problem-table-empty svg {
  width: 46px;
  height: 46px;
  margin-bottom: 14px;
  color: var(--ds-primary);
}

.global-problem-info-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 18px 22px;
  border: 1px solid var(--ds-border);
  border-radius: var(--radius-md);
  background: var(--ds-card);
  box-shadow: var(--shadow-card);
}

.global-problem-info-card > svg {
  display: grid;
  width: 32px;
  height: 32px;
  color: var(--ds-primary);
}

.global-problem-info-card p {
  margin: 0;
  color: var(--ds-text);
  line-height: 1.6;
}

.global-problem-info-card strong {
  color: var(--ds-heading);
}

@media (max-width: 1360px) {
  .global-problem-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .global-problem-tabs {
    width: 100%;
    overflow-x: auto;
  }

  .global-problem-filters {
    grid-template-columns: 1fr;
  }

  .global-problem-info-card {
    grid-template-columns: 1fr;
  }
}

/* Sprint Radni nalozi: tab Problemi - pregled. */
.problems-overview {
  display: grid;
  gap: 20px;
}

.problems-overview .problem-table-card {
  padding: 0;
  overflow: hidden;
}

.problems-overview .problem-table-card > h2 {
  margin: 0;
  padding: 24px 28px 10px;
  font-size: 20px;
}

.problems-overview .problem-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1.3fr) repeat(3, minmax(150px, .7fr)) auto;
  gap: 14px;
  padding: 14px 28px 22px;
}

.problems-overview .problem-toolbar select,
.problems-overview .problem-toolbar input {
  min-height: 48px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--ds-card);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
}

.problems-overview .problem-search {
  position: relative;
}

.problems-overview .problem-search svg {
  position: absolute;
  left: 15px;
  top: 50%;
  width: 19px;
  height: 19px;
  color: var(--muted);
  transform: translateY(-50%);
}

.problems-overview .problem-search input {
  width: 100%;
  padding: 0 16px 0 46px;
}

.problems-overview .problem-toolbar select {
  padding: 0 14px;
}

.problems-overview .problem-table-wrap {
  overflow-x: auto;
}

.problems-overview .problem-table {
  min-width: 1100px;
}

.problems-overview .problem-table th,
.problems-overview .problem-table td {
  padding: 20px 24px;
  font-size: 15px;
}

.problems-overview .problem-table th {
  background: var(--ds-card);
}

.problems-overview .problem-table td small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.problem-type {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 750;
}

.problem-type svg {
  width: 19px;
  height: 19px;
}

.problem-priority,
.problem-status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  border-radius: 9px;
  padding: 6px 13px;
  font-size: 13px;
  font-weight: 850;
}

.problem-priority.nizak {
  background: var(--ds-success-bg);
  color: #1a3d63;
}

.problem-priority.srednji {
  background: var(--ds-warning-bg);
  color: var(--ds-warning);
}

.problem-priority.visok {
  background: var(--ds-warning-bg);
  color: var(--ds-warning);
}

.problem-priority.kritican,
.problem-priority.zaustavlja-rad {
  background: var(--ds-danger-bg);
  color: var(--ds-danger);
}

.problem-status-badge.open {
  background: var(--ds-warning-bg);
  color: var(--ds-warning);
}

.problem-status-badge.resolved {
  background: var(--ds-success-bg);
  color: #1a3d63;
}

.problem-detail-button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--nx-green);
}

.problem-detail-button:hover {
  background: rgba(74, 127, 167, .08);
}

.problem-detail-button svg {
  width: 18px;
  height: 18px;
}

@media (max-width: 1180px) {
  .problems-overview .problem-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .problems-overview .problem-toolbar {
    grid-template-columns: 1fr;
  }
}

/* Sprint Radni nalozi: detalj jednog problema. */
.problem-detail-page {
  display: grid;
  gap: 22px;
}

.problem-detail-nav,
.problem-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.problem-detail-header {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.problem-detail-header h2 {
  margin: 0;
  color: var(--nx-ink);
  font-size: clamp(28px, 2.4vw, 40px);
  line-height: 1.05;
  letter-spacing: 0;
}

.problem-detail-actions {
  display: flex;
  gap: 10px;
}

.problem-detail-actions .primary-button[disabled] {
  cursor: default;
  opacity: .75;
}

.problem-detail-actions .resolved-action {
  background: var(--ds-success-bg);
  color: #1a3d63;
  box-shadow: none;
}

.problem-context-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--nx-line);
  border-radius: var(--radius-md);
  background: var(--ds-card);
  box-shadow: var(--shadow-card);
}

.problem-context-strip > div {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-height: 102px;
  padding: 20px 24px;
  border-right: 1px solid var(--nx-line);
}

.problem-context-strip > div:last-child {
  border-right: 0;
}

.problem-context-strip .soft-icon {
  width: 44px;
  height: 44px;
}

.problem-context-strip small,
.problem-context-strip strong {
  display: block;
}

.problem-context-strip small {
  margin-bottom: 5px;
  color: var(--nx-soft);
  font-size: 13px;
}

.problem-context-strip strong {
  color: var(--nx-ink);
  font-size: 16px;
  line-height: 1.25;
}

.problem-detail-grid-page {
  display: grid;
  grid-template-columns: minmax(420px, .86fr) minmax(520px, 1.14fr);
  gap: 24px;
  align-items: start;
}

.problem-detail-card,
.problem-activity-card {
  padding: 0;
  overflow: hidden;
}

.problem-detail-card h3,
.problem-activity-card h3 {
  margin: 0;
  padding: 24px 28px 18px;
  color: var(--nx-ink);
  font-size: 20px;
}

.problem-detail-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding: 22px 28px;
  border-top: 1px solid var(--nx-line);
  border-bottom: 1px solid var(--nx-line);
}

.problem-detail-meta > div {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.problem-detail-meta .soft-icon {
  width: 34px;
  height: 34px;
  border-radius: 11px;
}

.problem-detail-meta small,
.problem-detail-meta strong {
  display: block;
}

.problem-detail-meta small {
  color: var(--nx-soft);
  font-size: 13px;
}

.problem-detail-meta strong {
  margin-top: 4px;
  color: var(--nx-ink);
  font-size: 16px;
  line-height: 1.35;
}

.problem-description-block,
.problem-documents-block {
  padding: 24px 28px;
  border-bottom: 1px solid var(--nx-line);
}

.problem-description-block h4,
.problem-documents-block h4 {
  margin: 0 0 12px;
  color: var(--nx-ink);
  font-size: 16px;
}

.problem-description-block p {
  margin: 0;
  color: var(--nx-text);
  font-size: 16px;
  line-height: 1.7;
}

.section-line-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.section-line-title span {
  display: inline-grid;
  place-items: center;
  min-width: 32px;
  height: 28px;
  border-radius: 999px;
  background: var(--nx-accent-soft);
  color: var(--nx-green);
  font-weight: 800;
}

.problem-documents-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.problem-document-card,
.problem-add-file-card,
.problem-empty-docs {
  min-height: 132px;
  border: 1px solid var(--nx-line);
  border-radius: var(--radius-sm);
  background: var(--ds-card);
}

.problem-document-card,
.problem-add-file-card {
  display: grid;
  gap: 10px;
  align-content: center;
  padding: 14px;
  text-align: left;
}

.problem-document-card:hover,
.problem-add-file-card:hover {
  border-color: rgba(179, 207, 229, .45);
  box-shadow: 0 12px 26px rgba(10, 25, 49, .06);
}

.problem-document-card img {
  width: 100%;
  height: 92px;
  border-radius: 10px;
  object-fit: cover;
}

.problem-document-card > svg,
.problem-add-file-card > svg,
.problem-empty-docs > svg {
  width: 34px;
  height: 34px;
  color: var(--nx-green);
}

.problem-document-card span,
.problem-document-card strong,
.problem-document-card small,
.problem-add-file-card strong,
.problem-add-file-card small {
  display: block;
}

.problem-document-card strong {
  color: var(--nx-ink);
  font-size: 14px;
}

.problem-document-card small,
.problem-add-file-card small {
  margin-top: 4px;
  color: var(--nx-soft);
  font-size: 12px;
}

.problem-add-file-card {
  border-style: dashed;
  place-items: center;
  text-align: center;
}

.problem-empty-docs {
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 18px;
  color: var(--nx-soft);
  text-align: center;
}

.problem-source-note,
.success-confirm-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 24px 28px;
  border-radius: 12px;
  background: var(--ds-warning-bg);
  color: #9a5f08;
  padding: 14px 16px;
  font-weight: 650;
}

.success-confirm-note {
  margin: 0;
  background: var(--ds-success-bg);
  color: #1a3d63;
}

.problem-activity-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--nx-line);
}

.problem-activity-header h3 {
  border-bottom: 3px solid var(--nx-accent);
}

.problem-activity-header label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-right: 28px;
  color: var(--nx-soft);
  font-size: 14px;
}

.problem-timeline {
  display: grid;
}

.problem-activity-item {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 16px;
  padding: 24px 28px;
  border-bottom: 1px solid var(--nx-line);
}

.problem-activity-item::before {
  content: "";
  position: absolute;
  left: 52px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--nx-line);
}

.activity-avatar {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 3px solid var(--ds-card);
  border-radius: 999px;
  background: var(--nx-green);
  color: var(--ds-card);
  font-size: 14px;
  font-weight: 850;
  box-shadow: 0 8px 18px rgba(10, 25, 49, .12);
}

.activity-body header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.activity-body header strong {
  color: var(--nx-ink);
  font-size: 16px;
}

.activity-body header span {
  border-radius: 999px;
  background: var(--ds-success-bg);
  color: #1a3d63;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 800;
}

.activity-body header time {
  margin-left: auto;
  color: var(--nx-soft);
  font-size: 13px;
}

.activity-body p {
  margin: 10px 0 0;
  color: var(--nx-text);
  font-size: 15px;
  line-height: 1.6;
}

.activity-files {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.activity-files button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--nx-line);
  border-radius: 10px;
  background: var(--ds-card);
  padding: 8px 10px;
  color: var(--nx-text);
  font-weight: 700;
}

.activity-files svg {
  color: var(--nx-green);
}

.problem-detail-composer {
  display: grid;
  gap: 12px;
  padding: 20px 24px 24px;
}

.problem-detail-composer textarea {
  width: 100%;
  min-height: 92px;
  resize: vertical;
  border: 1px solid var(--nx-line);
  border-radius: 14px;
  padding: 14px 16px;
  color: var(--nx-text);
  font: inherit;
  font-size: 15px;
}

.pending-problem-files {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pending-problem-files span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--nx-line);
  border-radius: 999px;
  background: var(--ds-card);
  padding: 7px 10px;
  color: var(--nx-text);
  font-size: 13px;
  font-weight: 700;
}

.pending-problem-files button {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 0;
  background: transparent;
  color: var(--nx-soft);
}

.pending-problem-files svg {
  width: 15px;
  height: 15px;
}

.composer-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.composer-actions small {
  margin-right: auto;
  color: var(--nx-soft);
}

@media (max-width: 1380px) {
  .problem-context-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .problem-context-strip > div {
    border-bottom: 1px solid var(--nx-line);
  }

  .problem-detail-grid-page {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .problem-context-strip,
  .problem-detail-meta,
  .problem-documents-grid {
    grid-template-columns: 1fr;
  }

  .problem-context-strip > div {
    border-right: 0;
  }

  .problem-detail-nav,
  .problem-activity-header,
  .composer-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .activity-body header time {
    width: 100%;
    margin-left: 0;
  }
}

@media (max-width: 1480px) {
  .work-items-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .items-summary-metric:nth-child(3) {
    border-right: 0;
  }

  .items-summary-metric:nth-child(n + 4) {
    border-top: 1px solid var(--border);
  }
}

@media (max-width: 880px) {
  .work-items-summary {
    grid-template-columns: 1fr;
  }

  .items-summary-metric {
    border-right: 0;
    border-top: 1px solid var(--border);
  }

  .items-summary-metric:first-child {
    border-top: 0;
  }

  .items-overview-card .panel-header,
  .items-overview-card .table-tools {
    align-items: stretch;
    flex-direction: column;
  }
}

/* NormaX Design System v1.0 global component standard */
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 0;
  box-shadow: var(--ds-focus-ring);
}

input,
select,
textarea,
.field input,
.field select,
.field textarea,
.wo-modal-field input,
.wo-modal-field select,
.wo-modal-field textarea,
.products-toolbar input,
.products-toolbar select,
.work-orders-toolbar input,
.work-orders-toolbar select,
.table-tools input,
.filters select,
.assembly-inline-input,
.assembly-inline-select,
.position-inline-input {
  border-color: var(--ds-border);
  border-radius: var(--ds-radius-input);
  color: var(--ds-text);
  background-color: var(--ds-card);
}

input::placeholder,
textarea::placeholder {
  color: var(--ds-placeholder);
}

input:focus,
select:focus,
textarea:focus,
.field input:focus,
.field select:focus,
.field textarea:focus,
.wo-modal-field input:focus,
.wo-modal-field select:focus,
.wo-modal-field textarea:focus,
.products-toolbar input:focus,
.products-toolbar select:focus,
.work-orders-toolbar input:focus,
.work-orders-toolbar select:focus,
.table-tools input:focus {
  border-color: var(--ds-primary);
  box-shadow: var(--ds-focus-ring);
}

.primary-button,
.initial-items-card .primary-button,
.work-order-modal-actions .primary-button,
.product-modal-actions .primary-button,
.modal-actions .primary-button,
.finish-modal-actions .primary-button,
.problem-submit-button,
.save-button,
.add-button {
  border-color: var(--ds-primary);
  color: var(--ds-card);
  background: var(--ds-primary);
  box-shadow: 0 10px 22px rgba(74, 127, 167, 0.22);
}

.primary-button:hover,
.initial-items-card .primary-button:hover,
.work-order-modal-actions .primary-button:hover,
.product-modal-actions .primary-button:hover,
.modal-actions .primary-button:hover,
.finish-modal-actions .primary-button:hover,
.problem-submit-button:hover,
.save-button:hover,
.add-button:hover {
  border-color: var(--ds-primary-hover);
  background: var(--ds-primary-hover);
  box-shadow: 0 14px 28px rgba(74, 127, 167, 0.26);
}

.secondary-button,
.initial-items-card .secondary-button,
.work-order-modal-actions .secondary-button,
.product-modal-actions .secondary-button,
.modal-actions .secondary-button,
.finish-modal-actions .secondary-button,
.compact-command,
.detail-action {
  border-color: var(--ds-border);
  color: var(--ds-heading);
  background: var(--ds-card);
  box-shadow: none;
}

.secondary-button:hover,
.initial-items-card .secondary-button:hover,
.work-order-modal-actions .secondary-button:hover,
.product-modal-actions .secondary-button:hover,
.modal-actions .secondary-button:hover,
.finish-modal-actions .secondary-button:hover,
.compact-command:hover,
.detail-action:hover {
  border-color: var(--ds-primary-border);
  background: var(--ds-primary-light);
}

.danger-action,
.danger-button,
.icon-mini.danger,
.secondary-button.danger-action {
  border-color: rgba(220, 38, 38, 0.45);
  color: var(--ds-danger);
  background: transparent;
}

.danger-action:hover,
.danger-button:hover,
.icon-mini.danger:hover,
.secondary-button.danger-action:hover {
  border-color: var(--ds-danger);
  color: var(--ds-danger);
  background: var(--ds-danger-bg);
}

.card,
.metric-card,
.dashboard-card,
.table-shell,
.modal-panel,
.product-form-card,
.product-kpi,
.work-order-kpi,
.items-table-card,
.detail-card,
.status-card,
.problem-detail-card,
.problem-table-card,
.products-table-card,
.product-assembly-card,
.station-card,
.settings-card,
.analytics-card {
  border-color: var(--ds-border);
  border-radius: var(--ds-radius-card);
  background: var(--ds-card);
  box-shadow: var(--ds-shadow-card);
}

.analytics-screen {
  display: grid;
  gap: 18px;
}

.analytics-topbar,
.analytics-filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-card);
  background: var(--ds-card);
  box-shadow: var(--ds-shadow-card);
}

.analytics-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
}

.analytics-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-bottom: 3px solid transparent;
  color: var(--ds-text);
  background: transparent;
  font-weight: 600;
  cursor: pointer;
}

.analytics-tabs button.active {
  color: var(--ds-primary);
  border-color: var(--ds-primary);
  background: linear-gradient(180deg, rgba(179, 207, 229, 0.28), transparent);
}

.analytics-tabs svg,
.analytics-actions svg,
.analytics-filter-row svg {
  width: 18px;
  height: 18px;
}

.analytics-actions,
.analytics-filter-row {
  flex-wrap: wrap;
}

.analytics-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.analytics-filter-row {
  justify-content: flex-start;
}

.analytics-period {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-input);
  color: var(--ds-text);
  background: var(--ds-card);
}

.analytics-period input {
  width: 132px;
  border: 0;
  outline: 0;
  color: var(--ds-heading);
  background: transparent;
  font: inherit;
  font-weight: 600;
}

.analytics-period.compact input {
  width: 126px;
}

.analytics-actions select,
.analytics-filter-row select {
  min-width: 190px;
  min-height: 46px;
  padding: 0 38px 0 14px;
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-input);
  color: var(--ds-heading);
  background: var(--ds-card);
  font: inherit;
  font-weight: 500;
}

.analytics-empty-card {
  min-height: 520px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  padding: 44px;
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-card);
  background: var(--ds-card);
  box-shadow: var(--ds-shadow-card);
  text-align: center;
}

.analytics-empty-card h2 {
  margin: 0;
  color: var(--ds-heading);
  font-size: 28px;
}

.analytics-empty-card p {
  max-width: 680px;
  margin: 0;
  color: var(--ds-text-light);
  font-size: 16px;
  line-height: 1.65;
}

.analytics-empty-illustration {
  position: relative;
  width: 180px;
  height: 150px;
  display: grid;
  place-items: center;
  border-radius: 42px;
  background: radial-gradient(circle at 50% 40%, rgba(179, 207, 229, 0.55), rgba(246, 250, 253, 0.15));
}

.analytics-empty-illustration svg {
  width: 74px;
  height: 74px;
  color: var(--ds-primary);
}

.analytics-empty-illustration i,
.analytics-empty-illustration b,
.analytics-empty-illustration em {
  position: absolute;
  border-radius: 999px;
  background: var(--ds-primary-border);
  opacity: 0.75;
}

.analytics-empty-illustration i {
  width: 42px;
  height: 42px;
  left: 18px;
  bottom: 22px;
}

.analytics-empty-illustration b {
  width: 26px;
  height: 26px;
  right: 24px;
  top: 28px;
}

.analytics-empty-illustration em {
  width: 56px;
  height: 12px;
  left: 62px;
  bottom: 12px;
}

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

.analytics-kpi-card,
.analytics-table-card,
.analytics-chart-card,
.analytics-insights {
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-card);
  background: var(--ds-card);
  box-shadow: var(--ds-shadow-card);
}

.analytics-kpi-card {
  display: grid;
  gap: 6px;
  min-height: 124px;
  padding: 18px;
}

.analytics-kpi-card div {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--ds-primary);
  background: var(--ds-info-bg);
}

.analytics-kpi-card svg {
  width: 22px;
  height: 22px;
}

.analytics-kpi-card span {
  color: var(--ds-text);
  font-size: 13px;
  font-weight: 500;
}

.analytics-kpi-card strong {
  color: var(--ds-heading);
  font-size: 24px;
  line-height: 1.1;
}

.analytics-kpi-card small {
  color: var(--ds-success);
  font-weight: 600;
}

.analytics-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(360px, 0.9fr);
  gap: 14px;
}

.analytics-table-card,
.analytics-chart-card {
  padding: 18px;
}

.analytics-table-card .panel-header {
  margin-bottom: 12px;
}

.analytics-table-card h2,
.analytics-chart-card h2,
.analytics-insights h2 {
  margin: 0;
  color: var(--ds-heading);
  font-size: 18px;
}

.analytics-table-wrap {
  overflow-x: auto;
}

.analytics-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
}

.analytics-table th,
.analytics-table td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--ds-border);
  color: var(--ds-text);
  text-align: left;
  vertical-align: middle;
}

.analytics-table th {
  background: var(--ds-primary-light);
  color: var(--ds-heading);
  font-size: 12px;
  font-weight: 700;
}

.analytics-table th button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.analytics-table tr[data-action] {
  cursor: pointer;
}

.analytics-table tr[data-action]:hover {
  background: rgba(179, 207, 229, 0.16);
}

.analytics-note {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 12px 0 0;
  color: var(--ds-text-light);
  font-size: 13px;
}

.analytics-mini-bar {
  display: inline-grid;
  grid-template-columns: 72px auto;
  align-items: center;
  gap: 8px;
  min-width: 122px;
}

.analytics-mini-bar b {
  height: 7px;
  border-radius: 999px;
  background: var(--ds-success);
}

.analytics-mini-bar::before {
  content: "";
  grid-column: 1;
  grid-row: 1;
  width: 72px;
  height: 7px;
  border-radius: 999px;
  background: var(--ds-primary-light);
}

.analytics-mini-bar b {
  grid-column: 1;
  grid-row: 1;
}

.analytics-mini-bar em {
  color: var(--ds-text);
  font-style: normal;
  font-weight: 700;
}

.analytics-spark {
  display: inline-flex;
  align-items: end;
  gap: 3px;
  height: 22px;
}

.analytics-spark i {
  width: 12px;
  border-radius: 999px;
  background: var(--ds-success);
}

.analytics-spark i:nth-child(1) { height: 8px; }
.analytics-spark i:nth-child(2) { height: 14px; }
.analytics-spark i:nth-child(3) { height: 11px; }
.analytics-spark i:nth-child(4) { height: 18px; }
.analytics-spark i:nth-child(5) { height: 13px; }
.analytics-spark.warn i { background: var(--ds-danger); }

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

.analytics-columns {
  height: 260px;
  display: flex;
  align-items: end;
  justify-content: space-around;
  gap: 12px;
  padding-top: 28px;
}

.analytics-columns button {
  flex: 1;
  display: grid;
  justify-items: center;
  align-items: end;
  gap: 8px;
  border: 0;
  color: var(--ds-text);
  background: transparent;
  cursor: pointer;
}

.analytics-columns span {
  width: min(52px, 80%);
  border-radius: 9px 9px 3px 3px;
  background: linear-gradient(180deg, var(--ds-primary), var(--ds-primary-hover));
  box-shadow: 0 10px 18px rgba(74, 127, 167, 0.18);
}

.analytics-columns strong {
  color: var(--ds-heading);
  font-weight: 700;
}

.analytics-columns small {
  max-width: 84px;
  color: var(--ds-text-light);
  font-size: 12px;
  line-height: 1.25;
}

.analytics-line {
  height: 220px;
  display: flex;
  align-items: end;
  gap: 9px;
  padding: 20px 4px;
}

.analytics-line span {
  flex: 1;
  min-width: 8px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--ds-primary), var(--ds-primary-border));
}

.analytics-donut-layout {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  min-height: 240px;
}

.analytics-donut {
  width: 170px;
  height: 170px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--ds-primary) 0 25%, var(--ds-success) 25% 46%, var(--ds-warning) 46% 62%, #8b5cf6 62% 77%, #64748b 77% 100%);
}

.analytics-donut span {
  width: 90px;
  height: 90px;
  display: grid;
  place-items: center;
  align-content: center;
  border-radius: 50%;
  background: var(--ds-card);
  color: var(--ds-heading);
  text-align: center;
}

.analytics-donut strong {
  font-size: 20px;
}

.analytics-donut small {
  color: var(--ds-text-light);
}

.analytics-legend,
.analytics-bars {
  display: grid;
  gap: 10px;
}

.analytics-legend button,
.analytics-bars button {
  display: grid;
  align-items: center;
  gap: 8px;
  border: 0;
  color: var(--ds-text);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.analytics-legend button {
  grid-template-columns: 12px minmax(0, 1fr) auto;
}

.analytics-legend i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ds-primary);
}

.analytics-legend button:nth-child(2) i { background: var(--ds-success); }
.analytics-legend button:nth-child(3) i { background: var(--ds-warning); }
.analytics-legend button:nth-child(4) i { background: #8b5cf6; }
.analytics-legend button:nth-child(5) i { background: #64748b; }

.analytics-bars button {
  grid-template-columns: minmax(120px, 1fr) minmax(100px, 1.4fr) auto;
}

.analytics-bars i {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--ds-primary-light);
}

.analytics-bars b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--ds-primary);
}

.analytics-no-chart {
  display: grid;
  min-height: 220px;
  place-items: center;
  color: var(--ds-text-light);
  text-align: center;
}

.analytics-insights {
  padding: 18px;
}

.analytics-insights > div {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.analytics-insights section {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 8px 12px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-input);
  background: var(--ds-primary-light);
}

.analytics-insights section > span {
  grid-row: span 2;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--ds-primary);
  background: var(--ds-card);
}

.analytics-insights strong {
  color: var(--ds-heading);
}

.analytics-insights p {
  margin: 0;
  color: var(--ds-text-light);
  line-height: 1.45;
}

.success-text {
  color: var(--ds-success);
  font-weight: 700;
}

.danger-text {
  color: var(--ds-danger);
  font-weight: 700;
}

@media (max-width: 1380px) {
  .analytics-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .analytics-main-grid,
  .analytics-chart-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .analytics-topbar,
  .analytics-filter-row,
  .analytics-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .analytics-tabs {
    overflow-x: auto;
  }

  .analytics-actions select,
  .analytics-filter-row select,
  .analytics-period,
  .analytics-actions .compact-command,
  .analytics-filter-row .compact-command {
    width: 100%;
  }

  .analytics-kpi-grid,
  .analytics-insights > div {
    grid-template-columns: 1fr;
  }

  .analytics-donut-layout {
    grid-template-columns: 1fr;
    justify-items: center;
  }
}

.modal-panel,
.work-order-create-modal,
.product-create-modal {
  border-radius: var(--ds-radius-modal);
  box-shadow: var(--ds-shadow-modal);
}

.modal-panel.work-order-create-modal {
  width: min(calc(100vw - 56px), 1360px);
  max-height: min(94vh, 940px);
  padding: 34px 40px 30px;
}

.modal-panel.work-order-create-modal .work-order-create-layout {
  grid-template-columns: minmax(640px, 1fr) 360px;
}

.modal-panel.work-order-create-modal .work-order-modal-header {
  margin-bottom: 32px;
}

.modal-panel.work-order-create-modal .work-order-modal-header .soft-icon {
  width: 64px;
  height: 64px;
}

.modal-panel.work-order-create-modal .work-order-modal-header h2 {
  font-size: clamp(26px, 2vw, 34px);
}

.modal-panel.work-order-create-modal .work-order-modal-header p {
  margin-top: 8px;
  font-size: 15px;
}

.modal-panel.work-order-create-modal .work-order-create-main {
  gap: 18px;
}

.modal-panel.work-order-create-modal .wo-create-card {
  padding: 22px 24px;
}

.modal-panel.work-order-create-modal .wo-create-card h3 {
  margin-bottom: 18px;
  font-size: 20px;
}

.modal-panel.work-order-create-modal .wo-create-card-grid {
  gap: 16px 24px;
}

.modal-panel.work-order-create-modal .wo-modal-field {
  gap: 9px;
  font-size: 15px;
}

.modal-panel.work-order-create-modal .wo-modal-field input,
.modal-panel.work-order-create-modal .wo-modal-field select,
.modal-panel.work-order-create-modal .wo-modal-field textarea {
  min-height: 58px;
  padding: 0 18px;
  font-size: 17px;
}

.modal-panel.work-order-create-modal .wo-modal-field textarea {
  min-height: 86px;
  padding-top: 14px;
}

.modal-panel.work-order-create-modal .wo-priority-segments {
  min-height: 58px;
}

.modal-panel.work-order-create-modal .wo-priority-segment {
  font-size: 15px;
}

.modal-panel.work-order-create-modal .wo-number-card {
  padding: 34px 28px;
}

.modal-panel.work-order-create-modal .wo-number-card > .soft-icon {
  width: 76px;
  height: 76px;
  margin-bottom: 24px;
}

.modal-panel.work-order-create-modal .wo-number-note {
  margin-bottom: 28px;
  padding: 18px;
}

.modal-panel.work-order-create-modal .work-order-modal-actions {
  margin-top: 26px;
  padding-top: 22px;
}

@media (max-width: 1120px) {
  .modal-panel.work-order-create-modal .work-order-create-layout {
    grid-template-columns: 1fr;
  }

  .modal-panel.work-order-create-modal {
    width: min(calc(100vw - 32px), 900px);
  }
}

@media (max-width: 760px) {
  .modal-panel.work-order-create-modal {
    width: min(calc(100vw - 24px), 620px);
    padding: 28px 20px 24px;
  }
}

@media (max-width: 1180px) {
  .stations-card-header {
    align-items: stretch;
    flex-direction: column;
  }

  .stations-tools {
    width: 100%;
    min-width: 0;
  }

  .stations-tip-card {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .stations-tip-chips {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .stations-card-header {
    padding: 24px 20px 20px;
  }

  .stations-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .station-search,
  .stations-tools select {
    width: 100%;
    min-width: 0;
  }

  .stations-empty-state {
    min-height: 440px;
    padding: 42px 18px 54px;
  }

  .stations-empty-illustration {
    transform: scale(0.88);
  }

  .stations-tip-card {
    margin: 0 20px 24px;
  }
}

table th,
.products-table th,
.work-orders-table th,
.hierarchy-table th,
.assembly-table th,
.station-table th,
.positions-table th,
.problem-table th {
  color: var(--ds-heading);
  background: var(--ds-bg);
  border-color: var(--ds-border);
}

table td,
.products-table td,
.work-orders-table td,
.hierarchy-table td,
.assembly-table td,
.station-table td,
.positions-table td,
.problem-table td {
  border-color: var(--ds-border);
  color: var(--ds-text);
}

tbody tr:hover,
.products-table tbody tr:hover,
.work-orders-table tbody tr:hover,
.hierarchy-table tbody tr:hover,
.assembly-table tbody tr:hover,
.station-table tbody tr:hover,
.positions-table tbody tr:hover,
.problem-table tbody tr:hover {
  background: var(--ds-bg);
}

.detail-tabs button.active,
.product-steps button.active,
.tabs button.active,
.tab-button.active {
  color: var(--ds-primary);
  border-color: var(--ds-primary);
}

.detail-tabs button.active,
.tabs button.active,
.tab-button.active {
  border-bottom-color: var(--ds-primary);
}

.product-steps button.active span,
.status-badge.success,
.status-badge.done,
.status-badge.completed,
.type-finished,
.pill-success,
.badge-success {
  color: #1a3d63;
  background: var(--ds-success-bg);
}

.status-badge,
.priority-badge,
.product-type-badge,
.problem-priority,
.problem-status,
.status-pill,
.badge {
  border-radius: 10px;
  font-weight: 700;
}

.status-badge.in-progress,
.status-badge.active,
.badge-info,
.pill-info {
  color: var(--ds-info);
  background: var(--ds-info-bg);
}

.status-badge.warning,
.priority-badge.medium,
.badge-warning,
.pill-warning {
  color: var(--ds-warning);
  background: var(--ds-warning-bg);
}

.status-badge.danger,
.priority-badge.high,
.priority-badge.critical,
.badge-danger,
.pill-danger {
  color: var(--ds-danger);
  background: var(--ds-danger-bg);
}

.soft-icon,
.metric-icon,
.check-icon,
.success-icon {
  color: var(--ds-primary);
  background: var(--ds-primary-light);
}

.scrap-screen {
  display: grid;
  gap: 22px;
}

.scrap-filter-card,
.scrap-kpi-card,
.scrap-chart-card,
.scrap-list-card,
.scrap-detail-modal {
  background: var(--ds-card);
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-card);
  box-shadow: var(--ds-shadow-card);
}

.scrap-filter-card {
  display: grid;
  grid-template-columns: repeat(8, minmax(132px, 1fr));
  gap: 14px;
  padding: 18px;
  align-items: end;
}

.scrap-filter-card label {
  display: grid;
  gap: 7px;
  color: var(--ds-text);
  font-size: 13px;
  font-weight: 700;
}

.scrap-filter-card input,
.scrap-filter-card select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-input);
  background: var(--ds-card);
  color: var(--ds-heading);
  padding: 0 13px;
}

.scrap-date-field,
.scrap-search {
  position: relative;
}

.scrap-date-field svg,
.scrap-search svg {
  position: absolute;
  left: 13px;
  bottom: 13px;
  color: var(--ds-primary);
}

.scrap-date-field input,
.scrap-search input {
  padding-left: 42px;
}

.scrap-filter-card .secondary-button {
  min-height: 44px;
}

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

.scrap-kpi-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
}

.scrap-kpi-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  color: var(--ds-primary);
  background: var(--ds-info-bg);
}

.scrap-kpi-card span,
.scrap-kpi-card small {
  display: block;
  color: var(--ds-text-light);
}

.scrap-kpi-card strong {
  display: block;
  margin: 5px 0 2px;
  color: var(--ds-heading);
  font-size: 28px;
  line-height: 1;
}

.scrap-chart-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.scrap-chart-card {
  min-height: 285px;
  padding: 20px;
}

.scrap-chart-card h2 {
  margin: 0 0 18px;
  color: var(--ds-heading);
  font-size: 18px;
}

.scrap-empty-panel {
  display: grid;
  justify-items: center;
  align-content: center;
  text-align: center;
  gap: 12px;
}

.scrap-empty-panel h2 {
  justify-self: start;
  align-self: start;
  width: 100%;
  text-align: left;
}

.scrap-empty-illustration {
  position: relative;
  display: grid;
  place-items: center;
  width: 150px;
  height: 120px;
  border-radius: 48%;
  color: var(--ds-primary);
  background: linear-gradient(135deg, rgba(179, 207, 229, 0.42), rgba(246, 250, 253, 0.92));
}

.scrap-empty-illustration svg:first-child {
  width: 70px;
  height: 70px;
}

.scrap-empty-illustration svg:last-child {
  position: absolute;
  right: 18px;
  top: 18px;
  width: 34px;
  height: 34px;
  color: var(--ds-info);
}

.scrap-empty-panel strong,
.scrap-table-empty h2 {
  color: var(--ds-heading);
  font-size: 22px;
}

.scrap-empty-panel p,
.scrap-table-empty p {
  margin: 0;
  max-width: 360px;
  color: var(--ds-text-light);
  line-height: 1.6;
}

.scrap-donut-wrap {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 22px;
  align-items: center;
}

.scrap-donut {
  display: grid;
  place-items: center;
  width: 210px;
  height: 210px;
  border: 0;
  border-radius: 50%;
  padding: 0;
  box-shadow: inset 0 0 0 1px var(--ds-border);
}

.scrap-donut span {
  display: grid;
  place-items: center;
  width: 116px;
  height: 116px;
  border-radius: 50%;
  background: var(--ds-card);
  color: var(--ds-heading);
}

.scrap-donut strong {
  font-size: 30px;
  line-height: 1;
}

.scrap-donut small,
.scrap-donut em {
  color: var(--ds-text-light);
  font-style: normal;
}

.scrap-legend,
.scrap-bars {
  display: grid;
  gap: 10px;
}

.scrap-legend button,
.scrap-bars button {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  color: var(--ds-text);
  text-align: left;
}

.scrap-legend i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.scrap-legend strong,
.scrap-bars strong {
  color: var(--ds-text-light);
  font-size: 13px;
  white-space: nowrap;
}

.scrap-bars button {
  grid-template-columns: 140px minmax(120px, 1fr) auto;
}

.scrap-bars i {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--ds-info-bg);
}

.scrap-bars b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--ds-primary);
}

.scrap-list-card {
  overflow: hidden;
}

.scrap-list-card .panel-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--ds-border);
}

.scrap-table-wrap {
  overflow-x: auto;
}

.scrap-table {
  width: 100%;
  min-width: 1120px;
  border-collapse: collapse;
}

.scrap-table th,
.scrap-table td {
  padding: 15px 18px;
  border-bottom: 1px solid var(--ds-border);
  text-align: left;
  vertical-align: middle;
}

.scrap-table th {
  background: var(--ds-bg);
  color: var(--ds-heading);
  font-weight: 800;
}

.scrap-table th button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  color: inherit;
  font-weight: inherit;
}

.scrap-table tbody tr {
  cursor: pointer;
}

.scrap-table tbody tr:hover {
  background: var(--ds-primary-light);
}

.scrap-table-empty {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 56px 20px;
  text-align: center;
}

.scrap-table-empty div {
  position: relative;
  display: grid;
  place-items: center;
  width: 90px;
  height: 78px;
  color: var(--ds-primary);
  background: var(--ds-info-bg);
  border-radius: 24px;
}

.scrap-table-empty div svg:first-child {
  width: 48px;
  height: 48px;
}

.scrap-table-empty div svg:last-child {
  position: absolute;
  right: -10px;
  bottom: -8px;
  color: var(--ds-warning);
}

.scrap-detail-modal {
  width: min(760px, calc(100vw - 36px));
  padding: 0;
  overflow: hidden;
}

.scrap-detail-grid {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  margin: 0 28px 20px;
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-input);
  overflow: hidden;
}

.scrap-detail-grid div {
  display: contents;
}

.scrap-detail-grid dt,
.scrap-detail-grid dd {
  margin: 0;
  padding: 15px 18px;
  border-bottom: 1px solid var(--ds-border);
}

.scrap-detail-grid dt {
  background: var(--ds-bg);
  color: var(--ds-text);
  font-weight: 700;
}

.scrap-detail-grid dd {
  color: var(--ds-heading);
  font-weight: 600;
}

.scrap-detail-grid div:last-child dt,
.scrap-detail-grid div:last-child dd {
  border-bottom: 0;
}

.scrap-detail-modal .modal-actions {
  padding: 18px 28px;
  border-top: 1px solid var(--ds-border);
}

@media (max-width: 1200px) {
  .scrap-filter-card,
  .scrap-kpi-grid,
  .scrap-chart-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .scrap-chart-card:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .scrap-filter-card,
  .scrap-kpi-grid,
  .scrap-chart-grid,
  .scrap-donut-wrap,
  .scrap-detail-grid {
    grid-template-columns: 1fr;
  }

  .scrap-donut {
    justify-self: center;
  }
}

.shipment-screen,
.archive-screen {
  display: grid;
  gap: 18px;
}

.shipment-filter-card {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr)) auto;
  gap: 14px;
  align-items: end;
  padding: 22px;
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-card);
  background: var(--ds-card);
  box-shadow: var(--ds-shadow-card);
}

.shipment-filter-card label {
  display: grid;
  gap: 7px;
  color: var(--ds-text);
  font-weight: 700;
}

.shipment-filter-card label > svg {
  display: none;
}

.shipment-filter-card span {
  font-size: 12px;
  color: var(--ds-text-light);
}

.shipment-filter-card input,
.shipment-filter-card select {
  min-height: 48px;
  width: 100%;
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-input);
  background: var(--ds-card);
  color: var(--ds-heading);
  padding: 0 14px;
  font: inherit;
}

.shipment-filter-card input:focus,
.shipment-filter-card select:focus,
.inline-select:focus {
  outline: 0;
  border-color: var(--ds-primary);
  box-shadow: 0 0 0 3px rgba(74, 127, 167, .14);
}

.shipment-search {
  grid-column: span 2;
}

.shipment-empty-card {
  display: grid;
  justify-items: center;
  gap: 14px;
  min-height: 520px;
  padding: 74px 24px;
  text-align: center;
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-card);
  background: var(--ds-card);
  box-shadow: var(--ds-shadow-card);
}

.shipment-empty-illustration {
  position: relative;
  display: grid;
  place-items: center;
  width: 168px;
  height: 132px;
  color: var(--ds-primary);
  border-radius: 36px;
  background: linear-gradient(145deg, rgba(179, 207, 229, .28), rgba(246, 250, 253, .86));
}

.shipment-empty-illustration svg:first-child {
  width: 86px;
  height: 86px;
}

.shipment-empty-illustration svg:last-child {
  position: absolute;
  right: 24px;
  bottom: 22px;
  width: 34px;
  height: 34px;
  color: var(--ds-success);
  background: var(--ds-card);
  border-radius: 999px;
  padding: 5px;
  box-shadow: var(--ds-shadow-card);
}

.archive-empty-card .shipment-empty-illustration svg:last-child {
  display: none;
}

.shipment-empty-card h2 {
  margin: 6px 0 0;
  color: var(--ds-heading);
  font-size: 28px;
}

.shipment-empty-card p {
  margin: 0;
  color: var(--ds-text);
  font-size: 17px;
}

.shipment-list-card {
  overflow: hidden;
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-card);
  background: var(--ds-card);
  box-shadow: var(--ds-shadow-card);
}

.shipment-table-wrap {
  overflow-x: auto;
}

.shipment-table {
  width: 100%;
  min-width: 1120px;
  border-collapse: collapse;
}

.shipment-table th,
.shipment-table td {
  padding: 18px 20px;
  border-bottom: 1px solid var(--ds-border);
  text-align: left;
  vertical-align: middle;
}

.shipment-table th {
  background: var(--ds-bg);
  color: var(--ds-heading);
  font-weight: 800;
}

.shipment-table tbody tr {
  transition: background .15s ease;
}

.shipment-table tbody tr:hover {
  background: rgba(179, 207, 229, .16);
}

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

.shipment-table td small {
  margin-top: 4px;
  color: var(--ds-text-light);
}

.inline-select {
  min-height: 38px;
  border: 1px solid var(--ds-primary-border);
  border-radius: var(--ds-radius-input);
  background: var(--ds-primary-light);
  color: var(--ds-primary-hover);
  padding: 0 10px;
  font-weight: 700;
}

.avatar-name {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.avatar-name i {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--ds-sidebar);
  color: #fff;
  font-style: normal;
  font-size: 12px;
}

.shipment-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  color: var(--ds-text);
}

.shipment-pagination nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.shipment-pagination button,
.shipment-pagination select {
  min-width: 42px;
  min-height: 42px;
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-input);
  background: var(--ds-card);
  color: var(--ds-heading);
  font-weight: 700;
}

.shipment-pagination button.active,
.shipment-pagination button[aria-current="page"] {
  background: var(--ds-primary);
  color: #fff;
  border-color: var(--ds-primary);
}

.shipment-pagination select {
  padding: 0 12px;
}

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

.shipment-info-grid article {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 24px;
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-card);
  background: var(--ds-card);
  box-shadow: var(--ds-shadow-card);
}

.shipment-info-grid svg {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  color: var(--ds-primary);
  padding: 8px;
  border-radius: 14px;
  background: var(--ds-primary-light);
}

.shipment-info-grid strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ds-heading);
}

.shipment-info-grid p {
  margin: 0;
  color: var(--ds-text);
}

.icon-action.success {
  color: var(--ds-success);
  border-color: rgba(34, 197, 94, .32);
  background: rgba(34, 197, 94, .08);
}

.icon-action.success:hover {
  color: #fff;
  background: var(--ds-success);
  border-color: var(--ds-success);
}

@media (max-width: 1280px) {
  .shipment-filter-card {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .shipment-search {
    grid-column: span 2;
  }
}

@media (max-width: 860px) {
  .shipment-filter-card,
  .shipment-info-grid {
    grid-template-columns: 1fr;
  }

  .shipment-search {
    grid-column: auto;
  }

  .shipment-pagination {
    align-items: stretch;
    flex-direction: column;
  }
}

.notes-screen {
  display: grid;
  gap: 22px;
}

.notes-tabs {
  display: flex;
  align-items: flex-end;
  gap: 28px;
  border-bottom: 1px solid var(--ds-border);
}

.notes-tabs button {
  border: 0;
  background: transparent;
  color: var(--ds-text);
  font-weight: 600;
  padding: 18px 0;
  cursor: pointer;
  border-bottom: 3px solid transparent;
}

.notes-tabs button.active {
  color: var(--ds-primary);
  border-bottom-color: var(--ds-primary);
}

.notes-filter-card,
.notes-archive-card,
.notes-detail-panel,
.notes-list-panel,
.notes-info-banner {
  background: var(--ds-card);
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-card);
  box-shadow: var(--ds-shadow-card);
}

.notes-filter-card {
  display: grid;
  grid-template-columns: minmax(260px, 1.6fr) repeat(6, minmax(140px, 1fr));
  gap: 18px;
  padding: 22px;
}

.notes-filter-card label,
.note-modal-body label {
  display: grid;
  gap: 8px;
  font-weight: 600;
  color: var(--ds-heading);
}

.notes-filter-card input,
.notes-filter-card select,
.note-modal-body input,
.note-modal-body select,
.note-modal-body textarea {
  min-height: 48px;
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-input);
  padding: 0 14px;
  color: var(--ds-text);
  background: var(--ds-card);
  font: inherit;
}

.note-modal-body textarea {
  padding: 14px;
  resize: vertical;
}

.notes-filter-card input:focus,
.notes-filter-card select:focus,
.note-modal-body input:focus,
.note-modal-body select:focus,
.note-modal-body textarea:focus {
  outline: none;
  border-color: var(--ds-primary);
  box-shadow: var(--ds-focus-ring);
}

.notes-filter-card .input-with-icon {
  position: relative;
}

.notes-filter-card .input-with-icon svg {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ds-text-light);
}

.notes-filter-card .input-with-icon input {
  width: 100%;
  padding-right: 42px;
}

.notes-clear-filter {
  align-self: end;
  min-height: 48px;
  border: 0;
  background: transparent;
  color: var(--ds-primary);
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.notes-workspace {
  display: grid;
  grid-template-columns: minmax(420px, 1.08fr) minmax(420px, .92fr);
  gap: 18px;
  align-items: start;
}

.notes-list-panel,
.notes-detail-panel,
.notes-archive-card {
  overflow: hidden;
}

.notes-list-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
}

.notes-list-toolbar div {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ds-text-light);
}

.notes-list-toolbar select {
  min-height: 42px;
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-input);
  padding: 0 12px;
  color: var(--ds-heading);
  background: var(--ds-card);
}

.note-row {
  position: relative;
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 18px 22px;
  border-top: 1px solid var(--ds-border);
  cursor: pointer;
  background: var(--ds-card);
  transition: background .18s ease, box-shadow .18s ease;
}

.note-row::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--ds-primary-border);
}

.note-row.priority-high::before,
.note-row.priority-critical::before {
  background: var(--ds-danger);
}

.note-row.priority-medium::before {
  background: var(--ds-warning);
}

.note-row.active,
.note-row:hover {
  background: var(--ds-primary-light);
}

.note-row-icon,
.notes-empty-detail > svg {
  width: 44px;
  height: 44px;
  border-radius: var(--ds-radius-button);
  background: var(--ds-info-bg);
  color: var(--ds-primary);
  display: grid;
  place-items: center;
}

.note-row-main {
  display: grid;
  gap: 8px;
}

.note-row-main > div {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.note-row-main p,
.note-row time,
.note-detail small,
.note-more,
.note-modal-files,
.note-relation-hint {
  color: var(--ds-text-light);
}

.note-detail {
  display: grid;
  gap: 20px;
  padding: 24px;
}

.note-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.note-detail-header > div {
  display: flex;
  gap: 10px;
  align-items: center;
}

.priority-pill,
.note-relation-badge {
  display: inline-flex;
  align-items: center;
  width: auto;
  height: auto;
  padding: 7px 12px;
  border-radius: 999px;
  font-weight: 700;
}

.priority-pill.high,
.priority-pill.critical {
  color: var(--ds-danger);
  background: var(--ds-danger-bg);
}

.priority-pill.medium {
  color: var(--ds-warning);
  background: var(--ds-warning-bg);
}

.priority-pill.low,
.note-relation-badge {
  color: var(--ds-primary);
  background: var(--ds-info-bg);
}

.note-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--ds-border);
  border-bottom: 1px solid var(--ds-border);
}

.note-meta-grid > div {
  display: grid;
  gap: 7px;
  padding: 16px;
  border-right: 1px solid var(--ds-border);
}

.note-meta-grid > div:nth-child(3n) {
  border-right: 0;
}

.note-attachments,
.note-modal-body,
.note-modal-grid {
  display: grid;
  gap: 14px;
}

.note-attachment,
.note-modal-files span {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-input);
  padding: 12px;
  background: var(--ds-card);
  color: var(--ds-text);
  text-align: left;
}

.note-attachment span:first-child,
.note-modal-files span svg {
  color: var(--ds-primary);
}

.notes-empty-state,
.notes-empty-detail {
  min-height: 360px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  text-align: center;
  padding: 32px;
  color: var(--ds-text);
}

.notes-empty-state.compact {
  min-height: 320px;
}

.notes-illustration {
  width: 220px;
  max-width: 58%;
}

.notes-info-banner {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 16px 20px;
  color: var(--ds-text);
  background: var(--ds-primary-light);
}

.note-table-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.note-table-title svg {
  color: var(--ds-primary);
}

.note-table-title span {
  display: grid;
  gap: 4px;
}

.note-table-title small {
  color: var(--ds-text-light);
}

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

.note-upload-zone {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 120px;
  border: 1px dashed var(--ds-primary-border);
  border-radius: var(--ds-radius-card);
  background: var(--ds-primary-light);
  color: var(--ds-text);
  cursor: pointer;
}

.note-modal-files {
  min-height: 44px;
}

.note-modal-files span {
  justify-content: space-between;
}

.note-modal-files button {
  border: 0;
  background: transparent;
  color: var(--ds-danger);
  cursor: pointer;
}

.note-preview-modal .modal-panel,
.note-edit-modal .modal-panel {
  max-width: 920px;
}

@media (max-width: 1180px) {
  .notes-filter-card,
  .notes-workspace {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 760px) {
  .note-modal-grid,
  .note-meta-grid {
    grid-template-columns: 1fr;
  }

  .note-row {
    grid-template-columns: 44px 1fr;
  }

  .note-row time {
    grid-column: 2;
  }
}

.settings-page {
  display: grid;
  gap: 24px;
}

.settings-section {
  background: var(--ds-card);
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-card);
  box-shadow: var(--ds-shadow-card);
  padding: var(--ds-space-card);
}

.settings-section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.settings-section-header h2 {
  margin: 0 0 6px;
  color: var(--ds-heading);
  font-size: 22px;
  font-weight: 700;
}

.settings-section-header p,
.settings-password-card small,
.settings-mini-card small,
.settings-info-item small,
.settings-module-card small,
.settings-module-card p,
.settings-mini-card em,
.settings-password-note {
  margin: 0;
  color: var(--ds-text-light);
}

.settings-company-grid,
.settings-account-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 18px;
}

.settings-info-list {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.settings-info-item,
.settings-logo-panel,
.settings-password-card,
.settings-mini-card,
.settings-module-card {
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-input);
  background: var(--ds-card);
}

.settings-info-item {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
}

.settings-info-item svg,
.settings-module-card > svg,
.settings-mini-card > svg {
  width: 22px;
  height: 22px;
  color: var(--ds-primary);
  flex: 0 0 auto;
}

.settings-info-item span,
.settings-mini-card span,
.settings-module-card span,
.settings-password-card span {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.settings-info-item strong,
.settings-password-card strong,
.settings-mini-card strong,
.settings-module-card strong {
  color: var(--ds-heading);
  overflow-wrap: anywhere;
}

.settings-logo-panel {
  min-height: 120px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 12px;
  padding: 18px;
  text-align: center;
}

.settings-logo-panel > span {
  justify-self: start;
  color: var(--ds-text-light);
  font-size: 13px;
}

.settings-logo-panel img {
  max-width: min(300px, 88%);
  max-height: 86px;
  object-fit: contain;
}

.settings-logo-panel strong {
  color: var(--ds-primary);
  font-size: 24px;
}

.settings-password-card {
  min-height: 104px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
}

.settings-app-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1.55fr) repeat(4, minmax(132px, 1fr));
  gap: 16px;
}

.settings-module-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px;
  border-left: 4px solid var(--ds-primary);
}

.settings-module-card .status-badge {
  margin-left: auto;
}

.settings-mini-card {
  min-height: 104px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
}

.settings-edit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.settings-edit-grid.compact {
  grid-template-columns: 1fr;
}

.settings-logo-upload {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-input);
  padding: 16px;
  background: var(--ds-primary-light);
}

.settings-logo-upload > span {
  color: var(--ds-heading);
  font-weight: 700;
}

.settings-logo-upload > div {
  min-height: 110px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--ds-primary-border);
  border-radius: var(--ds-radius-input);
  background: var(--ds-card);
  color: var(--ds-primary);
  text-align: center;
}

.settings-logo-upload img {
  max-width: min(340px, 92%);
  max-height: 96px;
  object-fit: contain;
}

.settings-logo-upload nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.settings-modal-error,
.field-error {
  color: var(--ds-danger);
  font-style: normal;
  font-weight: 600;
}

.settings-password-note {
  padding: 12px 14px;
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-input);
  background: var(--ds-primary-light);
}

.modal-panel.settings-modal {
  max-width: 880px;
}

.modal-panel.compact-settings-modal {
  max-width: 560px;
}

@media (max-width: 1180px) {
  .settings-app-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .settings-module-card {
    grid-column: 1 / -1;
  }
}

@media (max-width: 920px) {
  .settings-company-grid,
  .settings-account-grid,
  .settings-edit-grid {
    grid-template-columns: 1fr;
  }

  .settings-password-card,
  .settings-section-header {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .settings-app-grid {
    grid-template-columns: 1fr;
  }

  .settings-section {
    padding: 18px;
  }
}
