/* SAP Digital Manufacturing POD-inspired layout, adapted to supply work. */
:root {
  --navy: #354a5f;
  --navy-deep: #354a5f;
  --blue: #0a6ed1;
  --blue-soft: #eaf3fc;
  --green: #107e3e;
  --green-soft: #edf7ed;
  --amber: #a86400;
  --amber-soft: #fff4d7;
  --red: #bb0000;
  --red-soft: #ffebeb;
  --ink: #1d2d3e;
  --muted: #556b80;
  --line: #d5dadd;
  --bg: #f5f6f7;
  --shadow: none;
  font-family: Arial, Helvetica, sans-serif;
}
body {background: var(--bg)}
.app {display: block; min-height: 100vh}
.rail {height: 49px; width: 100%; padding: 0 18px; position: sticky; top: 0; z-index: 8; flex-direction: row; align-items: center; gap: 22px; background: #354a5f; box-shadow: 0 2px 5px #1d2d3e25}
.rail .brand {padding: 0 20px 0 0; font-size: 14px; letter-spacing: .025em; white-space: nowrap; border-right: 1px solid #6c8191; min-height: 29px}
.rail .brand-mark {width: 28px; height: 28px; border-radius: 3px; font-size: 17px; background: #fff; color: #354a5f}
.rail-label {display: none}
.rail-nav {display: flex; align-items: stretch; gap: 0; height: 100%; min-width: 0; overflow-x: auto}
.nav-item {width: auto; flex: 0 0 auto; padding: 0 15px; border-radius: 0; font-size: 12px; font-weight: 600; color: #e4edf4; border-bottom: 3px solid transparent}
.nav-item:hover {background: #49647a; color: #fff}
.nav-item.active {background: #243c50; border-bottom-color: #92d1ff; color: #fff}
.nav-icon {font-size: 16px; width: 16px}
.rail-bottom {display: flex; align-items: center; gap: 11px; margin: 0 0 0 auto; border: 0; padding: 0; white-space: nowrap; font-size: 11px}
.rail-bottom small {display: none}
.rail-bottom button {margin: 0; color: #fff; border-left: 1px solid #6c8191; padding: 5px 0 5px 11px; font-size: 11px}
.workspace {min-width: 0}
.topbar {height: 51px; padding: 0 26px; background: #fff}
.topbar-title {display: flex; align-items: baseline; gap: 14px}
.topbar-title h1 {font-size: 17px; font-weight: 700; margin: 0; letter-spacing: 0}
.topbar-title p {order: 2; color: #687b8d; font-size: 11px}
.role-pill {background: #eef2f5; border-radius: 3px; padding: 5px 9px; font-size: 11px}
.icon-button {border-radius: 3px; min-height: 31px; min-width: 31px}
.page {max-width: none; padding: 17px 22px 28px}
.page-heading {align-items: center; margin-bottom: 13px}
.page-heading .eyebrow {display: none}
.page-heading h2 {font-size: 21px; line-height: 1.2; margin: 0 0 3px; letter-spacing: 0}
.page-heading p {font-size: 11px}
.button {min-height: 32px; padding: 6px 12px; border-radius: 3px; font-size: 12px; font-weight: 650}
.button.primary {background: #0a6ed1}
.button.primary:hover {background: #085caf}
.button.secondary {border-color: #a9b5bf; color: #0a6ed1}
.button[hidden] {display: none}
.panel {border-radius: 3px; box-shadow: none}
.plugin-bar {height: 37px; display: flex; align-items: center; gap: 8px; padding: 0 12px; background: linear-gradient(#fff,#f8f9fa); border-bottom: 1px solid var(--line); color: #263e52; font-size: 12px}
.plugin-bar strong {font-weight: 700}
.plugin-icon {color: #0a6ed1; font-size: 16px}
.plugin-note {margin-left: auto; color: #708397; font-size: 10px; white-space: nowrap}
.pod-selection {margin-bottom: 11px; overflow: hidden}
.pod-selection-fields {display: grid; grid-template-columns: 1.1fr 1.15fr 1fr minmax(230px,1.5fr); gap: 0; padding: 11px 13px}
.pod-field {min-width: 0; padding: 0 15px; border-right: 1px solid #dfe3e6; display: flex; flex-direction: column; justify-content: center; gap: 5px}
.pod-field:first-child {padding-left: 0}
.pod-field:last-child {border-right: 0; padding-right: 0}
.pod-field span,.pod-field label {color: #61758a; font-size: 10px; font-weight: 700}
.pod-field strong {font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap}
.pod-find-target .search-wrap:before {top: 0; left: 9px; font-size: 22px}
.pod-find-target .search-input {min-height: 30px; height: 30px; padding: 3px 9px 3px 31px; border-radius: 2px; font-size: 12px}
.stats {display: flex; gap: 0; margin: 0 0 11px; background: #fff; border: 1px solid var(--line); border-radius: 3px; overflow: hidden}
.stat-card {flex: 1; min-width: 0; padding: 8px 13px; border: 0; border-right: 1px solid var(--line); border-radius: 0; box-shadow: none; display: flex; align-items: baseline; gap: 7px}
.stat-card:last-child {border: 0}
.stat-card span {font-size: 11px; font-weight: 600; white-space: nowrap}
.stat-card strong {font-size: 17px; margin: 0; letter-spacing: 0; line-height: 1}
.stat-card small {display: none}
.pod {--list-width: 44%; display: grid; grid-template-columns: minmax(370px,var(--list-width)) 7px minmax(0,1fr); gap: 0; align-items: stretch; min-height: calc(100vh - 266px)}
.comparison-page .stats {display:none}
.comparison-mode {--list-width:30%;align-items:start}
.comparison-mode .queue {position:sticky;top:62px}
.comparison-mode .queue-list {max-height:calc(100vh - 240px);min-height:140px}
.queue-toggle {display:none}
.queue {position: relative; top: auto; border-radius: 3px 0 0 3px}
.pod-divider {background: #e9edf0; border-top: 1px solid #d5dadd; border-bottom: 1px solid #d5dadd; cursor: col-resize; position: relative; touch-action: none}
.pod-divider:before {content: ''; position: absolute; top: 45%; left: 2px; height: 30px; width: 2px; border-left: 1px solid #9aabb8; border-right: 1px solid #9aabb8}
.pod-divider:hover,.pod-divider.dragging {background: #b9dafa}
.queue-head {padding: 0; border-bottom: 0}
.queue-head > h3 {display: none}
.queue-controls {padding: 8px 10px; justify-content: flex-end}
.queue-controls .search-wrap {display: none}
.filter-select {width: 152px; min-height: 29px; border-radius: 2px; padding: 2px 7px; font-size: 11px}
.queue-count {margin: 0; padding: 0 11px 8px; font-size: 10px}
.queue-columns,.queue-item {display: grid; grid-template-columns: minmax(95px,1fr) minmax(130px,1.75fr) 70px 80px; gap: 8px; align-items: center}
.queue-columns {padding: 9px 10px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #eff2f4; color: #52677a; font-size: 10px; font-weight: 700}
.queue-list {max-height: calc(100vh - 350px); min-height: 300px; overflow: auto}
.queue-item {padding: 11px 10px; border-bottom: 1px solid #e2e6e9; min-height: 58px; font-size: 11px}
.queue-item:nth-child(even) {background: #fafbfc}
.queue-item:hover {background: #eaf4fd}
.queue-item.selected {background: #dceeff}
.queue-item.selected:before {width: 3px; background: #0a6ed1}
.work-id,.work-material {min-width: 0; display: flex; flex-direction: column; gap: 4px}
.work-id strong,.work-material strong {white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 11px}
.work-id small,.work-material small {white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #687e90; font-size: 10px}
.work-date {color: #3b5368; white-space: nowrap; font-size: 10px}
.work-state {display: inline-flex; gap: 5px; align-items: center; font-size: 10px; white-space: nowrap}
.work-state i {width: 7px; height: 7px; border-radius: 50%; background: #0a6ed1}
.work-state.red i {background: #bb0000}.work-state.amber i {background: #e09d00}.work-state.green i {background: #107e3e}
.detail {border-radius: 0 3px 3px 0}
.detail-head {padding: 16px 18px 13px}
.detail-kicker {font-size: 10px; gap: 5px}
.detail-head h2 {font-size: clamp(18px,1.55vw,25px); letter-spacing: 0; margin: 6px 0 5px}
.detail-spec {font-size: 11px; margin-bottom: 11px}
.detail-header-bottom {align-items: center}
.badge {border-radius: 2px; padding: 4px 6px; font-size: 10px; font-weight: 700}
.detail-body {padding: 15px 18px 24px}
.pod-route {display: flex; padding: 11px 18px; gap: 0; border-bottom: 1px solid var(--line); background: #fafbfc; overflow-x: auto}
.pod-stage {flex: 1; display: flex; align-items: center; gap: 6px; position: relative; min-width: 105px; color: #798b9a; font-size: 10px; font-weight: 650}
.pod-stage:not(:last-child):after {content: ''; position: absolute; height: 1px; width: calc(100% - 82px); background: #bfcbd3; left: 82px; top: 12px}
.stage-mark {width: 24px; height: 24px; flex: 0 0 24px; display: grid; place-items: center; border-radius: 50%; border: 1px solid #aab8c4; background: #fff; font-size: 10px}
.pod-stage.done {color: #107e3e}.pod-stage.done .stage-mark {background: #107e3e; border-color: #107e3e; color: #fff}
.pod-stage.current {color: #0a6ed1}.pod-stage.current .stage-mark {border: 2px solid #0a6ed1; color: #0a6ed1; font-weight: 800}
.key-metrics {border-radius: 2px; margin-bottom: 14px}
.metric {padding: 11px 10px; background: #fff}
.metric label {font-size: 10px}.metric strong {font-size: 16px}.metric small {font-size: 9px}
.metric.emphasis {background: #edf5fd}.metric.emphasis strong {color: #0a6ed1}
.plugin-content-label {font-size: 11px; font-weight: 700; color: #41566b; margin: 0 0 4px}
.tabs {gap: 0; margin-bottom: 14px}.tab {padding: 9px 11px; font-size: 11px; font-weight: 600; border-bottom-width: 2px}
.tab.active {color: #0a6ed1; border-color: #0a6ed1}
.info,.record,.lot,.callout,.empty-state,.table-wrap {border-radius: 2px}
.info {background: #fafbfc; padding: 10px 11px}
.section-heading h3 {font-size: 13px}
.record {padding: 11px 12px}
.callout {padding: 9px 11px; margin-bottom: 9px}
dialog {border-radius: 4px}
.registry {overflow: hidden}
.registry-guide {display: flex; gap: 11px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); background: #f8fafb; font-size: 12px; color: #31495d}
.registry-guide span {display: inline-flex; gap: 7px; align-items: center}
.registry-guide b {width: 21px; height: 21px; border-radius: 50%; display: inline-grid; place-items: center; background: #0a6ed1; color: white; font-size: 11px}
.registry-guide .guide-arrow {color: #8295a5; font-size: 19px}
.registry-filters {display: grid; grid-template-columns: minmax(210px,2fr) minmax(130px,1.3fr) minmax(140px,1.2fr) 135px 135px auto; gap: 9px; align-items: end; padding: 15px}
.registry-filters label {display: flex; flex-direction: column; gap: 5px; min-width: 0; font-size: 10px; font-weight: 700; color: #4d6377}
.registry-filters input,.registry-filters select {width: 100%; min-height: 32px; border: 1px solid #a9b8c4; border-radius: 2px; background: white; color: var(--ink); padding: 5px 8px; font-size: 12px}
.registry-filters input:focus,.registry-filters select:focus {outline: 2px solid #a8d7ff; border-color: #0a6ed1}
.registry-summary {padding: 8px 15px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #f6f8f9; font-size: 11px; color: #52677a}
.registry-scroll-hint {display: none}
.registry-table-wrap {overflow: auto; max-height: calc(100vh - 345px); min-height: 280px}
.registry-table {min-width: 1180px; border-collapse: collapse; width: 100%}
.registry-table th {position: sticky; top: 0; z-index: 1; background: #edf1f4; border-right: 1px solid #d6dfe5; padding: 10px 11px; white-space: nowrap; font-size: 11px; color: #40566a}
.registry-table td {border-right: 1px solid #e5e9ed; padding: 10px 11px; font-size: 11px; vertical-align: middle; white-space: nowrap}
.registry-table tr:nth-child(even) td {background: #fafbfc}
.registry-table tbody tr:hover td {background: #eaf4fd}
.registry-table th button {border: 0; padding: 0; background: transparent; color: inherit; font-size: inherit; font-weight: 700; cursor: pointer}
.registry-table th button:hover,.registry-table th button.active {color: #0a6ed1}
.registry-table th button.active:after {content: ' ↕'; font-size: 10px}
.registry-open {border: 0; background: transparent; color: #0a6ed1; font-weight: 700; padding: 3px 0; text-decoration: underline; text-underline-offset: 2px}
.registry-material {min-width: 190px; max-width: 280px; white-space: normal !important}
.registry-material strong,.registry-material small {display: block; line-height: 1.35}
.registry-material small {margin-top: 3px; color: #637a8b; font-size: 10px}
.registry-empty {text-align: center; padding: 33px !important; color: #647b8e}
.registry-loading {padding: 32px; text-align: center; color: #647b8e}

@media(max-width:1200px) {
  .rail .brand span,.nav-item span:not(.nav-icon),.rail-bottom {display: flex}
  .rail .brand span {display: inline}
  .nav-item span:not(.nav-icon) {display: inline}
  .page {padding: 14px}
  .pod {--list-width: 48%}
  .comparison-mode {--list-width: 32%}
  .queue-columns,.queue-item {grid-template-columns: minmax(75px,1fr) minmax(100px,1.7fr) 62px 68px; gap: 5px}
  .registry-filters {grid-template-columns: repeat(3,minmax(0,1fr))}
}
@media(min-width:601px) and (max-width:850px) {
  .rail {gap:10px;padding:0 12px}
  .rail .brand {padding-right:10px}
  .rail .brand span:last-child {display:none}
  .nav-item {padding:0 10px}
}
@media(max-width:1000px) {
  .pod {display: block; min-height: 0}
  .pod-divider {display: none}
  .queue {border-radius: 3px; margin-bottom: 10px}
  .detail {border-radius: 3px}
  .queue-list {min-height: 0; max-height: 285px}
  .comparison-mode .queue {position:static}
  .comparison-mode .queue-list {max-height:180px;min-height:0}
  .pod-selection-fields {grid-template-columns: repeat(2,minmax(0,1fr)); row-gap: 11px}
  .pod-field:nth-child(2) {border-right: 0}
  .pod-field:nth-child(3) {padding-left: 0}
  .registry-table-wrap {max-height: none}
}
@media(max-width:600px) {
  .rail {display: none}
  .topbar {height: 48px; padding: 0 12px}
  .topbar-title h1 {font-size: 14px}
  .topbar-title p {display: none}
  .page {padding: 11px 8px 72px}
  .page-heading {display: flex; align-items: start; gap: 8px}
  .page-heading h2 {font-size: 17px}
  .page-heading p {display: none}
  .heading-actions {justify-content: flex-end; margin: 0}
  .heading-actions .button {font-size: 10px; padding: 5px 7px}
  .heading-actions #exportButton {display: none}
  .pod-selection-fields {grid-template-columns: repeat(2,minmax(0,1fr)); padding: 9px}
  .pod-field {padding: 0 8px}
  .pod-field:nth-child(3) {border-right: 1px solid #dfe3e6}
  .pod-field:nth-child(4) {padding-left: 8px}
  .stats {display: grid; grid-template-columns: 1fr 1fr}
  .stat-card {border-bottom: 1px solid var(--line); padding: 7px}
  .stat-card:nth-child(even) {border-right: 0}
  .stat-card:nth-child(n+3) {border-bottom: 0}
  .stat-card span {font-size: 9px; white-space: normal}
  .stat-card strong {font-size: 14px}
  .queue-columns,.queue-item {grid-template-columns: minmax(75px,1fr) minmax(120px,1.6fr) 65px; gap: 5px}
  .queue-columns span:nth-child(3),.work-date {display: none}
  .queue-columns span:nth-child(4) {grid-column: 3}
  .work-state {font-size: 9px}
  .queue-list {max-height: 270px}
  .comparison-mode .queue-list {max-height:none;min-height:0}
  .comparison-mode .queue-columns,.comparison-mode .queue-controls,.comparison-mode .queue-count,.comparison-mode .queue-item:not(.selected) {display:none}
  .comparison-mode .queue-item.selected {display:grid}
  .comparison-mode.comparison-picker-open .queue-columns {display:grid}
  .comparison-mode.comparison-picker-open .queue-controls {display:flex}
  .comparison-mode.comparison-picker-open .queue-count {display:block}
  .comparison-mode.comparison-picker-open .queue-item:not(.selected) {display:grid}
  .comparison-mode.comparison-picker-open .queue-list {max-height:230px;overflow:auto}
  .comparison-mode .queue-toggle {display:block;width:100%;border:0;border-top:1px solid var(--line);background:#f4f8fb;color:#0a6ed1;text-align:left;padding:9px 11px;font-size:11px;font-weight:700}
  .detail-head,.detail-body {padding: 12px}
  .pod-route {padding: 9px 12px}
  .pod-stage {min-width: 92px}
  .pod-stage:not(:last-child):after {display: none}
  .metric {padding: 9px}
  .metric strong {font-size: 15px}
  .mobile-nav {display: flex}
  .registry-guide {flex-wrap: wrap; gap: 5px 7px; padding: 9px; font-size: 10px}
  .registry-guide b {width: 18px; height: 18px}
  .registry-filters {grid-template-columns: repeat(2,minmax(0,1fr)); padding: 9px; gap: 8px}
  .registry-filter-search {grid-column: 1/-1}
  .registry-filters #registryReset {align-self: end}
  .registry-scroll-hint {display: block; padding: 6px 9px; font-size: 10px; color: #61788b; background: #f8fafb}
}
