/* ==========================================================================
   GPSPL ENTERPRISE SIGNAGE — AESTHETIC LIGHT OPERATIONS CONSOLE
   Design Discipline: Apple Studio / Notion / Linear Light / Stripe
   Theme: Aesthetic Warm Porcelain & Velvet Obsidian (Zero Blue, Zero Green)
   ========================================================================== */

:root {
  /* Surfaces & Canvas (Aesthetic Warm Porcelain & Alabaster) */
  --bg-canvas: #f8f9fa;
  --bg-sidebar: #f4f4f6;
  --bg-topbar: #ffffff;
  --bg-surface: #ffffff;
  --bg-surface-subtle: #f4f4f6;
  --bg-surface-elevated: #ffffff;
  --bg-surface-hover: #f1f2f4;

  /* Primary Accent: Velvet Obsidian / Jet Black (Zero Blue, Zero Green) */
  --brand-primary: #18181b;
  --brand-hover: #27272a;
  --brand-active: #09090b;
  --brand-subtle: #f4f4f6;
  --brand-border: #e4e4e7;
  --brand-text: #18181b;

  /* Restrained Semantic Status (Zero Blue, Zero Green) */
  /* Live / Active Broadcasting: Warm Golden Amber */
  --status-live-bg: #fef3c7;
  --status-live-border: #fde68a;
  --status-live-dot: #d97706;
  --status-live-text: #92400e;

  /* Standby: Neutral Stone / Slate */
  --status-standby-bg: #f4f4f5;
  --status-standby-border: #e4e4e7;
  --status-standby-dot: #71717a;
  --status-standby-text: #52525b;

  /* Alert / Error: Warm Crimson */
  --status-alert-bg: #ffe4e6;
  --status-alert-border: #fecdd3;
  --status-alert-dot: #e11d48;
  --status-alert-text: #9f1239;

  /* Warning / Notice: Warm Sand */
  --status-warn-bg: #fffbeb;
  --status-warn-border: #fef3c7;
  --status-warn-dot: #f59e0b;
  --status-warn-text: #b45309;

  /* Typography Hierarchy (Deep Charcoal / High Contrast) */
  --text-main: #09090b;
  --text-body: #27272a;
  --text-secondary: #52525b;
  --text-muted: #71717a;
  --text-dim: #a1a1aa;

  /* Precision 1px Borders */
  --border-subtle: #f4f4f5;
  --border-default: #e4e4e7;
  --border-strong: #d4d4d8;
  --border-sidebar: #e4e4e7;

  /* Soft Ambient Shadows */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.06), 0 2px 4px rgba(0, 0, 0, 0.03);
  --shadow-modal: 0 24px 48px -12px rgba(0, 0, 0, 0.15), 0 8px 16px -4px rgba(0, 0, 0, 0.08);

  /* Geometry: 6px-8px Clean Radii */
  --radius-xs: 3px;
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 12px;

  /* Fonts: Unique, human-designed modern geometric sans paired with JetBrains Mono */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --sidebar-width: 240px;
  --header-height: 52px;
}

/* ==========================================================================
   RESET & GLOBAL BASE
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  font-family: var(--font-sans);
  background-color: var(--bg-canvas);
  color: var(--text-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  font-size: 13px;
  overflow: hidden;
}

/* Crisp Clean Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-canvas);
}
::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: var(--radius-xs);
}
::-webkit-scrollbar-thumb:hover {
  background: #a1a1aa;
}

a {
  color: var(--brand-primary);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* Hidden Utility */
.hidden,
.auth-gate-overlay.hidden {
  display: none !important;
}

/* ==========================================================================
   AUTHENTICATION GATE MODAL (AESTHETIC LIGHT CARD)
   ========================================================================== */
.auth-gate-overlay {
  position: fixed;
  inset: 0;
  background: rgba(50, 50, 50, 0.4);
  backdrop-filter: blur(8px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-box {
  background: #ffffff;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 400px;
  padding: 34px 30px;
  box-shadow: var(--shadow-modal);
  text-align: center;
}

.auth-logo-frame {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-lg);
  background: #ffffff;
  border: 1px solid var(--border-default);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  padding: 6px;
  box-shadow: var(--shadow-sm);
}

.auth-logo-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.auth-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.015em;
  margin-bottom: 4px;
}

.auth-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 22px;
  line-height: 1.4;
}

.btn-quick-login {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-default);
  color: var(--text-main);
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s ease;
  margin-bottom: 18px;
}
.btn-quick-login:hover {
  background: #e4e4e7;
  color: #000000;
  border-color: var(--border-strong);
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 0 0 18px;
  color: var(--text-muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border-default);
}
.auth-divider span {
  padding: 0 10px;
}

.form-group {
  text-align: left;
  margin-bottom: 14px;
}

.form-label {
  display: block;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-control-input,
.form-control-select {
  width: 100%;
  background: #ffffff;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 0.84rem;
  padding: 8px 12px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  font-family: inherit;
}
.form-control-input:focus,
.form-control-select:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 2px rgba(24, 24, 27, 0.08);
}

.btn-toggle-pass {
  position: absolute;
  right: 8px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-toggle-pass:hover {
  color: var(--text-main);
}

.auth-helper-text {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 5px;
}
.auth-helper-text code {
  font-family: var(--font-mono);
  color: var(--text-secondary);
  background: var(--bg-surface-subtle);
  padding: 1px 5px;
  border-radius: 3px;
  border: 1px solid var(--border-default);
}

.btn-auth-submit {
  width: 100%;
  padding: 10px 16px;
  margin-top: 8px;
}

.auth-error-text {
  color: var(--status-alert-text);
  font-size: 0.78rem;
  font-weight: 600;
  text-align: center;
  min-height: 20px;
  margin-top: 10px;
}

/* ==========================================================================
   APP SHELL & SIDEBAR NAVIGATION
   ========================================================================== */
.app-shell {
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  background: var(--bg-canvas);
}

.sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  height: 100vh;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-sidebar);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  user-select: none;
  z-index: 100;
}

.sidebar-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-sidebar);
  background: #ffffff;
}

.brand-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo-frame {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: #ffffff;
  border: 1px solid var(--border-default);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3px;
  flex-shrink: 0;
  box-shadow: var(--shadow-xs);
}

.brand-logo-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.brand-text-block {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.brand-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.brand-sub {
  font-size: 0.68rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.sidebar-nav {
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
}

.nav-section-title {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 10px 10px 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
}
.nav-item:hover {
  background: #e4e4e7;
  color: var(--text-main);
  text-decoration: none;
}
.nav-item.active {
  background: #ffffff;
  color: var(--text-main);
  font-weight: 600;
  border-color: var(--border-default);
  box-shadow: var(--shadow-xs);
}

.nav-item-left {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}
.nav-item-left span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  color: var(--text-muted);
}
.nav-item.active .nav-icon {
  color: var(--brand-primary);
}

.nav-count-badge {
  font-size: 0.68rem;
  font-weight: 600;
  background: #ffffff;
  color: var(--text-muted);
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid var(--border-default);
}
.nav-item.active .nav-count-badge {
  color: var(--text-main);
  border-color: var(--border-strong);
}

.sidebar-footer {
  padding: 12px 10px;
  border-top: 1px solid var(--border-sidebar);
  background: #ffffff;
}

.admin-profile-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  border-radius: var(--radius-md);
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-default);
}

.admin-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.admin-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--brand-primary);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.admin-name-text {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-role-text {
  font-size: 0.66rem;
  color: var(--text-muted);
}

.btn-lock-sidebar {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease;
}
.btn-lock-sidebar:hover {
  color: var(--status-alert-dot);
}

/* ==========================================================================
   TOP COMMAND BAR
   ========================================================================== */
.main-viewport {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  background: var(--bg-canvas);
}

.topbar {
  height: var(--header-height);
  min-height: var(--header-height);
  padding: 0 20px;
  background: var(--bg-topbar);
  border-bottom: 1px solid var(--border-default);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  z-index: 90;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.breadcrumb-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  white-space: nowrap;
}

.breadcrumb-root {
  color: var(--text-muted);
  font-weight: 500;
}

.breadcrumb-separator {
  color: var(--border-strong);
}

.breadcrumb-current {
  color: var(--text-main);
  font-weight: 600;
}

/* Telemetry Active Status (Warm Amber - Zero Blue, Zero Green) */
.telemetry-radar-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--status-live-bg);
  border: 1px solid var(--status-live-border);
  border-radius: var(--radius-sm);
  padding: 3px 8px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--status-live-text);
  white-space: nowrap;
}

.status-dot,
.pulse-radar-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--status-live-dot);
  flex-shrink: 0;
}

.branch-selector-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 2px 10px;
  color: var(--text-secondary);
}

#branch-select {
  border: none;
  background: transparent;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-main);
  padding: 4px 6px 4px 0;
  cursor: pointer;
  outline: none;
  font-family: inherit;
}
#branch-select option {
  background: #ffffff;
  color: var(--text-main);
}

.branch-locked-tag {
  background: var(--bg-surface-subtle);
  color: var(--text-main);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  border: 1px solid var(--border-default);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* ==========================================================================
   BUTTONS (VELVET OBSIDIAN & REFINED PORCELAIN)
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  font-family: inherit;
  outline: none;
  user-select: none;
  line-height: 1.3;
}

.btn-primary {
  background: var(--brand-primary);
  color: #ffffff;
  border-color: var(--brand-active);
  box-shadow: var(--shadow-xs);
}
.btn-primary:hover {
  background: var(--brand-hover);
  border-color: #000000;
  text-decoration: none;
}
.btn-primary:active {
  background: var(--brand-active);
}

.btn-secondary {
  background: #ffffff;
  color: var(--text-main);
  border-color: var(--border-default);
  box-shadow: var(--shadow-xs);
}
.btn-secondary:hover {
  background: var(--bg-surface-subtle);
  color: #000000;
  border-color: var(--border-strong);
  text-decoration: none;
}

.btn-danger {
  background: var(--status-alert-bg);
  color: var(--status-alert-text);
  border-color: var(--status-alert-border);
}
.btn-danger:hover {
  background: #fecdd3;
  color: #881337;
}

.btn-success {
  background: var(--status-live-bg);
  color: var(--status-live-text);
  border-color: var(--status-live-border);
}
.btn-success:hover {
  background: #fde68a;
  color: #78350f;
}

.btn-sm {
  padding: 4px 9px;
  font-size: 0.76rem;
}

.btn-lg {
  padding: 9px 18px;
  font-size: 0.86rem;
}

.btn-icon-only {
  width: 30px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-icon-only:hover {
  color: var(--text-main);
}
.btn-icon-only.active {
  background: var(--bg-surface-subtle);
  color: var(--text-main);
}

.view-mode-toggle {
  display: flex;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #ffffff;
}

/* ==========================================================================
   VIEWPORT CONTENT & TAB PANES
   ========================================================================== */
.viewport-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px 24px;
}

.tab-pane {
  display: none;
}
.tab-pane.active {
  display: block;
}

/* ==========================================================================
   KPI SUMMARY METRICS DECK (APPLE PRO / STRIPE AESTHETIC CARDS)
   ========================================================================== */
.stats-deck {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
@media (max-width: 1100px) {
  .stats-deck {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 640px) {
  .stats-deck {
    grid-template-columns: 1fr;
  }
}

.stat-metric-card {
  background: #ffffff;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-xs);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.stat-metric-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.stat-metric-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.stat-metric-label {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.stat-metric-icon {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-subtle);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}
.stat-metric-icon.status-green {
  background: var(--status-live-bg);
  color: var(--status-live-dot);
}
.stat-metric-icon.status-muted {
  background: var(--bg-surface-subtle);
  color: var(--text-muted);
}

.stat-metric-val-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
}

.stat-metric-number {
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.025em;
  line-height: 1.1;
  font-family: var(--font-sans);
}
.stat-metric-number.stat-online {
  color: var(--status-live-dot);
}
.stat-metric-number.stat-offline {
  color: var(--text-muted);
}

.stat-metric-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: var(--font-sans);
}

/* ==========================================================================
   FILTERS, SEGMENTED CONTROL & SEARCH BAR
   ========================================================================== */
.screens-filter-navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

/* Linear-style Flush Segmented Control (Light Palette) */
.filter-pills-left,
.filter-segmented-group {
  display: inline-flex;
  align-items: center;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 3px;
  gap: 2px;
}

.pill-btn,
.segmented-btn {
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  padding: 4px 12px;
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}
.pill-btn:hover,
.segmented-btn:hover {
  color: var(--text-main);
}
.pill-btn.active,
.segmented-btn.active {
  background: #ffffff;
  color: var(--text-main);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.filter-controls-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.control-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.control-label {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-muted);
}

.custom-select-control {
  background: #ffffff;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 0.78rem;
  padding: 4px 8px;
  outline: none;
  font-family: inherit;
  cursor: pointer;
}
.custom-select-control option {
  background: #ffffff;
  color: var(--text-main);
}
.custom-select-control:focus {
  border-color: var(--brand-primary);
}

.pagination-control {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pagination-text {
  font-size: 0.76rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.pagination-btn {
  background: #ffffff;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.15s ease;
}
.pagination-btn:hover:not(:disabled) {
  background: var(--bg-surface-subtle);
  color: var(--text-main);
  border-color: var(--border-strong);
}
.pagination-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Secondary Search & Action Toolbar */
.floor-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.search-input-group {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 5px 10px;
  width: 320px;
  color: var(--text-muted);
  box-shadow: var(--shadow-xs);
}
.search-input-group svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.search-input-group input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-main);
  font-size: 0.8rem;
  width: 100%;
  font-family: inherit;
}
.search-input-group:focus-within {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 2px rgba(24, 24, 27, 0.08);
}

.toolbar-actions-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ==========================================================================
   ENTERPRISE DATA TABLE (CLEAN WHITE SURFACE + STONE BORDERS)
   ========================================================================== */
.player-table-card,
.table-container-card {
  background: #ffffff;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}

.player-data-table,
.enterprise-data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.player-data-table thead,
.enterprise-data-table thead {
  background: #fafafa;
  border-bottom: 1px solid var(--border-default);
}

.player-data-table th,
.enterprise-data-table th {
  padding: 10px 14px;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.player-data-table tbody tr,
.enterprise-data-table tbody tr {
  border-bottom: 1px solid var(--border-subtle);
  transition: background 0.1s ease;
}
.player-data-table tbody tr:last-child,
.enterprise-data-table tbody tr:last-child {
  border-bottom: none;
}
.player-data-table tbody tr:hover,
.enterprise-data-table tbody tr:hover {
  background: var(--bg-surface-subtle);
}

.player-data-table td,
.enterprise-data-table td {
  padding: 11px 14px;
  vertical-align: middle;
  font-size: 0.82rem;
}

/* Display Node Cell */
.player-cell-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.device-display-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-default);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
}
.device-display-icon.online {
  color: var(--status-live-dot);
  border-color: var(--status-live-border);
}

.device-status-led {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text-muted);
}
.device-status-led.led-online {
  background: var(--status-live-dot);
}

.device-name-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.device-title-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.device-title-link:hover {
  color: #000000;
  text-decoration: underline;
}

.device-sub-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.68rem;
  color: var(--text-muted);
}

.sub-code {
  font-family: var(--font-mono);
  color: var(--text-secondary);
  background: var(--bg-surface-subtle);
  padding: 1px 4px;
  border-radius: 3px;
  border: 1px solid var(--border-default);
}

.sub-badge-model {
  color: var(--text-muted);
}

.sub-badge-status {
  font-weight: 600;
  font-size: 0.65rem;
  padding: 1px 5px;
  border-radius: 3px;
  font-family: var(--font-sans);
}
.sub-badge-status.online {
  color: var(--status-live-text);
  background: var(--status-live-bg);
}
.sub-badge-status.offline {
  color: var(--text-muted);
  background: var(--bg-surface-subtle);
}

/* Now Broadcasting Cell */
.live-playing-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.live-media-thumb {
  width: 44px;
  height: 28px;
  border-radius: var(--radius-xs);
  background: #f4f4f5;
  border: 1px solid var(--border-default);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.live-media-thumb video,
.live-media-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.live-media-tag {
  position: absolute;
  bottom: 1px;
  right: 1px;
  font-size: 0.55rem;
  font-weight: 700;
  padding: 0 2px;
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.75);
  color: #ffffff;
}

.live-media-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.live-media-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}

.live-media-sub {
  font-size: 0.68rem;
  color: var(--text-muted);
}

/* Orientation Badge */
.orientation-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-default);
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
}

/* Refined Subtle Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 6px;
  border-radius: var(--radius-sm);
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.2;
  font-family: var(--font-sans);
}
.badge-brand {
  background: #f4f4f5;
  color: var(--text-main);
  border: 1px solid var(--border-default);
}
.badge-success {
  background: var(--status-live-bg);
  color: var(--status-live-text);
  border: 1px solid var(--status-live-border);
}
.badge-neutral {
  background: var(--bg-surface-subtle);
  color: var(--text-secondary);
  border: 1px solid var(--border-default);
}
.badge-danger {
  background: var(--status-alert-bg);
  color: var(--status-alert-text);
  border: 1px solid var(--status-alert-border);
}

/* Action Kebab Menu Button (3 Dots) */
.action-grid-btn {
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  padding: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}
.action-grid-btn:hover {
  background: var(--bg-surface-subtle);
  border-color: var(--border-default);
  color: var(--text-main);
}

/* ==========================================================================
   GRID CARDS VIEW (ALTERNATIVE TO TABLE)
   ========================================================================== */
.fleet-cards-grid,
.screens-grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  margin-top: 12px;
}

.tv-display-card {
  background: #ffffff;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-xs);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.tv-display-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.tv-card-preview-stage {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #18181b;
  position: relative;
  overflow: hidden;
}
.tv-card-preview-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tv-card-preview-text {
  color: #ffffff;
  font-weight: 700;
  font-size: 0.9rem;
  text-align: center;
  padding: 8px;
}

.tv-card-badge-status {
  position: absolute;
  top: 8px;
  left: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  backdrop-filter: blur(4px);
}
.tv-status-online {
  background: rgba(217, 119, 6, 0.9);
  color: #ffffff;
}
.tv-status-offline {
  background: rgba(100, 116, 139, 0.9);
  color: #ffffff;
}

.tv-card-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
}

.tv-card-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.tv-card-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
}

.tv-card-floor-select {
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.72rem;
  padding: 2px 6px;
  outline: none;
}
.tv-card-floor-select option {
  background: #ffffff;
}

.tv-card-meta-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.tv-card-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tv-card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  border-top: 1px solid var(--border-subtle);
  padding-top: 10px;
}

/* ==========================================================================
   STUDIO COMPOSER TAB
   ========================================================================== */
.studio-layout {
  display: grid;
  grid-template-columns: minmax(460px, 1.18fr) minmax(380px, 1fr);
  gap: 20px;
  align-items: start;
}
@media (max-width: 1100px) {
  .studio-layout {
    grid-template-columns: 1fr;
  }
}

.composer-card,
.stage-wrapper-card,
.inspector-card {
  background: #ffffff;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow-xs);
}

.stage-card-header,
.inspector-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.composer-section-title,
.stage-title,
.inspector-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.01em;
}

.stage-subtitle {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.layout-selector-grid,
.layout-picker {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.layout-blueprint-card {
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 8px 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s ease;
  user-select: none;
}
.layout-blueprint-card:hover {
  border-color: var(--border-strong);
  background: #e4e4e7;
}
.layout-blueprint-card.active {
  border-color: var(--brand-primary);
  background: #ffffff;
  box-shadow: var(--shadow-xs);
}

.layout-mini-icon {
  width: 24px;
  height: 16px;
  border: 1px solid var(--border-strong);
  border-radius: 2px;
  flex-shrink: 0;
}

.layout-card-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-main);
}

.content-type-tabs {
  display: flex;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 2px;
  gap: 2px;
}

.tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  padding: 6px 4px;
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}
.tab-btn:hover {
  color: var(--text-main);
}
.tab-btn.active {
  background: #ffffff;
  color: var(--text-main);
  font-weight: 600;
  box-shadow: var(--shadow-xs);
}

.step-label-badge {
  display: inline-flex;
  align-items: center;
  background: #18181b;
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 1px 5px;
  border-radius: 3px;
  margin-right: 6px;
  font-family: var(--font-mono);
}

.modern-dropzone,
.dropzone {
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  padding: 20px 16px;
  text-align: center;
  background: var(--bg-surface-subtle);
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.modern-dropzone:hover,
.dropzone:hover {
  border-color: var(--brand-primary);
  background: #ffffff;
}

.dropzone-prompt-text {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-main);
}
.dropzone-hint-text {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.orient-btn-group {
  display: inline-flex;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 2px;
  gap: 2px;
}
.btn-orient {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: transparent;
  border: none;
  border-radius: var(--radius-xs);
  padding: 3px 8px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: var(--font-sans);
}
.btn-orient:hover {
  color: var(--text-main);
}
.btn-orient.active {
  background: var(--brand-primary);
  color: #ffffff;
  box-shadow: var(--shadow-xs);
}

.orient-blueprint-card {
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 8px 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all 0.15s ease;
  user-select: none;
}
.orient-blueprint-card:hover {
  border-color: var(--border-strong);
  background: #e4e4e7;
}
.orient-blueprint-card.active {
  border-color: var(--brand-primary);
  background: #ffffff;
  color: var(--text-main);
  box-shadow: var(--shadow-xs);
}

/* TV Bezel Mockup Stage */
.samsung-tv-frame,
.tv-hardware-bezel {
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  background: #18181b;
  border: 7px solid #27272a;
  border-radius: var(--radius-md);
  box-shadow: 0 12px 36px -12px rgba(0, 0, 0, 0.22), 0 4px 10px -2px rgba(0, 0, 0, 0.08);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  margin: 0 auto;
  transition: max-width 0.35s cubic-bezier(0.4, 0, 0.2, 1), aspect-ratio 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* PORTRAIT 9:16 ROTATION */
.samsung-tv-frame.portrait {
  max-width: 270px;
  aspect-ratio: 9 / 16;
}
.samsung-tv-frame.portrait #mockup-preview-text {
  font-size: 1.15rem;
  padding: 16px;
  line-height: 1.35;
}
.samsung-tv-frame.portrait .samsung-tv-chin {
  height: 16px;
}
.samsung-tv-frame.portrait .samsung-logo-text {
  font-size: 0.44rem;
  letter-spacing: 0.12em;
}

.samsung-screen-inner {
  flex: 1;
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #18181b;
}

.samsung-tv-chin {
  height: 18px;
  width: 100%;
  background: #202023;
  border-top: 1px solid #2e2e32;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.samsung-logo-text {
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: #71717a;
  text-transform: uppercase;
  font-family: var(--font-mono);
}

/* Split screen styling in simulator */
.mockup-split {
  display: flex;
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
}
.mockup-split.split-vertical {
  flex-direction: row;
}
.mockup-split.split-vertical .mockup-split-zone {
  flex: 1 1 50%;
  width: 50%;
  height: 100%;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #18181b;
}
.mockup-split.split-vertical #mockup-zone-1 {
  border-right: 1px solid rgba(255, 255, 255, 0.2);
  border-bottom: none;
}

.mockup-split.split-horizontal {
  flex-direction: column;
}
.mockup-split.split-horizontal .mockup-split-zone {
  flex: 1 1 50%;
  width: 100%;
  height: 50%;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #18181b;
}
.mockup-split.split-horizontal #mockup-zone-1 {
  border-right: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.mockup-split-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}
.mockup-split-txt {
  color: #ffffff;
  font-weight: 700;
  font-size: 0.85rem;
  z-index: 2;
  text-align: center;
  padding: 10px;
}
.mockup-split-yt {
  color: #a28b75;
  font-weight: 700;
  font-size: 0.8rem;
  z-index: 2;
  text-align: center;
}

/* Technical Metadata Strip Under TV */
.display-meta-strip {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 10px 14px;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  margin-top: 12px;
  font-size: 0.74rem;
  color: var(--text-muted);
}

.meta-strip-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.meta-strip-item span {
  color: var(--text-muted);
}

.meta-strip-item strong {
  color: var(--text-main);
  font-weight: 600;
}

.meta-strip-divider {
  color: var(--border-strong);
  display: inline-block;
  user-select: none;
}

.swatch-btn {
  width: 22px;
  height: 22px;
  border-radius: var(--radius-xs);
  border: 1px solid rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}
.swatch-btn:hover {
  transform: scale(1.12);
}
.swatch-btn.active {
  box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px var(--brand-primary);
}

/* ==========================================================================
   MEDIA VAULT GRID
   ========================================================================== */
.media-vault-grid,
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.media-vault-card,
.media-card {
  background: #ffffff;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-xs);
}
.media-vault-card:hover,
.media-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.media-vault-thumb,
.media-thumb-stage {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #18181b;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.media-vault-thumb img,
.media-vault-thumb video,
.media-thumb-stage img,
.media-thumb-stage video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-vault-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  padding: 1px 5px;
  border-radius: var(--radius-xs);
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(0, 0, 0, 0.75);
  color: #ffffff;
}

.media-vault-info,
.media-card-body {
  padding: 10px;
}

.media-vault-title,
.media-card-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.media-card-meta {
  font-size: 0.68rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
}

/* ==========================================================================
   MODALS & OVERLAYS
   ========================================================================== */
.modal-overlay,
.modal-backdrop-wrap {
  position: fixed;
  inset: 0;
  background: rgba(50, 50, 50, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.open,
.modal-backdrop-wrap.open {
  display: flex !important;
}

.modal-window-content,
.modal-dialog,
.modal-backdrop-wrap .modal-card {
  background: #ffffff;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 520px;
  padding: 24px 28px;
  box-shadow: var(--shadow-modal);
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalPop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
  0% { transform: scale(0.96); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.modal-header-row,
.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-default);
}

.modal-title-text,
.modal-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
}

.modal-subtitle-text {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.btn-close-modal-x,
.btn-close-modal {
  background: transparent;
  border: none;
  font-size: 1.1rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  line-height: 1;
}
.btn-close-modal-x:hover,
.btn-close-modal:hover {
  color: var(--text-main);
}

.modal-body {
  padding: 6px 0 14px;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border-default);
}

/* ==========================================================================
   ALERTS & TOASTS
   ========================================================================== */
.alert-message {
  font-size: 0.74rem;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: var(--radius-md);
  display: none;
  text-align: center;
  margin-top: 8px;
}
.alert-message.success {
  display: block;
  background: var(--status-live-bg);
  color: var(--status-live-text);
  border: 1px solid var(--status-live-border);
}
.alert-message.error {
  display: block;
  background: var(--status-alert-bg);
  color: var(--status-alert-text);
  border: 1px solid var(--status-alert-border);
}

.card {
  background: #ffffff;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 14px;
  box-shadow: var(--shadow-xs);
}

#toast-container {
  position: fixed;
  bottom: 18px;
  right: 18px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: none;
}

.toast {
  background: #ffffff;
  color: var(--text-main);
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-size: 0.76rem;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-default);
  display: flex;
  align-items: center;
  gap: 8px;
  animation: slideInToast 0.15s ease;
  pointer-events: auto;
}

@keyframes slideInToast {
  from { transform: translateY(8px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}


/* ==========================================================================
   ENTERPRISE OPERATIONAL DESIGN SYSTEM EXTENSIONS
   Architecture: High-density, zero AI tropes, operational clarity
   ========================================================================== */

/* 1. Global Search Topbar Bar & Trigger */
.topbar-search-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 5px 12px;
  color: var(--text-muted);
  font-size: 0.8rem;
  cursor: pointer;
  min-width: 260px;
  transition: all 0.15s ease;
}
.topbar-search-trigger:hover {
  background: #ffffff;
  border-color: var(--border-strong);
  color: var(--text-main);
}
.search-kbd {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  background: #ffffff;
  border: 1px solid var(--border-default);
  padding: 1px 5px;
  border-radius: 3px;
  margin-left: auto;
  color: var(--text-secondary);
}

/* 2. Operational Metric Strip (Compact Fleet Health KPI) */
.fleet-kpi-strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  background: #ffffff;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  overflow: hidden;
}
.kpi-cell {
  padding: 14px 18px;
  border-right: 1px solid var(--border-default);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 4px;
}
.kpi-cell:last-child {
  border-right: none;
}
.kpi-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.kpi-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}
.kpi-value {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.kpi-subtext {
  font-size: 0.7rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Dual Status Indicators (Symbols + Text, accessible, non-color-only) */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.74rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  border: 1px solid transparent;
  line-height: 1.2;
}
.status-pill.online {
  background: #ecfdf5;
  color: #065f46;
  border-color: #a7f3d0;
}
.status-pill.offline {
  background: #f4f4f5;
  color: #52525b;
  border-color: #e4e4e7;
}
.status-pill.syncing {
  background: #f0e8e1;
  color: #323232;
  border-color: #d8c8ba;
}
.status-pill.warning {
  background: #fffbeb;
  color: #92400e;
  border-color: #fde68a;
}
.status-pill.error {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fecaca;
}
.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-pill.online .status-dot { background: #10b981; }
.status-pill.offline .status-dot { background: #71717a; }
.status-pill.syncing .status-dot { background: #65594e; }
.status-pill.warning .status-dot { background: #f59e0b; }
.status-pill.error .status-dot { background: #ef4444; }

/* 3. Overview Layout Grid */
.overview-sections-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 20px;
  align-items: start;
}
.overview-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.section-panel-card {
  background: #ffffff;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.section-panel-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-default);
  background: var(--bg-surface-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.section-panel-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}
.section-panel-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Activity Feed */
.activity-feed-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.activity-feed-item {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8rem;
  transition: background 0.1s ease;
}
.activity-feed-item:last-child {
  border-bottom: none;
}
.activity-feed-item:hover {
  background: var(--bg-surface-hover);
}
.activity-time {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-muted);
  font-weight: 600;
  width: 48px;
  flex-shrink: 0;
}
.activity-desc {
  flex: 1;
  color: var(--text-body);
}
.activity-actor {
  font-weight: 600;
  color: var(--text-main);
}
.activity-target-pill {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-default);
  padding: 1px 5px;
  border-radius: 3px;
  color: var(--text-secondary);
}

/* Attention Required Priority Queue */
.attention-queue-list {
  display: flex;
  flex-direction: column;
  divide-y: 1px solid var(--border-subtle);
}
.attention-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.attention-item:last-child {
  border-bottom: none;
}
.attention-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.attention-icon-wrap {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.attention-icon-wrap.offline {
  background: #f4f4f5;
  color: #71717a;
}
.attention-icon-wrap.warning {
  background: #fffbeb;
  color: #d97706;
}
.attention-icon-wrap.error {
  background: #fef2f2;
  color: #dc2626;
}
.attention-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-main);
}
.attention-subtitle {
  font-size: 0.74rem;
  color: var(--text-muted);
}
.attention-action-btn {
  font-size: 0.74rem;
  font-weight: 600;
  padding: 4px 10px;
  border: 1px solid var(--border-default);
  background: #ffffff;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-main);
  transition: all 0.15s ease;
}
.attention-action-btn:hover {
  background: var(--bg-surface-subtle);
  border-color: var(--border-strong);
}

/* 4. High-Density Operational Device Table */
.device-ops-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  text-align: left;
}
.device-ops-table th {
  padding: 9px 12px;
  background: var(--bg-surface-subtle);
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-default);
  white-space: nowrap;
}
.device-ops-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
  color: var(--text-body);
}
.device-ops-table tbody tr {
  transition: background 0.1s ease;
  cursor: pointer;
}
.device-ops-table tbody tr:hover {
  background: var(--bg-surface-hover);
}
.device-ops-table tbody tr.row-selected {
  background: #f4f4f6;
}

/* Storage Telemetry Bar */
.storage-telemetry-cell {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 100px;
}
.storage-bar-track {
  width: 100%;
  height: 5px;
  background: #e4e4e7;
  border-radius: 3px;
  overflow: hidden;
}
.storage-bar-progress {
  height: 100%;
  background: #18181b;
  border-radius: 3px;
  transition: width 0.3s ease;
}
.storage-bar-progress.warn {
  background: #f59e0b;
}
.storage-bar-progress.danger {
  background: #ef4444;
}
.storage-text-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.68rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* 5. Slide-Over Device Detail Drawer */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(50, 50, 50, 0.4);
  backdrop-filter: blur(4px);
  z-index: 10001;
  display: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.drawer-backdrop.open {
  display: block;
  opacity: 1;
}
.device-detail-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 480px;
  max-width: 92vw;
  background: #ffffff;
  border-left: 1px solid var(--border-default);
  box-shadow: -8px 0 24px rgba(0, 0, 0, 0.12);
  z-index: 10002;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.device-detail-drawer.open {
  transform: translateX(0);
}
.drawer-header,
.drawer-top-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-default);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface-subtle);
  flex-shrink: 0;
}
.drawer-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.015em;
  line-height: 1.2;
}
.drawer-sub {
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-top: 3px;
  font-weight: 500;
}
.drawer-btn-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border-default);
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  transition: all 0.15s ease;
  flex-shrink: 0;
}
.drawer-btn-close:hover {
  background: #fee2e2;
  color: #b91c1c;
  border-color: #fca5a5;
  transform: scale(1.05);
}
.drawer-body,
.drawer-body-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.drawer-section-card {
  background: #ffffff;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}
.drawer-section-heading {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.drawer-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.drawer-meta-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.drawer-meta-label {
  font-size: 0.7rem;
  color: var(--text-muted);
}
.drawer-meta-val {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-main);
  font-family: var(--font-mono);
}
.drawer-actions-stack {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.danger-zone-box {
  border: 1px solid #fecaca;
  background: #fff5f5;
  border-radius: var(--radius-md);
  padding: 14px 16px;
}

/* 6. Mass Operations Floating Action Bar */
.mass-ops-bar {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(120px);
  background: #18181b;
  color: #ffffff;
  padding: 8px 16px;
  border-radius: 9999px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 9999;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.mass-ops-bar.visible {
  transform: translateX(-50%) translateY(0);
}
.mass-ops-count {
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  padding-right: 12px;
  border-right: 1px solid #3f3f46;
}
.mass-ops-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.btn-mass-pill {
  background: #27272a;
  color: #ffffff;
  border: 1px solid #3f3f46;
  border-radius: 9999px;
  padding: 5px 12px;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-mass-pill:hover {
  background: #3f3f46;
}
.btn-mass-pill.clear {
  background: transparent;
  border-color: transparent;
  color: #a1a1aa;
}
.btn-mass-pill.clear:hover {
  color: #ffffff;
}

/* 7. Global Search Modal (Cmd+K) */
.global-search-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(50, 50, 50, 0.4);
  backdrop-filter: blur(6px);
  z-index: 10005;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 100px;
}
.global-search-backdrop.open {
  display: flex;
}
.global-search-card {
  width: 580px;
  max-width: 92vw;
  background: #ffffff;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-modal);
  overflow: hidden;
}
.search-input-header {
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border-default);
}
.search-field-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 0.95rem;
  color: var(--text-main);
  background: transparent;
}
.search-results-box {
  max-height: 380px;
  overflow-y: auto;
  padding: 8px 0;
}
.search-result-row {
  padding: 8px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: background 0.1s ease;
}
.search-result-row:hover,
.search-result-row.selected {
  background: var(--bg-surface-hover);
}
.search-result-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.entity-badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 3px;
  font-family: var(--font-mono);
}
.entity-badge.device { background: #f0e8e1; color: #403932; }
.entity-badge.client { background: #f3e8ff; color: #7e22ce; }
.entity-badge.playlist { background: #fef3c7; color: #92400e; }
.entity-badge.media { background: #f2ede8; color: #484440; }

/* 8. Sub-Admin Simplified Banner */
.subadmin-banner-strip {
  background: #ffffff;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ==========================================================================
   ENTERPRISE STUDIO COMPOSER & PLAYLIST TRACK STYLES
   ========================================================================== */
.composer-panel-box {
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.composer-panel-label {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
#section-playlist {
  width: 100%;
  display: block;
}
.playlist-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  width: 100%;
}
.playlist-track-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 340px;
  overflow-y: auto;
  padding-right: 4px;
  width: 100%;
}
.playlist-track-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  border: 1px solid var(--border-default);
  border-radius: 8px;
  padding: 8px 10px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}
.playlist-track-card:hover {
  border-color: var(--border-strong);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}
.track-handle {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
  width: 22px;
}
.track-pos-badge {
  font-family: var(--font-mono);
  font-size: 0.70rem;
  font-weight: 800;
  color: var(--text-muted);
  line-height: 1;
}
.track-reorder-btns {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.track-reorder-btns button {
  background: none;
  border: none;
  font-size: 0.58rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  line-height: 1;
}
.track-reorder-btns button:hover:not(:disabled) {
  color: var(--text-main);
}
.track-thumb-frame {
  width: 50px;
  height: 32px;
  border-radius: 6px;
  background: #000000;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
}
.track-type-tag {
  position: absolute;
  bottom: 2px;
  right: 2px;
  font-size: 0.50rem;
  font-weight: 800;
  padding: 1px 3px;
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.85);
  color: #ffffff;
  line-height: 1;
}
.track-details {
  flex: 1 1 0%;
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.track-name {
  font-size: 0.80rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.track-sub {
  font-size: 0.68rem;
  color: #10b981;
  font-weight: 600;
  font-family: var(--font-mono);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  display: flex;
  align-items: center;
  gap: 4px;
}
.track-timing {
  flex-shrink: 0;
  margin-left: auto;
}
.track-timing select {
  font-size: 0.74rem;
  font-weight: 600;
  padding: 4px 6px;
  height: 30px;
  width: 120px;
  max-width: 120px;
  border: 1px solid var(--border-default);
  border-radius: 6px;
  background: #ffffff;
  color: var(--text-main);
  cursor: pointer;
}
.btn-track-delete {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.90rem;
  padding: 4px 6px;
  border-radius: 4px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}
.btn-track-delete:hover {
  color: #ef4444;
  background: #fee2e2;
}
.vault-picker-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}
.vault-picker-item:hover {
  background: #f0e8e1;
  border-color: #65594e;
}


/* ==========================================================================
   MNC SAAS COMMAND BAR & TOPBAR ENHANCEMENTS
   ========================================================================== */
.topbar {
  height: 54px;
  min-height: 54px;
  padding: 0 24px;
  background: #ffffff;
  border-bottom: 1px solid #e4e4e7;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  z-index: 90;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.breadcrumb-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.breadcrumb-root {
  color: #71717a;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.breadcrumb-separator {
  color: #d4d4d8;
  font-weight: 400;
}

.breadcrumb-current {
  color: #09090b;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.telemetry-radar-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 9999px;
  padding: 3px 10px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #15803d;
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: 0.01em;
}

.telemetry-radar-pill .status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2);
  flex-shrink: 0;
}

.btn-global-search-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f8f5f1;
  border: 1px solid #e3dbd4;
  border-radius: 8px;
  padding: 5px 12px;
  font-size: 0.78rem;
  color: #716961;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.btn-global-search-trigger:hover {
  background: #ffffff;
  border-color: #cfc3b9;
  color: #323232;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.btn-global-search-trigger kbd {
  background: #ffffff;
  border: 1px solid #e3dbd4;
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 0.68rem;
  font-family: var(--font-mono);
  color: #716961;
  font-weight: 600;
}

.branch-selector-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f8f5f1;
  border: 1px solid #e3dbd4;
  border-radius: 8px;
  padding: 4px 12px;
  min-width: 220px;
  max-width: 290px;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.branch-selector-wrap:hover {
  border-color: #cfc3b9;
  background: #f2ede8;
}

.branch-selector-wrap svg {
  color: #716961;
  flex-shrink: 0;
}

#branch-select {
  border: none;
  background: transparent;
  font-size: 0.82rem;
  font-weight: 600;
  color: #323232;
  width: 100%;
  cursor: pointer;
  outline: none;
  font-family: inherit;
  white-space: nowrap;
  text-overflow: ellipsis;
  padding-right: 4px;
}

#branch-select option {
  background: #ffffff;
  color: #09090b;
}

.branch-locked-tag {
  background: #e3dbd4;
  color: #484440;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}


/* ==========================================================================
   CANVA-GRADE STUDIO COMPOSER & 4K WORKSPACE
   ========================================================================== */
.studio-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 1180px) {
  .studio-layout {
    grid-template-columns: 1fr;
  }
}

.stage-wrapper-card {
  background: #ffffff;
  border: 1px solid #e4e4e7;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.stage-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.stage-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #09090b;
  letter-spacing: -0.01em;
}

.stage-subtitle {
  font-size: 0.74rem;
  color: #71717a;
}

.orient-btn-group {
  display: inline-flex;
  background: #f4f4f5;
  border: 1px solid #e4e4e7;
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
}

.btn-orient {
  border: none;
  background: transparent;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 600;
  color: #71717a;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-orient.active {
  background: #ffffff;
  color: #09090b;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

/* 4K Samsung Commercial Screen Bezel */
.samsung-tv-frame {
  background: #09090b;
  border: 4px solid #18181b;
  border-radius: 10px;
  box-shadow: 0 16px 36px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.08);
  overflow: hidden;
  position: relative;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  margin: 0 auto;
}

.samsung-tv-frame.landscape {
  width: 100%;
  aspect-ratio: 16 / 9;
  max-width: 680px;
}

.samsung-tv-frame.portrait {
  width: 340px;
  aspect-ratio: 9 / 16;
  max-width: 90%;
}

.samsung-screen-inner {
  width: 100%;
  height: 100%;
  background: #18181b;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.samsung-tv-chin {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 18px;
  background: #18181b;
  display: flex;
  align-items: center;
  justify-content: center;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  z-index: 10;
}

.samsung-logo-text {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 700;
  color: #71717a;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.display-meta-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #f8f5f1;
  border: 1px solid #e3dbd4;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 0.74rem;
  color: #716961;
  flex-wrap: wrap;
}

.meta-strip-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.meta-strip-item strong {
  color: #323232;
  font-family: var(--font-mono);
  font-weight: 600;
}

.meta-strip-divider {
  color: #cfc3b9;
}

/* Inspector Card */
.inspector-card {
  background: #ffffff;
  border: 1px solid #e4e4e7;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.inspector-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #f4f4f5;
  padding-bottom: 12px;
}

.inspector-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #09090b;
  letter-spacing: -0.01em;
}

.composer-panel-box {
  background: #fcfcfc;
  border: 1px solid #e4e4e7;
  border-radius: 10px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.composer-panel-label {
  font-size: 0.76rem;
  font-weight: 700;
  color: #3f3f46;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Layout Blueprint Selector Cards */
.layout-selector-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.layout-blueprint-card {
  background: #ffffff;
  border: 1px solid #e4e4e7;
  border-radius: 8px;
  padding: 8px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.layout-blueprint-card:hover {
  border-color: #a1a1aa;
  background: #fafafa;
}

.layout-blueprint-card.active {
  border-color: #09090b;
  background: #09090b;
  color: #ffffff;
}

.layout-blueprint-card.active .layout-card-label {
  color: #ffffff;
}

.layout-mini-icon {
  width: 28px;
  height: 18px;
  border-radius: 3px;
  border: 1px solid #d4d4d8;
}

.layout-blueprint-card.active .layout-mini-icon {
  border-color: #71717a;
}

.layout-card-label {
  font-size: 0.68rem;
  font-weight: 600;
  color: #52525b;
  white-space: nowrap;
}

/* Orientation Blueprint Cards */
.orient-blueprint-card {
  background: #ffffff;
  border: 1px solid #e4e4e7;
  border-radius: 8px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.76rem;
  font-weight: 600;
  color: #52525b;
  cursor: pointer;
  transition: all 0.15s ease;
}

.orient-blueprint-card:hover {
  border-color: #a1a1aa;
  background: #fafafa;
}

.orient-blueprint-card.active {
  border-color: #09090b;
  background: #09090b;
  color: #ffffff;
}

/* Content Type Segmented Tabs */
.content-type-tabs {
  display: flex;
  background: #f4f4f5;
  border: 1px solid #e4e4e7;
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
  overflow-x: auto;
}

.content-type-tabs .tab-btn {
  border: none;
  background: transparent;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 600;
  color: #71717a;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  font-family: inherit;
}

.content-type-tabs .tab-btn.active {
  background: #ffffff;
  color: #09090b;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}


/* Modern Dropzones */
.modern-dropzone {
  border: 1.5px dashed #cfc3b9;
  background: #f8f5f1;
  border-radius: 8px;
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}

.modern-dropzone:hover {
  border-color: #716961;
  background: #f2ede8;
}

.dropzone-prompt-text {
  font-size: 0.78rem;
  font-weight: 600;
  color: #484440;
}

.dropzone-hint-text {
  font-size: 0.68rem;
  color: #80776f;
}

/* Primary Broadcast Submit Button */
#btn-broadcast-submit {
  background: #09090b;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 12px 20px;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: all 0.15s ease;
}

#btn-broadcast-submit:hover {
  background: #27272a;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* =========================================================================
   FLEET 40-TV LIVE MONITORING GRID VIEW
   ========================================================================= */
.fleet-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 20px;
  padding: 8px 0 28px 0;
}

.fleet-tv-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.fleet-tv-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  border-color: #cfc3b9;
}

.fleet-tv-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.fleet-tv-card-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.fleet-tv-card-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.fleet-tv-card-title:hover {
  color: #323232;
}

.fleet-tv-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.fleet-tv-bezel-wrapper {
  position: relative;
  background: #09090b;
  border-radius: 12px;
  padding: 8px;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.8), 0 4px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.fleet-tv-bezel-inner {
  position: relative;
  width: 100%;
  background: #000000;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fleet-tv-bezel-inner.portrait {
  aspect-ratio: 9 / 16;
  max-height: 380px;
}

.fleet-tv-bezel-inner.landscape {
  aspect-ratio: 16 / 9;
}

.fleet-tv-bezel-inner img,
.fleet-tv-bezel-inner video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fleet-tv-bezel-tag {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 5;
  background: rgba(0, 0, 0, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  backdrop-filter: blur(4px);
}

.fleet-tv-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border-default);
}
