/* ==========================================================================
   OJANVU STUDIO - ENTERPRISE OPERATIONS DESIGN SYSTEM
   Single-Screen Viewport Architecture | Strict Black & White Codex Theme
   ========================================================================== */

:root {
  --canvas-bg: #ffffff;
  --surface-card: #ffffff;
  --color-surface: #f8f9fb;
  --color-surface-hover: #f0f1f5;
  --border-hairline: #e6e8eb;
  --border-hover: #cbced4;

  --text-dark: #0d0d0d;
  --text-secondary: #222222;
  --text-muted: #555566;
  --text-dim: #777788;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

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

html, body {
  height: 100vh;
  overflow: hidden;
  background-color: var(--canvas-bg);
  color: var(--text-dark);
  font-family: var(--font-sans);
  font-size: 13.5px;
  line-height: 1.5;
  letter-spacing: -0.012em;
  -webkit-font-smoothing: antialiased;
}

/* Subtle Geometric Grid */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(circle at 50% 20%, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.12) 70%, transparent 100%);
  -webkit-mask-image: radial-gradient(circle at 50% 20%, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.12) 70%, transparent 100%);
}

/* ==========================================================================
   AUTHENTICATION GATE
   ========================================================================== */
.auth-gate-wrapper {
  max-width: 440px;
  margin: 80px auto 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 16px;
}

.auth-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 24px;
  text-align: center;
}

.logo-main {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #000000;
}

.logo-sub {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: #64748b;
  margin-top: 3px;
}

.auth-card {
  width: 100%;
  background-color: #ffffff;
  border: 1px solid var(--border-hairline);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04);
  border-radius: 16px;
  padding: 32px 28px;
}

.auth-role-tabs {
  display: flex;
  background-color: #f1f5f9;
  padding: 3px;
  border-radius: 9999px;
  gap: 3px;
}

.auth-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 8px 14px;
  border-radius: 9999px;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.15s ease;
}

.auth-tab-btn.active {
  background-color: #000000;
  color: #ffffff;
}

.auth-hint-box {
  margin-top: 20px;
  font-size: 11.5px;
  color: #64748b;
  line-height: 1.5;
  text-align: center;
  background-color: #f8fafc;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--border-hairline);
}

.auth-error-banner {
  color: #dc2626;
  font-size: 12.5px;
  font-weight: 600;
  margin-top: 10px;
  text-align: center;
}

/* ==========================================================================
   AUTHENTICATED ENTERPRISE APP SHELL (STRICT 100VH NO SCROLL)
   ========================================================================== */
.enterprise-app-shell {
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

/* LEFT SIDEBAR */
.enterprise-sidebar {
  width: 230px;
  height: 100vh;
  background-color: #ffffff;
  border-right: 1px solid var(--border-hairline);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.sidebar-header {
  padding: 16px 18px 14px;
  border-bottom: 1px solid var(--border-hairline);
}

.context-facility-badge {
  display: inline-block;
  background-color: #f1f5f9;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #475569;
  padding: 2px 7px;
  border-radius: 4px;
  margin-top: 6px;
  text-transform: uppercase;
}

.sidebar-nav-group {
  padding: 14px 10px;
  flex: 1;
  overflow-y: auto;
}

.nav-group-title {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #94a3b8;
  padding: 0 10px 8px;
  text-transform: uppercase;
}

.sidebar-link {
  width: 100%;
  display: flex;
  align-items: center;
  background: transparent;
  border: none;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  margin-bottom: 2px;
  transition: all 0.15s ease;
  text-align: left;
}

.sidebar-link:hover {
  background-color: #f8fafc;
  color: #000000;
}

.sidebar-link.active {
  background-color: #000000;
  color: #ffffff;
}

.sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border-hairline);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #ffffff;
}

.sidebar-user-info {
  display: flex;
  flex-direction: column;
}

.user-display-name {
  font-size: 12.5px;
  font-weight: 700;
  color: #000000;
}

.user-role-tag {
  font-size: 10.5px;
  font-weight: 600;
  color: #64748b;
}

.sidebar-signout-btn {
  background: transparent;
  border: 1px solid var(--border-hairline);
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
}

.sidebar-signout-btn:hover {
  background-color: #f1f5f9;
  color: #000000;
}

/* RIGHT CONTENT VIEWPORT */
.enterprise-content-area {
  flex: 1;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background-color: var(--canvas-bg);
}

.top-action-bar {
  height: 48px;
  padding: 0 24px;
  background-color: #ffffff;
  border-bottom: 1px solid var(--border-hairline);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.page-breadcrumb {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
}

.live-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: #f1f5f9;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #0f172a;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #22c55e;
}

/* MULTI-PAGE VIEWPORT PANELS (STRICT 100% SINGLE SCREEN) */
.enterprise-page {
  display: none;
  flex: 1;
  min-height: 0;
  height: calc(100vh - 48px);
  padding: 16px 24px 14px;
  flex-direction: column;
  overflow: hidden;
}

.enterprise-page.active {
  display: flex;
}

.page-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  flex-shrink: 0;
}

.page-heading {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: #000000;
}

.header-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.baud-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  background-color: #f1f5f9;
  padding: 4px 10px;
  border-radius: 9999px;
  color: #475569;
}

/* ==========================================================================
   CARDS & GRIDS
   ========================================================================== */
.card-grid-dual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  flex-shrink: 0;
  min-height: min-content;
  align-items: stretch;
}

.enterprise-page.super-page {
  overflow-y: auto;
  overflow-x: hidden;
  height: calc(100vh - 48px);
  padding: 16px 24px 40px;
  gap: 16px;
  width: 100%;
  box-sizing: border-box;
}

.enterprise-page.super-page > * {
  flex-shrink: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  min-width: 0;
}

.enterprise-page.super-page {
  overflow-y: auto;
  overflow-x: hidden;
  height: calc(100vh - 48px);
  padding: 16px 24px 40px;
  gap: 16px;
}

.enterprise-page.super-page > * {
  flex-shrink: 0;
}

.card-grid-tri {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
  flex-shrink: 0;
}

.card-grid-quad {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  flex-shrink: 0;
}

.panel-card {
  background-color: #ffffff;
  border: 1px solid var(--border-hairline);
  border-radius: 12px;
  padding: 18px 22px;
}

.card-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: #000000;
  margin-bottom: 14px;
}

.card-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.badge-black-pill {
  background-color: #000000;
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 9999px;
}

.badge-status-green {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  color: #16a34a;
}

.badge-status-green::before {
  content: "";
  width: 5px;
  height: 5px;
  background-color: #22c55e;
  border-radius: 50%;
}

.device-card-title {
  font-size: 18px;
  font-weight: 700;
  color: #000000;
}

.device-spec-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  background-color: #f8fafc;
  border-radius: 10px;
  padding: 12px 16px;
  margin-top: 14px;
}

.spec-cell {
  display: flex;
  flex-direction: column;
}

.spec-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #64748b;
  text-transform: uppercase;
}

.spec-val {
  font-size: 12.5px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: #0f172a;
  margin-top: 2px;
}

.device-action-row {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

/* Metric / Diagnostic Gauges */
.metric-card {
  background-color: #ffffff;
  border: 1px solid var(--border-hairline);
  border-radius: 12px;
  padding: 14px 18px;
}

.metric-channel-tag {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

.metric-channel-tag.red { color: #0d0d0d; }
.metric-channel-tag.green { color: #0d0d0d; }
.metric-channel-tag.blue { color: #0d0d0d; }

.metric-voltage-val {
  font-size: 24px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: #000000;
}

.voltage-meter-bar {
  height: 5px;
  background-color: #f1f5f9;
  border-radius: 9999px;
  margin-top: 8px;
  overflow: hidden;
}

.meter-fill {
  height: 100%;
  border-radius: 9999px;
}

.meter-meta {
  font-size: 11px;
  color: #64748b;
  font-family: var(--font-mono);
  margin-top: 6px;
}

.control-status-row {
  display: flex;
  gap: 24px;
}

.status-metric {
  display: flex;
  flex-direction: column;
}

.metric-title {
  font-size: 10.5px;
  font-weight: 700;
  color: #64748b;
}

.metric-value {
  font-size: 13px;
  font-weight: 700;
  font-family: var(--font-mono);
  margin-top: 2px;
}

.metric-value.status-pass {
  color: #16a34a;
}

/* High-Level Stat Counters */
.stat-counter-card {
  background-color: #ffffff;
  border: 1px solid var(--border-hairline);
  border-radius: 10px;
  padding: 12px 16px;
}

.counter-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #64748b;
}

.counter-val {
  font-size: 20px;
  font-weight: 700;
  color: #000000;
  margin-top: 3px;
  display: block;
}

/* ==========================================================================
   INPUTS & BUTTONS
   ========================================================================== */
.form-group {
  margin-bottom: 12px;
}

.input-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #000000;
  margin-bottom: 5px;
}

.input-pill {
  width: 100%;
  height: 38px;
  background-color: #ffffff;
  border: 1px solid var(--border-hairline);
  border-radius: 9999px;
  padding: 0 14px;
  font-size: 13px;
  font-family: var(--font-sans);
  color: #000000;
  outline: none;
  transition: border-color 0.15s ease;
}

.input-pill:focus {
  border-color: #000000;
}

.select-pill {
  cursor: pointer;
}

.btn-pill-solid {
  background-color: #000000;
  color: #ffffff;
  border: 1px solid #000000;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 18px;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-pill-solid:hover {
  background-color: #262626;
  border-color: #262626;
}

.btn-pill-outline {
  background-color: #ffffff;
  color: #000000;
  border: 1px solid var(--border-hairline);
  font-size: 12px;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-pill-outline:hover {
  background-color: #f8fafc;
  border-color: var(--border-hover);
}

.w-full {
  width: 100%;
}

.radio-pill-group {
  display: flex;
  gap: 8px;
}

.radio-pill {
  background-color: #f8fafc;
  border: 1px solid var(--border-hairline);
  border-radius: 9999px;
  padding: 5px 12px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.radio-pill input {
  accent-color: #000000;
}

/* ==========================================================================
   TERMINAL (FULLSCREEN SINGLE-SCREEN FIT)
   ========================================================================== */
.fullscreen-terminal-box {
  flex: 1;
  min-height: 0;
  background-color: #000000;
  border-radius: 12px;
  border: 1px solid #222222;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.terminal-body {
  flex: 1;
  min-height: 0;
  padding: 14px 18px;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.55;
  color: #d1d5db;
}

.term-line {
  margin-bottom: 2px;
}

.term-line.system { color: #9ca3af; }
.term-line.info { color: #60a5fa; }
.term-line.tx { color: #fbbf24; }
.term-line.rx { color: #4ade80; }

.terminal-command-bar {
  padding: 10px 14px;
  background-color: #0a0a0a;
  border-top: 1px solid #1f2937;
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.term-input {
  flex: 1;
  background-color: #111111;
  border: 1px solid #2d3748;
  border-radius: 6px;
  padding: 6px 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: #ffffff;
  outline: none;
}

.term-input:focus {
  border-color: #4b5563;
}

/* ==========================================================================
   TABLES (SCROLLABLE TBODY, STICKY THEAD)
   ========================================================================== */
.table-wrapper {
  flex: 1;
  min-height: 0;
  background-color: #ffffff;
  border: 1px solid var(--border-hairline);
  border-radius: 12px;
  overflow-y: auto;
  overflow-x: hidden;
  width: 100%;
  box-sizing: border-box;
}

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

.clean-table.super-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

.clean-table.super-table th,
.clean-table.super-table td {
  padding: 10px 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
  box-sizing: border-box;
}

.clean-table.super-table th {
  font-size: 10.5px;
  letter-spacing: 0.05em;
  font-weight: 700;
  color: var(--text-dim);
  background-color: #f8fafc;
  border-bottom: 1px solid var(--border-hairline);
}

.clean-table.super-table td {
  font-size: 12px;
  color: #1a1a24;
  border-bottom: 1px solid #f1f5f9;
}

.clean-table.super-table tr:hover td {
  background-color: #fafbfc;
}

.clean-table th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 10px 16px;
  background-color: #f8fafc;
  border-bottom: 1px solid var(--border-hairline);
  position: sticky;
  top: 0;
  z-index: 10;
}

.clean-table td {
  padding: 10px 16px;
  font-size: 12.5px;
  border-bottom: 1px solid #f1f5f9;
  color: var(--text-secondary);
}

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

.table-code {
  font-family: var(--font-mono);
  font-size: 11.5px;
  background-color: #f8fafc;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border-hairline);
}

.local-log-spec-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.log-directory-path {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #000000;
  font-weight: 700;
}

/* ==========================================================================
   MODALS
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-dialog {
  background-color: #ffffff;
  width: 100%;
  max-width: 440px;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.modal-dialog.modal-lg {
  max-width: 680px;
  width: 90vw;
}

.modal-dialog.modal-xl {
  max-width: 960px;
  width: 92vw;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.modal-title {
  font-size: 16px;
  font-weight: 700;
  color: #000000;
}

.modal-close-btn {
  background: transparent;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #64748b;
}

.modal-footer {
  margin-top: 18px;
}

/* ==========================================================================
   LAB OPERATIONS - HARDWARE MANAGEMENT & COCKPIT
   ========================================================================== */

.facility-subtext {
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
}

.hardware-subview {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Hardware Cards Roster Grid */
.hw-roster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 16px;
  overflow-y: auto;
  padding-bottom: 20px;
}

.hw-device-card {
  background-color: #ffffff;
  border: 1px solid var(--border-hairline);
  border-radius: 12px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.hw-device-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
}

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

.hw-card-title {
  font-size: 16px;
  font-weight: 700;
  color: #000000;
}

.hw-spec-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 14px;
  margin-bottom: 16px;
  background-color: #f8fafc;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--border-hairline);
}

.hw-spec-item {
  display: flex;
  flex-direction: column;
}

.hw-spec-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #64748b;
  text-transform: uppercase;
}

.hw-spec-val {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: #000000;
  margin-top: 2px;
}

.hw-card-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

/* Status Badges */
.badge-status-online {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #16a34a;
  background-color: #f0fdf4;
  border: 1px solid #bbf7d0;
  padding: 3px 8px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.badge-status-online::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #16a34a;
}

.badge-status-standby {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #d97706;
  background-color: #fffbeb;
  border: 1px solid #fde68a;
  padding: 3px 8px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.badge-status-standby::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #d97706;
}

.badge-status-disconnected {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #64748b;
  background-color: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 3px 8px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.badge-status-disconnected::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #94a3b8;
}

.badge-status-calibrating {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #4338ca;
  background-color: #eef2ff;
  border: 1px solid #c7d2fe;
  padding: 3px 8px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.badge-status-calibrating::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #4338ca;
  animation: pulse-dot-anim 1s infinite alternate;
}

.badge-status-suspended, .badge-status-danger {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #b91c1c;
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  padding: 3px 8px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.badge-status-suspended::before, .badge-status-danger::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #b91c1c;
}

@keyframes pulse-dot-anim {
  from { opacity: 0.4; }
  to { opacity: 1; }
}

/* Empty State */
.empty-roster-box {
  background-color: #ffffff;
  border: 1px dashed var(--border-hairline);
  border-radius: 12px;
  padding: 48px 24px;
  text-align: center;
  margin-top: 16px;
}

.empty-roster-title {
  font-size: 16px;
  font-weight: 700;
  color: #000000;
}

.empty-roster-desc {
  font-size: 13px;
  color: #64748b;
  max-width: 420px;
  margin: 6px auto 0;
}

/* Cockpit Top Bar */
.cockpit-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  flex-shrink: 0;
}

.cockpit-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-back-breadcrumb {
  background: transparent;
  border: 1px solid var(--border-hairline);
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-back-breadcrumb:hover {
  background-color: #f1f5f9;
  color: #000000;
}

.cockpit-title-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cockpit-device-name {
  font-size: 18px;
  font-weight: 700;
  color: #000000;
}

.cockpit-port-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  background-color: #f1f5f9;
  padding: 3px 8px;
  border-radius: 4px;
  color: #475569;
}

.cockpit-action-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Cockpit Grid */
.cockpit-grid {
  display: flex;
  gap: 14px;
  flex: 1;
  min-height: 0;
  min-width: 0;
  width: 100%;
  height: calc(100% - 44px);
  overflow: hidden;
}

.cockpit-main-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  height: 100%;
}

.calibration-card {
  padding: 12px 18px;
  flex-shrink: 0;
}

.calibration-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.calibration-sub {
  font-size: 11px;
  color: #64748b;
  display: block;
}

.calibration-status-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 2px 7px;
  border-radius: 4px;
  background-color: #f1f5f9;
  color: #475569;
}

.calibration-graph-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.cal-graph-container {
  flex: 1;
  background-color: #ffffff;
  border: 1px solid var(--border-hairline);
  border-radius: 6px;
  height: 70px;
  overflow: hidden;
  position: relative;
}

.cal-svg-chart {
  width: 100%;
  height: 100%;
  display: block;
}

.cal-channels-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 190px;
  flex-shrink: 0;
}

.cal-chan-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  background-color: #f8fafc;
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid var(--border-hairline);
}

.chan-tag {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 10.5px;
}

.chan-tag.red { color: #dc2626; }
.chan-tag.green { color: #16a34a; }
.chan-tag.blue { color: #2563eb; }

.chan-voltage {
  font-family: var(--font-mono);
  font-weight: 600;
  color: #000000;
}

.chan-status {
  font-size: 9.5px;
  font-weight: 700;
  color: #16a34a;
}

.calibration-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
  color: #64748b;
  margin-top: 6px;
  border-top: 1px solid var(--border-hairline);
  padding-top: 6px;
}

/* Terminal Card in Cockpit */
.terminal-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 12px 18px;
}

.terminal-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  flex-shrink: 0;
}

.term-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.term-action-group {
  display: flex;
  gap: 6px;
}

.cockpit-terminal-frame {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background-color: #0d0d0d;
  border-radius: 8px;
  overflow: hidden;
}

/* Right Side Queue */
.cockpit-side-queue {
  width: 300px;
  flex-shrink: 0;
  min-width: 0;
  height: 100%;
  box-sizing: border-box;
}

.queue-card-fill {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 14px 16px;
  box-sizing: border-box;
  width: 100%;
}

.queue-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  flex-shrink: 0;
}

.queue-subtext {
  font-size: 11px;
  color: #64748b;
  display: block;
}

.queue-count-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  background-color: #000000;
  color: #ffffff;
  padding: 2px 8px;
  border-radius: 9999px;
}

.queue-status-banner {
  background-color: #f8fafc;
  border: 1px solid var(--border-hairline);
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 11px;
  color: #475569;
  line-height: 1.4;
  margin-bottom: 10px;
  flex-shrink: 0;
}

.queue-scroll-container {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
}

.cockpit-queue-item {
  background-color: #ffffff;
  border: 1px solid var(--border-hairline);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cockpit-queue-item:hover {
  border-color: var(--border-hover);
}

.queue-item-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.queue-item-id {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 11.5px;
  color: #000000;
}

.queue-item-pos {
  font-size: 10px;
  font-weight: 700;
  color: #2563eb;
  background-color: #eff6ff;
  padding: 1px 6px;
  border-radius: 4px;
}

.queue-item-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #64748b;
}

/* ==========================================================================
   LAB OPERATIONS - JOBS MANAGEMENT
   ========================================================================== */

.jobs-kpi-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 12px;
  flex-shrink: 0;
}

.jobs-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  flex-shrink: 0;
}

.jobs-search-box {
  flex: 1;
  max-width: 320px;
}

.jobs-search-box input {
  width: 100%;
  height: 32px;
  font-size: 12px;
  padding: 0 10px;
  border: 1px solid var(--border-hairline);
  border-radius: 6px;
}

.jobs-filter-pills {
  display: flex;
  background-color: #f1f5f9;
  padding: 2px;
  border-radius: 6px;
  gap: 2px;
}

.filter-tab {
  background: transparent;
  border: none;
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 4px;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-tab:hover {
  color: #000000;
}

.filter-tab.active {
  background-color: #ffffff;
  color: #000000;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.jobs-hardware-select select {
  height: 32px;
  padding: 0 10px;
  font-size: 12px;
  border: 1px solid var(--border-hairline);
  border-radius: 6px;
  background-color: #ffffff;
}

/* Job Detail Inspection Modal */
.job-detail-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  background-color: #f8fafc;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-hairline);
}

.kpi-cell {
  display: flex;
  flex-direction: column;
}

.kpi-label {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #64748b;
}

.kpi-value {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: #000000;
  margin-top: 2px;
}
