/* ══════════════════════════════════════════════════════════
   MOBILE DARK HUD SKIN — SO-Scanner Room Screen
   Applies ONLY to #room-screen at viewport width <= 768px.
   Desktop (>768px) and all modals stay 100% untouched.
   ══════════════════════════════════════════════════════════ */

@media (max-width: 768px) {

  /* ── ROOT SCOPING & DARK SURFACE ── */
  #room-screen {
    --hud-bg: #0e1116;
    --hud-surface: #171c24;
    --hud-surface-2: #1d2430;
    --hud-border: #232a35;
    --hud-border-2: #2a3340;
    --hud-text: #e7ebf0;
    --hud-muted: #8b95a5;
    --hud-accent: #c6f432;
    --hud-on-accent: #10150a;
    --hud-klop: #4ade80;
    --hud-minus: #ff6b6b;
    --hud-plus: #5aa9ff;
    --hud-outtransit: #38bdf8;

    background: #0e1116 !important; /* Set Dark HUD base background */
    color: #e7ebf0 !important; /* Set Dark HUD base text color */
    overflow-x: hidden !important; /* Prevent horizontal scroll at 360px */
    min-height: 100vh !important; /* Fill mobile viewport */
  }

  /* ── TOP NAV ── */
  #room-screen .nav {
    background: #171c24 !important; /* Dark HUD nav surface */
    border-bottom: 1px solid #232a35 !important; /* Dark HUD nav border */
  }
  #room-screen .nav-brand {
    color: #e7ebf0 !important; /* Light nav brand text */
  }
  #room-screen .nav-brand span {
    color: #c6f432 !important; /* Lime nav brand accent */
  }
  #room-screen .user-badge {
    background: #1d2430 !important; /* Surface-2 user badge */
    color: #e7ebf0 !important; /* Light text */
    border: 1px solid #232a35 !important; /* Subtle border */
  }

  /* ── COMPACT ROOM HEADER (Zero wasted vertical space) ── */
  #room-screen .room-header {
    background: #0e1116 !important; /* Dark HUD header background */
    border-bottom: 1px solid #232a35 !important; /* Dark HUD header border */
    padding: 8px 12px 10px !important; /* Compact header padding */
  }
  #room-screen #current-room-name {
    font-size: 15px !important; /* Compact room title */
    font-weight: 500 !important; /* Weight 500 */
    color: #e7ebf0 !important; /* Light text */
    line-height: 1.2 !important; /* Tight header title line */
  }
  #room-screen #header-sync-status {
    font-size: 11px !important; /* Shrunk sync badge font */
    padding: 3px 8px !important; /* Shrunk sync badge padding */
    border-radius: 6px !important; /* Rounded badge */
  }
  #room-screen .btn-leave {
    width: 44px !important; /* 44px square tap target */
    height: 44px !important; /* 44px height */
    min-width: 44px !important; /* Prevent shrink */
    min-height: 44px !important; /* Prevent shrink */
    padding: 0 !important; /* Center icon */
    font-size: 0 !important; /* Hide original text for icon-only button */
    background: #1d2430 !important; /* Surface-2 button background */
    border: 1px solid #2a3340 !important; /* Border-2 */
    border-radius: 10px !important; /* 10px button radius */
    color: #e7ebf0 !important; /* Icon color */
    display: flex !important; /* Center icon container */
    align-items: center !important; /* Center vertically */
    justify-content: center !important; /* Center horizontally */
    position: relative !important; /* Icon positioning */
  }
  #room-screen .btn-leave::before {
    content: '←' !important; /* Icon-only arrow symbol */
    font-size: 18px !important; /* Visible icon size */
    line-height: 1 !important; /* Center line */
    color: #e7ebf0 !important; /* Icon color */
  }
  #room-screen .room-info-bar > div:not(.active-users) {
    display: none !important; /* Hide Created date row on mobile */
  }
  #room-screen .active-users {
    font-size: 11px !important; /* Active users 11px line */
    color: #8b95a5 !important; /* Muted text */
    line-height: 1.3 !important; /* Compact line height */
  }
  #room-screen .active-users * {
    color: #8b95a5 !important; /* Force muted color on children */
  }
  #room-screen #room-progress-box {
    background: transparent !important; /* Flat background */
    border: none !important; /* Remove borders */
    margin-top: 6px !important; /* Compact top margin */
    padding: 0 !important; /* No extra padding */
  }
  #room-screen .room-progress-row {
    font-size: 11px !important; /* 11px line */
    color: #8b95a5 !important; /* Muted row */
  }
  #room-screen .room-progress-label {
    font-size: 11px !important; /* 11px label */
    color: #8b95a5 !important; /* Muted label */
  }
  #room-screen .room-progress-stats {
    font-size: 11px !important; /* 11px stats */
    color: #8b95a5 !important; /* Muted stats */
  }
  #room-screen .room-progress-stats .stat-highlight {
    color: #e7ebf0 !important; /* Highlighted numbers */
  }
  #room-screen .room-progress-pct {
    font-size: 14px !important; /* Clear percent */
    font-weight: 700 !important; /* Bold */
    color: #c6f432 !important; /* Accent lime percent */
  }
  #room-screen .room-progress-track {
    height: 4px !important; /* 4px slim bar track */
    background: #232a35 !important; /* Border track color */
    border-radius: 2px !important; /* Rounded track */
  }
  #room-screen #room-progress-fill {
    background: #c6f432 !important; /* Lime progress fill */
    border-radius: 2px !important; /* Rounded fill */
  }

  /* ── GLOBAL / DOCK NAVIGATION ── */
  #room-screen .tabs {
    display: none !important; /* Hide original tabs on mobile, replaced by floating dock */
  }
  #room-screen .tab-content {
    padding-bottom: calc(90px + env(safe-area-inset-bottom)) !important; /* Prevent dock overlap */
  }
  #room-screen #tab-my-scans:has(#bulk-actions.has-selection) {
    padding-bottom: calc(146px + env(safe-area-inset-bottom)) !important; /* Ensure content clears sticky bulk actions */
  }

  /* Floating Dock */
  #room-screen #hud-dock {
    position: fixed !important; /* Floating dock */
    left: 18px !important; /* 18px horizontal offset */
    right: 18px !important; /* 18px horizontal offset */
    bottom: calc(14px + env(safe-area-inset-bottom)) !important; /* Safe area inset bottom */
    background: #1d2430 !important; /* Surface-2 background */
    border: 1px solid #2a3340 !important; /* Border-2 outline */
    border-radius: 30px !important; /* 30px dock pill radius */
    display: flex !important; /* Flex dock items */
    gap: 8px !important; /* Gap between pills */
    padding: 5px 6px !important; /* Inner pill padding */
    z-index: 950 !important; /* Above page content */
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45) !important; /* Subtle dock elevation */
    box-sizing: border-box !important; /* Border box */
  }
  #room-screen .hud-dock-item {
    flex: 1 1 0 !important; /* Equal width items */
    min-height: 44px !important; /* 44px tap target */
    height: 44px !important; /* 44px height */
    display: flex !important; /* Flex button */
    align-items: center !important; /* Center vertically */
    justify-content: center !important; /* Center horizontally */
    gap: 8px !important; /* Icon-text gap */
    border-radius: 22px !important; /* Pill shape */
    border: none !important; /* Clean button */
    background: transparent !important; /* Transparent when inactive */
    color: #8b95a5 !important; /* Muted text */
    font-size: 12px !important; /* Font size */
    font-weight: 600 !important; /* Semi-bold */
    cursor: pointer !important; /* Pointer cursor */
    user-select: none !important; /* No text selection */
    transition: background 0.15s ease, color 0.15s ease !important; /* Smooth active change */
  }
  #room-screen .hud-dock-item.active {
    background: #c6f432 !important; /* Lime active pill */
    color: #10150a !important; /* On-accent dark text */
    font-weight: 700 !important; /* Bold */
  }
  #room-screen .hud-dock-item svg {
    stroke: currentColor !important; /* Match text color */
    width: 18px !important; /* Consistent icon size */
    height: 18px !important; /* Consistent icon size */
    flex-shrink: 0 !important; /* Prevent shrinking */
  }

  /* ── MY SCANS (#tab-my-scans) ── */
  #room-screen .scan-layout {
    display: flex !important; /* Single column stack */
    flex-direction: column !important; /* Stack vertically */
    width: 100% !important; /* Full width */
    height: auto !important; /* Natural height */
  }
  #room-screen .scan-left-section {
    width: 100% !important; /* Full width */
    margin-bottom: 8px !important; /* Spacing */
  }
  #room-screen .scan-right {
    width: 100% !important; /* Full width */
    max-height: none !important; /* Allow natural expansion */
    height: auto !important; /* Natural height */
    background: transparent !important; /* Remove white/default frame in app.html:1615 */
    border: none !important; /* Remove border */
    padding: 0 !important; /* Remove padding */
    box-shadow: none !important; /* Remove shadow */
    overflow: visible !important; /* Remove nested scroll clipping */
  }
  #room-screen .scan-summary-col {
    width: 100% !important; /* Full width */
    display: block !important; /* Keep container visible */
  }
  #room-screen .scan-summary {
    display: none !important; /* Hide Part Summary column on mobile (replaced by Summary tab) */
  }

  /* Warehouse Header */
  #room-screen .warehouse-header {
    display: flex !important; /* One row layout */
    justify-content: space-between !important; /* Space between warehouse name and rak */
    align-items: center !important; /* Vertical center */
    padding: 10px 14px !important; /* Clean padding */
    background: transparent !important; /* Transparent background */
    border: none !important; /* Remove border */
    width: 100% !important; /* Full width */
    box-sizing: border-box !important; /* Border box */
  }
  #room-screen #warehouse-name {
    font-size: 14px !important; /* Warehouse title */
    font-weight: 700 !important; /* Bold */
    color: #e7ebf0 !important; /* Light text */
    white-space: nowrap !important; /* Single line */
  }
  #room-screen .current-rak-badge {
    display: inline-flex !important; /* Pill layout */
    align-items: center !important; /* Center text */
    justify-content: center !important; /* Center text */
    min-height: 36px !important; /* Tap target */
    padding: 6px 14px !important; /* Pill padding */
    border-radius: 999px !important; /* Full pill radius */
    background: transparent !important; /* Outlined pill */
    border: 1.5px solid #c6f432 !important; /* Accent lime outline */
    color: #c6f432 !important; /* Accent lime text */
    font-size: 12px !important; /* Badge font */
    font-weight: 700 !important; /* Bold */
    cursor: pointer !important; /* Tap affordance */
  }

  /* Viewfinder (Live Scanning Box) */
  #room-screen .live-scanning-box {
    min-height: 84px !important; /* Viewfinder compact height */
    height: auto !important; /* Auto fit content */
    background-color: #171c24 !important; /* Surface background */
    border-radius: 14px !important; /* 14px radius */
    border: 1px solid #232a35 !important; /* 1px border */
    position: relative !important; /* Positioning context */
    padding: 14px 20px !important; /* Comfortable padding inside corner brackets */
    overflow: hidden !important; /* Contain corners */
    box-shadow: none !important; /* Flat design */
    display: flex !important; /* Flex layout */
    flex-direction: row !important; /* Row layout: text left, qty right */
    align-items: center !important; /* Center vertically */
    justify-content: space-between !important; /* Separate text and qty */
    box-sizing: border-box !important; /* Border box */
    background-image:
      linear-gradient(to right, #c6f432 18px, transparent 18px),
      linear-gradient(to bottom, #c6f432 18px, transparent 18px),
      linear-gradient(to left, #c6f432 18px, transparent 18px),
      linear-gradient(to bottom, #c6f432 18px, transparent 18px),
      linear-gradient(to right, #c6f432 18px, transparent 18px),
      linear-gradient(to top, #c6f432 18px, transparent 18px),
      linear-gradient(to left, #c6f432 18px, transparent 18px),
      linear-gradient(to top, #c6f432 18px, transparent 18px) !important; /* Four 18px 2px lime corner brackets */
    background-repeat: no-repeat !important; /* Do not repeat corners */
    background-size: 18px 2px, 2px 18px, 18px 2px, 2px 18px, 18px 2px, 2px 18px, 18px 2px, 2px 18px !important; /* Bracket dimensions */
    background-position:
      8px 8px, 8px 8px,
      calc(100% - 8px) 8px, calc(100% - 8px) 8px,
      8px calc(100% - 8px), 8px calc(100% - 8px),
      calc(100% - 8px) calc(100% - 8px), calc(100% - 8px) calc(100% - 8px) !important; /* Corner insets */
  }
  #room-screen .live-scanning-box::before {
    display: none !important; /* Disable animated white/green slide */
  }
  #room-screen .live-indicator {
    display: none !important; /* Hide indicator pill for clean viewfinder */
  }
  #room-screen .live-content {
    flex: 1 1 auto !important; /* Take remaining width */
    min-width: 0 !important; /* Allow text ellipsis to work */
    display: flex !important; /* Flex column */
    flex-direction: column !important; /* Stack part number and description */
    justify-content: center !important; /* Center vertically */
    align-items: flex-start !important; /* Left align text */
    text-align: left !important; /* Left align */
  }
  #room-screen .live-empty {
    color: #8b95a5 !important; /* Muted empty state */
    font-size: 13px !important; /* Font size */
    line-height: 1.4 !important; /* Line height */
    text-align: left !important; /* Left align */
  }
  #room-screen .live-part-number {
    font-family: 'Space Mono', monospace !important; /* Space Mono */
    font-size: 15px !important; /* 15px mono part number */
    font-weight: 700 !important; /* Bold */
    color: #e7ebf0 !important; /* Light text */
    width: 100% !important; /* Full width of content */
    max-width: 100% !important; /* Full width */
    overflow: hidden !important; /* Overflow hidden */
    text-overflow: ellipsis !important; /* Ellipsis */
    white-space: nowrap !important; /* Single line */
    text-align: left !important; /* Left align */
    letter-spacing: 0.5px !important; /* Slight tracking */
  }
  #room-screen .live-description {
    font-size: 11px !important; /* 11px muted description */
    color: #8b95a5 !important; /* Muted text */
    width: 100% !important; /* Full width of content */
    max-width: 100% !important; /* Full width */
    overflow: hidden !important; /* Overflow hidden */
    text-overflow: ellipsis !important; /* Ellipsis */
    white-space: nowrap !important; /* Single line */
    margin-top: 4px !important; /* Small gap */
    text-align: left !important; /* Left align */
  }
  #room-screen #live-scan-qty {
    position: static !important; /* Natural flex flow */
    transform: none !important; /* Remove translate */
    flex-shrink: 0 !important; /* Do not shrink */
    margin-left: 14px !important; /* Spacing from text */
    font-size: 32px !important; /* 32px large number */
    font-weight: 700 !important; /* Bold */
    line-height: 1 !important; /* Tight line */
    text-align: right !important; /* Right aligned */
  }

  /* Minus: background merah muda, teks merah, corner bracket merah */
  #room-screen .live-scanning-box.is-minus {
    background-color: rgba(239, 68, 68, 0.16) !important;
    border-color: rgba(239, 68, 68, 0.45) !important;
    box-shadow: 0 0 16px rgba(239, 68, 68, 0.12) !important;
    background-image:
      linear-gradient(to right, #ef4444 18px, transparent 18px),
      linear-gradient(to bottom, #ef4444 18px, transparent 18px),
      linear-gradient(to left, #ef4444 18px, transparent 18px),
      linear-gradient(to bottom, #ef4444 18px, transparent 18px),
      linear-gradient(to right, #ef4444 18px, transparent 18px),
      linear-gradient(to top, #ef4444 18px, transparent 18px),
      linear-gradient(to left, #ef4444 18px, transparent 18px),
      linear-gradient(to top, #ef4444 18px, transparent 18px) !important;
  }
  #room-screen .live-scanning-box.is-minus #live-scan-qty {
    color: #ef4444 !important; /* Merah */
  }

  /* Plus: background orange muda, teks kuning, corner bracket orange */
  #room-screen .live-scanning-box.is-plus {
    background-color: rgba(249, 115, 22, 0.16) !important;
    border-color: rgba(249, 115, 22, 0.45) !important;
    box-shadow: 0 0 16px rgba(249, 115, 22, 0.12) !important;
    background-image:
      linear-gradient(to right, #f59e0b 18px, transparent 18px),
      linear-gradient(to bottom, #f59e0b 18px, transparent 18px),
      linear-gradient(to left, #f59e0b 18px, transparent 18px),
      linear-gradient(to bottom, #f59e0b 18px, transparent 18px),
      linear-gradient(to right, #f59e0b 18px, transparent 18px),
      linear-gradient(to top, #f59e0b 18px, transparent 18px),
      linear-gradient(to left, #f59e0b 18px, transparent 18px),
      linear-gradient(to top, #f59e0b 18px, transparent 18px) !important;
  }
  #room-screen .live-scanning-box.is-plus #live-scan-qty {
    color: #facc15 !important; /* Kuning */
  }

  /* Klop: background hijau neon muda, teks hijau neon KLOP, corner bracket hijau neon */
  #room-screen .live-scanning-box.is-klop {
    background-color: rgba(57, 255, 20, 0.12) !important;
    border-color: rgba(57, 255, 20, 0.45) !important;
    box-shadow: 0 0 18px rgba(57, 255, 20, 0.2) !important;
    background-image:
      linear-gradient(to right, #39ff14 18px, transparent 18px),
      linear-gradient(to bottom, #39ff14 18px, transparent 18px),
      linear-gradient(to left, #39ff14 18px, transparent 18px),
      linear-gradient(to bottom, #39ff14 18px, transparent 18px),
      linear-gradient(to right, #39ff14 18px, transparent 18px),
      linear-gradient(to top, #39ff14 18px, transparent 18px),
      linear-gradient(to left, #39ff14 18px, transparent 18px),
      linear-gradient(to top, #39ff14 18px, transparent 18px) !important;
  }
  #room-screen .live-scanning-box.is-klop #live-scan-qty {
    font-size: 24px !important; /* Smaller size for text KLOP */
    font-weight: 800 !important;
    letter-spacing: 1.5px !important;
    color: #39ff14 !important; /* Hijau neon */
    text-shadow: 0 0 12px rgba(57, 255, 20, 0.45) !important;
  }

  /* Scan Input Section */
  #room-screen .scan-input-section {
    background: #171c24 !important; /* Surface background */
    border: 1px solid #232a35 !important; /* Border */
    border-radius: 14px !important; /* 14px radius */
    padding: 10px 12px !important; /* Compact padding */
    margin-top: 12px !important; /* Spacing */
    display: grid !important; /* Grid layout */
    grid-template-columns: 1fr auto 92px !important; /* Barcode + Pencil + Qty (~92px) */
    gap: 8px !important; /* Gap */
    align-items: center !important; /* Center vertically */
    box-sizing: border-box !important; /* Border box */
  }
  #room-screen .scan-input-box {
    width: 100% !important; /* Full width */
  }
  #room-screen #barcode-input {
    min-height: 44px !important; /* 44px height */
    height: 44px !important; /* 44px height */
    font-size: 16px !important; /* 16px prevents iOS zoom */
    background: #171c24 !important; /* Surface background */
    border: 1px solid #232a35 !important; /* Border */
    border-radius: 10px !important; /* 10px input radius */
    color: #e7ebf0 !important; /* Light text */
    padding: 0 12px !important; /* Padding */
    box-sizing: border-box !important; /* Border box */
  }
  #room-screen #btn-keyboard-toggle {
    width: 44px !important; /* 44px square */
    height: 44px !important; /* 44px square */
    min-width: 44px !important; /* Prevent shrink */
    min-height: 44px !important; /* Prevent shrink */
    background: #1d2430 !important; /* Surface-2 */
    border: 1px solid #2a3340 !important; /* Border-2 */
    border-radius: 10px !important; /* 10px radius */
    color: #e7ebf0 !important; /* Icon color */
    display: flex !important; /* Flex center */
    align-items: center !important; /* Center vertically */
    justify-content: center !important; /* Center horizontally */
    padding: 0 !important; /* Remove padding */
    flex-shrink: 0 !important; /* Prevent shrink */
  }
  #room-screen .qty-input-box {
    width: 92px !important; /* ~92px wide box */
    flex: 0 0 92px !important; /* Fixed width */
  }
  #room-screen #qty-input {
    min-height: 44px !important; /* 44px height */
    height: 44px !important; /* 44px height */
    width: 100% !important; /* Full box width */
    font-size: 16px !important; /* 16px prevents iOS zoom */
    background: #171c24 !important; /* Surface background */
    border: 1px solid #232a35 !important; /* Border */
    border-radius: 10px !important; /* 10px radius */
    color: #e7ebf0 !important; /* Light text */
    padding: 0 8px !important; /* Padding */
    text-align: center !important; /* Centered number */
    box-sizing: border-box !important; /* Border box */
  }

  /* Recently Part Scan Box (Dark HUD Restyle) */
  #room-screen #recently-part-scan-box {
    background: #171c24 !important; /* Surface background */
    border: 1px solid #232a35 !important; /* Border */
    border-radius: 14px !important; /* 14px card radius */
    box-shadow: none !important; /* Remove light/gold glow */
    margin-top: 12px !important; /* Spacing */
    overflow: hidden !important; /* Contain */
  }
  #room-screen .recently-scan-header {
    background: transparent !important; /* Remove gold gradient */
    border-bottom: 1px solid #232a35 !important; /* Dark HUD border */
    padding: 10px 14px !important; /* Padding */
  }
  #room-screen .recently-scan-title {
    color: #e7ebf0 !important; /* Light text */
    text-shadow: none !important; /* Remove shadow */
    font-size: 13px !important; /* Font size */
  }
  #room-screen .recently-scan-body {
    background: transparent !important; /* Remove light background */
    padding: 10px 14px !important; /* Padding */
  }
  #room-screen .summary-item.recently-card-gold {
    background: #1d2430 !important; /* Surface-2 card */
    border: 1px solid #2a3340 !important; /* Border-2 */
    box-shadow: none !important; /* Flat design */
    border-radius: 10px !important; /* 10px radius */
    padding: 10px 12px !important; /* Padding */
  }
  #room-screen .summary-item.recently-card-gold .summary-item-part {
    color: #e7ebf0 !important; /* Light text */
    font-family: 'Space Mono', monospace !important; /* Space Mono */
    font-weight: 500 !important; /* 500 */
    font-size: 13px !important; /* 13px */
  }
  #room-screen .summary-item.recently-card-gold .summary-item-desc {
    color: #8b95a5 !important; /* Muted text */
    font-size: 11px !important; /* 11px */
  }
  #room-screen .deal-actions {
    grid-template-columns: 1fr !important; /* Full-width segments */
    gap: 8px !important; /* Gap */
    border-top: 1px solid #2a3340 !important; /* Border-2 */
    margin-top: 10px !important; /* Spacing */
    padding-top: 8px !important; /* Padding */
  }
  #room-screen .btn-deal {
    min-height: 44px !important; /* 44px tap target */
    height: 44px !important; /* 44px height */
    width: 100% !important; /* Full width segment */
    border-radius: 10px !important; /* 10px radius */
    font-size: 12px !important; /* Legible text */
    font-weight: 700 !important; /* Bold */
  }

  /* My Scans: Table -> Card List */
  #room-screen .scan-right {
    background: transparent !important; /* Remove white/default frame in app.html:1615 */
    border: none !important; /* Remove container border */
    padding: 0 !important; /* Remove padding */
    box-shadow: none !important; /* Remove shadow */
    width: 100% !important; /* Full width */
    max-height: none !important; /* Natural expansion */
    height: auto !important; /* Natural height */
    overflow: visible !important; /* Remove nested scroll clipping */
  }
  #room-screen .scan-right table {
    background: transparent !important; /* Transparent table */
    border: none !important; /* Remove border */
    width: 100% !important; /* Full width */
    border-collapse: separate !important; /* Separate borders */
    border-spacing: 0 !important; /* Zero spacing */
  }
  #room-screen .scan-right thead {
    display: none !important; /* Hide thead visually on mobile */
  }
  #room-screen #my-scans-tbody {
    display: block !important; /* Block container for cards */
    width: 100% !important; /* Full width */
    max-height: clamp(280px, 48vh, 420px) !important; /* Scrollable list height */
    overflow-y: auto !important; /* Scrollable */
    overflow-x: hidden !important; /* No horizontal scroll */
    -webkit-overflow-scrolling: touch !important; /* Smooth iOS momentum scroll */
    padding-right: 2px !important; /* Clearance for scrollbar */
  }
  #room-screen #my-scans-tbody::-webkit-scrollbar {
    width: 4px !important; /* Slim scrollbar */
  }
  #room-screen #my-scans-tbody::-webkit-scrollbar-track {
    background: transparent !important; /* Transparent track */
  }
  #room-screen #my-scans-tbody::-webkit-scrollbar-thumb {
    background: #2a3340 !important; /* Dark scrollbar thumb */
    border-radius: 4px !important; /* Rounded thumb */
  }

  /* Select All Helper Row */
  #room-screen #hud-select-all-bar {
    display: flex !important; /* Flex bar */
    align-items: center !important; /* Center vertically */
    background: #171c24 !important; /* Surface #171c24 */
    border: 1px solid #232a35 !important; /* Border #232a35 */
    border-radius: 12px !important; /* Radius 12px */
    color: #8b95a5 !important; /* Text #8b95a5 */
    padding: 8px 12px !important; /* Padding */
    margin-bottom: 8px !important; /* Spacing */
    font-size: 12px !important; /* Legible font */
    box-sizing: border-box !important; /* Border box */
  }
  #room-screen .hud-select-all-label {
    display: inline-flex !important; /* Inline flex */
    align-items: center !important; /* Center */
    gap: 10px !important; /* Gap */
    cursor: pointer !important; /* Pointer */
    font-weight: 500 !important; /* Weight 500 */
    color: #8b95a5 !important; /* Text color */
    width: 100% !important; /* Full width */
  }

  /* Checkbox Restyling */
  #room-screen .row-checkbox,
  #room-screen #hud-select-all-cb {
    appearance: none !important; /* Remove native appearance */
    -webkit-appearance: none !important; /* Webkit appearance reset */
    width: 22px !important; /* 22px width */
    height: 22px !important; /* 22px height */
    border: 2px solid #2a3340 !important; /* 2px solid #2a3340 */
    border-radius: 7px !important; /* Radius 7px */
    background-color: transparent !important; /* Transparent background */
    cursor: pointer !important; /* Pointer cursor */
    margin: 0 !important; /* Reset margin */
    position: relative !important; /* Positioning context for tap target */
    box-sizing: border-box !important; /* Border box */
    display: inline-block !important; /* Inline block */
    vertical-align: middle !important; /* Vertical alignment */
    flex-shrink: 0 !important; /* Do not shrink */
  }
  #room-screen .row-checkbox::before,
  #room-screen #hud-select-all-cb::before {
    content: '' !important; /* 44x44px tap target */
    position: absolute !important; /* Absolute hit box */
    top: 50% !important; /* Center Y */
    left: 50% !important; /* Center X */
    width: 44px !important; /* 44px hit width */
    height: 44px !important; /* 44px hit height */
    transform: translate(-50%, -50%) !important; /* Center translate */
  }
  #room-screen .row-checkbox:checked,
  #room-screen #hud-select-all-cb:checked {
    background-color: #c6f432 !important; /* #c6f432 background */
    border-color: #c6f432 !important; /* #c6f432 border */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2310150a' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") !important; /* Dark #10150a checkmark */
    background-position: center !important; /* Centered checkmark */
    background-repeat: no-repeat !important; /* No repeat */
    background-size: 14px 14px !important; /* Checkmark dimensions */
  }

  /* Card Row Layout */
  #room-screen #my-scans-tbody tr {
    display: flex !important; /* Flex row layout */
    flex-wrap: wrap !important; /* Allow wrapping */
    align-items: center !important; /* Align center */
    gap: 4px 10px !important; /* Gap 4px row, 10px column */
    background: #171c24 !important; /* Surface background */
    border: 1px solid #232a35 !important; /* 1px border */
    border-radius: 14px !important; /* 14px card radius */
    padding: 10px 12px !important; /* Target height about 70px */
    margin-bottom: 8px !important; /* Card spacing */
    width: 100% !important; /* Full width */
    box-sizing: border-box !important; /* Border box */
    cursor: pointer !important; /* Tap affordance */
  }
  #room-screen #my-scans-tbody tr.selected {
    border: 1px solid #c6f432 !important; /* 1px solid #c6f432 border */
    background: rgba(198, 244, 50, 0.06) !important; /* Background rgba(198,244,50,.06) */
  }
  #room-screen #my-scans-tbody td {
    padding: 0 !important; /* Reset td padding */
    border: none !important; /* Remove borders */
    background: transparent !important; /* Transparent cell */
    box-sizing: border-box !important; /* Border box */
  }
  #room-screen #my-scans-tbody td:nth-child(1) {
    flex: none !important; /* Flex none */
    display: flex !important; /* Flex center */
    align-items: center !important; /* Center Y */
    justify-content: center !important; /* Center X */
    min-width: 24px !important; /* Min width */
    min-height: 24px !important; /* Min height */
  }
  #room-screen #my-scans-tbody td:nth-child(2) {
    flex: 1 1 0% !important; /* Flex 1 */
    min-width: 0 !important; /* Allow text flex shrink */
    font-family: 'Space Mono', monospace !important; /* Space Mono */
    font-size: 13px !important; /* 13px font */
    font-weight: 500 !important; /* Weight 500 */
    color: #e7ebf0 !important; /* Light text */
    white-space: normal !important; /* Full part number without truncation */
    overflow-wrap: anywhere !important; /* Wrap anywhere */
    text-overflow: clip !important; /* No text-overflow ellipsis */
    overflow: visible !important; /* Visible overflow */
  }
  #room-screen #my-scans-tbody td:nth-child(2) strong {
    font-weight: 500 !important; /* Weight 500 */
    color: #e7ebf0 !important; /* Light text */
  }
  #room-screen #my-scans-tbody td:nth-child(3) {
    flex: none !important; /* Flex none */
    margin-left: auto !important; /* Sit on same line as part number, right aligned */
    display: inline-flex !important; /* Pill container */
    align-items: center !important; /* Center Y */
    justify-content: center !important; /* Center X */
    min-width: 36px !important; /* Min-width 36px */
    height: 24px !important; /* Height */
    padding: 0 8px !important; /* Padding */
    border-radius: 10px !important; /* Radius 10px */
    background: rgba(198, 244, 50, 0.14) !important; /* rgba(198,244,50,.14) */
    color: #c6f432 !important; /* Color #c6f432 */
    font-size: 14px !important; /* 14px font */
    font-weight: 500 !important; /* Weight 500 */
    text-align: center !important; /* Centered */
  }
  #room-screen #my-scans-tbody td:nth-child(3) strong {
    font-size: 14px !important; /* Override inline style="font-size:16px;" in app.html:8894 */
    font-weight: 500 !important; /* Weight 500 */
    color: #c6f432 !important; /* Lime color */
    line-height: 1 !important; /* Tight line */
  }
  #room-screen #my-scans-tbody td:nth-child(4) {
    flex-basis: 100% !important; /* Flex-basis 100% (line 2) */
    width: 100% !important; /* Full width */
    font-size: 11px !important; /* 11px font */
    color: #8b95a5 !important; /* Muted text */
    line-height: 1.3 !important; /* Compact line */
    white-space: nowrap !important; /* Single line */
    overflow: hidden !important; /* Overflow hidden */
    text-overflow: ellipsis !important; /* Ellipsis for description only */
  }
  #room-screen #my-scans-tbody td:nth-child(5) {
    flex: 0 0 auto !important; /* Flex meta */
    font-size: 11px !important; /* 11px font */
    color: #8b95a5 !important; /* #8b95a5 text */
    display: inline-flex !important; /* Inline flex */
    align-items: center !important; /* Center */
  }
  #room-screen #my-scans-tbody td:nth-child(5)::before {
    content: 'System: ' !important; /* System label */
    font-size: 11px !important; /* 11px font */
    color: #8b95a5 !important; /* Muted */
  }
  #room-screen #my-scans-tbody td:nth-child(5) strong {
    font-size: 11px !important; /* 11px font */
    font-weight: 500 !important; /* Weight 500 */
    color: #8b95a5 !important; /* Muted */
  }
  #room-screen #my-scans-tbody td:nth-child(6) {
    flex: 0 0 auto !important; /* Flex meta */
    font-size: 11px !important; /* 11px font */
    color: #8b95a5 !important; /* Default muted */
    display: inline-flex !important; /* Inline flex */
    align-items: center !important; /* Center */
  }
  #room-screen #my-scans-tbody td:nth-child(6)::before {
    content: ' · ' !important; /* · separator */
    font-size: 11px !important; /* 11px font */
    color: #8b95a5 !important; /* Muted separator */
    white-space: pre !important; /* Preserve space */
  }
  #room-screen #my-scans-tbody td:nth-child(6) .outtransit-badge,
  #room-screen #my-scans-tbody td:nth-child(6):has(.outtransit-badge) {
    color: #38bdf8 !important; /* Turns #38bdf8 only when not 0 */
  }
  #room-screen #my-scans-tbody td:nth-child(6) .outtransit-badge {
    font-size: 11px !important; /* 11px font */
    font-weight: 600 !important; /* Weight 600 */
    background: transparent !important; /* Flat */
    border: none !important; /* No border */
    padding: 0 !important; /* No padding */
  }
  #room-screen #my-scans-tbody td:nth-child(7) {
    flex: 0 0 auto !important; /* Flex meta */
    font-size: 11px !important; /* 11px font */
    color: #8b95a5 !important; /* #8b95a5 text */
    display: inline-flex !important; /* Inline flex */
    align-items: center !important; /* Center */
  }
  #room-screen #my-scans-tbody td:nth-child(7)::before {
    content: ' · ' !important; /* · separator */
    font-size: 11px !important; /* 11px font */
    color: #8b95a5 !important; /* Muted separator */
    white-space: pre !important; /* Preserve space */
  }
  #room-screen #my-scans-tbody td:nth-child(7):empty,
  #room-screen #my-scans-tbody td:nth-child(7):has(.deal-empty) {
    display: none !important; /* Hide Deal By when empty or deal-empty */
  }
  #room-screen #my-scans-tbody td:nth-child(7) .deal-badge {
    font-size: 11px !important; /* 11px font */
    font-weight: 500 !important; /* Weight 500 */
    padding: 0 !important; /* Flat */
    background: transparent !important; /* Transparent */
    border: none !important; /* No border */
    color: #8b95a5 !important; /* Muted */
  }

  /* Bulk Actions Bar (Sticky above dock, centered compact island) */
  #room-screen #bulk-actions {
    display: none !important; /* Default hidden */
  }
  #room-screen #bulk-actions.has-selection {
    display: flex !important; /* Show when selection exists */
    position: fixed !important; /* Fixed position */
    left: 50% !important; /* Center X */
    transform: translateX(-50%) !important; /* Center X */
    right: auto !important; /* Prevent stretch */
    width: calc(100% - 28px) !important; /* Responsive width */
    max-width: 340px !important; /* Compact island */
    bottom: calc(72px + env(safe-area-inset-bottom)) !important; /* Positioned just above dock */
    z-index: 1000 !important; /* Above dock */
    background: #171c24 !important; /* Surface background */
    border: 1px solid #2a3340 !important; /* Border-2 */
    border-radius: 12px !important; /* 12px radius */
    padding: 5px !important; /* Compact padding */
    gap: 5px !important; /* Compact gap */
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45) !important; /* Elevation */
    box-sizing: border-box !important; /* Border box */
    margin: 0 !important; /* Remove any desktop margin */
  }
  #room-screen #bulk-actions .btn-bulk {
    min-height: 32px !important; /* 32px compact height */
    height: 32px !important; /* 32px height */
    min-width: 0 !important; /* Overrule desktop min-width */
    flex: 1 1 0 !important; /* Equal width distribution */
    padding: 0 4px !important; /* Compact padding */
    border-radius: 7px !important; /* 7px radius */
    font-family: 'DM Sans', sans-serif !important; /* Font */
    font-size: 10px !important; /* Crisp legible size */
    font-weight: 700 !important; /* Bold */
    letter-spacing: 0.3px !important; /* Letter spacing */
    box-shadow: none !important; /* Flat design */
    display: flex !important; /* Flex */
    align-items: center !important; /* Center Y */
    justify-content: center !important; /* Center X */
    gap: 3px !important; /* Icon to text gap */
    cursor: pointer !important; /* Pointer */
    transition: background 0.15s ease, opacity 0.15s ease, transform 0.1s ease !important; /* Smooth feedback */
    box-sizing: border-box !important; /* Border box */
    white-space: nowrap !important; /* Prevent text wrap */
  }
  #room-screen #bulk-actions .btn-bulk:active {
    transform: scale(0.96) !important; /* Tactile tap feel */
  }
  #room-screen #bulk-actions .btn-bulk-cancel {
    background: #1d2430 !important; /* Surface-2 dark */
    border: 1px solid #2a3340 !important; /* Border-2 */
    color: #8b95a5 !important; /* Muted text */
  }
  #room-screen #bulk-actions .btn-bulk-cancel:active {
    background: #232a35 !important; /* Active feedback */
    color: #e7ebf0 !important; /* Light text */
  }
  #room-screen #bulk-actions .btn-bulk-edit {
    background: rgba(90, 169, 255, 0.15) !important; /* Soft blue surface */
    border: 1px solid rgba(90, 169, 255, 0.35) !important; /* Blue border */
    color: #5aa9ff !important; /* Plus blue accent */
  }
  #room-screen #bulk-actions .btn-bulk-edit:active {
    background: rgba(90, 169, 255, 0.28) !important; /* Active feedback */
  }
  #room-screen #bulk-actions .btn-bulk-delete {
    background: rgba(255, 107, 107, 0.15) !important; /* Soft red surface */
    border: 1px solid rgba(255, 107, 107, 0.35) !important; /* Red border */
    color: #ff6b6b !important; /* Minus red accent */
  }
  #room-screen #bulk-actions .btn-bulk-delete:active {
    background: rgba(255, 107, 107, 0.28) !important; /* Active feedback */
  }

  /* Gudang & Rak Section (Restyled Dark High-Contrast) */
  #room-screen .gudang-rak-section {
    background: #171c24 !important; /* Surface background */
    border: 1px solid #232a35 !important; /* Border */
    border-radius: 14px !important; /* 14px radius */
    padding: 14px !important; /* Padding */
    margin-top: 16px !important; /* Spacing */
    box-sizing: border-box !important; /* Border box */
  }
  #room-screen .rak-section-title {
    color: #cbd5e1 !important; /* High contrast slate-200 */
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px !important;
  }
  #room-screen .gudang-col-title {
    color: #94a3b8 !important; /* High contrast slate-400 */
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px !important;
  }
  #room-screen .gudang-rak-row {
    display: flex !important; /* Flex */
    flex-direction: column !important; /* Stack vertically on mobile */
    gap: 12px !important; /* Spacing */
  }
  #room-screen .gudang-divider {
    display: none !important; /* Hide desktop vertical divider */
  }
  #room-screen .rak-add-btn {
    min-height: 40px !important; /* 40px tap target */
    height: 40px !important; /* Height */
    padding: 0 14px !important; /* Padding */
    background: #c6f432 !important; /* Lime accent */
    color: #10150a !important; /* Dark on-accent text */
    font-weight: 700 !important; /* Bold */
    font-size: 11px !important; /* Font size */
    border: none !important; /* Clean border */
    border-radius: 10px !important; /* 10px radius */
  }
  #room-screen .rak-card,
  #room-screen .gudang-card {
    background: #171c24 !important; /* Surface background */
    border: 1px solid #232a35 !important; /* Border */
    border-radius: 10px !important; /* 10px radius */
    color: #e7ebf0 !important; /* Light text */
    min-height: 44px !important; /* 44px min tap height */
    padding: 12px 14px !important; /* Padding */
    box-sizing: border-box !important; /* Border box */
  }
  #room-screen .gudang-card.mine {
    border-color: rgba(74, 222, 128, 0.3) !important;
    background: #171c24 !important;
  }
  #room-screen .gudang-card-name {
    color: #f8fafc !important; /* High contrast white */
    font-size: 22px !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px !important;
  }
  #room-screen .gudang-card-meta {
    color: #94a3b8 !important; /* Readable muted text */
    font-size: 11px !important;
  }
  #room-screen .rak-card.current {
    border: 1.5px solid #38bdf8 !important; /* Active blue border */
    background: rgba(56, 189, 248, 0.08) !important;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.12) !important;
  }
  #room-screen .rak-card-name {
    color: #f8fafc !important; /* High contrast white */
    font-size: 20px !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px !important;
  }
  #room-screen .rak-card-meta {
    color: #94a3b8 !important; /* Readable muted text */
    font-size: 11px !important;
  }
  #room-screen .rak-chip {
    background: #1d2430 !important; /* High contrast dark pill */
    color: #cbd5e1 !important;
    border: 1px solid #2a3340 !important;
    font-size: 9px !important;
    font-weight: 600 !important;
  }
  #room-screen .rak-chip.current-chip {
    background: #2563eb !important; /* Bright blue active chip */
    color: #ffffff !important;
    border: none !important;
    font-weight: 700 !important;
  }
  #room-screen .rak-chip.mine-chip {
    background: rgba(74, 222, 128, 0.15) !important;
    color: #4ade80 !important;
    border: 1px solid rgba(74, 222, 128, 0.3) !important;
    font-weight: 600 !important;
  }
  #room-screen .rak-chip.member-chip {
    background: rgba(90, 169, 255, 0.15) !important;
    color: #5aa9ff !important;
    border: 1px solid rgba(90, 169, 255, 0.3) !important;
    font-weight: 600 !important;
  }
  #room-screen .other-gudangs-box .rak-card [style*="color:var(--text)"] {
    color: #f8fafc !important;
  }
  #room-screen .btn-switch-gudang,
  #room-screen .btn-request-join {
    min-height: 40px !important; /* 40px tap target */
    border-radius: 10px !important; /* 10px radius */
  }

  /* ── SUMMARY TAB (#tab-summary) ── */
  #room-screen #tab-summary .container {
    display: flex !important; /* Flex layout */
    flex-direction: column !important; /* Stack vertically */
    width: 100% !important; /* Full width */
    box-sizing: border-box !important; /* Border box */
  }
  #room-screen #tab-summary .summary-header-wrap,
  #room-screen #tab-summary .summary-header-left,
  #room-screen #tab-summary .summary-export-actions {
    display: contents !important; /* Flatten DOM hierarchy for flex reordering */
  }
  #room-screen #tab-summary .summary-header-left h2 {
    display: none !important; /* Hide h2 Rekap Part (hero replaces it) */
  }

  /* Hero Node (#hud-hero) */
  #room-screen #hud-hero {
    background: #171c24 !important; /* Surface background */
    border: 1px solid #232a35 !important; /* Border */
    border-radius: 14px !important; /* 14px card radius */
    padding: 16px 18px !important; /* Padding */
    margin-bottom: 14px !important; /* Spacing */
    display: flex !important; /* Column layout */
    flex-direction: column !important; /* Stack */
    gap: 8px !important; /* Gap */
    order: 1 !important; /* Top of tab order */
    box-sizing: border-box !important; /* Border box */
  }
  #room-screen .hud-hero-pct {
    font-size: 52px !important; /* 52px large percentage */
    font-weight: 800 !important; /* Heavy bold */
    line-height: 1 !important; /* Tight line */
    color: #c6f432 !important; /* Lime accent */
    font-family: 'Space Mono', monospace !important; /* Space Mono */
  }
  #room-screen .hud-hero-line {
    font-size: 12px !important; /* 12px text */
    color: #8b95a5 !important; /* Muted text */
  }
  #room-screen .hud-hero-bar {
    height: 8px !important; /* 8px stacked bar */
    display: flex !important; /* Flex segments */
    gap: 2px !important; /* 2px gaps */
    border-radius: 4px !important; /* Rounded bar */
    overflow: hidden !important; /* Contain */
    background: #232a35 !important; /* Track background */
    margin: 4px 0 !important; /* Spacing */
  }
  #room-screen .hud-bar-seg {
    height: 100% !important; /* Full height */
    transition: width 0.2s ease !important; /* Smooth width update */
  }
  #room-screen .hud-seg-klop {
    background: #4ade80 !important; /* Klop green */
  }
  #room-screen .hud-seg-minus {
    background: #ff6b6b !important; /* Minus red */
  }
  #room-screen .hud-seg-plus {
    background: #5aa9ff !important; /* Plus blue */
  }
  #room-screen .hud-seg-belum {
    background: #232a35 !important; /* Belum dark segment */
  }
  #room-screen .hud-hero-legend {
    display: flex !important; /* Flex legend */
    gap: 14px !important; /* Gap between items */
    align-items: center !important; /* Center vertically */
    font-size: 11px !important; /* 11px legend */
    color: #8b95a5 !important; /* Muted text */
    margin-top: 4px !important; /* Spacing */
  }
  #room-screen .hud-legend-item {
    display: inline-flex !important; /* Inline flex item */
    align-items: center !important; /* Center */
    gap: 5px !important; /* Dot-text gap */
  }
  #room-screen .hud-dot {
    width: 8px !important; /* Dot width */
    height: 8px !important; /* Dot height */
    border-radius: 50% !important; /* Circular dot */
  }
  #room-screen .hud-dot-klop {
    background: #4ade80 !important; /* Klop dot */
  }
  #room-screen .hud-dot-minus {
    background: #ff6b6b !important; /* Minus dot */
  }
  #room-screen .hud-dot-plus {
    background: #5aa9ff !important; /* Plus dot */
  }
  #room-screen .hud-legend-item strong {
    color: #e7ebf0 !important; /* Light count number */
    font-weight: 700 !important; /* Bold */
  }

  /* Failsafe: hide .scan-stats ONLY when hero is ready */
  #room-screen #tab-summary.hud-hero-ready .scan-stats {
    display: none !important; /* Hide old stats only when JS successfully builds hero */
  }

  /* Summary Controls */
  #room-screen .summary-filter-buttons {
    order: 2 !important; /* Position under hero */
    display: flex !important; /* Equal row */
    width: 100% !important; /* Full width */
    gap: 6px !important; /* Gap */
    margin-bottom: 10px !important; /* Spacing */
  }
  #room-screen .btn-summary-filter {
    flex: 1 1 0 !important; /* Equal width chips */
    min-height: 44px !important; /* 44px tap target */
    height: 44px !important; /* 44px height */
    border-radius: 10px !important; /* 10px radius */
    background: #171c24 !important; /* Surface background */
    border: 1px solid #232a35 !important; /* Border */
    color: #8b95a5 !important; /* Muted text */
    font-size: 11px !important; /* Legible size */
    font-weight: 700 !important; /* Bold */
    text-align: center !important; /* Centered */
    cursor: pointer !important; /* Tap affordance */
  }
  #room-screen .btn-summary-filter.active {
    background: #c6f432 !important; /* Lime active chip */
    border-color: #c6f432 !important; /* Lime border */
    color: #10150a !important; /* Dark on-accent text */
  }
  #room-screen #summary-search-input {
    order: 3 !important; /* Position under filter chips */
    width: 100% !important; /* Full width input */
    min-height: 44px !important; /* 44px height */
    height: 44px !important; /* 44px height */
    font-size: 16px !important; /* 16px prevents iOS zoom */
    background: #171c24 !important; /* Surface background */
    border: 1px solid #232a35 !important; /* Border */
    border-radius: 10px !important; /* 10px radius */
    color: #e7ebf0 !important; /* Light text */
    padding: 0 12px !important; /* Inner padding */
    margin-bottom: 12px !important; /* Spacing */
    box-sizing: border-box !important; /* Border box */
  }
  #room-screen #global-part-summary-container {
    order: 4 !important; /* Main content order */
    width: 100% !important; /* Full width */
  }

  /* Summary Table -> Card List */
  #room-screen #tab-summary .scans-table {
    max-height: none !important; /* Beat inline style max-height:60vh */
    overflow-y: visible !important; /* Remove inner 60vh scroll; page scrolls as a whole */
    border: none !important; /* Remove wrapper border */
    background: transparent !important; /* Transparent wrapper */
  }
  #room-screen #tab-summary .scans-table table {
    display: block !important; /* Block table */
    width: 100% !important; /* Full width */
    border-collapse: separate !important; /* Separate cards */
  }
  #room-screen #tab-summary .scans-table thead {
    display: none !important; /* Visually hide thead on mobile */
  }
  #room-screen #tab-summary .scans-table tbody {
    display: block !important; /* Block tbody */
    width: 100% !important; /* Full width */
  }
  #room-screen #tab-summary .scans-table tbody tr {
    display: grid !important; /* Card grid */
    grid-template-columns: repeat(4, 1fr) !important; /* 4 equal stat columns */
    gap: 6px 8px !important; /* Gap */
    background: #171c24 !important; /* Surface background */
    border: 1px solid #232a35 !important; /* 1px border */
    border-radius: 14px !important; /* 14px card radius */
    padding: 10px 12px !important; /* Card padding */
    margin-bottom: 8px !important; /* Spacing */
    width: 100% !important; /* Full width */
    box-sizing: border-box !important; /* Border box */
  }
  #room-screen #tab-summary .scans-table tbody td {
    padding: 0 !important; /* Reset cell padding */
    border: none !important; /* Remove cell borders */
    background: transparent !important; /* Transparent */
  }
  /* Row 1: Part number left, Status badge right */
  #room-screen #tab-summary .scans-table tbody td:nth-child(1) {
    grid-column: 1 / 4 !important; /* Part number col 1-3 */
    grid-row: 1 !important; /* Row 1 */
    font-family: 'Space Mono', monospace !important; /* Space Mono */
    font-size: 13px !important; /* 13px */
    font-weight: 500 !important; /* 500 */
    color: #e7ebf0 !important; /* Light text */
    align-self: center !important; /* Center vertically */
  }
  #room-screen #tab-summary .scans-table tbody td:nth-child(7) {
    grid-column: 4 !important; /* Status badge col 4 */
    grid-row: 1 !important; /* Row 1 */
    justify-self: end !important; /* Right aligned */
    align-self: center !important; /* Center vertically */
  }
  /* Row 2: Description full width */
  #room-screen #tab-summary .scans-table tbody td:nth-child(2) {
    grid-column: 1 / -1 !important; /* Full width */
    grid-row: 2 !important; /* Row 2 */
    font-size: 11px !important; /* 11px muted */
    color: #8b95a5 !important; /* Muted text */
    line-height: 1.3 !important; /* Line height */
  }
  /* Row 3: Four small stats (System, Scan, Out, Diff) */
  #room-screen #tab-summary .scans-table tbody td:nth-child(3) {
    grid-column: 1 !important; /* System */
    grid-row: 3 !important; /* Row 3 */
    display: flex !important; /* Column flex */
    flex-direction: column !important; /* Column */
    font-size: 11px !important; /* 11px */
    color: #8b95a5 !important; /* Muted text */
  }
  #room-screen #tab-summary .scans-table tbody td:nth-child(3)::before {
    content: 'System' !important; /* Small header */
    font-size: 10px !important; /* 10px uppercase */
    color: #8b95a5 !important; /* Muted */
    text-transform: uppercase !important; /* Uppercase */
  }
  #room-screen #tab-summary .scans-table tbody td:nth-child(5) {
    grid-column: 2 !important; /* Scan */
    grid-row: 3 !important; /* Row 3 */
    display: flex !important; /* Column flex */
    flex-direction: column !important; /* Column */
    font-size: 11px !important; /* 11px */
    color: #8b95a5 !important; /* Muted text */
  }
  #room-screen #tab-summary .scans-table tbody td:nth-child(5)::before {
    content: 'Scan' !important; /* Small header */
    font-size: 10px !important; /* 10px uppercase */
    color: #8b95a5 !important; /* Muted */
    text-transform: uppercase !important; /* Uppercase */
  }
  #room-screen #tab-summary .scans-table tbody td:nth-child(4) {
    grid-column: 3 !important; /* Outtransit */
    grid-row: 3 !important; /* Row 3 */
    display: flex !important; /* Column flex */
    flex-direction: column !important; /* Column */
    font-size: 11px !important; /* 11px */
    color: #38bdf8 !important; /* Outtransit color */
  }
  #room-screen #tab-summary .scans-table tbody td:nth-child(4) * {
    color: #38bdf8 !important; /* Force outtransit color */
  }
  #room-screen #tab-summary .scans-table tbody td:nth-child(4)::before {
    content: 'Out' !important; /* Small header */
    font-size: 10px !important; /* 10px uppercase */
    color: #8b95a5 !important; /* Muted */
    text-transform: uppercase !important; /* Uppercase */
  }
  #room-screen #tab-summary .scans-table tbody td:nth-child(6) {
    grid-column: 4 !important; /* Diff */
    grid-row: 3 !important; /* Row 3 */
    display: flex !important; /* Column flex */
    flex-direction: column !important; /* Column */
    align-items: flex-end !important; /* Right aligned */
    font-size: 18px !important; /* 18px */
    font-weight: 500 !important; /* 500 */
    line-height: 1.1 !important; /* Tight line */
  }
  #room-screen #tab-summary .scans-table tbody td:nth-child(6)::before {
    content: 'Diff' !important; /* Small header */
    font-size: 10px !important; /* 10px uppercase */
    color: #8b95a5 !important; /* Muted */
    text-transform: uppercase !important; /* Uppercase */
  }
  /* Row 4: Deal By */
  #room-screen #tab-summary .scans-table tbody td:nth-child(8) {
    grid-column: 1 / -1 !important; /* Full width */
    grid-row: 4 !important; /* Row 4 */
    font-size: 11px !important; /* 11px */
    color: #8b95a5 !important; /* Muted */
    display: flex !important; /* Inline flex */
    align-items: center !important; /* Center */
    gap: 4px !important; /* Gap */
  }
  #room-screen #tab-summary .scans-table tbody td:nth-child(8)::before {
    content: 'Deal By: ' !important; /* Label */
    font-size: 11px !important; /* Small label */
    color: #8b95a5 !important; /* Muted */
  }

  /* Empty State Support for Summary Table */
  #room-screen #tab-summary .scans-table tbody tr:has(td[colspan]) {
    display: block !important; /* Display block for empty state */
  }
  #room-screen #tab-summary .scans-table tbody td[colspan] {
    display: block !important; /* Display block for empty message cell */
    width: 100% !important; /* Full width */
    text-align: center !important; /* Centered */
  }

  /* Export Buttons (Bottom of Tab, Outline Style) */
  #room-screen #tab-summary .btn-export-summary {
    order: 5 !important; /* Move to bottom of summary tab */
    width: 100% !important; /* Full width */
    min-height: 44px !important; /* 44px tap target */
    height: 44px !important; /* 44px height */
    background: transparent !important; /* Outline style background */
    border: 1.5px solid #2a3340 !important; /* Border-2 outline */
    border-radius: 10px !important; /* 10px radius */
    color: #e7ebf0 !important; /* Light text */
    font-size: 12px !important; /* Font size */
    font-weight: 700 !important; /* Bold */
    margin-top: 8px !important; /* Spacing */
    box-shadow: none !important; /* Remove gold/blue box-shadow */
    display: flex !important; /* Center */
    align-items: center !important; /* Center */
    justify-content: center !important; /* Center */
  }
  #room-screen #tab-summary .btn-export-summary:active {
    background: #171c24 !important; /* Active background */
    border-color: #c6f432 !important; /* Accent border on active */
  }

  /* Status Badges */
  #room-screen .summary-badge.klop {
    background: #4ade80 !important; /* Klop green badge */
    color: #10150a !important; /* On-accent dark text */
    border: none !important; /* Flat badge */
  }
  #room-screen .summary-badge.minus {
    background: #ff6b6b !important; /* Minus red badge */
    color: #ffffff !important; /* White text */
    border: none !important; /* Flat badge */
  }
  #room-screen .summary-badge.plus {
    background: #5aa9ff !important; /* Plus blue badge */
    color: #10150a !important; /* Dark text */
    border: none !important; /* Flat badge */
  }
}
