@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg: #F8FAFC;
  --bg-sidebar: #0F1C2E;
  --bg-sidebar-hover: #1A293E;
  --bg-sidebar-active: #20334C;
  --surface: #FFFFFF;
  --surface-alt: #F1F5F9;
  --border: #E2E8F0;
  --border-dark: #1E3250;
  
  --text-main: #0F172A;
  --text-muted: #64748B;
  --text-light: #F8FAFC;
  --text-dim: #94A3B8;

  --teal: #00C9B1;
  --purple: #7C3AED;
  --gradient: linear-gradient(135deg, #00C9B1 0%, #7C3AED 100%);
  --gradient-hover: linear-gradient(135deg, #02b6a0 0%, #6d28d9 100%);
  --gradient-subtle: linear-gradient(135deg, rgba(0, 201, 177, 0.12) 0%, rgba(124, 58, 237, 0.12) 100%);
  
  --success: #10B981;
  --warning: #F59E0B;
  --danger: #EF4444;
  --info: #3B82F6;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
  --shadow-glow: 0 0 20px rgba(0, 201, 177, 0.25);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  background-color: var(--bg);
  color: var(--text-main);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* App Container Layout - Fits full screen in Chrome & Safari */
#app-container {
  display: flex;
  width: 100%;
  height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
}

/* Sidebar */
.sidebar {
  width: 270px;
  background-color: var(--bg-sidebar);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  border-right: 1px solid var(--border-dark);
  z-index: 100;
  overflow: hidden;
  transition: width 0.25s ease, transform 0.25s ease, opacity 0.2s ease;
}

/* Fullscreen Studio Mode - Auto-Collapses Sidebar & Extends Page Full */
#app-container.fullscreen-studio .sidebar {
  width: 0 !important;
  min-width: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border-right: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
  overflow: hidden !important;
  transform: translateX(-100%);
  visibility: hidden;
}

#app-container.fullscreen-studio .main-wrapper {
  width: 100vw !important;
  max-width: 100vw !important;
  flex: 1 1 100% !important;
}

#app-container.fullscreen-studio .page-container {
  padding: 0 !important;
  overflow: hidden !important;
}

.sidebar-header {
  padding: 24px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-dark);
}

.brand-logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  cursor: pointer;
  flex-shrink: 0;
}

.brand-logo-img {
  display: block;
  height: 60px;
  max-width: 100%;
  width: auto;
  flex-shrink: 0;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0, 201, 177, 0.25));
}

.sidebar-nav {
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-grow: 1;
  overflow-y: auto;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

.sidebar-nav::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.nav-section-title {
  color: var(--text-dim);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  padding: 12px 14px 4px 14px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  color: #CBD5E1;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.nav-item:hover {
  background-color: var(--bg-sidebar-hover);
  color: var(--text-light);
}

.nav-item.active {
  background: var(--gradient);
  color: #FFFFFF;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 201, 177, 0.3);
}

.nav-item svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
  flex-shrink: 0;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border-dark);
  background: rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--gradient);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
}

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

.user-name {
  color: var(--text-light);
  font-size: 13px;
  font-weight: 600;
}

.user-org {
  color: var(--text-dim);
  font-size: 11px;
}

.user-role-badge {
  font-size: 10px;
  font-weight: 700;
  color: #00C9B1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: 1px;
  display: inline-block;
}

.user-badge:hover {
  opacity: 0.92;
}

.nav-section-title {
  color: #64748B;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-weight: 700;
  padding: 14px 14px 4px 14px;
}

.btn-icon-dim {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-icon-dim:hover {
  color: var(--text-light);
  background-color: var(--bg-sidebar-hover);
}

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

/* Header */
.top-header {
  height: 68px;
  background-color: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  flex-shrink: 0;
}

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

.page-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--gradient);
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(0, 201, 177, 0.25);
}

.btn-primary:hover {
  background: var(--gradient-hover);
  box-shadow: 0 4px 14px rgba(0, 201, 177, 0.4);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: var(--surface-alt);
  border-color: #CBD5E1;
}

.btn-danger {
  background: #FEE2E2;
  color: var(--danger);
  border: 1px solid #FECACA;
}

.btn-danger:hover {
  background: var(--danger);
  color: white;
}

/* Page Body Container */
.page-container {
  flex-grow: 1;
  padding: 32px;
  overflow-y: auto;
}

/* Stats Row */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
  border-color: #CBD5E1;
  transform: translateY(-2px);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--gradient-subtle);
  color: var(--teal);
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.1;
}

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

/* Grids and Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.screen-card, .content-card, .playlist-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

.screen-card:hover, .content-card:hover, .playlist-card:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(0, 201, 177, 0.4);
  transform: translateY(-3px);
}

.card-preview {
  height: 160px;
  background: #0F172A;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.card-preview img, .card-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.status-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 6px;
  backdrop-filter: blur(8px);
}

.status-badge.online {
  background: rgba(16, 185, 129, 0.9);
  color: white;
}

.status-badge.offline {
  background: rgba(100, 116, 139, 0.85);
  color: white;
}

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

.card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-grow: 1;
}

.card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-meta {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.card-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  background: var(--surface-alt);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: var(--surface);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  animation: modalIn 0.2s ease-out;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
}

.modal-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  flex-grow: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  background: var(--surface-alt);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-shrink: 0;
}

/* Forms */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 14px;
  color: var(--text-main);
  background: var(--surface);
  transition: var(--transition);
  outline: none;
}

.form-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  padding-right: 38px;
  cursor: pointer;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(0, 201, 177, 0.15);
}

/* Pairing Code Display */
.pairing-code-box {
  background: var(--surface-alt);
  border: 2px dashed #00C9B1;
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  margin: 10px 0;
}

.pairing-code-text {
  font-family: monospace;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: 0.2em;
  color: var(--text-main);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.empty-state-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--gradient-subtle);
  color: var(--teal);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

.empty-state-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
}

.empty-state-desc {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 420px;
  margin-bottom: 8px;
}

/* Widget Icon Grid (Phase 2) */
.widget-icon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(115px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.widget-card-item {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 8px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.widget-card-item:hover {
  border-color: var(--teal);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.widget-card-item.active {
  border-color: var(--teal);
  background: var(--gradient-subtle);
  box-shadow: 0 0 12px rgba(0, 201, 177, 0.25);
}

.widget-card-icon {
  font-size: 28px;
  line-height: 1;
}

.widget-card-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

.location-detected-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--teal);
  background: rgba(0, 201, 177, 0.1);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  margin-bottom: 16px;
}

/* Schedule Redesign Styles */
.segmented-control {
  display: flex;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 4px;
  gap: 4px;
}

.segment-btn {
  flex: 1;
  padding: 8px 12px;
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

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

.segment-btn.active {
  background: var(--surface);
  color: var(--teal);
  box-shadow: var(--shadow-sm);
  font-weight: 700;
}

/* ==========================================================================
   Custom Web Dropdowns (Disables macOS native Cocoa popup overlay)
   ========================================================================== */
.custom-dropdown-wrap {
  position: relative;
  width: 100%;
}

.custom-dropdown-trigger {
  width: 100%;
  min-height: 48px;
  height: 48px;
  padding: 0 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  user-select: none;
}

.custom-dropdown-trigger:hover {
  border-color: var(--teal);
}

.custom-dropdown-wrap.open .custom-dropdown-trigger {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(0, 201, 177, 0.15);
}

.custom-dropdown-text {
  font-size: 14.5px;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
}

.custom-dropdown-arrow {
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.custom-dropdown-wrap.open .custom-dropdown-arrow {
  transform: rotate(180deg);
}

.custom-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
  max-height: 220px;
  overflow-y: auto;
  z-index: 99999;
  display: none;
  padding: 6px;
  animation: dropdownFadeIn 0.15s ease;
}

@keyframes dropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.custom-dropdown-wrap.open .custom-dropdown-menu {
  display: block;
}

.custom-dropdown-item {
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-main);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.12s ease, color 0.12s ease;
}

.custom-dropdown-item:hover {
  background: var(--surface-alt);
  color: var(--teal);
}

.custom-dropdown-item.selected {
  background: rgba(0, 201, 177, 0.12);
  color: var(--teal);
  font-weight: 600;
}

/* Compact modifier for card headers and inline toolbars */
.custom-dropdown-wrap.custom-dropdown-compact {
  flex: 1;
  max-width: 190px;
}

.custom-dropdown-wrap.custom-dropdown-compact .custom-dropdown-trigger {
  height: 20px;
  min-height: 20px;
  padding: 0 6px;
  font-size: 11px;
  border-radius: var(--radius-sm);
  background-color: var(--surface);
}

.custom-dropdown-wrap.custom-dropdown-compact .custom-dropdown-text {
  font-size: 11px;
  line-height: 20px;
}

.custom-dropdown-wrap.custom-dropdown-compact .custom-dropdown-menu {
  top: calc(100% + 3px);
  padding: 3px;
  max-height: 150px;
}

.custom-dropdown-wrap.custom-dropdown-compact .custom-dropdown-item {
  padding: 4px 8px;
  font-size: 11px;
}

.time-presets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.time-preset-pill {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.time-preset-pill:hover {
  border-color: var(--teal);
  background: var(--surface-alt);
}

.time-preset-pill.active {
  background: var(--gradient-subtle);
  border-color: var(--teal);
  color: var(--teal);
  font-weight: 700;
}

.day-circle-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.day-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
}

.day-circle:hover {
  border-color: var(--teal);
  color: var(--text-main);
}

.day-circle.active {
  background: var(--gradient);
  border-color: transparent;
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(0, 201, 177, 0.35);
}

.quick-days-row {
  display: flex;
  gap: 8px;
}

.preset-link-btn {
  background: none;
  border: none;
  color: var(--teal);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.preset-link-btn:hover {
  background: rgba(0, 201, 177, 0.1);
}

/* Weekly Schedule Matrix Timeline */
.weekly-matrix-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-sm);
}

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

.matrix-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
}

.matrix-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.matrix-day-col {
  background: var(--surface-alt);
  border-radius: var(--radius-md);
  padding: 12px 8px;
  text-align: center;
  min-height: 90px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border: 1px solid var(--border);
}

.matrix-day-name {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.matrix-day-slot {
  background: var(--gradient);
  color: white;
  border-radius: 6px;
  padding: 4px 6px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 2px 6px rgba(0, 201, 177, 0.25);
}

/* Schedule KPI Row */
.schedule-kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.schedule-kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.schedule-kpi-card:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 201, 177, 0.4);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
}

.schedule-kpi-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.schedule-kpi-val {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.1;
  font-family: 'Inter', sans-serif;
}

.schedule-kpi-lbl {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 3px;
}

/* Today highlight in Matrix */
.matrix-day-col.is-today {
  border-color: var(--teal);
  background: rgba(0, 201, 177, 0.05);
  box-shadow: 0 0 16px rgba(0, 201, 177, 0.15);
  position: relative;
}

.matrix-today-pill {
  font-size: 9px;
  font-weight: 800;
  color: #FFFFFF;
  background: var(--teal);
  padding: 1px 6px;
  border-radius: 10px;
  letter-spacing: 0.05em;
  display: inline-block;
  margin-bottom: 4px;
}

/* Schedule Filter Bar */
.schedule-filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.schedule-search-wrap {
  position: relative;
  flex: 1;
  max-width: 380px;
  min-width: 240px;
}

.schedule-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.schedule-search-input {
  width: 100%;
  height: 40px;
  padding: 0 14px 0 40px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 13.5px;
  font-family: 'Inter', sans-serif;
  transition: var(--transition);
}

.schedule-search-input:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(0, 201, 177, 0.15);
}

.schedule-filter-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.schedule-filter-pill {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.schedule-filter-pill:hover {
  border-color: var(--teal);
  color: var(--text-main);
}

.schedule-filter-pill.active {
  background: var(--teal);
  border-color: var(--teal);
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(0, 201, 177, 0.3);
}

/* Schedule Card V2 */
.schedule-card-v2 {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.schedule-card-v2:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 201, 177, 0.4);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
}

.schedule-card-v2.is-live {
  border-color: rgba(0, 201, 177, 0.5);
  box-shadow: 0 0 16px rgba(0, 201, 177, 0.15);
}

.schedule-card-v2.is-live::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient);
}

/* Card Header: Status & Time Window */
.schedule-card-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.schedule-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  white-space: nowrap;
  flex-shrink: 0;
}

.schedule-status-badge.live {
  background: rgba(0, 201, 177, 0.15);
  color: var(--teal);
  border: 1px solid rgba(0, 201, 177, 0.35);
}

.schedule-status-badge.live .pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 8px var(--teal);
  animation: pulseLive 1.5s infinite;
}

@keyframes pulseLive {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.schedule-status-badge.queued {
  background: rgba(148, 163, 184, 0.12);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.schedule-time-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: monospace;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--teal);
  background: rgba(0, 201, 177, 0.08);
  border: 1px solid rgba(0, 201, 177, 0.22);
  padding: 4px 10px;
  border-radius: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Primary Playlist & Audience Presentation */
.schedule-playlist-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.schedule-playlist-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(168, 85, 247, 0.12);
  color: var(--purple);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.schedule-playlist-details {
  flex: 1;
  min-width: 0;
}

.schedule-playlist-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0 0 4px 0;
}

.schedule-target-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

/* Balanced 7-Day Matrix Row */
.schedule-days-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.schedule-days-header {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  justify-content: space-between;
  align-items: center;
  white-space: nowrap;
}

.schedule-days-grid-bar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.schedule-day-pill {
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  transition: all 0.15s ease;
  user-select: none;
}

.schedule-day-pill.active {
  background: var(--teal);
  color: #FFFFFF;
  box-shadow: 0 2px 6px rgba(0, 201, 177, 0.25);
}

.schedule-day-pill.inactive {
  background: var(--surface-alt);
  color: var(--text-dim);
  border: 1px solid var(--border);
}

/* Card Footer */
.schedule-card-footer {
  border-top: 1px solid var(--border);
  padding-top: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.schedule-footer-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.schedule-btn-delete {
  background: transparent;
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #EF4444;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
  white-space: nowrap;
}

.schedule-btn-delete:hover {
  background: rgba(239, 68, 68, 0.12);
  border-color: #EF4444;
}

/* Multi-Zone Layout Selector Styles */
.layout-selector-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 6px;
  margin-bottom: 12px;
}

.layout-option-card {
  background: var(--surface-alt);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 8px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.layout-option-card:hover {
  border-color: var(--teal);
  transform: translateY(-2px);
}

.layout-option-card.active {
  border-color: var(--teal);
  background: rgba(0, 201, 177, 0.08);
  box-shadow: 0 0 0 1px var(--teal);
}

.layout-icon-box {
  width: 48px;
  height: 30px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--surface);
  position: relative;
  overflow: hidden;
  display: flex;
}

/* Layout Mini Previews */
.layout-preview-fullscreen .zone-mini-main {
  width: 100%;
  height: 100%;
  background: var(--teal);
  opacity: 0.85;
}

.layout-preview-split .zone-mini-left {
  width: 50%;
  height: 100%;
  background: var(--teal);
  opacity: 0.85;
  border-right: 1px solid #fff;
}
.layout-preview-split .zone-mini-right {
  width: 50%;
  height: 100%;
  background: var(--purple);
  opacity: 0.85;
}

.layout-preview-lbar {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: 2fr 1fr;
  width: 100%;
  height: 100%;
  gap: 1px;
}
.layout-preview-lbar .zone-mini-main {
  background: var(--teal);
  opacity: 0.85;
}
.layout-preview-lbar .zone-mini-side {
  background: var(--purple);
  opacity: 0.85;
  grid-row: span 2;
}
.layout-preview-lbar .zone-mini-bottom {
  background: #F59E0B;
  opacity: 0.85;
}

.layout-preview-quad {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  width: 100%;
  height: 100%;
  gap: 1px;
}
.layout-preview-quad div {
  background: var(--teal);
  opacity: 0.7;
}
.layout-preview-quad div:nth-child(2) { background: var(--purple); }
.layout-preview-quad div:nth-child(3) { background: #3B82F6; }
.layout-preview-quad div:nth-child(4) { background: #F59E0B; }

.layout-option-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-main);
}

.zone-picker-box {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.zone-picker-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.zone-tag {
  font-size: 11px;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  color: #fff;
  white-space: nowrap;
  min-width: 90px;
  text-align: center;
}
.zone-tag.tag-main { background: var(--teal); }
.zone-tag.tag-side { background: var(--purple); }
.zone-tag.tag-bottom { background: #F59E0B; }
.zone-tag.tag-quad { background: #3B82F6; }

/* Live Playback Card Preview & Remote Controls */
.live-preview-box {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  background: #0A111E;
  display: flex;
  align-items: center;
  justify-content: center;
}

.live-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.screen-card:hover .live-preview-img {
  transform: scale(1.04);
}

.on-air-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(15, 28, 46, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(0, 201, 177, 0.4);
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 800;
  color: var(--teal);
  display: flex;
  align-items: center;
  gap: 5px;
  letter-spacing: 0.05em;
  z-index: 2;
}

.live-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 8px #10B981;
  animation: pulseDot 1.5s infinite;
  display: inline-block;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.6; }
}

.remote-quick-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-remote-action {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 5px 8px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: var(--transition);
}

.btn-remote-action:hover {
  background: rgba(0, 201, 177, 0.1);
  border-color: var(--teal);
  color: var(--teal);
}

.btn-remote-action.btn-danger-action:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: var(--danger);
  color: var(--danger);
}

/* Video Wall Studio Styles */
.vw-preset-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.vw-preset-btn {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.vw-preset-btn:hover {
  border-color: var(--teal);
  color: var(--text-main);
}

.vw-preset-btn.active {
  background: rgba(0, 201, 177, 0.12);
  border-color: var(--teal);
  color: var(--teal);
  font-weight: 700;
}

.vw-bezel-box {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}

.vw-matrix-grid {
  display: grid;
  gap: 12px;
  background: rgba(15, 28, 46, 0.04);
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px dashed var(--border);
  overflow-x: auto;
  max-width: 100%;
}

.vw-tile-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  min-width: 140px;
  box-sizing: border-box;
  position: relative;
  z-index: 1;
}

.vw-tile-card.is-dropdown-open {
  z-index: 1000 !important;
}

.vw-tile-card:hover {
  border-color: var(--teal);
  box-shadow: 0 4px 12px rgba(0, 201, 177, 0.12);
}

.vw-tile-card.is-assigned {
  border-color: rgba(0, 201, 177, 0.6);
  background: rgba(0, 201, 177, 0.04);
}

.vw-tile-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  overflow: hidden;
}

.vw-tile-coord {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--teal);
  letter-spacing: 0.05em;
  white-space: nowrap;
  flex-shrink: 0;
}

.vw-tile-status-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 10px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  flex-shrink: 0;
}

.vw-tile-status-badge.assigned {
  background: rgba(0, 201, 177, 0.15);
  color: var(--teal);
}

.vw-tile-status-badge.empty {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
}

.vw-tile-select {
  width: 100%;
  height: 32px;
  background-color: var(--surface);
  color: var(--text-main);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px 22px 4px 8px;
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2300C9B1' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 12px;
  transition: var(--transition);
  outline: none;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

.vw-tile-select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 2px rgba(0, 201, 177, 0.2);
}

.vw-tile-select option {
  background: #111B2B;
  color: #F8FAFC;
  padding: 8px;
}

/* Custom Dropdown Architecture for Matrix Tiles */
.vw-tile-dropdown-wrap {
  width: 100% !important;
  max-width: 100% !important;
  position: relative;
}

.vw-tile-dropdown-wrap .custom-dropdown-trigger {
  width: 100%;
  height: 32px;
  min-height: 32px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.vw-tile-dropdown-wrap .custom-dropdown-trigger:hover {
  border-color: var(--teal);
}

.vw-tile-dropdown-wrap.open .custom-dropdown-trigger {
  border-color: var(--teal);
  box-shadow: 0 0 0 2px rgba(0, 201, 177, 0.2);
}

.vw-tile-dropdown-wrap .custom-dropdown-text {
  font-size: 11.5px;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  text-align: left;
}

.vw-tile-dropdown-wrap .custom-dropdown-arrow {
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  color: var(--teal);
  transition: transform 0.2s ease;
}

.vw-tile-dropdown-wrap.open .custom-dropdown-arrow {
  transform: rotate(180deg);
}

.vw-tile-dropdown-wrap .custom-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 180px;
  width: 100%;
  max-width: 260px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  max-height: 180px;
  overflow-y: auto;
  z-index: 99999;
  padding: 4px;
}

.vw-tile-dropdown-wrap.dropup .custom-dropdown-menu {
  top: auto;
  bottom: calc(100% + 4px);
  box-shadow: 0 -12px 30px rgba(0, 0, 0, 0.45);
}

.vw-tile-dropdown-wrap .custom-dropdown-item {
  padding: 7px 10px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-main);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  white-space: nowrap;
  transition: background 0.12s ease, color 0.12s ease;
}

.vw-tile-dropdown-wrap .custom-dropdown-item:hover {
  background: var(--surface-alt);
  color: var(--teal);
}

.vw-tile-dropdown-wrap .custom-dropdown-item.selected {
  background: rgba(0, 201, 177, 0.12);
  color: var(--teal);
  font-weight: 600;
}

.vw-simulation-box {
  background: #0A111E;
  border-radius: var(--radius-md);
  padding: 14px;
  border: 1px solid var(--border-dark);
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vw-simulation-canvas {
  display: grid;
  width: 100%;
  max-width: 560px;
  height: 220px;
  background: #111B2B;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.vw-simulation-cell {
  background: linear-gradient(135deg, rgba(0, 201, 177, 0.3) 0%, rgba(124, 58, 237, 0.3) 100%), #1E293B;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  color: #FFFFFF;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.vw-simulation-cell span.tile-label {
  background: rgba(0, 0, 0, 0.6);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  margin-bottom: 2px;
}

.vw-simulation-cell span.device-label {
  color: var(--teal);
  font-size: 9px;
  max-width: 90%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Video Wall Cards in Dashboard */
.vw-grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 20px;
}

.vw-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: var(--transition);
}

.vw-card:hover {
  border-color: var(--teal);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.vw-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.vw-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.vw-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.vw-matrix-minimap {
  display: grid;
  gap: 4px;
  background: #0A111E;
  padding: 8px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.08);
  max-height: 140px;
}

.vw-minimap-cell {
  background: #1E293B;
  border: 1px solid rgba(0, 201, 177, 0.25);
  border-radius: 3px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: #E2E8F0;
  text-align: center;
  min-height: 48px;
}

.vw-minimap-cell.assigned {
  background: rgba(0, 201, 177, 0.12);
  border-color: var(--teal);
}

.vw-minimap-cell.online {
  border-color: var(--success);
}

.vw-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

/* Enterprise Video Wall Studio Enhancements */
.vw-metrics-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  background: #0A111E;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-dark);
}

.vw-metric-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.vw-metric-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}

.vw-metric-value {
  font-size: 14px;
  font-weight: 800;
  color: #FFFFFF;
}

.vw-bezel-presets-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.vw-bezel-preset-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.vw-bezel-preset-btn:hover {
  border-color: var(--teal);
}

.vw-bezel-preset-btn.active {
  background: rgba(0, 201, 177, 0.12);
  border-color: var(--teal);
  color: var(--teal);
  font-weight: 700;
}

.vw-preview-mode-tabs {
  display: flex;
  gap: 6px;
}

.vw-tab-btn {
  background: #111B2B;
  border: 1px solid var(--border-dark);
  color: var(--text-dim);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.vw-tab-btn:hover {
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.2);
}

.vw-tab-btn.active {
  background: rgba(0, 201, 177, 0.15);
  border-color: var(--teal);
  color: var(--teal);
}

.vw-simulation-cell.alignment-mode {
  background:
    linear-gradient(to top right, transparent calc(50% - 1px), rgba(0, 201, 177, 0.8) 50%, transparent calc(50% + 1px)),
    linear-gradient(to bottom right, transparent calc(50% - 1px), rgba(0, 201, 177, 0.8) 50%, transparent calc(50% + 1px)),
    radial-gradient(circle at center, transparent 40%, rgba(0, 201, 177, 0.15) 40%, rgba(0, 201, 177, 0.15) 41%, transparent 41%),
    #0E1726;
}

.vw-btn-pill-action {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-light);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: var(--transition);
}

.vw-btn-pill-action:hover {
  background: rgba(0, 201, 177, 0.15);
  border-color: var(--teal);
  color: var(--teal);
}

/* ==========================================================================
   Add Content to Library Redesign
   ========================================================================== */
.content-tab-group {
  display: flex;
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  margin-bottom: 6px;
}

.content-tab-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.content-tab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.04);
}

.content-tab-btn.active {
  background: rgba(13, 148, 136, 0.14);
  color: var(--teal);
  border-color: rgba(13, 148, 136, 0.4);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.content-dropzone {
  border: 2px dashed rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.content-dropzone:hover {
  border-color: var(--teal);
  background: rgba(13, 148, 136, 0.05);
  transform: translateY(-1px);
}

.content-dropzone.dragover {
  border-color: var(--teal);
  background: rgba(13, 148, 136, 0.12);
  box-shadow: 0 0 18px rgba(13, 148, 136, 0.25);
  transform: scale(1.01);
}

.dropzone-icon-circle {
  width: 52px;
  height: 52px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: rgba(13, 148, 136, 0.12);
  color: var(--teal);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(13, 148, 136, 0.25);
  transition: transform 0.2s ease;
}

.content-dropzone:hover .dropzone-icon-circle {
  transform: scale(1.08);
}

.dropzone-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 5px;
}

.dropzone-browse-text {
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.dropzone-subtitle {
  font-size: 12px;
  color: var(--text-muted);
}

.dropzone-file-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  text-align: left;
}

.file-card-preview {
  width: 46px;
  height: 46px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  color: var(--teal);
  border: 1px solid var(--border);
}

.file-card-preview img,
.file-card-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.file-card-info {
  flex: 1;
  min-width: 0;
}

.file-card-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-card-meta {
  font-size: 11px;
  color: var(--teal);
  margin-top: 2px;
  font-weight: 500;
}

.upload-progress-container {
  margin-top: 14px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}

.upload-progress-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
}

.upload-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--teal), #06b6d4);
  border-radius: 4px;
  transition: width 0.15s ease;
}

/* ==========================================================================
   Paired Screen Card Redesign & Remote Controls
   ========================================================================== */
.screen-card-top {
  padding: 10px 10px 0;
  background: transparent;
}

.screen-card-preview {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  background: #090e17;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.6);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.screen-card:hover .screen-card-preview {
  border-color: rgba(13, 148, 136, 0.4);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 12px rgba(13, 148, 136, 0.2);
}

.screen-tv-bezel {
  height: 138px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.screen-preview-badges {
  position: absolute;
  bottom: 8px;
  left: 10px;
  z-index: 2;
  display: flex;
  gap: 6px;
}

.screen-spec-chip {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 2px 7px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  color: rgba(255, 255, 255, 0.85);
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.screen-idle-display {
  text-align: center;
  color: rgba(255, 255, 255, 0.35);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.screen-code-pill {
  font-family: 'SF Mono', Monaco, Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  background: rgba(0, 201, 177, 0.12);
  border: 1px solid rgba(0, 201, 177, 0.3);
  color: var(--teal);
  border-radius: var(--radius-sm);
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

.screen-playlist-select-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 2px 8px;
  margin-bottom: 6px;
  transition: border-color 0.15s ease;
}

.screen-playlist-select-box:focus-within {
  border-color: var(--teal);
  box-shadow: 0 0 0 1px var(--teal);
}

.screen-playlist-select {
  flex: 1;
  max-width: 190px;
  height: 28px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 500;
  border-color: var(--border);
  background-color: var(--surface);
  cursor: pointer;
  border-radius: var(--radius-sm);
}

.screen-meta-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

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

.screen-meta-item .meta-label {
  color: var(--text-muted);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.screen-meta-item .meta-value {
  font-weight: 600;
  color: var(--text-main);
}

.screen-action-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  background: var(--surface-alt);
  border-top: 1px solid var(--border);
}

.screen-remote-btns {
  display: flex;
  align-items: center;
  gap: 5px;
}

.btn-remote-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.btn-remote-icon:hover {
  background: rgba(0, 201, 177, 0.12);
  border-color: var(--teal);
  color: var(--teal);
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 201, 177, 0.25);
}

.btn-remote-icon:active {
  transform: scale(0.95);
}

/* ==========================================================================
   Content Library Redesign & Media Viewer
   ========================================================================== */
.content-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.content-filter-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.content-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.content-filter-pill:hover {
  color: var(--text-main);
  border-color: rgba(0, 201, 177, 0.4);
  background: var(--surface-alt);
}

.content-filter-pill.active {
  background: var(--teal);
  border-color: var(--teal);
  color: white;
  box-shadow: 0 2px 8px rgba(0, 201, 177, 0.3);
}

.content-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 6px 14px;
  color: var(--text-muted);
  transition: border-color 0.15s ease;
}

.content-search-box:focus-within {
  border-color: var(--teal);
  box-shadow: 0 0 0 1px var(--teal);
}

.content-search-box input {
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 13px;
  outline: none;
  width: 190px;
}

.content-media-card {
  position: relative;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.content-media-card:hover {
  transform: translateY(-3px);
  border-color: rgba(0, 201, 177, 0.5);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08), 0 0 12px rgba(0, 201, 177, 0.15);
}

.content-card-preview {
  height: 170px;
  position: relative;
  background: #090e17;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.content-card-preview img,
.content-card-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.content-media-card:hover .content-card-preview img,
.content-media-card:hover .content-card-preview video {
  transform: scale(1.04);
}

.content-card-badge-top {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
  z-index: 2;
}

.content-type-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  backdrop-filter: blur(6px);
  color: white;
}

.content-type-chip.image {
  background: rgba(37, 99, 235, 0.88);
}

.content-type-chip.video {
  background: rgba(219, 39, 119, 0.88);
}

.content-type-chip.web {
  background: rgba(13, 148, 136, 0.88);
}

.content-duration-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.content-filesize-chip {
  font-family: 'SF Mono', Monaco, Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 600;
  color: var(--teal);
  background: rgba(0, 201, 177, 0.1);
  border: 1px solid rgba(0, 201, 177, 0.25);
  padding: 2px 7px;
  border-radius: 4px;
}

.video-play-badge {
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: transform 0.2s ease, background 0.2s ease;
  z-index: 2;
}

.content-media-card:hover .video-play-badge {
  transform: scale(1.1);
  background: var(--teal);
}

.content-card-hover-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 3;
}

.content-card-preview:hover .content-card-hover-overlay {
  opacity: 1;
}

.content-view-btn-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  background: rgba(13, 148, 136, 0.92);
  color: white;
  font-size: 12px;
  font-weight: 700;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  transform: translateY(4px);
  transition: transform 0.2s ease;
}

.content-card-preview:hover .content-view-btn-pill {
  transform: translateY(0);
}

/* ==========================================================================
   Screen Settings Redesign & Screens View Styles (Light Theme Consistent)
   ========================================================================== */
.settings-section-card {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: border-color 0.2s ease;
}

.settings-section-card:hover {
  border-color: rgba(0, 201, 177, 0.35);
}

.settings-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.day-chip {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  user-select: none;
  cursor: pointer;
  padding: 0;
  transition: all 0.15s ease;
}

.day-chip:hover {
  border-color: var(--teal);
  color: var(--text-main);
  transform: translateY(-1px);
}

.day-chip.active {
  background: var(--teal);
  border-color: var(--teal);
  color: white;
  box-shadow: 0 1px 4px rgba(0, 201, 177, 0.35);
}

.modal-remote-toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.modal-remote-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.15s ease;
}

.modal-remote-btn:hover {
  background: rgba(0, 201, 177, 0.12);
  border-color: var(--teal);
  color: var(--teal);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 201, 177, 0.2);
}

.modal-remote-btn:active {
  transform: scale(0.97);
}

/* Screens & Displays View Filter Toolbar */
.screens-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.screens-search-box {
  position: relative;
  flex: 1;
  max-width: 340px;
}

.screens-search-box input {
  padding-left: 36px;
  height: 38px;
  font-size: 13px;
  border-radius: var(--radius-full);
}

.screens-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.screens-filter-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.screen-filter-pill {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.screen-filter-pill:hover {
  color: var(--text-main);
  background: var(--surface-alt);
  border-color: rgba(0, 201, 177, 0.4);
}

.screen-filter-pill.active {
  background: var(--teal);
  border-color: var(--teal);
  color: white;
  box-shadow: 0 2px 8px rgba(0, 201, 177, 0.3);
}

/* ==========================================================================
   Toast Notifications (Modern non-blocking alerts)
   ========================================================================== */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast-item {
  min-width: 260px;
  max-width: 400px;
  padding: 12px 18px;
  background: #0F172A;
  color: #F8FAFC;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.25), 0 4px 6px -2px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 10px;
  border-left: 4px solid var(--teal);
  pointer-events: auto;
  animation: toastSlideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast-item.toast-error {
  border-left-color: var(--danger);
}

.toast-item.toast-success {
  border-left-color: var(--success);
}

@keyframes toastSlideIn {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ==========================================================================
   Responsive Viewport & Screen Fitting for Chrome & Safari
   ========================================================================== */
@media (max-width: 1200px) {
  .sidebar {
    width: 240px;
  }
  .page-container {
    padding: 24px 20px;
  }
  .card-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 18px;
  }
}

@media (max-width: 900px) {
  .sidebar {
    width: 210px;
  }
  .top-header {
    padding: 0 18px;
    height: 60px;
  }
  .page-title {
    font-size: 18px;
  }
  .page-container {
    padding: 18px 14px;
  }
  .card-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
  }
  .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
  }
}

/* Mobile Menu Button & Drawer Backdrop */
.btn-mobile-menu {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-main);
  padding: 6px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
  transition: var(--transition);
}

.btn-mobile-menu:hover {
  background: var(--surface-alt);
  color: var(--teal);
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(5, 11, 20, 0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9998;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.sidebar-backdrop.active {
  display: block;
  opacity: 1;
}

/* Plan Activation & Payment View */
.plan-activation-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 16px;
  width: 100%;
  box-sizing: border-box;
}
.plan-activation-header {
  text-align: center;
  margin-bottom: 36px;
}
.plan-activation-title {
  font-size: 32px;
  font-weight: 900;
  color: var(--text-main);
  margin: 0 0 10px 0;
  letter-spacing: -0.02em;
}
.plan-activation-desc {
  font-size: 15px;
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto;
  line-height: 1.5;
}
.plan-activation-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 32px;
}
.plan-activation-card {
  border-radius: var(--radius-md);
  padding: 28px;
  display: flex;
  flex-direction: column;
  position: relative;
  box-sizing: border-box;
}
.plan-activation-card.business-card {
  border: 2px solid #818CF8;
  background: rgba(129, 140, 248, 0.04);
  box-shadow: 0 12px 36px rgba(129, 140, 248, 0.15);
}
.plan-activation-card.starter-card {
  border: 1.5px solid var(--border);
  background: var(--surface);
}
.plan-activation-badge {
  position: absolute;
  top: -13px;
  right: 24px;
  font-size: 11px;
  font-weight: 800;
  background: linear-gradient(135deg, #00C9B1 0%, #7C3AED 100%);
  color: #fff;
  padding: 4px 12px;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 14px rgba(0, 201, 177, 0.4);
}
.plan-activation-trust {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 32px;
  padding: 18px 24px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 13px;
  flex-wrap: wrap;
}
.plan-trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Mobile Web App Layout (Phone & Tablet) */
@media (max-width: 768px) {
  .btn-mobile-menu {
    display: inline-flex;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    max-width: 85vw;
    height: 100%;
    height: 100dvh;
    z-index: 9999;
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: none;
    border-right: 1px solid var(--border);
    background: #0B1320;
    display: flex;
    flex-direction: column;
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: max(16px, env(safe-area-inset-bottom));
  }

  .sidebar.mobile-open {
    transform: translateX(0);
    box-shadow: 8px 0 36px rgba(0, 0, 0, 0.6);
  }

  .sidebar-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-dark);
  }

  .brand-logo-img {
    height: 38px;
  }

  .sidebar-nav {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 12px 14px;
    gap: 4px;
    flex: 1;
  }

  .nav-section-title {
    display: block;
    margin-top: 10px;
    font-size: 11px;
    font-weight: 700;
  }

  .sidebar-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-top: 1px solid var(--border);
    margin-top: auto;
    background: #090F1A;
  }

  .main-wrapper {
    width: 100%;
    min-width: 0;
  }

  .top-header {
    min-height: calc(56px + env(safe-area-inset-top, 0px));
    height: auto;
    padding: env(safe-area-inset-top, 0px) 14px 8px 14px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    background-color: var(--surface);
    position: relative;
    z-index: 50;
  }

  .top-header .header-left {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    min-width: 0;
    height: 44px;
  }

  .btn-mobile-menu {
    display: inline-flex !important;
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    margin-right: 8px;
  }

  .page-title {
    font-size: 17px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
  }

  .header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-left: auto;
    gap: 6px;
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
  }

  .header-actions::-webkit-scrollbar {
    display: none;
  }

  .analytics-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
  }

  .analytics-header-actions .btn {
    padding: 6px 10px !important;
    font-size: 12px !important;
    white-space: nowrap;
    flex-shrink: 0;
    height: 32px;
  }

  .analytics-header-actions .telemetry-status-pill {
    padding: 4px 8px;
    font-size: 11px;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .page-container {
    padding: 14px 12px;
    padding-bottom: max(24px, env(safe-area-inset-bottom));
  }

  .card-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .modal-overlay {
    padding: 10px;
    align-items: flex-end;
  }

  .modal-content {
    max-width: 100% !important;
    width: 100% !important;
    max-height: 90vh;
    max-height: 90dvh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    margin: 0;
  }

  .modal-header {
    padding: 14px 16px;
  }

  .modal-body {
    padding: 16px 14px;
    gap: 14px;
  }

  .modal-footer {
    padding: 12px 14px;
    gap: 8px;
  }

  /* Schedule Modal Mobile Optimizations */
  .schedule-time-range {
    display: grid !important;
    grid-template-columns: 1fr auto 1fr !important;
    gap: 8px !important;
    padding: 8px 10px !important;
    align-items: center !important;
    box-sizing: border-box !important;
  }

  .schedule-time-arrow {
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: var(--text-dim);
    margin-top: 16px;
    flex-shrink: 0;
  }

  .schedule-time-col {
    display: flex;
    flex-direction: column;
    min-width: 0 !important;
    width: 100% !important;
  }

  .schedule-time-range input[type="time"] {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 35px !important;
    padding: 4px 6px !important;
    font-size: 12.5px !important;
    text-align: center;
    box-sizing: border-box !important;
    margin-top: 4px;
    border-radius: var(--radius-sm);
  }

  .segment-btn {
    padding: 6px 6px;
    font-size: 11.5px;
    gap: 4px;
  }

  .quick-days-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
  }

  .preset-link-btn {
    font-size: 11px;
    white-space: nowrap;
  }

  .day-circle-row {
    justify-content: space-between;
    gap: 4px;
  }

  .day-circle {
    width: 34px;
    height: 34px;
    font-size: 12px;
    flex-shrink: 0;
  }

  .vw-studio-layout {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .btn, .form-input, .form-select, .nav-item {
    min-height: 40px;
  }

  /* Mobile-Only Plan Activation & Payment View */
  .plan-activation-container {
    padding: 16px 12px;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
  }
  .plan-activation-header {
    margin-bottom: 20px;
    text-align: center;
  }
  .plan-activation-title {
    font-size: 22px;
    line-height: 1.25;
    margin-bottom: 8px;
  }
  .plan-activation-desc {
    font-size: 13.5px;
    line-height: 1.5;
    padding: 0 4px;
  }
  .plan-activation-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 20px;
  }
  .plan-activation-card {
    padding: 22px 18px;
    border-radius: 16px;
    width: 100%;
    box-sizing: border-box;
  }
  .plan-activation-badge {
    top: -11px;
    right: 14px;
    font-size: 10px;
    padding: 3px 10px;
  }
  .plan-activation-btn {
    height: 48px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 800;
  }
  .plan-activation-trust {
    flex-direction: column;
    gap: 10px;
    padding: 14px 16px;
    align-items: flex-start;
    border-radius: 12px;
  }
  .plan-trust-item {
    font-size: 12.5px;
    gap: 10px;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .header-actions .btn {
    padding: 6px 10px;
    font-size: 12px;
  }
}

/* ==========================================================================
   Modern Confirmation Dialog Modal
   ========================================================================== */
.confirm-dialog-content {
  max-width: 420px !important;
  width: 90%;
  border-radius: var(--radius-lg);
  padding: 0;
  overflow: hidden;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.05);
  animation: confirmScaleIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  background: var(--surface);
  border: 1px solid var(--border);
}

@keyframes confirmScaleIn {
  from {
    transform: scale(0.94);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.confirm-dialog-body {
  padding: 28px 24px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.confirm-dialog-icon-wrap {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--danger);
}

.confirm-dialog-icon-wrap.info-variant {
  background: rgba(0, 201, 177, 0.12);
  border-color: rgba(0, 201, 177, 0.25);
  color: var(--teal);
}

.confirm-dialog-title {
  font-family: 'Inter', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
  line-height: 1.3;
}

.confirm-dialog-desc {
  font-family: 'Inter', sans-serif;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-muted);
  margin: 0;
  max-width: 360px;
}

.confirm-dialog-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 24px;
  background: var(--surface-alt);
  border-top: 1px solid var(--border);
}

/* ==========================================================================
   Playlist Cards & Overview Redesign
   ========================================================================== */
.playlist-modern-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.playlist-modern-card:hover {
  transform: translateY(-3px);
  border-color: rgba(0, 201, 177, 0.5);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08), 0 0 12px rgba(0, 201, 177, 0.15);
}

.playlist-card-preview {
  height: 140px;
  position: relative;
  background: linear-gradient(135deg, #090e17 0%, #151e2e 100%);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.playlist-preview-glow {
  position: absolute;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(0, 201, 177, 0.2) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.playlist-preview-center {
  position: relative;
  z-index: 2;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.playlist-icon-halo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0, 201, 177, 0.12);
  border: 1px solid rgba(0, 201, 177, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 12px rgba(0, 201, 177, 0.2);
}

.playlist-preview-badge {
  font-size: 11px;
  font-weight: 700;
  color: white;
  letter-spacing: 0.03em;
}

.playlist-card-top-chips {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 2;
  pointer-events: none;
}

.playlist-duration-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.playlist-loop-pill {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.playlist-loop-pill.loop-active {
  background: rgba(0, 201, 177, 0.15);
  color: var(--teal);
  border-color: rgba(0, 201, 177, 0.3);
}

.playlist-meta-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 12px;
}

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

.playlist-meta-item .meta-label {
  color: var(--text-muted);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.playlist-trans-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  color: var(--teal);
  background: rgba(0, 201, 177, 0.1);
  border: 1px solid rgba(0, 201, 177, 0.25);
  padding: 2px 8px;
  border-radius: 4px;
}

/* ==========================================================================
   Analytics & Proof of Play Redesign
   ========================================================================== */
.analytics-view-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.analytics-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.telemetry-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-full);
  color: #10B981;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.telemetry-pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: telemetryPulse 2s infinite;
}

@keyframes telemetryPulse {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { box-shadow: 0 0 0 7px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.analytics-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

@media (max-width: 1024px) {
  .analytics-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .analytics-kpi-grid {
    grid-template-columns: 1fr;
  }
}

.analytics-kpi-card {
  position: relative;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025) 0%, rgba(255, 255, 255, 0.008) 100%), var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 15px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  overflow: hidden;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.analytics-kpi-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 24px -6px rgba(0, 0, 0, 0.35);
}

.analytics-kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--kpi-glow, var(--teal)), transparent);
  opacity: 0.6;
}

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

.analytics-kpi-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.analytics-kpi-icon-wrap {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.analytics-kpi-icon-wrap svg {
  width: 14px;
  height: 14px;
}

.analytics-kpi-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.analytics-kpi-val {
  font-size: 21px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.analytics-kpi-sub {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Two Column Split */
.analytics-split-grid {
  display: grid;
  grid-template-columns: 1.5fr 1.1fr;
  gap: 14px;
}

@media (max-width: 960px) {
  .analytics-split-grid {
    grid-template-columns: 1fr;
  }
}

.analytics-panel-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.analytics-panel-header {
  padding: 10px 15px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: rgba(255, 255, 255, 0.015);
}

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

.analytics-panel-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--teal);
  flex-shrink: 0;
}

.analytics-panel-icon svg {
  width: 14px;
  height: 14px;
}

.analytics-panel-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
}

.analytics-panel-subtitle {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}

.analytics-panel-body {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Leaderboard List */
.leaderboard-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 10px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: all 0.15s ease;
}

.leaderboard-item:hover {
  border-color: rgba(0, 201, 177, 0.35);
  background: rgba(255, 255, 255, 0.03);
}

.leaderboard-rank {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 10.5px;
  flex-shrink: 0;
}

.leaderboard-rank.rank-1 {
  background: rgba(245, 158, 11, 0.16);
  color: #F59E0B;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.leaderboard-rank.rank-2 {
  background: rgba(148, 163, 184, 0.16);
  color: #CBD5E1;
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.leaderboard-rank.rank-3 {
  background: rgba(217, 119, 6, 0.16);
  color: #D97706;
  border: 1px solid rgba(217, 119, 6, 0.35);
}

.leaderboard-rank.rank-other {
  background: var(--surface);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.leaderboard-media-thumb {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid var(--border);
  flex-shrink: 0;
  background: var(--surface);
}

.leaderboard-media-placeholder {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  flex-shrink: 0;
}

.leaderboard-media-placeholder svg {
  width: 14px;
  height: 14px;
}

.leaderboard-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.leaderboard-title-line {
  display: flex;
  align-items: center;
  gap: 6px;
}

.leaderboard-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.leaderboard-type-tag {
  font-size: 8.5px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 3px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.leaderboard-bar-track {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  overflow: hidden;
}

.leaderboard-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--teal), #3B82F6);
  border-radius: 2px;
  transition: width 0.4s ease;
}

.leaderboard-metrics {
  text-align: right;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
}

.leaderboard-plays {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-main);
}

.leaderboard-airtime {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--teal);
}

/* Screen Activity Cards */
.screen-stat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: all 0.15s ease;
}

.screen-stat-item:hover {
  border-color: rgba(0, 201, 177, 0.35);
}

.screen-stat-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.screen-stat-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.screen-stat-dot.online {
  background: #10B981;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.6);
}

.screen-stat-dot.offline {
  background: #64748B;
  box-shadow: none;
}

.screen-stat-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
}

.screen-code-badge {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 10px;
  font-weight: 600;
  color: var(--teal);
  background: rgba(0, 201, 177, 0.08);
  padding: 1px 5px;
  border-radius: 3px;
  border: 1px solid rgba(0, 201, 177, 0.2);
  display: inline-block;
}

/* Proof of Play Audit Section */
.audit-search-wrapper {
  position: relative;
  min-width: 220px;
}

.audit-search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.audit-search-input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 5px 10px 5px 30px;
  color: var(--text-main);
  font-size: 11.5px;
  outline: none;
  transition: all 0.15s ease;
}

.audit-search-input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 2px rgba(0, 201, 177, 0.2);
}

.audit-table-wrapper {
  overflow-x: auto;
}

.audit-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.audit-table thead th {
  padding: 9px 14px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.015);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.audit-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.12s ease;
}

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

.audit-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.audit-table td {
  padding: 8px 14px;
  vertical-align: middle;
}

.audit-timestamp-badge {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 10.5px;
  color: var(--text-muted);
  background: var(--surface-alt);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border);
  white-space: nowrap;
}

.audit-screen-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
}

.audit-screen-chip svg {
  color: var(--teal);
}

.audit-asset-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.audit-thumb {
  width: 28px;
  height: 28px;
  border-radius: 5px;
  object-fit: cover;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  flex-shrink: 0;
}

.audit-thumb-placeholder {
  width: 28px;
  height: 28px;
  border-radius: 5px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  flex-shrink: 0;
}

.audit-thumb-placeholder svg {
  width: 14px;
  height: 14px;
}

.audit-asset-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
}

.audit-type-pill {
  display: inline-block;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid;
}

.audit-duration-pill {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
  color: var(--teal);
  background: rgba(0, 201, 177, 0.08);
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid rgba(0, 201, 177, 0.2);
}

.audit-playlist-tag {
  font-size: 12px;
  color: var(--text-muted);
}

/* ==========================================================================
   Display Groups Redesign
   ========================================================================== */
.groups-view-container {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.groups-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

@media (max-width: 1024px) {
  .groups-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .groups-kpi-grid {
    grid-template-columns: 1fr;
  }
}

.group-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 18px;
}

.group-card-modern {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--grp-color, var(--teal));
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.group-card-modern:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 10px 24px -6px rgba(0, 0, 0, 0.4);
}

.group-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.group-card-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.group-color-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--grp-color, var(--teal));
  box-shadow: 0 0 8px var(--grp-color, var(--teal));
  flex-shrink: 0;
}

.group-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
}

.group-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.group-action-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.group-action-btn:hover {
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
}

.group-action-btn.delete:hover {
  color: #EF4444;
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.1);
}

.group-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
  margin: 0;
  min-height: 18px;
}

.group-screens-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}

.group-screens-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.group-screens-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 80px;
  overflow-y: auto;
}

.group-screen-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-main);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 3px 8px;
  border-radius: 4px;
}

.group-screen-chip svg {
  color: var(--grp-color, var(--teal));
}

.group-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.group-color-picker {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 4px;
}

.color-swatch-item {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  border: 2px solid transparent;
}

.color-swatch-item:hover {
  transform: scale(1.08);
}

.color-swatch-item.active {
  transform: scale(1.15);
  border-color: #FFFFFF;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.35);
}

/* ==========================================================================
   Video Wall Studio Redesign
   ========================================================================== */
.vw-view-container {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.vw-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 20px;
}

.vw-card-modern {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  position: relative;
}

.vw-card-modern:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 201, 177, 0.35);
  box-shadow: 0 10px 28px -6px rgba(0, 0, 0, 0.45);
}

.vw-card-modern::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--teal), transparent);
  opacity: 0.6;
}

.vw-card-header-group {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.vw-card-title-line {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.vw-card-title-modern {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
}

.vw-card-badge-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.vw-matrix-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  color: var(--teal);
  background: rgba(0, 201, 177, 0.08);
  border: 1px solid rgba(0, 201, 177, 0.25);
  padding: 2px 8px;
  border-radius: 4px;
}

.vw-bezel-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  color: var(--purple);
  background: rgba(124, 58, 237, 0.08);
  border: 1px solid rgba(124, 58, 237, 0.25);
  padding: 2px 8px;
  border-radius: 4px;
}

.vw-playlist-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
}

.vw-playlist-strip svg {
  color: var(--teal);
  flex-shrink: 0;
}

.vw-matrix-stage-preview {
  background: #000;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 6px;
  display: grid;
  gap: 4px;
  min-height: 120px;
}

.vw-matrix-stage-tile {
  background: #0F172A;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  text-align: center;
  min-height: 52px;
  position: relative;
  transition: all 0.15s ease;
}

.vw-matrix-stage-tile.online {
  border-color: rgba(16, 185, 129, 0.5);
  background: rgba(16, 185, 129, 0.05);
}

.vw-matrix-stage-tile.unassigned {
  border-style: dashed;
  opacity: 0.5;
}

.vw-stage-tile-coord {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 9px;
  font-weight: 700;
  color: var(--text-muted);
}

.vw-stage-tile-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 90%;
}

.vw-card-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.vw-action-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.15s ease;
}

.vw-action-pill:hover {
  border-color: rgba(0, 201, 177, 0.4);
  background: rgba(0, 201, 177, 0.06);
  color: var(--teal);
}

.vw-action-pill.danger:hover {
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.08);
  color: #EF4444;
}

/* Video Wall Studio Modal Redesign */
.vw-studio-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 20px;
}

@media (max-width: 900px) {
  .vw-studio-layout {
    grid-template-columns: 1fr;
  }
}

.vw-studio-col {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.vw-studio-section {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.vw-studio-section-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.vw-studio-section-title svg {
  color: var(--teal);
}

.vw-preset-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.vw-preset-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  color: var(--text-main);
  text-align: center;
}

.vw-preset-tile:hover {
  border-color: rgba(0, 201, 177, 0.4);
  background: rgba(0, 201, 177, 0.04);
}

.vw-preset-tile.active {
  border-color: var(--teal);
  background: rgba(0, 201, 177, 0.1);
  box-shadow: 0 0 0 1px var(--teal);
}

.vw-preset-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--teal);
}

.vw-preset-name {
  font-size: 11px;
  font-weight: 700;
}

.vw-preset-desc {
  font-size: 10px;
  color: var(--text-muted);
}

/* ==========================================================================
   Profile & Account Settings — Mobile Friendly & Responsive Layout
   ========================================================================== */

.profile-view-wrap {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.profile-hero-card {
  background: linear-gradient(135deg, rgba(15, 28, 46, 0.95) 0%, rgba(11, 19, 32, 0.98) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 26px 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.profile-hero-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.profile-hero-user {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.profile-avatar-box {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: linear-gradient(135deg, #00C9B1 0%, #7C3AED 100%);
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 201, 177, 0.35);
  flex-shrink: 0;
  letter-spacing: 0.04em;
}

.profile-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.profile-plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 22px;
  margin-bottom: 22px;
}

.profile-forms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 24px;
}

.profile-card-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px 28px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.profile-videowall-card {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.08) 0%, rgba(217, 119, 6, 0.05) 100%);
  border: 1.5px solid rgba(124, 58, 237, 0.28);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.profile-videowall-info {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.profile-videowall-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.profile-capacity-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
  padding-top: 12px;
  border-top: 1px dashed rgba(129, 140, 248, 0.2);
}

.profile-capacity-row {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.profile-capacity-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.profile-btn-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 8px;
  min-height: 42px;
  transition: all 0.2s ease;
}

/* Mobile Friendly Overrides for Profile & Settings */
@media (max-width: 768px) {
  .profile-view-wrap {
    gap: 16px;
    padding: 0 2px;
  }

  .profile-hero-card {
    padding: 18px 16px;
    border-radius: var(--radius-md);
    gap: 16px;
  }

  .profile-hero-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .profile-hero-user {
    gap: 12px;
    width: 100%;
  }

  .profile-avatar-box {
    width: 52px;
    height: 52px;
    font-size: 19px;
    border-radius: 13px;
  }

  #profile-page-display-name {
    font-size: 19px !important;
  }

  .profile-hero-header .btn {
    width: 100%;
    justify-content: center;
    min-height: 42px;
  }

  /* 2x2 grid on mobile for compact KPI metrics */
  .profile-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding-top: 14px;
  }

  .profile-kpi-grid > div {
    padding: 10px 12px !important;
  }

  .profile-kpi-grid > div > div:first-child {
    font-size: 10px !important;
  }

  .profile-kpi-grid > div > div:last-child {
    font-size: 13.5px !important;
  }

  .profile-card-panel {
    padding: 18px 16px;
    border-radius: var(--radius-md);
  }

  /* Stack plan cards to 1 column so they never side-scroll */
  .profile-plans-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 16px;
  }

  .profile-plans-grid > div {
    padding: 18px 16px !important;
  }

  .profile-plans-grid .btn {
    min-height: 44px;
    font-size: 14px !important;
  }

  /* Video Wall card stacks cleanly */
  .profile-videowall-card {
    padding: 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .profile-videowall-info {
    align-items: flex-start;
    gap: 12px;
  }

  .profile-videowall-actions {
    justify-content: space-between;
    width: 100%;
    padding-top: 10px;
    border-top: 1px solid rgba(124, 58, 237, 0.2);
  }

  .profile-videowall-actions .btn {
    min-height: 40px;
    padding: 8px 16px !important;
  }

  /* Capacity add-ons stack to 1 column */
  .profile-capacity-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .profile-capacity-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 14px;
  }

  .profile-capacity-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .profile-capacity-actions .btn {
    min-height: 38px;
    flex: 1;
    justify-content: center;
  }

  /* 2-Column form grid stacks to single column with zero overflow */
  .profile-forms-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .profile-btn-submit {
    width: 100%;
    min-height: 44px;
    font-size: 14px;
  }

  /* Prevent Safari input auto-zoom by ensuring 16px text on mobile */
  .profile-forms-grid .form-input,
  #modal-account-settings .form-input {
    font-size: 16px !important;
    min-height: 44px;
  }

  /* Modal responsiveness */
  #modal-account-settings .modal-content {
    max-width: calc(100vw - 20px) !important;
    margin: 10px auto !important;
    max-height: 90vh !important;
  }

  #modal-account-settings .modal-body {
    padding: 16px 14px !important;
    gap: 14px !important;
  }

  #modal-account-settings .modal-header,
  #modal-account-settings .modal-footer {
    padding: 14px 16px !important;
  }

  #modal-account-settings .btn {
    min-height: 42px;
  }
}

@media (max-width: 480px) {
  .profile-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .profile-videowall-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .profile-videowall-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ==========================================================================
   Desktop Version Typography & Component Refinement (Customer Dashboard & Super Admin)
   ========================================================================== */
@media (min-width: 769px) {
  #app-container,
  #admin-app-container {
    font-size: 13px;
  }

  /* Page Body Container (Across All Tabs) */
  #app-container .page-container,
  #admin-app-container .page-container,
  #admin-app-container .admin-page-container {
    padding: 20px 24px;
  }

  /* Stats Row & Metric Cards Across All Tabs */
  #app-container .stats-grid,
  #admin-app-container .stats-grid {
    gap: 14px;
    margin-bottom: 20px;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }

  #app-container .stat-card,
  #admin-app-container .stat-card {
    padding: 13px 16px;
    gap: 12px;
    border-radius: var(--radius-md);
  }

  #admin-app-container .admin-stat-card {
    padding: 10px 14px;
    gap: 4px;
    border-radius: 8px;
  }

  #app-container .stat-icon,
  #admin-app-container .stat-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
  }

  #app-container .stat-icon svg,
  #admin-app-container .stat-icon svg {
    width: 20px;
    height: 20px;
  }

  #app-container .stat-value,
  #admin-app-container .stat-value {
    font-size: 20px;
  }

  #admin-app-container .admin-stat-value {
    font-size: 18px;
  }

  #app-container .stat-label,
  #admin-app-container .stat-label {
    font-size: 11.5px;
  }

  #admin-app-container .admin-stat-label {
    font-size: 10px;
  }

  /* Sidebar Navigation */
  #app-container .sidebar,
  #admin-app-container .sidebar {
    width: 250px;
  }

  #app-container .sidebar .sidebar-header,
  #admin-app-container .sidebar .sidebar-header {
    padding: 18px 16px;
  }

  #app-container .brand-logo-img,
  #admin-app-container .brand-logo-img {
    height: 48px;
  }

  #app-container .sidebar .sidebar-nav,
  #admin-app-container .sidebar .sidebar-nav {
    padding: 14px 10px;
    gap: 4px;
  }

  #app-container .sidebar .nav-item,
  #admin-app-container .sidebar .nav-item {
    font-size: 13px;
    padding: 7px 11px;
    gap: 9px;
    border-radius: var(--radius-sm);
  }

  #app-container .sidebar .nav-item svg,
  #admin-app-container .sidebar .nav-item svg {
    width: 16px;
    height: 16px;
  }

  #app-container .sidebar .nav-section-title,
  #admin-app-container .sidebar .nav-section-title {
    font-size: 10px;
    padding: 10px 11px 3px 11px;
  }

  #app-container .sidebar-footer,
  #admin-app-container .sidebar-footer {
    padding: 12px 14px;
  }

  #app-container .sidebar .user-avatar,
  #admin-app-container .sidebar .user-avatar {
    width: 32px;
    height: 32px;
    font-size: 12px;
  }

  #app-container .sidebar .user-name,
  #admin-app-container .sidebar .user-name {
    font-size: 12px;
  }

  #app-container .sidebar .user-org,
  #admin-app-container .sidebar .user-org {
    font-size: 10px;
  }

  #app-container .sidebar .user-role-badge,
  #admin-app-container .sidebar .user-role-badge {
    font-size: 9px;
  }

  /* Top Header & Page Titles */
  #app-container .top-header,
  #admin-app-container .top-header,
  #admin-app-container .admin-top-header {
    height: 56px;
    padding: 0 24px;
  }

  #app-container .top-header .page-title,
  #admin-app-container .admin-top-header h1 {
    font-size: 17px;
  }

  /* Buttons & Action Controls */
  #app-container .btn,
  #admin-app-container .btn {
    font-size: 12.5px;
    padding: 6px 14px;
    gap: 6px;
    border-radius: var(--radius-sm);
  }

  #app-container .btn-sm,
  #admin-app-container .btn-sm {
    font-size: 11.5px;
    padding: 4px 10px;
  }

  #app-container .btn-xs,
  #admin-app-container .btn-xs {
    font-size: 10.5px;
    padding: 3px 7px;
  }

  /* Form Controls */
  #app-container .form-input,
  #app-container .form-select,
  #app-container .form-textarea,
  #admin-app-container .form-input,
  #admin-app-container .form-select,
  #admin-app-container .form-textarea {
    font-size: 12.5px;
    padding: 7px 11px;
    border-radius: var(--radius-sm);
  }

  #app-container .form-label,
  #admin-app-container .form-label {
    font-size: 11.5px;
    margin-bottom: 4px;
  }

  #app-container .form-hint,
  #admin-app-container .form-hint {
    font-size: 10.5px;
  }

  /* Tab 1: Screens & Displays Cards */
  #app-container .card-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
  }

  #app-container .screen-card,
  #app-container .content-card,
  #app-container .playlist-card {
    border-radius: var(--radius-md);
  }

  #app-container .card-preview {
    height: 130px;
  }

  #app-container .card-body {
    padding: 13px 15px;
    gap: 7px;
  }

  #app-container .card-title,
  #admin-app-container .card-title,
  #admin-app-container .admin-card-title,
  #app-container .section-title {
    font-size: 14px;
  }

  #app-container .card-meta,
  #admin-app-container .card-meta,
  #app-container .card-subtitle,
  #admin-app-container .card-subtitle {
    font-size: 11.5px;
    gap: 3px;
  }

  #app-container .card-footer,
  #admin-app-container .card-footer {
    padding: 8px 14px;
    font-size: 11.5px;
  }

  #app-container .status-badge {
    padding: 3px 8px;
    font-size: 10px;
    top: 9px;
    right: 9px;
  }

  /* Tab 2: Content Library (Upload & Asset Tiles) */
  #app-container .upload-dropzone {
    padding: 24px 20px;
    min-height: 120px;
  }

  #app-container .upload-dropzone svg {
    width: 32px;
    height: 32px;
    margin-bottom: 8px;
  }

  #app-container .content-meta-pill {
    padding: 2px 7px;
    font-size: 10.5px;
  }

  /* Tab 3: Playlists & Sequences */
  #app-container .playlist-modern-card {
    border-radius: var(--radius-md);
  }

  #app-container .playlist-card-preview {
    height: 120px;
  }

  #app-container .playlist-card-top-chips {
    top: 8px;
    left: 8px;
    right: 8px;
    gap: 5px;
  }

  #app-container .playlist-duration-pill,
  #app-container .playlist-loop-pill {
    font-size: 10px;
    padding: 3px 8px;
  }

  #app-container .playlist-meta-row {
    padding-top: 8px;
    gap: 5px;
    font-size: 11.5px;
  }

  #app-container .playlist-trans-chip {
    font-size: 10px;
    padding: 1px 6px;
  }

  #app-container .playlist-item-card {
    padding: 10px 14px;
    gap: 10px;
  }

  /* Tab 4: Display Groups */
  #app-container .group-card {
    padding: 15px 18px;
    border-radius: var(--radius-md);
    gap: 12px;
  }

  /* Tab 5: Dayparting Schedules */
  #app-container .schedule-kpi-row {
    gap: 12px;
    margin-bottom: 16px;
  }

  #app-container .schedule-kpi-card {
    padding: 12px 14px;
    gap: 10px;
    border-radius: var(--radius-md);
  }

  #app-container .schedule-kpi-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
  }

  #app-container .schedule-kpi-val {
    font-size: 17px;
  }

  #app-container .schedule-kpi-lbl {
    font-size: 10.5px;
  }

  #app-container .schedule-filter-bar {
    padding: 10px 14px;
    gap: 12px;
    margin-bottom: 16px;
    border-radius: var(--radius-md);
  }

  #app-container .schedule-search-input {
    height: 34px;
    font-size: 12px;
  }

  #app-container .schedule-filter-pill {
    padding: 4px 10px;
    font-size: 11px;
    height: 28px;
  }

  #app-container .schedule-card-v2 {
    padding: 14px 16px;
    border-radius: var(--radius-md);
    gap: 10px;
  }

  #app-container .schedule-time-chip {
    font-size: 11.5px;
    padding: 3px 8px;
  }

  #app-container .schedule-status-badge {
    font-size: 10px;
    padding: 2px 7px;
  }

  #app-container .schedule-playlist-row {
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    gap: 9px;
  }

  /* Tab 6: Dynamic Widgets */
  #app-container .widget-card-item {
    padding: 12px 10px;
    min-height: 72px;
    border-radius: var(--radius-md);
  }

  #app-container .widget-card-icon {
    width: 28px;
    height: 28px;
    margin-bottom: 6px;
  }

  #app-container .widget-card-label {
    font-size: 11.5px;
  }

  /* Tab 7: Video Walls Matrix */
  #app-container .vw-preset-tile {
    padding: 7px 6px;
    gap: 4px;
    border-radius: var(--radius-sm);
  }

  #app-container .vw-preset-name {
    font-size: 10.5px;
  }

  #app-container .vw-preset-desc {
    font-size: 9.5px;
  }

  /* Tab 8: Analytics & Proof of Play */
  #app-container .analytics-stat-card {
    padding: 13px 16px;
    border-radius: var(--radius-md);
  }

  #app-container .analytics-chart-panel {
    padding: 16px 20px;
    border-radius: var(--radius-md);
  }

  /* Tables Across All Tabs */
  #app-container .table th,
  #admin-app-container .admin-table th {
    font-size: 10.5px;
    padding: 8px 12px;
  }

  #app-container .table td,
  #admin-app-container .admin-table td {
    font-size: 12px;
    padding: 9px 12px;
  }

  /* Super Admin Console Specific */
  #admin-app-container .admin-filter-bar {
    padding: 8px 14px;
    margin-bottom: 14px;
  }

  #admin-app-container .admin-panel-card {
    padding: 12px 14px;
    margin-bottom: 14px;
    border-radius: 8px;
  }

  #admin-app-container .admin-panel-header {
    margin-bottom: 10px;
    padding-bottom: 8px;
  }

  #admin-app-container .admin-panel-title {
    font-size: 13px;
    gap: 6px;
  }

  /* Tab 9: Profile & Settings Tab */
  #app-container .profile-view-wrap {
    gap: 16px;
  }

  #app-container .profile-hero-card {
    padding: 18px 22px;
    gap: 14px;
    border-radius: var(--radius-md);
  }

  #app-container .profile-avatar-box {
    width: 48px;
    height: 48px;
    font-size: 17px;
    border-radius: 12px;
  }

  #app-container .profile-hero-card #profile-page-display-name {
    font-size: 18px !important;
  }

  #app-container .profile-kpi-grid {
    gap: 10px;
    padding-top: 12px;
  }

  #app-container .profile-kpi-grid > div {
    padding: 9px 12px !important;
    border-radius: var(--radius-sm);
  }

  #app-container .profile-kpi-grid > div > div:first-child {
    font-size: 10px !important;
  }

  #app-container .profile-kpi-grid > div > div:last-child {
    font-size: 13px !important;
  }

  #app-container .profile-card-panel {
    padding: 18px 20px;
    border-radius: var(--radius-md);
  }

  #app-container .profile-plans-grid {
    gap: 16px;
    margin-bottom: 16px;
  }

  #app-container .profile-plans-grid > div {
    padding: 18px 20px !important;
    border-radius: var(--radius-md);
  }

  #app-container .profile-plans-grid h3 {
    font-size: 14px;
  }

  #app-container .profile-plans-grid ul {
    font-size: 11.5px;
    gap: 7px;
  }

  #app-container .profile-videowall-card {
    padding: 14px 18px;
    border-radius: var(--radius-md);
  }

  #app-container .profile-forms-grid {
    gap: 16px;
  }

  /* Modals Across All Tabs */
  .modal-content {
    border-radius: var(--radius-md);
  }

  .modal-header {
    padding: 14px 18px;
  }

  .modal-title {
    font-size: 15px;
  }

  .modal-body {
    padding: 16px 18px;
    font-size: 12.5px;
    gap: 12px;
  }

  .modal-footer {
    padding: 11px 18px;
  }
}




