/* 🏆 OPC AI REVENUE ENGINE — LUXURY RESPONSIVE DESIGN SYSTEM
   Optimized for: Desktop PC (4K/QHD/FHD) + Tablet + iPhone (Retina / Dynamic Island) + Android */

:root {
  --bg-main: #060913;
  --bg-card: rgba(15, 23, 42, 0.75);
  --bg-card-hover: rgba(30, 41, 59, 0.85);
  --bg-sidebar: rgba(10, 15, 30, 0.95);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-active: rgba(6, 182, 212, 0.4);
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --accent-cyan: #06b6d4;
  --accent-cyan-glow: rgba(6, 182, 212, 0.25);
  --accent-emerald: #10b981;
  --accent-emerald-glow: rgba(16, 185, 129, 0.25);
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  --accent-purple: #8b5cf6;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", Roboto, sans-serif;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.5;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(6, 182, 212, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(139, 92, 246, 0.08) 0%, transparent 40%);
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: hidden;
}

/* APP SHELL */
.app-layout {
  display: flex;
  min-height: 100vh;
  position: relative;
  width: 100%;
}

/* SIDEBAR (Desktop) */
.sidebar {
  width: 260px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
}

.brand {
  padding: 24px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border-color);
}

.brand-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 4px 16px var(--accent-cyan-glow);
}

.brand-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: #fff;
}

.brand-subtitle {
  font-size: 11px;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

.nav-menu {
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

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

.nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.nav-item.active {
  background: rgba(6, 182, 212, 0.12);
  color: var(--accent-cyan);
  border-color: rgba(6, 182, 212, 0.3);
  font-weight: 600;
}

.nav-icon {
  font-size: 18px;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border-color);
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.system-status-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 10px var(--accent-emerald);
}

/* MAIN CONTENT */
.main-wrapper {
  flex: 1;
  margin-left: 260px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: calc(100% - 260px);
}

/* TOP STATUS BAR — COMPACT PRO WORKSPACE RIBBON */
.top-bar.compact-ribbon {
  padding: 8px 20px;
  min-height: 52px;
  background: rgba(6, 9, 19, 0.95);
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: sticky;
  top: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: nowrap;
}

.top-left-group {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.page-headline-compact {
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-headline-compact h1 {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: #fff;
  white-space: nowrap;
  margin: 0;
}

/* METRICS TICKER CHIPS (SPACE-SAVING HORIZONTAL HUD) */
.metrics-ticker {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.metrics-ticker::-webkit-scrollbar {
  display: none;
}

.ticker-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  font-size: 12px;
  white-space: nowrap;
  transition: var(--transition);
}

.ticker-chip:hover {
  border-color: rgba(6, 182, 212, 0.4);
  background: rgba(6, 182, 212, 0.06);
  transform: translateY(-1px);
}

.ticker-icon {
  font-size: 13px;
}

.ticker-label {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 11px;
}

.ticker-val {
  font-weight: 800;
  color: #fff;
  font-size: 13px;
}

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

/* CONTENT AREA */
.content-area {
  padding: 20px 24px;
  flex: 1;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.25s ease-out;
}

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

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  min-height: 42px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-cyan), #2563eb);
  color: #fff;
  box-shadow: 0 4px 14px var(--accent-cyan-glow);
}

.btn-primary:hover {
  opacity: 0.95;
  transform: translateY(-1px);
}

.btn-success {
  background: linear-gradient(135deg, var(--accent-emerald), #059669);
  color: #fff;
  box-shadow: 0 4px 14px var(--accent-emerald-glow);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border-color: var(--border-color);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  min-height: 32px;
  border-radius: var(--radius-sm);
}

/* DATA TABLES & EXCEL GRID */
.card-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  backdrop-filter: blur(16px);
  margin-bottom: 20px;
}

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

.panel-title {
  font-size: 16px;
  font-weight: 700;
}

/* EXCEL GRID TOOLBAR */
.excel-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  background: rgba(10, 15, 30, 0.9);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  flex-wrap: wrap;
}

.excel-toolbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 260px;
}

.excel-toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.excel-search-input {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  color: #fff;
  font-size: 13px;
  width: 100%;
  max-width: 380px;
  outline: none;
  transition: var(--transition);
}

.excel-search-input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 2px var(--accent-cyan-glow);
}

.excel-select {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  color: #fff;
  font-size: 12px;
  outline: none;
  cursor: pointer;
}

/* COLUMN VISIBILITY POPOVER */
.col-vis-wrapper {
  position: relative;
}

.col-vis-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: #0f172a;
  border: 1px solid var(--border-active);
  border-radius: var(--radius-md);
  padding: 12px;
  width: 220px;
  max-height: 360px;
  overflow-y: auto;
  z-index: 500;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
}

.col-vis-menu.show {
  display: block;
  animation: fadeIn 0.2s ease-out;
}

.col-vis-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 4px;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
}

.col-vis-item:hover {
  color: #fff;
}

.col-vis-item input[type="checkbox"] {
  accent-color: var(--accent-cyan);
  cursor: pointer;
}

/* EXCEL GRID CONTAINER & TABLE */
.excel-grid-container {
  width: 100%;
  overflow: auto;
  min-height: 400px;
  max-height: calc(100vh - 165px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: rgba(6, 9, 19, 0.95);
  position: relative;
  scrollbar-width: thin;
  scrollbar-color: rgba(6, 182, 212, 0.3) rgba(15, 23, 42, 0.6);
}

.excel-grid-container::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.excel-grid-container::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.6);
  border-radius: 4px;
}

.excel-grid-container::-webkit-scrollbar-thumb {
  background: rgba(6, 182, 212, 0.25);
  border-radius: 4px;
}

.excel-grid-container::-webkit-scrollbar-thumb:hover {
  background: rgba(6, 182, 212, 0.5);
}

/* COLLAPSIBLE CREATION DRAWER */
.creation-drawer {
  background: rgba(13, 31, 54, 0.7);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px;
  backdrop-filter: blur(16px);
  animation: fadeIn 0.25s ease-out;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* VIEW TOGGLE GROUP (TABLE VS CARDS) */
.view-toggle-group button.active {
  background: var(--accent-cyan) !important;
  color: #060913 !important;
  font-weight: 700 !important;
  box-shadow: 0 0 12px var(--accent-cyan-glow);
}

table.excel-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  text-align: left;
  table-layout: fixed;
}

/* STICKY HEADER */
table.excel-table th {
  position: sticky;
  top: 0;
  background: #0d1f36;
  color: #ffc72c;
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid #ffc72c;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  white-space: nowrap;
  user-select: none;
  z-index: 20;
}

/* COLUMN RESIZE HANDLE */
.th-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.resize-handle {
  position: absolute;
  top: 0;
  right: 0;
  width: 6px;
  bottom: 0;
  cursor: col-resize;
  user-select: none;
  z-index: 30;
}

.resize-handle:hover, .resize-handle.resizing {
  background: var(--accent-cyan);
}

/* STICKY COLUMNS */
table.excel-table th.sticky-col-1,
table.excel-table td.sticky-col-1 {
  position: sticky;
  left: 0;
  z-index: 25;
  background: #0a1728;
  width: 50px;
  min-width: 50px;
  max-width: 50px;
  text-align: center;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
}

table.excel-table th.sticky-col-2,
table.excel-table td.sticky-col-2 {
  position: sticky;
  left: 50px;
  z-index: 25;
  background: #0c1c30;
  border-right: 2px solid rgba(6, 182, 212, 0.3);
}

table.excel-table th.sticky-col-1,
table.excel-table th.sticky-col-2 {
  z-index: 40; /* Above regular sticky headers */
}

/* DATA CELLS & INLINE EDITING */
table.excel-table td {
  padding: 10px 12px;
  font-size: 13px;
  color: var(--text-primary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  border-right: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: rgba(15, 23, 42, 0.5);
  transition: background 0.15s ease;
}

table.excel-table tr:nth-child(even) td {
  background: rgba(10, 16, 30, 0.7);
}

table.excel-table tr:hover td {
  background: rgba(6, 182, 212, 0.08);
}

/* EDITABLE CELL STYLES */
td.editable-cell {
  cursor: pointer;
  position: relative;
}

td.editable-cell:hover {
  outline: 1px dashed var(--accent-cyan);
  background: rgba(6, 182, 212, 0.12) !important;
}

td.editable-cell.editing {
  padding: 0;
  outline: 2px solid var(--accent-cyan);
  z-index: 10;
}

.inline-edit-input {
  width: 100%;
  height: 100%;
  min-height: 38px;
  padding: 8px 10px;
  background: #020617;
  color: #fff;
  border: none;
  font-family: inherit;
  font-size: 13px;
  outline: none;
}

.cell-sync-indicator {
  display: inline-block;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  margin-left: 6px;
  background: rgba(16, 185, 129, 0.2);
  color: var(--accent-emerald);
  animation: fadeIn 0.2s ease-out;
}

/* EXCEL FOOTER STATUS BAR */
.excel-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: rgba(10, 15, 30, 0.95);
  border: 1px solid var(--border-color);
  border-top: none;
  font-size: 12px;
  color: var(--text-secondary);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  flex-wrap: wrap;
  gap: 8px;
}

/* BADGES */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-success {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-warning {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-amber);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-info {
  background: rgba(6, 182, 212, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.badge-danger {
  background: rgba(244, 63, 94, 0.15);
  color: var(--accent-rose);
  border: 1px solid rgba(244, 63, 94, 0.3);
}

/* FORMS */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

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

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

.form-input {
  background: rgba(10, 15, 30, 0.8);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
  transition: var(--transition);
}

.form-input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px var(--accent-cyan-glow);
}

/* MODAL */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-backdrop.active {
  display: flex;
  animation: fadeIn 0.2s ease-out;
}

.modal-box {
  background: #0f172a;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  max-width: 580px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0,0,0,0.6);
  padding: 20px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
}

/* MOBILE BOTTOM BAR (iOS / Android) */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(10, 15, 30, 0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid var(--border-color);
  padding: 8px 6px calc(8px + var(--safe-bottom));
  z-index: 500;
  justify-content: space-around;
}

.mobile-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 500;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.mobile-nav-btn.active {
  color: var(--accent-cyan);
  font-weight: 700;
}

.mobile-nav-btn .icon {
  font-size: 18px;
}

/* RESPONSIVE MEDIA QUERIES (Mobile & Tablet) */
@media (max-width: 900px) {
  .sidebar {
    display: none !important; /* Never show desktop sidebar on small screens */
  }

  .main-wrapper {
    margin-left: 0 !important;
    width: 100% !important;
    padding-bottom: calc(75px + var(--safe-bottom)) !important;
  }

  .top-bar {
    padding: 12px 16px calc(12px + var(--safe-top));
  }

  .metrics-row {
    padding: 14px 16px 0 16px;
    grid-template-columns: repeat(2, 1fr);
  }

  .content-area {
    padding: 14px 16px;
  }

  .mobile-bottom-nav {
    display: flex !important;
  }

  .page-headline h1 {
    font-size: 17px;
  }
}

@media (max-width: 480px) {
  .metrics-row {
    grid-template-columns: 1fr;
  }
}

/* ─── MULTI-TENANT USER SESSION & TENANT SWITCHER ─── */
.user-session-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(13, 31, 54, 0.7);
  border: 1px solid rgba(255, 199, 44, 0.3);
  padding: 4px 12px 4px 6px;
  border-radius: var(--radius-full);
  backdrop-filter: blur(12px);
}

.user-avatar-badge {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FFC72C, #F59E0B);
  color: #060913;
  font-weight: 800;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 10px rgba(255, 199, 44, 0.4);
}

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

.user-display-name {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.user-tenant-title {
  font-size: 10px;
  color: var(--accent-gold);
  line-height: 1.2;
}

.role-chip {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.5px;
  background: rgba(255, 199, 44, 0.15);
  color: var(--accent-gold);
  border: 1px solid rgba(255, 199, 44, 0.4);
  padding: 2px 6px;
  border-radius: 6px;
}

.tenant-switcher-wrap {
  display: flex;
  align-items: center;
}

.tenant-dropdown {
  background: rgba(10, 15, 30, 0.85);
  border: 1px solid var(--border-color);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  outline: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tenant-dropdown:hover, .tenant-dropdown:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.25);
}

/* ─── SETTINGS CONSOLE (BYOK) ─── */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 20px;
}

/* TOGGLE SWITCH */
.switch-label {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.switch-label input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(255, 255, 255, 0.15);
  transition: 0.3s;
  border-radius: 24px;
  border: 1px solid var(--border-color);
}

.switch-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

input:checked + .switch-slider {
  background-color: var(--accent-emerald);
  border-color: var(--accent-emerald);
}

input:checked + .switch-slider:before {
  transform: translateX(20px);
}

/* ─── AUTH MODAL TABS ─── */
.auth-tabs {
  display: flex;
  background: rgba(255, 255, 255, 0.05);
  padding: 4px;
  border-radius: var(--radius-sm);
  gap: 4px;
}

.auth-tab-btn {
  flex: 1;
  padding: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-tab-btn.active {
  background: var(--accent-cyan);
  color: #060913;
  font-weight: 700;
}

/* ─── OMNI-CHANNEL SUB-NAVIGATION TABS ─── */
.channel-subnav {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(13, 31, 54, 0.7);
  padding: 6px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  margin-bottom: 20px;
  overflow-x: auto;
  scrollbar-width: none;
  backdrop-filter: blur(12px);
}

.channel-subnav::-webkit-scrollbar {
  display: none;
}

.channel-subnav-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.25s ease;
}

.channel-subnav-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.channel-subnav-btn.active {
  background: rgba(6, 182, 212, 0.15);
  color: var(--accent-cyan);
  border-color: rgba(6, 182, 212, 0.4);
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.15);
}

.channel-subnav-btn.active.instagram {
  background: rgba(225, 48, 108, 0.15);
  color: #ff6b9d;
  border-color: rgba(225, 48, 108, 0.4);
  box-shadow: 0 0 15px rgba(225, 48, 108, 0.2);
}

.channel-subnav-btn.active.tiktok {
  background: rgba(0, 242, 254, 0.15);
  color: #00f2fe;
  border-color: rgba(0, 242, 254, 0.4);
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.2);
}

.channel-subnav-btn.active.youtube {
  background: rgba(255, 0, 0, 0.15);
  color: #ff4d4d;
  border-color: rgba(255, 0, 0, 0.4);
  box-shadow: 0 0 15px rgba(255, 0, 0, 0.2);
}

.channel-subnav-btn.active.facebook {
  background: rgba(24, 119, 242, 0.15);
  color: #60a5fa;
  border-color: rgba(24, 119, 242, 0.4);
  box-shadow: 0 0 15px rgba(24, 119, 242, 0.2);
}

.channel-subnav-btn.active.bio-parser {
  background: rgba(255, 199, 44, 0.15);
  color: var(--accent-gold);
  border-color: rgba(255, 199, 44, 0.4);
  box-shadow: 0 0 15px rgba(255, 199, 44, 0.2);
}

.channel-panel {
  display: none;
  animation: fadeIn 0.25s ease-out;
}

.channel-panel.active {
  display: block;
}

/* ─── BIO QUICK PARSER WIDGET ─── */
.bio-result-card {
  margin-top: 18px;
  background: rgba(6, 9, 19, 0.75);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  display: none;
}

.bio-result-card.show {
  display: block;
}

.bio-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.bio-stat-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 10px;
  text-align: center;
}

.bio-stat-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.bio-stat-val {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin-top: 2px;
}

/* ─── BIO DRAG & DROP ZONE ─── */
.bio-dropzone-wrap {
  position: relative;
  width: 100%;
}

.dropzone-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(6, 182, 212, 0.18);
  border: 2px dashed var(--accent-cyan);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s ease;
  z-index: 10;
}

.bio-dropzone-wrap.dragover .dropzone-overlay {
  opacity: 1;
  pointer-events: auto;
}

/* ─── BIO BATCH PROGRESS BAR ─── */
.bio-progress-container {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
}

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

.bio-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-emerald));
  border-radius: 9999px;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── EXCEL GRID LIKE COMPACT OPTIMIZATION ─── */
.content-area {
  padding: 12px 20px 24px 20px;
  flex: 1;
}

.card-panel {
  margin-bottom: 16px;
}



