/* ==============================================================================
   RECAPSTYLE AI — ElevenLabs-Inspired Premium Dark SaaS Design System v5.0
   Clean, minimal, professional AI productivity platform aesthetic.
   ============================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800;900&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;600;700&display=swap');

@font-face {
  font-family: 'Pyidaungsu';
  src: url('/fonts/Pyidaungsu.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* ==============================================================================
   1. DESIGN TOKENS (CSS VARIABLES)
   ============================================================================== */
:root {
  /* Fonts */
  --font-sans: 'Plus Jakarta Sans', 'Pyidaungsu', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Brand Colors — PRESERVED */
  --brand-primary: #3b82f6;
  --brand-primary-dark: #2563eb;
  --brand-primary-light: #60a5fa;
  --brand-primary-muted: rgba(59, 130, 246, 0.12);
  --brand-primary-border: rgba(59, 130, 246, 0.25);

  /* Semantic Status Colors */
  --status-success: #22c55e;
  --status-success-bg: rgba(34, 197, 94, 0.1);
  --status-success-border: rgba(34, 197, 94, 0.25);
  --status-error: #ef4444;
  --status-error-bg: rgba(239, 68, 68, 0.1);
  --status-error-border: rgba(239, 68, 68, 0.25);
  --status-warning: #f59e0b;
  --status-warning-bg: rgba(245, 158, 11, 0.1);
  --status-warning-border: rgba(245, 158, 11, 0.25);
  --status-processing: #3b82f6;
  --status-processing-bg: rgba(59, 130, 246, 0.1);
  --status-processing-border: rgba(59, 130, 246, 0.25);
  --status-disabled: #52525b;
  --status-disabled-bg: rgba(82, 82, 91, 0.1);
  --status-cancelled: #71717a;

  /* Surfaces */
  --bg-base: #09090B;
  --bg-surface: #111113;
  --bg-surface-2: #18181B;
  --bg-surface-3: #1c1c1f;
  --bg-hover: rgba(255, 255, 255, 0.04);
  --bg-active: rgba(255, 255, 255, 0.06);

  /* Borders */
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-default: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.14);
  --border-hover: rgba(255, 255, 255, 0.18);

  /* Text */
  --text-primary: #fafafa;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --text-disabled: #52525b;

  /* Spacing & Radius */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 10px;
  --radius-2xl: 12px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.7);
  --shadow-xl: 0 8px 40px rgba(0, 0, 0, 0.8);
}

/* ==============================================================================
   2. GLOBAL RESET & BASE
   ============================================================================== */
html, body {
  background-color: var(--bg-base) !important;
  background-image: none !important;
  color: var(--text-primary) !important;
  font-family: var(--font-sans) !important;
  -webkit-font-smoothing: antialiased !important;
  -moz-osx-font-smoothing: grayscale !important;
}

/* Remove grid overlay */
body::before {
  display: none !important;
}

#root {
  background-color: var(--bg-base) !important;
  min-height: 100vh;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans) !important;
  color: var(--text-primary) !important;
  letter-spacing: -0.02em !important;
}

code, pre, .font-mono, [class*="font-mono"] {
  font-family: var(--font-mono) !important;
}

/* ==============================================================================
   3. BUTTON SYSTEM — Clean, Professional
   ============================================================================== */

/* Reset ALL button transitions to remove translate/scale effects */
button {
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease !important;
  transform: none !important;
}
button:hover {
  transform: none !important;
}
button:active {
  transform: none !important;
  opacity: 0.85 !important;
}

/* Primary Blue Buttons */
button.bg-blue-600,
button[class*="bg-blue-600"],
button.bg-indigo-600,
button[class*="bg-indigo-600"],
button[class*="from-blue-600"],
button[class*="bg-blue-500"] {
  background: var(--brand-primary) !important;
  background-image: none !important;
  border: 1px solid var(--brand-primary-border) !important;
  border-radius: var(--radius-lg) !important;
  color: #fff !important;
  font-weight: 600 !important;
  font-family: var(--font-sans) !important;
  letter-spacing: 0.01em !important;
  box-shadow: 0 1px 3px rgba(59, 130, 246, 0.2) !important;
  text-shadow: none !important;
}
button.bg-blue-600:hover,
button[class*="bg-blue-600"]:hover,
button[class*="from-blue-600"]:hover,
button[class*="bg-blue-500"]:hover {
  background: var(--brand-primary-dark) !important;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3) !important;
}

/* Amber/Orange/Primary action buttons — keep amber as accent */
button[class*="bg-amber-500"],
button[class*="bg-amber-400"],
button[class*="bg-orange-500"] {
  background: var(--status-warning) !important;
  background-image: none !important;
  border: 1px solid var(--status-warning-border) !important;
  border-radius: var(--radius-lg) !important;
  color: #0a0a0b !important;
  font-weight: 700 !important;
  box-shadow: 0 1px 3px rgba(245, 158, 11, 0.2) !important;
  text-shadow: none !important;
}
button[class*="bg-amber-500"]:hover,
button[class*="bg-amber-400"]:hover {
  background: #d97706 !important;
}

/* Emerald/Green Buttons */
button[class*="bg-emerald"],
button[class*="bg-green-5"],
button[class*="bg-green-6"] {
  background: #16a34a !important;
  background-image: none !important;
  border: 1px solid rgba(22, 163, 74, 0.3) !important;
  border-radius: var(--radius-lg) !important;
  color: #fff !important;
  font-weight: 600 !important;
  box-shadow: 0 1px 3px rgba(22, 163, 74, 0.2) !important;
  text-shadow: none !important;
}
button[class*="bg-emerald"]:hover,
button[class*="bg-green-5"]:hover,
button[class*="bg-green-6"]:hover {
  background: #15803d !important;
}

/* Rose/Red Danger Buttons */
button[class*="bg-rose"],
button[class*="bg-red-5"],
button[class*="bg-red-6"] {
  background: #dc2626 !important;
  background-image: none !important;
  border: 1px solid rgba(220, 38, 38, 0.3) !important;
  border-radius: var(--radius-lg) !important;
  color: #fff !important;
  font-weight: 600 !important;
  box-shadow: 0 1px 3px rgba(220, 38, 38, 0.2) !important;
  text-shadow: none !important;
}
button[class*="bg-rose"]:hover,
button[class*="bg-red-5"]:hover {
  background: #b91c1c !important;
}

/* Ghost/Outline buttons */
button[class*="border-white/10"],
button[class*="bg-white/5"],
button[class*="bg-white/8"] {
  background: var(--bg-surface-2) !important;
  background-image: none !important;
  border: 1px solid var(--border-default) !important;
  border-radius: var(--radius-lg) !important;
  color: var(--text-secondary) !important;
  box-shadow: none !important;
}
button[class*="border-white/10"]:hover,
button[class*="bg-white/5"]:hover {
  background: var(--bg-surface-3) !important;
  border-color: var(--border-hover) !important;
  color: var(--text-primary) !important;
}

/* Generate & Burn / Big CTA button */
button[class*="font-black"][class*="uppercase"],
button[class*="GENERATE"],
.generate-btn {
  background: var(--brand-primary) !important;
  background-image: none !important;
  border: 1px solid var(--brand-primary-border) !important;
  border-radius: var(--radius-lg) !important;
  color: #fff !important;
  font-weight: 800 !important;
  letter-spacing: 0.05em !important;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25) !important;
  text-shadow: none !important;
}

/* ==============================================================================
   4. CARDS & PANELS — Minimal Dark Surfaces
   ============================================================================== */

/* Card base */
div[class*="bg-\[#0F0F11\]"],
div[class*="bg-\[#0F0F12\]"],
div[class*="bg-\[#0d0f17\]"],
div[class*="bg-\[#0D0F17\]"],
div[class*="bg-\[#12151F\]"],
div[class*="bg-\[#111\]"],
div[class*="bg-slate-900/80"],
div[class*="bg-slate-800"],
div[class*="bg-slate-900"] {
  background: var(--bg-surface) !important;
  background-image: none !important;
}

/* Border cards — refined, not golden */
div[class*="border-white/10"]:not([class*="fixed"]):not([class*="sticky"]):not(button):not(input):not(select),
div[class*="border-white/8"]:not([class*="fixed"]):not([class*="sticky"]):not(button):not(input) {
  border-color: var(--border-default) !important;
  border-radius: var(--radius-xl) !important;
  box-shadow: var(--shadow-sm) !important;
}

/* rounded-2xl cards */
div[class*="rounded-2xl"][class*="border"]:not([class*="fixed"]):not([class*="sticky"]):not(button) {
  border-radius: var(--radius-2xl) !important;
}

/* Remove card hover translate */
div[class*="rounded"][class*="border"]:not(button):hover {
  transform: none !important;
}

/* ==============================================================================
   5. NAVIGATION & SIDEBAR — Clean, Minimal
   ============================================================================== */

/* Desktop Sidebar */
div[class*="w-64"][class*="flex-col"],
div[class*="w-60"][class*="flex-col"],
aside[class*="w-64"],
aside[class*="w-60"] {
  background: var(--bg-base) !important;
  background-image: none !important;
  border-right: 1px solid var(--border-subtle) !important;
  box-shadow: none !important;
}

/* Top bar / Navbar */
div[class*="sticky top-0"],
header[class*="sticky"],
div[class*="border-b border-white/10"] {
  background: var(--bg-base) !important;
  background-image: none !important;
  border-bottom: 1px solid var(--border-subtle) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* Nav items — inactive */
button[class*="text-gray-400"][class*="hover:bg-white"],
button[class*="text-slate-400"][class*="hover:bg"] {
  color: var(--text-secondary) !important;
  background: transparent !important;
  border-radius: var(--radius-md) !important;
}
button[class*="text-gray-400"][class*="hover:bg-white"]:hover,
button[class*="text-slate-400"][class*="hover:bg"]:hover {
  background: var(--bg-hover) !important;
  color: var(--text-primary) !important;
}

/* Nav items — active (blue) */
button[class*="bg-blue-600/10"][class*="border-blue-500"],
button[class*="bg-blue-500/10"][class*="text-blue"],
a[class*="bg-blue-600/10"] {
  background: var(--brand-primary-muted) !important;
  border: 1px solid var(--brand-primary-border) !important;
  border-radius: var(--radius-md) !important;
  color: var(--brand-primary-light) !important;
}

/* Logo / Brand area */
div[class*="font-black"][class*="text-blue"],
span[class*="font-black"][class*="text-blue"] {
  font-family: var(--font-sans) !important;
  letter-spacing: -0.03em !important;
}

/* ==============================================================================
   6. STATUS BADGES & INDICATORS
   ============================================================================== */

/* Green = Completed / Success / Enabled / Approved */
span[class*="text-emerald"],
div[class*="text-emerald"],
p[class*="text-emerald"],
span[class*="text-green-4"],
span[class*="text-green-5"],
div[class*="text-green-4"] {
  color: var(--status-success) !important;
}
span[class*="bg-emerald"]:not(button),
div[class*="bg-emerald"]:not(button),
span[class*="bg-green-5"]:not(button) {
  background: var(--status-success-bg) !important;
  color: var(--status-success) !important;
}

/* Red = Failed / Error / Rejected */
span[class*="text-rose"],
div[class*="text-rose"],
span[class*="text-red-4"],
span[class*="text-red-5"] {
  color: var(--status-error) !important;
}
span[class*="bg-rose"]:not(button),
div[class*="bg-rose"]:not(button) {
  background: var(--status-error-bg) !important;
  color: var(--status-error) !important;
}

/* Amber = Pending / Warning */
span[class*="text-amber"],
div[class*="text-amber"],
span[class*="text-yellow"] {
  color: var(--status-warning) !important;
}
span[class*="bg-amber"]:not(button),
div[class*="bg-amber"]:not(button) {
  background: var(--status-warning-bg) !important;
  color: var(--status-warning) !important;
}

/* Blue = Processing / Running */
span[class*="text-blue"],
div[class*="text-blue"],
p[class*="text-blue"] {
  color: var(--brand-primary-light) !important;
}
span[class*="bg-blue"]:not(button),
div[class*="bg-blue-5"]:not(button),
div[class*="bg-blue-6"]:not(button) {
  background: var(--brand-primary-muted) !important;
  color: var(--brand-primary-light) !important;
}

/* Gray = Disabled / Cancelled */
span[class*="text-gray-4"],
span[class*="text-slate-4"],
span[class*="text-zinc-4"] {
  color: var(--status-cancelled) !important;
}

/* ==============================================================================
   7. INPUT FIELDS & FORMS
   ============================================================================== */
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]),
textarea,
select {
  background: var(--bg-surface-2) !important;
  border: 1px solid var(--border-default) !important;
  border-radius: var(--radius-md) !important;
  color: var(--text-primary) !important;
  box-shadow: none !important;
  font-family: var(--font-sans) !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
}
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):focus,
textarea:focus,
select:focus {
  border-color: var(--brand-primary-border) !important;
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
}
input::placeholder,
textarea::placeholder {
  color: var(--text-disabled) !important;
}

/* Range sliders */
input[type="range"] {
  accent-color: var(--brand-primary) !important;
}

/* Checkboxes */
input[type="checkbox"] {
  accent-color: var(--brand-primary) !important;
}

/* ==============================================================================
   8. MODALS & OVERLAYS — Properly handle backdrop
   ============================================================================== */

/* Modal backdrop */
div[class*="fixed inset-0"][class*="bg-black"],
div[class*="fixed inset-0"][class*="bg-black/80"],
div[class*="fixed inset-0"][class*="backdrop-blur"] {
  background: rgba(0, 0, 0, 0.75) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* Modal panel */
div[class*="fixed"][class*="inset-0"][class*="z-50"] > div[class*="bg-"],
div[class*="rounded-xl"][class*="border"][class*="shadow-2xl"]:not(button):not(input) {
  background: var(--bg-surface) !important;
  background-image: none !important;
  border: 1px solid var(--border-strong) !important;
  border-radius: var(--radius-2xl) !important;
  box-shadow: var(--shadow-xl) !important;
}

/* ==============================================================================
   9. SCROLLBARS — Minimal
   ============================================================================== */
::-webkit-scrollbar {
  width: 4px !important;
  height: 4px !important;
}
::-webkit-scrollbar-track {
  background: transparent !important;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1) !important;
  border-radius: 999px !important;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.18) !important;
}

/* ==============================================================================
   10. PROGRESS BARS & SPINNERS
   ============================================================================== */
div[class*="bg-blue-600"][role="progressbar"],
div[class*="bg-blue-500"][class*="h-"],
div[class*="rounded-full"][class*="bg-blue"] {
  background: var(--brand-primary) !important;
}
div[class*="bg-emerald"][class*="h-"],
div[class*="rounded-full"][class*="bg-emerald"],
div[class*="rounded-full"][class*="bg-green"] {
  background: var(--status-success) !important;
}

/* ==============================================================================
   11. CREDIT BADGE & BILLING
   ============================================================================== */
div[class*="bg-amber"][class*="rounded"],
span[class*="bg-amber"][class*="rounded"] {
  background: var(--status-warning-bg) !important;
  border: 1px solid var(--status-warning-border) !important;
  color: var(--status-warning) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: none !important;
}

/* Credit text values */
span[class*="text-amber"][class*="font-"],
div[class*="text-amber"][class*="font-"] {
  color: var(--status-warning) !important;
}

/* ==============================================================================
   12. FEATURE UNAVAILABLE PAGE FIX (Black screen issue)
   ============================================================================== */
div[class*="max-w-xl"][class*="my-16"][class*="bg-\[#12151F\]"] {
  background: var(--bg-surface) !important;
  border: 1px solid var(--border-default) !important;
  border-radius: var(--radius-2xl) !important;
  box-shadow: var(--shadow-lg) !important;
}

/* The page wrapper behind the unavailable card needs a background */
body > #root > div {
  background: var(--bg-base) !important;
  min-height: 100vh !important;
}

/* ==============================================================================
   13. ADMIN SUITE CLASSES (dubflow-admin.js injected styles)
   ============================================================================== */
.admin-card {
  background: var(--bg-surface) !important;
  border: 1px solid var(--border-default) !important;
  border-radius: var(--radius-xl) !important;
  box-shadow: var(--shadow-sm) !important;
  color: var(--text-primary) !important;
}

.admin-tab-btn {
  padding: 7px 14px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  transition: all 0.15s ease;
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid transparent;
  background: transparent;
  font-family: var(--font-sans);
}

.admin-tab-btn:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
  border-color: var(--border-default);
}

.admin-tab-btn.active {
  color: var(--brand-primary-light);
  background: var(--brand-primary-muted);
  border-color: var(--brand-primary-border);
  font-weight: 700;
}

.admin-input {
  background: var(--bg-surface-2) !important;
  border: 1px solid var(--border-default) !important;
  color: var(--text-primary) !important;
  border-radius: var(--radius-md) !important;
  padding: 0.5rem 0.75rem !important;
  transition: all 0.15s ease !important;
  font-family: var(--font-sans) !important;
}

.admin-input:focus {
  outline: none !important;
  border-color: var(--brand-primary-border) !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
}

.admin-textarea {
  width: 100% !important;
  min-height: 110px !important;
  background: var(--bg-surface-2) !important;
  border: 1px solid var(--border-default) !important;
  color: var(--text-primary) !important;
  border-radius: var(--radius-md) !important;
  padding: 10px 14px !important;
  font-size: 12px !important;
  line-height: 1.5 !important;
  box-sizing: border-box !important;
  font-family: var(--font-sans) !important;
  resize: vertical !important;
}

.admin-textarea:focus {
  outline: none !important;
  border-color: var(--brand-primary-border) !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
}

/* Additional Admin Suite Custom Utilities */
.dub-tab-btn {
  padding: 7px 14px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
  color: var(--text-secondary) !important;
  border-radius: var(--radius-md) !important;
  transition: all 0.15s ease !important;
  white-space: nowrap !important;
  cursor: pointer !important;
  background: transparent !important;
  border: 1px solid transparent !important;
  flex-shrink: 0 !important;
  font-family: var(--font-sans) !important;
}

.dub-tab-btn:hover {
  color: var(--text-primary) !important;
  background: var(--bg-hover) !important;
  border-color: var(--border-default) !important;
}

.dub-tab-btn.active {
  color: var(--brand-primary-light) !important;
  background: var(--brand-primary-muted) !important;
  border-color: var(--brand-primary-border) !important;
  font-weight: 700 !important;
  box-shadow: none !important;
}

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

/* ==============================================================================
   14. MOBILE RESPONSIVENESS — Full Fix
   ============================================================================== */

/* Global mobile fixes — NO backdrop-filter that breaks mobile */
.backdrop-blur,
.backdrop-blur-sm,
.backdrop-blur-xs,
.backdrop-blur-md,
.backdrop-blur-lg,
.backdrop-blur-xl,
.backdrop-blur-2xl,
.backdrop-blur-3xl {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* Mobile nav top bar */
@media (max-width: 768px) {
  html, body {
    overflow-x: hidden !important;
    width: 100% !important;
  }

  /* Mobile top bar */
  .md\:hidden.w-full,
  div[class*="md:hidden"][class*="w-full"] {
    border-radius: 0 !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
    border-bottom: 1px solid var(--border-subtle) !important;
    background: var(--bg-base) !important;
    background-image: none !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 45 !important;
    width: 100% !important;
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.5) !important;
  }

  /* Mobile drawer — clean, no border-radius on left side */
  div[class*="fixed inset-y-0 left-0"] {
    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    height: 100vh !important;
    height: 100dvh !important;
    width: 82vw !important;
    max-width: 300px !important;
    border-radius: 0 var(--radius-xl) var(--radius-xl) 0 !important;
    border-top: none !important;
    border-bottom: none !important;
    border-left: none !important;
    border-right: 1px solid var(--border-default) !important;
    background: var(--bg-surface) !important;
    background-image: none !important;
    box-shadow: 8px 0 32px rgba(0, 0, 0, 0.9) !important;
    z-index: 999 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }

  /* Drawer backdrop — no blur, clean dark overlay */
  div[class*="fixed inset-0"][class*="z-[998]"],
  div[class*="fixed inset-0"][class*="z-\[998\]"] {
    background: rgba(0, 0, 0, 0.6) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  /* Content padding on mobile */
  .max-w-7xl {
    padding-left: 12px !important;
    padding-right: 12px !important;
    padding-top: 12px !important;
    margin-top: 0 !important;
  }

  /* Full width cards on mobile */
  div[class*="max-w-xl"][class*="my-16"] {
    margin: 2rem auto !important;
    max-width: calc(100vw - 32px) !important;
  }
}

/* Tablet adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
  .max-w-7xl {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
}

/* ==============================================================================
   15. SPECIAL COMPONENTS — Studio, Panels, Sliders
   ============================================================================== */

/* Audio/Video waveform, progress tracks */
div[class*="rounded-full"][class*="bg-white/10"],
div[class*="rounded-full"][class*="bg-slate-800"] {
  background: var(--bg-surface-2) !important;
}

/* Profile image / Avatar */
div[class*="rounded-full"][class*="bg-blue"],
span[class*="rounded-full"][class*="bg-blue"] {
  background: var(--brand-primary) !important;
}

/* Dividers */
div[class*="border-t border-white/10"],
hr[class*="border-white/10"] {
  border-color: var(--border-subtle) !important;
}

/* Select / Dropdown menus */
div[class*="absolute"][class*="bg-\[#"],
div[class*="absolute"][class*="border"][class*="rounded"][class*="shadow"] {
  background: var(--bg-surface) !important;
  border: 1px solid var(--border-strong) !important;
  border-radius: var(--radius-xl) !important;
  box-shadow: var(--shadow-xl) !important;
}

/* Tooltip */
div[class*="tooltip"],
div[role="tooltip"] {
  background: var(--bg-surface-3) !important;
  border: 1px solid var(--border-default) !important;
  border-radius: var(--radius-md) !important;
  color: var(--text-secondary) !important;
  font-size: 12px !important;
  box-shadow: var(--shadow-md) !important;
}

/* Table rows */
tr:hover > td {
  background: var(--bg-hover) !important;
}
table th {
  color: var(--text-secondary) !important;
  font-weight: 600 !important;
  font-size: 11px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
}

/* ==============================================================================
   16. STUDIO FOOTER BRANDING (bottom bar)
   ============================================================================== */
footer,
div[class*="STUDIO SUITE"] {
  color: var(--text-disabled) !important;
  font-size: 10px !important;
  letter-spacing: 0.08em !important;
}

/* ==============================================================================
   17. ANIMATION — Subtle, professional
   ============================================================================== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: fadeInUp 0.2s ease !important;
}

/* Remove all glow/pulse animations on cards */
div[class*="rounded"][class*="border"]:not(button):not(input) {
  animation: none !important;
}

/* Keep spinner animations */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.animate-spin {
  animation: spin 1s linear infinite !important;
}

/* Keep pulse for processing indicators */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite !important;
}

/* ==============================================================================
   18. APP-SPECIFIC SELECTORS (from compiled JS class audit)
   ============================================================================== */

/* Login page */
div[class*="min-h-screen bg-\[#08090C\]"],
div[class*="min-h-screen bg-\[#08080A\]"],
div[class*="min-h-screen bg-\[#080809\]"] {
  background-color: var(--bg-base) !important;
  background-image: none !important;
}

/* Main app wrapper */
div[class*="min-h-screen bg-\[#0A0A0B\]"] {
  background-color: var(--bg-base) !important;
  background-image: none !important;
}

/* Sidebar (desktop+mobile) */
div[class*="bg-\[#0D0F15\]"],
div[class*="bg-\[#0d0f15\]"] {
  background-color: var(--bg-surface) !important;
  background-image: none !important;
}

/* Studio card panels */
div[class*="bg-\[#0F0F11\]"],
div[class*="bg-\[#0E0E10\]"] {
  background-color: var(--bg-surface) !important;
  background-image: none !important;
}

/* Billing/Account sidebar panel */
div[class*="bg-\[#0F172A\]"],
div[class*="bg-\[#111827\]"] {
  background-color: var(--bg-surface) !important;
  background-image: none !important;
}

/* Mobile sidebar drawer backdrop — dark overlay, no blur */
div.fixed.inset-0.bg-black\/70.z-40.md\:hidden {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  background: rgba(0, 0, 0, 0.65) !important;
}

/* Logo square — amber preserved for brand identity */
div[class*="w-8 h-8 rounded-lg bg-amber-500"],
div[class*="rounded-lg bg-amber-500"] {
  background: var(--status-warning) !important;
  color: #0a0a0b !important;
}

/* Toast notifications */
div[class*="bg-emerald-950"][class*="border-emerald-500"] {
  background: var(--status-success-bg) !important;
  border-color: var(--status-success-border) !important;
  color: var(--status-success) !important;
  border-radius: var(--radius-lg) !important;
}
div[class*="bg-rose-950"][class*="border-rose-500"] {
  background: var(--status-error-bg) !important;
  border-color: var(--status-error-border) !important;
  color: var(--status-error) !important;
  border-radius: var(--radius-lg) !important;
}
div[class*="bg-blue-950"][class*="border-blue-500"] {
  background: var(--status-processing-bg) !important;
  border-color: var(--status-processing-border) !important;
  color: var(--brand-primary-light) !important;
  border-radius: var(--radius-lg) !important;
}

/* Billing overview card bg-slate-900/80 */
div[class*="bg-slate-900/80"][class*="backdrop-blur"] {
  background: var(--bg-surface) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-radius: var(--radius-xl) !important;
}

/* Video aspect ratio wrapper */
div[class*="aspect-video"][class*="bg-black"] {
  background: #000 !important;
}

/* Selection highlight */
::selection {
  background: rgba(59, 130, 246, 0.3) !important;
  color: #fff !important;
}

/* ==============================================================================
   19. MOBILE DRAWER BLUR FIX — Critical
   ============================================================================== */

/* The main mobile blur issue: when sidebar opens it uses backdrop-blur on modals.
   Remove ALL backdrop-filter from non-fixed elements on mobile */
@media (max-width: 768px) {
  * {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }

  /* But still allow solid backgrounds on modals */
  div[class*="fixed inset-0"][class*="bg-black"] {
    background: rgba(0, 0, 0, 0.75) !important;
  }

  /* Prevent body scroll when drawer open */
  body.mobile-drawer-open {
    overflow: hidden !important;
  }

  /* Admin Suite floating pill — on mobile */
  #btn-admin-floating-pill {
    position: fixed !important;
    bottom: 18px !important;
    top: auto !important;
    right: 16px !important;
    left: auto !important;
    height: 34px !important;
    min-height: 34px !important;
    max-height: 34px !important;
    width: auto !important;
    max-width: max-content !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    padding: 0 14px !important;
    line-height: 34px !important;
    border-radius: 9999px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    z-index: 2147483640 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
  }
}

/* Global desktop floating pill */
#btn-admin-floating-pill {
  position: fixed !important;
  bottom: 24px !important;
  top: auto !important;
  right: 24px !important;
  left: auto !important;
  height: 36px !important;
  min-height: 36px !important;
  max-height: 36px !important;
  width: auto !important;
  max-width: max-content !important;
  padding: 0 16px !important;
  line-height: 36px !important;
  border-radius: 9999px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  z-index: 2147483640 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
}

/* ==============================================================================
   20. DUB FLOW BRANDING REMOVAL — Replace text "DubFlow" references in footer
   ============================================================================== */
/* Footer text color fix */
div[class*="text-\[10px\]"][class*="text-gray"],
span[class*="text-\[10px\]"][class*="text-gray"],
p[class*="text-\[10px\]"][class*="uppercase"] {
  color: var(--text-disabled) !important;
  font-family: var(--font-mono) !important;
  letter-spacing: 0.08em !important;
}

/* ==============================================================================
   21. PROFESSIONAL DATA TABLE STYLES
   ============================================================================== */
table {
  width: 100% !important;
  border-collapse: collapse !important;
}
thead th {
  background: var(--bg-surface-2) !important;
  color: var(--text-secondary) !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  padding: 10px 12px !important;
  border-bottom: 1px solid var(--border-default) !important;
}
tbody tr {
  border-bottom: 1px solid var(--border-subtle) !important;
}
tbody tr:last-child {
  border-bottom: none !important;
}
tbody td {
  padding: 10px 12px !important;
  color: var(--text-secondary) !important;
  font-size: 12px !important;
}
tbody tr:hover td {
  background: var(--bg-hover) !important;
  color: var(--text-primary) !important;
}

/* ==============================================================================
   22. PROGRESS / UPLOAD INDICATORS
   ============================================================================== */
/* Upload area */
div[class*="border-dashed"][class*="border-white/10"] {
  border-color: var(--border-default) !important;
  background: var(--bg-surface-2) !important;
  border-radius: var(--radius-xl) !important;
  transition: border-color 0.2s ease, background 0.2s ease !important;
}
div[class*="border-dashed"][class*="border-white/10"]:hover {
  border-color: var(--brand-primary-border) !important;
  background: var(--brand-primary-muted) !important;
}

/* ==============================================================================
   23. ADMIN MODAL FULL-SCREEN PROFESSIONAL REDESIGN
   ============================================================================== */
#dubflow-admin-modal {
  background: var(--bg-base) !important;
  background-color: var(--bg-base) !important;
  font-family: var(--font-sans) !important;
}

/* Admin tabs header area */
#dubflow-admin-modal > div:first-child {
  background: var(--bg-surface) !important;
  border-bottom: 1px solid var(--border-subtle) !important;
}

/* Admin mobile backdrop */
#mobile-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 998;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* ==============================================================================
   24. TUTORIAL BUTTON VISIBILITY CONTROL
   When admin sets enable_tutorial_button=false, dubflow-admin.js adds
   class "tutorials-disabled" to <body>. These rules hide the button.
   ============================================================================== */

/* Universal tutorial button hiding rules — target by data attribute (most reliable) */
/* These rules apply when admin sets enable_tutorial_button=false */

/* High-specificity attribute selectors — not dependent on class names */
html.tutorials-disabled [data-tutorial-btn],
html.tutorials-disabled [title*="အသုံးပြုနည်း"],
html.tutorials-disabled [title*="Tutorial"],
html.tutorials-disabled button[class*="from-blue-600"][class*="to-indigo-600"],
html.tutorials-disabled button[class*="shadow-blue-900"],
body.tutorials-disabled [data-tutorial-btn],
body.tutorials-disabled [title*="အသုံးပြုနည်း"],
body.tutorials-disabled [title*="Tutorial"],
body.tutorials-disabled button[class*="from-blue-600"][class*="to-indigo-600"],
body.tutorials-disabled button[class*="shadow-blue-900"],
body[data-tutorials-enabled="false"] [data-tutorial-btn],
body[data-tutorials-enabled="false"] [title*="အသုံးပြုနည်း"],
body[data-tutorials-enabled="false"] [title*="Tutorial"],
body[data-tutorials-enabled="false"] button[class*="from-blue-600"][class*="to-indigo-600"],
body[data-tutorials-enabled="false"] button[class*="shadow-blue-900"],
/* Standalone selectors with !important — catches freshly-rendered React nodes before JS observer fires */
[data-tutorial-btn][style*="display: none"],
[data-tutorial-btn][style*="visibility: hidden"] {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  opacity: 0 !important;
  position: absolute !important;
  clip: rect(0,0,0,0) !important;
}

/* Catch-all: if html has tutorials-disabled, hide ALL data-tutorial-btn elements globally */
html.tutorials-disabled [data-tutorial-btn] {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  width: 0 !important;
  height: 0 !important;
}

/* Also hide any tutorial modal that might open */
body.tutorials-disabled div[class*="fixed inset-0"][class*="backdrop-blur-sm"][class*="animate-fade-in"],
body[data-tutorials-enabled="false"] div[class*="fixed inset-0"][class*="backdrop-blur-sm"][class*="animate-fade-in"] {
  display: none !important;
}
