/* ==========================================================================
   MGH ICEGATE Customs Clearance Portal - Design System & Styles
   Inspired by Sentinel Unifo & MGH Group Enterprise Brand
   ========================================================================== */

:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  
  /* Color Palette */
  --navy-dark: #071426;
  --navy-sidebar: #0b1d36;
  --navy-hover: #132a4d;
  --navy-active: #193863;
  --blue-primary: #1e56a0;
  --blue-hover: #164684;
  --blue-light: #e8f0fe;
  --blue-accent: #2563eb;
  
  --bg-page: #f1f5f9;
  --bg-card: #ffffff;
  --bg-subtle: #f8fafc;
  --bg-muted: #e2e8f0;
  
  --border-light: #e2e8f0;
  --border-medium: #cbd5e1;
  --border-dark: #94a3b8;
  
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #94a3b8;
  --text-white: #ffffff;
  
  /* Status Colors */
  --status-pending-bg: #f1f5f9;
  --status-pending-text: #475569;
  --status-pending-border: #cbd5e1;
  
  --status-submitted-bg: #fef3c7;
  --status-submitted-text: #92400e;
  --status-submitted-border: #fcd34d;
  
  --status-ack-bg: #d1fae5;
  --status-ack-text: #065f46;
  --status-ack-border: #6ee7b7;
  
  --status-reject-bg: #fee2e2;
  --status-reject-text: #991b1b;
  --status-reject-border: #fca5a5;

  /* Elevation Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 12px;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.5;
  font-size: 13px;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  height: 100vh;
}

/* Base App Shell Layout */
.app-container {
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

/* Profile button + account menu in the top bar */
.header-account {
  position: relative;
  padding-left: 12px;
  border-left: 1px solid var(--border-light);
}

.header-user-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: transparent;
  border: 2px solid transparent;
  border-radius: 50%;
  cursor: pointer;
  transition: border-color 0.15s;
}

.header-user-btn:hover,
.header-user-btn[aria-expanded="true"] {
  border-color: var(--blue-light);
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #1e40af);
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
  text-transform: uppercase;
}

/* Account Menu Popover */
.user-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 190px;
  background-color: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  z-index: 300;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.user-menu.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.user-menu-items {
  padding: 6px;
}

.user-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  background: none;
  border: none;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-main);
  cursor: pointer;
  text-align: left;
}

.user-menu-item svg {
  color: var(--text-muted);
}

.user-menu-item:hover {
  background-color: var(--bg-subtle);
}

.user-menu-item.danger,
.user-menu-item.danger svg {
  color: #b91c1c;
}

.user-menu-item.danger:hover {
  background-color: #fef2f2;
}

/* Login Screen */
.login-screen {
  display: flex;
  height: 100vh;
  width: 100vw;
  background-color: var(--bg-page);
}

.login-brand-panel {
  width: 44%;
  max-width: 560px;
  background: radial-gradient(circle at 20% 0%, #1b3a66 0%, var(--navy-sidebar) 55%, var(--navy-dark) 100%);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 40px 48px;
}

.login-brand-top {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  font-weight: 700;
}

.login-brand-logo {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background-color: #ffffff;
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-brand-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.login-brand-copy h2 {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 14px;
  max-width: 420px;
}

.login-brand-copy p {
  font-size: 14px;
  line-height: 1.6;
  color: #b6c4d9;
  max-width: 420px;
}

.login-brand-foot {
  font-size: 12px;
  color: #8da2c0;
}

.login-form-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.login-card h1 {
  font-size: 24px;
  font-weight: 700;
  color: var(--navy-dark);
}

.login-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: -10px;
  margin-bottom: 4px;
}

.login-card .form-input {
  height: 40px;
  width: 100%;
}

.login-submit {
  height: 40px;
  font-size: 13.5px;
  margin-top: 4px;
}

.login-error {
  padding: 9px 12px;
  border-radius: var(--radius-md);
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  font-size: 12.5px;
}

.password-wrap {
  position: relative;
  display: flex;
}

.password-wrap .form-input {
  flex: 1;
  padding-right: 40px;
}

.password-toggle {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  cursor: pointer;
}

.password-toggle:hover,
.password-toggle[aria-pressed="true"] {
  color: var(--blue-primary);
}

@media (max-width: 860px) {
  .login-brand-panel { display: none; }
}

/* Main Content Area */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  background-color: var(--bg-page);
}

/* Global Top Header Bar */
.top-header {
  height: 52px;
  background-color: #ffffff;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  flex-shrink: 0;
  z-index: 30;
}

.top-header-left {
  display: flex;
  align-items: center;
  align-self: stretch;
  gap: 16px;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-right: 20px;
  border-right: 1px solid var(--border-light);
}

.header-logo {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  background-color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3px;
  flex-shrink: 0;
}

.header-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.header-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  white-space: nowrap;
}

.header-brand-text strong {
  color: var(--navy-dark);
  font-size: 13.5px;
  font-weight: 700;
}

.header-brand-text span {
  color: var(--text-muted);
  font-size: 11px;
}

/* Primary navigation tabs in the top bar */
.top-nav {
  display: flex;
  align-items: stretch;
  align-self: stretch;
  gap: 4px;
}

.top-nav-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  padding: 0 12px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.15s ease;
}

.top-nav-btn:hover {
  color: var(--text-main);
}

.top-nav-btn.active {
  color: var(--blue-primary);
  font-weight: 600;
}

.top-nav-btn.active::after {
  content: '';
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: -1px;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background-color: var(--blue-primary);
}

.top-nav-soon {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-dim);
  background-color: var(--bg-page);
  padding: 1px 6px;
  border-radius: 4px;
}

.mode-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  background-color: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.mode-badge.training {
  background-color: #fefce8;
  color: #854d0e;
  border-color: #fef08a;
}

.mode-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: currentColor;
}

/* CargoWise environment toggle (Training / Production) */
.env-toggle {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border-radius: 20px;
  background-color: var(--bg-page);
  border: 1px solid var(--border-light);
}

.env-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border: 1px solid transparent;
  border-radius: 20px;
  background: none;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
}

.env-toggle-btn .mode-badge-dot { opacity: 0.45; }
.env-toggle-btn:hover:not(:disabled):not(.active) { color: var(--text-main); }

.env-toggle-btn.active { cursor: default; }
.env-toggle-btn.active .mode-badge-dot { opacity: 1; }

.env-toggle-btn.training.active {
  background-color: #fefce8;
  color: #854d0e;
  border-color: #fef08a;
}

.env-toggle-btn.production.active {
  background-color: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}

.env-toggle-btn:disabled {
  color: var(--text-dim);
  cursor: not-allowed;
}

.env-toggle-off {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0 5px;
  border-radius: 4px;
  background-color: var(--bg-muted);
  color: var(--text-dim);
}

.top-header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.header-user-info {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 12px;
}

.header-user-info strong {
  color: var(--text-main);
  font-weight: 600;
}

.mode-badge,
.env-toggle,
.header-user-info {
  white-space: nowrap;
}

@media (max-width: 1100px) {
  .header-user-info { display: none; }
}

/* Views Container */
.views-viewport {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}

.view-page {
  display: none !important;
  flex-direction: column;
  background-color: var(--bg-page);
  overflow-y: auto;
  height: 100%;
  width: 100%;
}

.view-page.active {
  display: flex !important;
}

/* ==========================================================================
   VIEW 1: JOB LIST (DATA GRID)
   ========================================================================== */
.job-list-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 16px;
  min-height: 0;
}

/* Single card containing tabs, toolbar, table and footer */
.job-table-card {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.04);
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Tab Navigation (All, Imports, Exports) */
.sub-tabs-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  border-bottom: 1px solid var(--border-light);
  padding: 0 12px;
  flex-shrink: 0;
}

.sub-tab-btn {
  background: none;
  border: none;
  padding: 12px 12px 11px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color 0.15s ease;
}

.sub-tab-btn:hover {
  color: var(--text-main);
}

.sub-tab-btn.active {
  color: var(--blue-primary);
}

.sub-tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 8px;
  right: 8px;
  height: 2px;
  background-color: var(--blue-primary);
  border-radius: 2px 2px 0 0;
}

.sub-tab-count {
  display: inline-block;
  min-width: 22px;
  text-align: center;
  background-color: #f1f5f9;
  color: var(--text-muted);
  padding: 1px 7px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.sub-tab-btn.active .sub-tab-count {
  background-color: var(--blue-light);
  color: var(--blue-primary);
}

/* Toolbar (Search, Filters, Actions) */
.job-controls-card {
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-light);
  gap: 12px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.job-controls-left,
.job-controls-right {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.search-box-wrap {
  display: flex;
  align-items: center;
  height: 32px;
  background-color: #ffffff;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 0 4px 0 10px;
  width: 380px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.search-box-wrap:focus-within {
  border-color: var(--blue-primary);
  box-shadow: 0 0 0 3px rgba(30, 86, 160, 0.12);
}

.search-icon {
  color: var(--text-dim);
  flex-shrink: 0;
}

.search-submit-btn {
  display: flex;
  align-items: center;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.search-submit-btn:hover .search-icon {
  color: var(--blue-primary);
}

.search-input::-webkit-search-cancel-button {
  cursor: pointer;
}

.search-input {
  border: none;
  background: transparent;
  outline: none;
  font-family: inherit;
  font-size: 12.5px;
  padding: 0 8px;
  height: 100%;
  flex: 1;
  min-width: 0;
  color: var(--text-main);
}

.search-input::placeholder {
  color: var(--text-dim);
}

.search-select-field {
  border: none;
  border-left: 1px solid var(--border-light);
  background: transparent;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  padding: 0 6px 0 10px;
  height: 20px;
  outline: none;
  cursor: pointer;
}

.filter-select-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 4px 0 10px;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  background-color: #ffffff;
  transition: border-color 0.15s;
}

.filter-select-wrap:hover,
.filter-select-wrap:focus-within {
  border-color: var(--border-dark);
}

.filter-select {
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-main);
  outline: none;
  cursor: pointer;
  padding-right: 4px;
  max-width: 170px;
  text-overflow: ellipsis;
}

/* Buttons */
.btn-primary {
  background-color: var(--blue-primary);
  color: #ffffff;
  border: 1px solid var(--blue-primary);
  height: 32px;
  padding: 0 14px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 1px 2px rgba(30, 86, 160, 0.25);
  transition: background-color 0.15s, transform 0.1s;
}

.btn-primary:hover {
  background-color: var(--blue-hover);
  border-color: var(--blue-hover);
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-primary:disabled {
  opacity: 0.65;
  cursor: progress;
}

.btn-secondary {
  background-color: #ffffff;
  color: var(--text-main);
  border: 1px solid var(--border-medium);
  height: 32px;
  padding: 0 12px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s;
}

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

.btn-secondary:hover {
  background-color: var(--bg-subtle);
  border-color: var(--border-dark);
}

/* Table */
.job-table-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.jobs-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  text-align: left;
  font-size: 12.5px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.jobs-table th {
  background-color: var(--bg-subtle);
  color: #64748b;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  height: 38px;
  padding: 0 10px;
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 10;
  user-select: none;
}

.jobs-table td {
  height: 44px;
  padding: 0 10px;
  border-bottom: 1px solid #eef2f6;
  color: var(--text-main);
  vertical-align: middle;
  background-color: #ffffff;
  transition: background-color 0.1s ease;
}

.jobs-table tbody tr:last-child td {
  border-bottom: none;
}

.jobs-table tbody tr.job-row {
  cursor: pointer;
}

.jobs-table tbody tr.job-row:hover td {
  background-color: #f6f9fd;
}

.jobs-table tbody tr.job-row.selected td {
  background-color: #eef4fd;
}

.jobs-table .col-check {
  width: 44px;
  padding: 0 0 0 16px;
}

.row-check {
  width: 15px;
  height: 15px;
  accent-color: var(--blue-primary);
  cursor: pointer;
  vertical-align: middle;
}

/* Action column pinned to the right edge */
.jobs-table .col-action {
  position: sticky;
  right: 0;
  width: 1%;
  text-align: right;
  padding-right: 16px;
}

.jobs-table th.col-action {
  z-index: 11;
}

.jobs-table .col-action::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: -8px;
  width: 8px;
  pointer-events: none;
  background: linear-gradient(to left, rgba(15, 23, 42, 0.05), transparent);
}

.jobs-table td.col-action {
  z-index: 1;
}

.col-resizer {
  position: absolute;
  top: 8px;
  right: 0;
  width: 5px;
  bottom: 8px;
  cursor: col-resize;
  user-select: none;
  z-index: 20;
  border-right: 1px solid var(--border-light);
}

.col-resizer:hover, .col-resizer.resizing {
  background-color: var(--blue-accent);
  border-right-color: transparent;
  top: 0;
  bottom: 0;
}

/* Cell content */
.job-number-link {
  color: var(--blue-primary);
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.01em;
}

.job-number-link:hover {
  color: #1d4ed8;
  text-decoration: underline;
  text-underline-offset: 2px;
}

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

.cell-empty {
  color: #cbd5e1;
}

.cell-name {
  display: block;
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cell-mono {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11.5px;
  color: #334155;
}

.cell-branch-tag {
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.branch-code-pill {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  background-color: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-sm);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.mot-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
}

.mot-badge svg {
  color: #94a3b8;
}

.decl-type {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.decl-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 20px;
  border-radius: var(--radius-sm);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.decl-tag.be {
  background-color: #eef2ff;
  color: #4338ca;
}

.decl-tag.sb {
  background-color: #ecfdf5;
  color: #047857;
}

.port-code {
  display: inline-block;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px;
  font-weight: 600;
  color: #334155;
  background-color: #f1f5f9;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 1px 6px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 9px 2px 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 500;
  border: 1px solid transparent;
  white-space: nowrap;
}

.status-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: currentColor;
  flex-shrink: 0;
}

.status-badge.pending {
  background-color: #fff7ed;
  color: #c2410c;
  border-color: #fed7aa;
}

.status-badge.submitted {
  background-color: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.status-badge.acknowledged {
  background-color: #f0fdf4;
  color: #15803d;
  border-color: #bbf7d0;
}

.status-badge.rejected {
  background-color: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}

.status-badge.signed {
  background-color: #f5f3ff;
  color: #6d28d9;
  border-color: #ddd6fe;
}

.version-pill {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  border-radius: var(--radius-sm);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-dim);
}

.version-pill.active-v {
  background-color: var(--blue-light);
  color: var(--blue-primary);
  font-weight: 600;
}

.row-open-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 10px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--blue-primary);
  background-color: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s;
}

.jobs-table tr.job-row:hover .row-open-btn {
  background-color: #ffffff;
  border-color: var(--border-medium);
}

.row-open-btn:hover {
  border-color: var(--blue-primary) !important;
  background-color: var(--blue-light) !important;
}

/* Empty / loading / error states */
.table-state-row td {
  height: auto;
  padding: 56px 16px;
  text-align: center;
  color: var(--text-muted);
  white-space: normal;
}

.table-state-row.error td {
  color: #b91c1c;
}

.table-state-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 4px;
}

.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 8px;
  vertical-align: -2px;
  border: 2px solid var(--border-light);
  border-top-color: var(--blue-primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.spinner.on-dark {
  border-color: rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
}

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

/* Footer */
.job-table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  border-top: 1px solid var(--border-light);
  background-color: var(--bg-subtle);
  font-size: 12px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.job-table-footer b {
  color: var(--text-main);
  font-weight: 600;
}

/* ==========================================================================
   VIEW 2: JOB DETAIL WORKSPACE (THE 2-TAB WORKSPACE)
   ========================================================================== */
.workspace-page {
  display: flex;
  flex-direction: column;
  height: 100%;
  background-color: #ffffff;
}

/* Workspace Header / Breadcrumbs Bar */
.workspace-header-bar {
  background-color: #ffffff;
  border-bottom: 1px solid var(--border-light);
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  flex-shrink: 0;
  gap: 8px 16px;
}

.workspace-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.back-to-jobs-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  background: transparent;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 0 10px 0 6px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}

.back-to-jobs-btn:hover {
  background-color: var(--bg-subtle);
  color: var(--text-main);
}

.workspace-job-info {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.workspace-job-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--navy-dark);
}

.workspace-job-sub {
  font-size: 12px;
  color: var(--text-muted);
}

.workspace-header-right {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

/* Workspace Tab Bar (Tab 1: Supplementary Input, Tab 2: Audit Checklist) */
.workspace-tabs-bar {
  display: flex;
  align-items: center;
  gap: 32px;
  border-bottom: 2px solid var(--border-light);
  padding: 0 24px;
  background-color: #ffffff;
  flex-shrink: 0;
}

.workspace-tab-btn {
  background: none;
  border: none;
  padding: 12px 2px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color 0.15s;
}

.workspace-tab-btn:hover {
  color: var(--blue-primary);
}

.workspace-tab-btn.active {
  color: var(--blue-primary);
}

.workspace-tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 3px;
  background-color: var(--blue-primary);
  border-radius: 3px 3px 0 0;
}

/* Workspace Tab Content Viewports */
.workspace-content-wrap {
  flex: 1;
  overflow: hidden;
  position: relative;
  background-color: var(--bg-page);
}

.workspace-pane {
  display: none !important;
  flex-direction: column;
  overflow: hidden;
  height: 100%;
  width: 100%;
}

.workspace-pane.active {
  display: flex !important;
}

/* ==========================================================================
   TAB 1: SUPPLEMENTARY INPUT (CUSTOMS FIELDS FOR ICEGATE)
   ========================================================================== */
.supplementary-container {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.form-section-card {
  background-color: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.form-section-head {
  padding: 14px 20px;
  background-color: var(--bg-subtle);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.form-section-head h3 {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy-dark);
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-section-head p {
  font-size: 11px;
  color: var(--text-muted);
}

.form-grid {
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px 20px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.form-input, .form-select {
  padding: 8px 12px;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-main);
  background-color: #ffffff;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-input:focus, .form-select:focus {
  border-color: var(--blue-primary);
  box-shadow: 0 0 0 3px rgba(30, 86, 160, 0.12);
}

.form-hint {
  font-size: 10.5px;
  color: var(--text-dim);
}

.supplementary-sticky-footer {
  position: sticky;
  bottom: 0;
  background-color: #ffffff;
  border-top: 1px solid var(--border-light);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 -4px 10px rgba(0,0,0,0.04);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

/* ==========================================================================
   TAB 2: AUDIT CHECKLIST & VERSION HISTORY (SENTINEL UNIFO STYLE)
   ========================================================================== */
.audit-workspace-layout {
  display: flex;
  height: 100%;
  width: 100%;
  overflow: hidden;
}

/* Center Document Viewer Column */
.document-viewer-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  border-right: 1px solid var(--border-light);
  background-color: var(--bg-page);
  overflow: hidden;
}

/* Document Top Toolbar */
.doc-toolbar {
  min-height: 52px;
  background-color: #ffffff;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 8px 16px;
  flex-shrink: 0;
  gap: 8px 12px;
}

.doc-toolbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* New Version / Export dropdowns */
.doc-menu {
  position: relative;
}

.doc-menu-list {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 190px;
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 4px;
  z-index: 50;
}

.doc-menu.open .doc-menu-list {
  display: block;
}

.doc-menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-family: inherit;
  font-size: 12.5px;
  color: var(--text-main);
  text-align: left;
  cursor: pointer;
}

.doc-menu-item span {
  font-size: 11px;
  color: var(--text-dim);
}

.doc-menu-item:hover {
  background-color: var(--bg-subtle);
}

.doc-menu-sep {
  height: 1px;
  margin: 4px 6px;
  background-color: var(--border-light);
}

/* Document Content Body */
.doc-canvas-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

#docCanvas {
  width: 100%;
  max-width: 1040px;
}

#docCanvas > .customs-paper-document {
  margin-left: auto;
  margin-right: auto;
}

/* PDF fills the available height instead of scrolling the page */
#docCanvas:has(> .pdf-viewer-container) {
  height: 100%;
}

.doc-empty {
  margin: 48px auto 0;
  max-width: 420px;
  padding: 32px;
  text-align: center;
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
}

.doc-empty h2 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 6px;
}

.doc-empty p {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 18px;
}

.doc-empty.muted {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-muted);
  background: transparent;
  border: none;
}

.customs-paper-document {
  width: 100%;
  max-width: 860px;
  background-color: #ffffff;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  padding: 36px 42px;
  color: #1e293b;
  font-size: 11px;
  line-height: 1.4;
  margin-bottom: 40px;
  position: relative;
}

.doc-formal-header {
  border-bottom: 2px solid #0f172a;
  padding-bottom: 12px;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.doc-formal-header-left h1 {
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.doc-formal-header-left p {
  font-size: 10.5px;
  color: #475569;
}

.doc-formal-header-right {
  text-align: right;
  font-size: 10.5px;
  color: #475569;
}

.doc-checklist-title-box {
  background-color: #f1f5f9;
  border: 1px solid #cbd5e1;
  text-align: center;
  padding: 6px;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  margin-bottom: 14px;
  letter-spacing: 0.5px;
}

.doc-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 24px;
  margin-bottom: 16px;
}

.doc-info-table {
  width: 100%;
  border-collapse: collapse;
}

.doc-info-table td {
  padding: 3px 6px;
  font-size: 10.5px;
  vertical-align: top;
}

.doc-info-table td.label {
  font-weight: 700;
  color: #334155;
  width: 40%;
}

.doc-info-table td.val {
  color: #0f172a;
}

.doc-items-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 14px;
  margin-bottom: 14px;
  border: 1px solid #94a3b8;
}

.doc-items-table th {
  background-color: #e2e8f0;
  border: 1px solid #94a3b8;
  padding: 5px 8px;
  font-size: 10px;
  font-weight: 700;
  text-align: left;
}

.doc-items-table td {
  border: 1px solid #cbd5e1;
  padding: 5px 8px;
  font-size: 10px;
}

.audit-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
}

.audit-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: currentColor;
}

.audit-badge.success {
  background-color: #f0fdf4;
  color: #15803d;
}

.audit-badge.error {
  background-color: #fef2f2;
  color: #b91c1c;
}

/* Right Version History Sidebar */
.history-sidebar-col {
  width: 296px;
  background-color: #ffffff;
  display: flex;
  flex-direction: column;
  height: 100%;
  flex-shrink: 0;
}

.history-head {
  height: 52px;
  padding: 0 16px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.history-head h3 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
}

.history-count-badge {
  background-color: var(--bg-muted);
  color: var(--text-muted);
  min-width: 20px;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
}

.history-list-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.history-note {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 24px 12px;
  text-align: center;
  font-size: 12px;
  color: var(--text-dim);
}

.history-note.error {
  color: #b91c1c;
}

.history-note.error span {
  color: var(--text-muted);
  font-size: 11.5px;
}

/* Version item in history */
.version-card {
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  padding: 10px 12px;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s;
}

.version-card:hover {
  background-color: var(--bg-subtle);
}

.version-card.active {
  background-color: var(--blue-light);
  border-color: #c7d7f5;
}

.version-card-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.version-tag {
  font-weight: 600;
  font-size: 12.5px;
  color: var(--text-main);
}

.version-latest {
  font-size: 10.5px;
  font-weight: 500;
  color: var(--blue-primary);
}

.version-card-head .status-badge {
  margin-left: auto;
}

.status-badge.sm {
  font-size: 10.5px;
  padding: 0 7px;
  gap: 4px;
}

.status-badge.sm::before {
  width: 5px;
  height: 5px;
}

.version-card-meta {
  font-size: 11.5px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Export + ICEGATE filing buttons, shown on the selected version card */
.version-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #c7d7f5;
  cursor: default;
}

.version-actions .btn-primary,
.version-actions .btn-secondary {
  height: 28px;
  padding: 0 10px;
  font-size: 12px;
}

.version-actions > .btn-primary,
.version-actions > .btn-secondary {
  flex: 1;
  white-space: nowrap;
}

.version-actions .doc-menu-list {
  position: fixed;
  right: auto;
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(2px);
  display: none !important;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.modal-backdrop.open {
  display: flex !important;
}

.modal-card {
  width: 100%;
  max-width: 460px;
  background-color: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  animation: modalPop 0.2s ease;
}

@keyframes modalPop {
  from { transform: scale(0.96); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--bg-subtle);
}

.modal-head h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--navy-dark);
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: var(--text-muted);
}

.modal-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.modal-foot {
  padding: 12px 20px;
  background-color: var(--bg-subtle);
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Profile details table */
.profile-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.profile-table th,
.profile-table td {
  padding: 11px 0;
  border-bottom: 1px solid var(--border-light);
  text-align: left;
  vertical-align: top;
}

.profile-table tr:last-child th,
.profile-table tr:last-child td {
  border-bottom: 0;
}

.profile-table th {
  width: 38%;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
}

.profile-table td {
  color: var(--text-main);
  overflow-wrap: anywhere;
}

/* Profile: ICEGATE API key */
.profile-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
}

.profile-section-title {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
}

.profile-section .form-hint {
  display: block;
  margin-bottom: 10px;
}

/* Toast Notifications */
.toast-notice {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background-color: var(--navy-dark);
  color: #ffffff;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  font-size: 12.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 200;
  transform: translateY(30px);
  opacity: 0;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.toast-notice.show {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.toast-notice.success {
  border-left: 4px solid #22c55e;
}

.toast-notice.error {
  border-left: 4px solid #ef4444;
}

.toast-notice.info {
  border-left: 4px solid #3b82f6;
}

/* Utility Helpers */
.hidden { display: none !important; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ==========================================================================
   SHIPPING BILL & PDF CHECKLIST VIEWER STYLES
   ========================================================================== */
.pdf-viewer-container {
  width: 100%;
  height: 100%;
  min-height: 480px;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-muted);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.pdf-viewer-frame {
  width: 100%;
  flex: 1;
  border: none;
}

.doc-view-mode-toggle {
  display: inline-flex;
  align-items: center;
  background-color: var(--bg-page);
  border-radius: var(--radius-md);
  padding: 3px;
  gap: 2px;
}

.doc-mode-btn {
  border: none;
  background: none;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  height: 26px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}

.doc-mode-btn:hover {
  color: var(--text-main);
}

.doc-mode-btn.active {
  background-color: #ffffff;
  color: var(--text-main);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.catalog-summary-banner {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
  color: #ffffff;
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

.catalog-summary-stats {
  display: flex;
  gap: 24px;
}

.catalog-stat-item {
  display: flex;
  flex-direction: column;
}

.catalog-stat-value {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
}

.catalog-stat-label {
  font-size: 11px;
  opacity: 0.85;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.catalog-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.catalog-model-card {
  background-color: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.catalog-model-header {
  background-color: #f8fafc;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--navy-dark);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.catalog-fields-grid {
  padding: 12px 16px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
}

.catalog-field-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.catalog-field-label {
  font-size: 11.5px;
  font-weight: 600;
  color: #334155;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.catalog-badge-extracted {
  background-color: #dcfce7;
  color: #15803d;
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 3px;
}

.catalog-badge-manual {
  background-color: #fef3c7;
  color: #b45309;
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 3px;
}

.catalog-field-input, .catalog-field-select {
  width: 100%;
  padding: 6px 10px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-family: inherit;
  color: #0f172a;
  background-color: #ffffff;
}

.catalog-field-input:focus, .catalog-field-select:focus {
  outline: none;
  border-color: var(--blue-primary);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.catalog-field-hint {
  font-size: 10.5px;
  color: #64748b;
  line-height: 1.3;
}

.json-view {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.json-view-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-light);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-main);
}

.json-view-meta {
  font-size: 11.5px;
  font-weight: 400;
  color: var(--text-muted);
}

.json-viewer-box {
  background-color: var(--bg-subtle);
  color: #1e293b;
  padding: 14px 16px;
  margin: 0;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11.5px;
  line-height: 1.55;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

.catalog-model-count {
  margin-left: 6px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-muted);
}

/* ==========================================================================
   VIEW 3: USER MANAGEMENT
   ========================================================================== */
.users-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
}

.users-head h2 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
}

.users-head p {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.users-table td.users-id {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Consolas, monospace;
  font-weight: 600;
  color: var(--text-main);
}

/* ==========================================================================
   VIEW 4: AUDIT REPORTS (COMING SOON)
   ========================================================================== */
.coming-soon {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 32px 16px;
  text-align: center;
  color: var(--text-dim);
}

.coming-soon h2 {
  margin-top: 4px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-main);
}

.coming-soon p {
  font-size: 13px;
  color: var(--text-muted);
}

/* Shipping Bill dashboard: warnings and supporting document rows */
.sb-warnings {
  background-color: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: var(--radius-md);
  color: #92400e;
  font-size: 12px;
  padding: 12px 16px;
  margin-bottom: 16px;
}

.sb-warnings ul {
  margin: 6px 0 0 18px;
  padding: 0;
  line-height: 1.5;
}

.sb-doc-row {
  border-top: 1px solid var(--border-light);
}

.sb-doc-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px 0;
  font-size: 12px;
  color: var(--navy-dark);
}

.sb-doc-empty {
  padding: 14px 16px;
  font-size: 12px;
  color: var(--text-muted);
}

.sb-doc-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 16px;
  border-top: 1px solid var(--border-light);
  background-color: #fffbeb;
  font-size: 12px;
  color: #92400e;
}
