/* ==========================================================
   VENUS STUDIO • RESPONSIVE ANTIGRAVITY DESIGN SYSTEM
   ========================================================== */

:root {
  /* Obsidian Space Canvas */
  --bg-space: #07070a;
  --bg-surface: #0c0d12;
  --bg-card: rgba(14, 15, 22, 0.76);
  --bg-card-hover: rgba(20, 22, 32, 0.9);
  --bg-card-solid: #11121a;
  --bg-sidebar: #09090e;
  
  /* Hairline Borders & Inner Glow */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.14);
  --border-focus: rgba(212, 255, 51, 0.5);
  --border-glow: 0 0 24px rgba(212, 255, 51, 0.18);
  --inner-highlight: inset 0 1px 0 0 rgba(255, 255, 255, 0.08);

  /* Signature Accents */
  --accent-lime: #d4ff33;
  --accent-lime-hover: #e2ff66;
  --accent-lime-dim: rgba(212, 255, 51, 0.12);
  --accent-cyan: #06b6d4;
  --accent-cyan-dim: rgba(6, 182, 212, 0.12);
  --accent-purple: #8b5cf6;
  --accent-purple-dim: rgba(139, 92, 246, 0.12);
  --accent-emerald: #10b981;
  --accent-emerald-dim: rgba(16, 185, 129, 0.12);
  --accent-rose: #f43f5e;
  --accent-amber: #f59e0b;

  /* Typography */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  /* Fonts */
  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Geometry & Scaling */
  --sidebar-width: 250px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  --transition-smooth: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Box Sizing & Defaults */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 14px;
}

body {
  background-color: var(--bg-space);
  color: var(--text-primary);
  font-family: var(--font-main);
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

/* Ambient Antigravity Space Elements */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
  z-index: 0;
}
.glow-top {
  top: -160px;
  left: 30%;
  width: 600px;
  height: 400px;
  background: radial-gradient(circle, rgba(212, 255, 51, 0.08) 0%, rgba(139, 92, 246, 0.03) 70%, transparent 100%);
}
.glow-right {
  bottom: 0;
  right: -100px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.05) 0%, rgba(16, 185, 129, 0.02) 70%, transparent 100%);
}
.ambient-grid {
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(212, 255, 51, 0.4);
}

/* ==========================================================
   STRICT LOGIN GATE (SECURITY SHIELD OVERLAY)
   ========================================================== */
.login-gate-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 6, 9, 0.9);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  transition: opacity 0.35s ease, visibility 0.35s ease, transform 0.35s ease;
}

.login-gate-overlay.hidden-gate {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: scale(1.02);
}

.login-card-container {
  position: relative;
  width: 100%;
  max-width: 420px;
}

.login-card {
  position: relative;
  background: rgba(14, 15, 22, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-xl);
  padding: 40px 32px 32px 32px;
  box-shadow: 
    0 30px 80px rgba(0, 0, 0, 0.85),
    0 0 40px rgba(212, 255, 51, 0.08),
    var(--inner-highlight);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  overflow: hidden;
}

.login-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-lime), transparent);
}

.login-shield-badge {
  position: relative;
  width: 60px;
  height: 60px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(212, 255, 51, 0.16) 0%, rgba(14, 15, 22, 0.9) 100%);
  border: 1.5px solid rgba(212, 255, 51, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-lime);
  margin-bottom: 20px;
  box-shadow: 0 0 28px rgba(212, 255, 51, 0.22);
}

.shield-aura {
  position: absolute;
  inset: -6px;
  border-radius: 24px;
  background: radial-gradient(circle, rgba(212, 255, 51, 0.2) 0%, transparent 70%);
  animation: pulseAura 3s infinite ease-in-out;
}

@keyframes pulseAura {
  0%, 100% { opacity: 0.4; transform: scale(0.95); }
  50% { opacity: 0.9; transform: scale(1.05); }
}

.login-brand-meta {
  margin-bottom: 24px;
}

.login-kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--accent-lime);
  background: var(--accent-lime-dim);
  padding: 3px 9px;
  border-radius: var(--radius-full);
  margin-bottom: 10px;
  border: 1px solid rgba(212, 255, 51, 0.25);
}

.login-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #fff;
  margin-bottom: 6px;
}

.login-subtitle {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
  max-width: 310px;
  margin: 0 auto;
}

.login-form-wrap {
  width: 100%;
}

.login-input-wrap {
  position: relative;
  width: 100%;
  margin-bottom: 14px;
}

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

.login-password-input {
  width: 100%;
  background: rgba(9, 10, 15, 0.95);
  border: 1.5px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 13px 44px 13px 42px;
  color: #fff;
  font-size: 13.5px;
  outline: none;
  font-family: var(--font-main);
  transition: var(--transition-smooth);
}

.login-password-input:focus {
  border-color: var(--accent-lime);
  background: rgba(14, 15, 22, 1);
  box-shadow: var(--border-glow);
}

.login-btn-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 4px;
  border-radius: 4px;
  transition: var(--transition-smooth);
}
.login-btn-toggle:hover { color: #fff; }

.login-error-msg {
  color: var(--accent-rose);
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 14px;
  display: none;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.25);
  animation: shake 0.3s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

@keyframes shake {
  10%, 90% { transform: translate3d(-1px, 0, 0); }
  20%, 80% { transform: translate3d(2px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-3px, 0, 0); }
  40%, 60% { transform: translate3d(3px, 0, 0); }
}

.login-submit-btn {
  width: 100%;
  padding: 13px 18px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--accent-lime) 0%, #b4ee0a 100%);
  color: #07070a;
  border: none;
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(212, 255, 51, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: var(--transition-smooth);
}
.login-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(212, 255, 51, 0.35);
}

.btn-kbd-shortcut {
  background: rgba(0, 0, 0, 0.2);
  padding: 2px 6px;
  border-radius: 5px;
  font-size: 10px;
  font-family: var(--font-mono);
  font-weight: 700;
}

.login-footer-info {
  margin-top: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-muted);
}

.secure-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
}

/* ==========================================================
   UNIFIED APP SHELL & RESPONSIVE LAYOUT
   ========================================================== */
.app-shell {
  display: flex;
  width: 100%;
  min-height: 100vh;
  position: relative;
  z-index: 10;
}

/* SIDEBAR (STICKY & ZOOM FRIENDLY) */
.app-sidebar {
  width: var(--sidebar-width);
  flex: 0 0 var(--sidebar-width);
  height: 100vh;
  position: sticky;
  top: 0;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px 14px 18px 14px;
  z-index: 100;
  backdrop-filter: blur(20px);
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-top {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 4px;
}

.brand-monogram {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(212, 255, 51, 0.16) 0%, rgba(14, 15, 22, 1) 100%);
  border: 1px solid rgba(212, 255, 51, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 16px rgba(212, 255, 51, 0.18);
  flex-shrink: 0;
}

.monogram-glow {
  position: absolute;
  inset: 0;
  border-radius: 10px;
  background: radial-gradient(circle, rgba(212, 255, 51, 0.25) 0%, transparent 70%);
}

.monogram-text {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 14px;
  color: var(--accent-lime);
  position: relative;
}

.brand-meta h2 {
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #fff;
  line-height: 1.2;
}

.brand-tagline {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 9.5px;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.8px;
}

.live-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 6px var(--accent-emerald);
}

.nav-section-title {
  font-size: 9.5px;
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: 1.2px;
  color: var(--text-muted);
  padding: 0 8px;
  margin-bottom: 6px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-main);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
  text-align: left;
  position: relative;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
}

.nav-item.active {
  background: rgba(212, 255, 51, 0.08);
  border-color: rgba(212, 255, 51, 0.25);
  color: #fff;
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 7px;
  bottom: 7px;
  width: 3px;
  border-radius: 0 4px 4px 0;
  background: var(--accent-lime);
  box-shadow: 0 0 8px var(--accent-lime);
}

.nav-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: var(--transition-smooth);
  flex-shrink: 0;
}

.nav-item.active .nav-icon-wrap,
.nav-item:hover .nav-icon-wrap {
  color: var(--accent-lime);
}

.nav-label {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-badge {
  font-family: var(--font-mono);
  font-size: 9.5px;
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 6px;
  border-radius: 5px;
  color: var(--text-muted);
}

.nav-badge-pill {
  font-family: var(--font-mono);
  font-size: 9px;
  background: var(--accent-lime-dim);
  color: var(--accent-lime);
  border: 1px solid rgba(212, 255, 51, 0.2);
  padding: 2px 5px;
  border-radius: 5px;
  white-space: nowrap;
}

/* Sidebar Footer (Profile & Actions) */
.sidebar-footer {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
}

.user-profile-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.user-avatar-wrap {
  position: relative;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.user-avatar {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  background: #181924;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.user-status-dot {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-emerald);
  border: 1.5px solid var(--bg-sidebar);
  box-shadow: 0 0 6px var(--accent-emerald);
}

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

.user-display-name {
  font-size: 11.5px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-roblox-handle {
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--accent-lime);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-action-row {
  display: flex;
  gap: 6px;
}

.sidebar-action-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: var(--font-main);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}
.sidebar-action-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
.btn-lock-btn:hover {
  background: rgba(244, 63, 94, 0.12);
  border-color: rgba(244, 63, 94, 0.3);
  color: var(--accent-rose);
}

/* ==========================================================
   MAIN WRAPPER & CANVAS (CENTERED, FLUID, NO WASTELAND)
   ========================================================== */
.app-main-wrapper {
  flex: 1;
  min-width: 0;
  display: flex;
  justify-content: center;
  width: 100%;
}

.app-content {
  width: 100%;
  max-width: 1560px;
  padding: 22px 28px 50px 28px;
  min-width: 0;
  box-sizing: border-box;
}

/* Topbar Header */
.app-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.topbar-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
}

.crumb-root {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-muted);
}

.crumb-separator {
  color: rgba(255, 255, 255, 0.2);
}

.crumb-active {
  color: #fff;
  font-weight: 700;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.plan-badge {
  background: var(--accent-lime-dim);
  border: 1px solid rgba(212, 255, 51, 0.3);
  color: var(--accent-lime);
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 6px currentColor;
}

.roblox-badge {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

/* Antigravity Metrics Ribbon (Fluid & Compact) */
.metrics-ribbon {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  backdrop-filter: blur(16px);
  box-shadow: var(--inner-highlight);
  transition: var(--transition-smooth);
  min-width: 0;
}
.metric-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.metric-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.metric-icon-wrap.lime {
  background: var(--accent-lime-dim);
  color: var(--accent-lime);
  border: 1px solid rgba(212, 255, 51, 0.25);
}
.metric-icon-wrap.cyan {
  background: var(--accent-cyan-dim);
  color: var(--accent-cyan);
  border: 1px solid rgba(6, 182, 212, 0.25);
}
.metric-icon-wrap.purple {
  background: var(--accent-purple-dim);
  color: var(--accent-purple);
  border: 1px solid rgba(139, 92, 246, 0.25);
}
.metric-icon-wrap.emerald {
  background: var(--accent-emerald-dim);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.metric-body {
  display: flex;
  flex-direction: column;
  gap: 1px;
  overflow: hidden;
}

.metric-label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--text-muted);
}

.metric-value {
  font-size: 12.5px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================
   VIEW PANELS (TAB SWITCHING: CRITICAL SEPARATION)
   ========================================================== */
.view-panel {
  display: none !important;
}

.view-panel.active-view {
  display: block !important;
  animation: fadeInView 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* ==========================================================
   GLASS CARDS & CONTENT GRIDS
   ========================================================== */
.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--inner-highlight), 0 16px 40px rgba(0, 0, 0, 0.4);
  min-width: 0;
}

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

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

.card-icon-tag {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-lime);
  flex-shrink: 0;
}

.card-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.2px;
}

.card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-subtle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: var(--font-main);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-smooth);
}
.btn-subtle:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.15);
}

/* Two Column Grids */
.uploader-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 20px;
}

.permissions-split-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 20px;
}

/* ==========================================================
   BALANCED 3-COLUMN PERMISSIONS TOOLBAR (NO GIANT BUTTON)
   ========================================================== */
.permissions-balanced-grid {
  display: grid;
  grid-template-columns: 1.2fr 1.1fr 0.95fr;
  gap: 18px;
  align-items: flex-start;
}

.perm-config-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.field-label {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 6px;
  letter-spacing: 0.5px;
}

.field-caption {
  font-size: 10.5px;
  color: var(--text-muted);
  line-height: 1.45;
  margin-top: 6px;
}

.input-with-action {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}

.collab-badge-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  min-width: 0;
}

.collab-avatar {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #14141e;
  flex-shrink: 0;
}

.collab-info {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.collab-name {
  font-size: 12.5px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.collab-meta {
  font-size: 10.5px;
  font-family: var(--font-mono);
  color: var(--accent-lime);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.verified-pill {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
  flex-shrink: 0;
}

.perm-action-col {
  display: flex;
  flex-direction: column;
}

.perm-target-summary {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  color: var(--text-muted);
  margin-top: 8px;
}

.dot-status-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-lime);
  box-shadow: 0 0 6px var(--accent-lime);
  animation: pulseDot 2s infinite ease-in-out;
}

/* ==========================================================
   DATE FILTER TOOLBAR (ERGONOMIC, NO TRUNCATION)
   ========================================================== */
.date-filter-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  margin-bottom: 12px;
}

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

.search-input-wrap {
  position: relative;
  flex: 1.3;
  min-width: 150px;
}
.search-input-wrap svg {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}
.filter-search {
  padding-left: 30px !important;
}

.filter-date-group {
  display: flex;
  gap: 6px;
  flex: 1.4;
  min-width: 230px;
}

.filter-date-select {
  flex: 1;
  min-width: 135px;
}

.filter-date-input {
  width: 125px !important;
  flex-shrink: 0;
}

.filter-bottom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  flex-wrap: wrap;
  gap: 8px;
}

.filter-quick-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

.btn-filter-pill {
  background: rgba(212, 255, 51, 0.08);
  border-color: rgba(212, 255, 51, 0.25);
  color: var(--accent-lime);
}
.btn-filter-pill:hover {
  background: rgba(212, 255, 51, 0.16);
  border-color: rgba(212, 255, 51, 0.4);
  color: #fff;
}

.filter-selection-counter {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 600;
}

/* ==========================================================
   TABLES (NON-WRAPPING DATES & ROBUST COLUMNS)
   ========================================================== */
.assets-table-scroll {
  max-height: 380px;
  overflow-y: auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.results-table-container {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.antigravity-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 12px;
}

.antigravity-table thead tr {
  background: #0b0c11;
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 10;
}

.antigravity-table th {
  padding: 10px 12px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  white-space: nowrap;
}

.antigravity-table td {
  padding: 11px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  vertical-align: middle;
}

.antigravity-table tbody tr {
  transition: var(--transition-smooth);
}
.antigravity-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.025);
}

/* Specific non-wrapping column widths */
.select-table th:nth-child(2), 
.select-table td:nth-child(2) {
  white-space: nowrap !important;
  width: 115px !important;
  min-width: 115px !important;
  font-family: var(--font-mono);
  font-size: 11px;
}

.select-table th:nth-child(3), 
.select-table td:nth-child(3) {
  white-space: nowrap !important;
  width: 145px !important;
  min-width: 145px !important;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--accent-lime);
}

.select-table th:nth-child(4), 
.select-table td:nth-child(4) {
  word-break: break-word;
  color: #fff;
  font-weight: 600;
}

.table-empty-row {
  text-align: center !important;
  padding: 32px 16px !important;
  color: var(--text-muted) !important;
  font-style: italic;
}

.custom-checkbox {
  width: 15px;
  height: 15px;
  accent-color: var(--accent-lime);
  cursor: pointer;
  vertical-align: middle;
}

.table-footer-status {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 6px;
}

/* ==========================================================
   INPUTS, SLIDERS, TEXTAREAS
   ========================================================== */
.textarea-container {
  background: rgba(8, 9, 14, 0.95);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  transition: var(--transition-smooth);
  margin-bottom: 16px;
}
.textarea-container:focus-within {
  border-color: var(--accent-lime);
  box-shadow: var(--border-glow);
}

.url-textarea {
  width: 100%;
  height: 160px;
  background: transparent;
  border: none;
  outline: none;
  resize: vertical;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
}
.url-textarea::placeholder {
  color: var(--text-muted);
}

.textarea-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.textarea-hints {
  font-size: 10.5px;
  color: var(--text-muted);
}

.links-badge {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--accent-lime);
  background: var(--accent-lime-dim);
  border: 1px solid rgba(212, 255, 51, 0.25);
  padding: 2px 8px;
  border-radius: 5px;
}

.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.setting-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

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

.setting-name {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-secondary);
}

.setting-val-badge {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--accent-lime);
  background: var(--accent-lime-dim);
  padding: 2px 6px;
  border-radius: 4px;
}

.range-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 5px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.1);
  outline: none;
  margin: 5px 0;
}
.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--accent-lime);
  cursor: pointer;
  box-shadow: 0 0 8px var(--accent-lime);
  transition: var(--transition-smooth);
}
.range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.setting-hint-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 9.5px;
  color: var(--text-muted);
}

.normal-playback-pill {
  color: var(--accent-lime);
  font-family: var(--font-mono);
}

.select-input, .text-input {
  width: 100%;
  background: rgba(9, 10, 15, 0.95);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  color: #fff;
  font-family: var(--font-main);
  font-size: 12px;
  outline: none;
  transition: var(--transition-smooth);
}
.select-input:focus, .text-input:focus {
  border-color: var(--accent-lime);
  box-shadow: var(--border-glow);
}

/* Custom Toggle Switch */
.toggle-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  margin-bottom: 16px;
}

.switch-control {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
  flex-shrink: 0;
}
.switch-control input {
  opacity: 0;
  width: 0;
  height: 0;
}
.switch-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
  transition: var(--transition-smooth);
}
.switch-slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: var(--transition-smooth);
}
input:checked + .switch-slider {
  background-color: var(--accent-lime);
}
input:checked + .switch-slider:before {
  transform: translateX(16px);
  background-color: #07070a;
}

.toggle-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.toggle-title {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}
.toggle-desc {
  font-size: 10.5px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Primary Action Glow Buttons */
.cta-actions-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-primary-glow {
  width: 100%;
  padding: 13px 20px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--accent-lime) 0%, #b4ee0a 100%);
  color: #07070a;
  border: none;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(212, 255, 51, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition-smooth);
  white-space: nowrap;
}
.btn-primary-glow:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(212, 255, 51, 0.38);
}
.btn-primary-glow:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.secondary-btn-row {
  display: flex;
  gap: 8px;
}

.btn-control {
  flex: 1;
  padding: 8px;
  border-radius: var(--radius-sm);
  font-family: var(--font-main);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  transition: var(--transition-smooth);
}
.btn-pause:not(:disabled):hover {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.4);
  color: #fbbf24;
}
.btn-stop:not(:disabled):hover {
  background: rgba(244, 63, 94, 0.15);
  border-color: rgba(244, 63, 94, 0.4);
  color: var(--accent-rose);
}
.btn-control:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ==========================================================
   PROGRESS BOX & TERMINAL
   ========================================================== */
.terminal-container-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.progress-box {
  background: rgba(8, 9, 14, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}

.status-live-tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--accent-lime);
  background: var(--accent-lime-dim);
  padding: 2px 7px;
  border-radius: 5px;
}

.pulse-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-lime);
  box-shadow: 0 0 6px var(--accent-lime);
  animation: pulseDot 2s infinite ease-in-out;
}

.progress-meta-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 8px;
}

.progress-percentage-large {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
}

.progress-fraction-badge {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary);
}

.progress-bar-track {
  width: 100%;
  height: 6px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--accent-lime) 0%, #06b6d4 100%);
  box-shadow: 0 0 12px rgba(212, 255, 51, 0.5);
  transition: width 0.3s ease;
}

.progress-sub-info {
  display: flex;
  justify-content: space-between;
  font-size: 10.5px;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.terminal-window {
  flex: 1;
  min-height: 220px;
  max-height: 300px;
  background: #06070a;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.6);
}

.terminal-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border-subtle);
}

.terminal-window-dots {
  display: flex;
  gap: 5px;
}
.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}
.dot-close { background: #ff5f56; }
.dot-minimize { background: #ffbd2e; }
.dot-maximize { background: #27c93f; }

.terminal-tab-title {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-muted);
  font-weight: 600;
}

.terminal-titlebar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-clear-term {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  cursor: pointer;
  padding: 3px 8px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  transition: all 0.15s ease;
  user-select: none;
}
.btn-clear-term:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: var(--border-medium);
}

.terminal-body {
  flex: 1;
  padding: 10px 12px;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.6;
  color: #cbd5e1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.log-entry { word-break: break-all; }
.log-time { color: var(--text-muted); margin-right: 6px; }
.log-level-INFO { color: #38bdf8; font-weight: 600; }
.log-level-SUCCESS { color: var(--accent-lime); font-weight: 700; }
.log-level-ERROR { color: var(--accent-rose); font-weight: 700; }
.log-level-WARN { color: #fbbf24; font-weight: 600; }

/* Segmented Control Tabs */
.segment-tabs {
  display: flex;
  gap: 4px;
  background: rgba(0, 0, 0, 0.4);
  padding: 3px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  margin-bottom: 14px;
}

.segment-tab {
  flex: 1;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-main);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-smooth);
}
.segment-tab.active {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

/* Results Cell Content */
.title-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.track-thumb {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  object-fit: cover;
  background: #14141e;
  border: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.track-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  overflow: hidden;
}

.track-title {
  font-weight: 700;
  color: #fff;
  font-size: 12.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 300px;
}

.track-url a {
  color: var(--text-muted);
  font-size: 10.5px;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: var(--font-mono);
  max-width: 260px;
  display: block;
}
.track-url a:hover { color: var(--accent-lime); text-decoration: underline; }

.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}
.status-APPROVED {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
}
.status-REVIEWING {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fbbf24;
}
.status-FAILED {
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.3);
  color: var(--accent-rose);
}
.status-SUCCESS {
  background: rgba(212, 255, 51, 0.12);
  border: 1px solid rgba(212, 255, 51, 0.3);
  color: var(--accent-lime);
}

.asset-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(212, 255, 51, 0.08);
  border: 1px solid rgba(212, 255, 51, 0.25);
  border-radius: 5px;
  padding: 3px 7px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--accent-lime);
  white-space: nowrap;
}

.btn-copy-id {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 2px;
  border-radius: 3px;
  transition: var(--transition-smooth);
}
.btn-copy-id:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.track-row-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.track-title-text {
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.btn-copy-inline {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  padding: 3px 8px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  transition: all 0.15s ease;
  user-select: none;
}

.btn-copy-inline:hover {
  background: rgba(212, 255, 51, 0.12);
  border-color: rgba(212, 255, 51, 0.35);
  color: var(--accent-lime);
}

/* ==========================================================
   SETTINGS MODAL
   ========================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(18px);
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  width: 100%;
  max-width: 480px;
  background: var(--bg-card-solid);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9), var(--inner-highlight);
  transform: scale(0.96);
  transition: transform 0.25s ease;
}

.modal-overlay.open .modal-card {
  transform: scale(1);
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* ==========================================================
   TOAST NOTIFICATIONS
   ========================================================== */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 10000;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background: rgba(18, 20, 29, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
  animation: slideToast 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* ==========================================================
   RESPONSIVE MEDIA QUERIES (FLUID AT ALL ZOOM LEVELS)
   ========================================================== */
@media (max-width: 1280px) {
  .permissions-balanced-grid {
    grid-template-columns: 1fr 1fr;
  }
  .perm-action-col {
    grid-column: span 2;
  }
}

@media (max-width: 1100px) {
  .uploader-grid, 
  .permissions-split-grid {
    grid-template-columns: 1fr;
  }
  .metrics-ribbon {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .app-shell {
    flex-direction: column;
  }
  .app-sidebar {
    position: relative;
    width: 100%;
    height: auto;
    flex: none;
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
  }
  .app-content {
    padding: 16px;
  }
  .permissions-balanced-grid {
    grid-template-columns: 1fr;
  }
  .perm-action-col {
    grid-column: span 1;
  }
  .metrics-ribbon {
    grid-template-columns: 1fr;
  }
}
