:root {
  --font-sans: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", monospace;

  /* Theme colors - Modern Dark (Default) */
  --bg-main: #0b0f19;
  --bg-card: rgba(18, 24, 38, 0.85);
  --bg-card-hover: rgba(26, 34, 52, 0.95);
  --bg-input: #121826;
  --bg-input-focus: #161f33;
  --border-color: rgba(255, 255, 255, 0.1);
  --border-color-hover: rgba(255, 255, 255, 0.2);
  --border-active: #6366f1;
  
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-dim: #6b7280;
  
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-glow: rgba(99, 102, 241, 0.35);
  --primary-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);

  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  --accent-cyan: #06b6d4;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.25);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  
  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Global Top Progress Bar */
#global-top-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, #6366f1, #38bdf8, #10b981);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.8), 0 0 4px #6366f1;
  z-index: 999999;
  transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
  opacity: 0;
  pointer-events: none;
}

/* Studio Quota Meter */
.preview-quota-widget {
  width: 100%;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.9rem;
  margin-bottom: 1rem;
  text-align: left;
}

.quota-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.35rem;
}

.quota-title {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.quota-pill {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 99px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
}

.quota-bar-bg {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 0.3rem;
}

.quota-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #10b981, #38bdf8);
  border-radius: 99px;
  transition: width 0.4s ease;
}

.quota-bar-fill.fill-danger {
  background: var(--accent-rose);
}

.quota-footer {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--text-muted);
}

[data-theme="dark"] {
  --bg-main: #0b0f19;
  --bg-card: rgba(18, 24, 38, 0.85);
  --bg-card-hover: rgba(26, 34, 52, 0.95);
  --bg-input: #121826;
  --bg-input-focus: #161f33;
  --border-color: rgba(255, 255, 255, 0.1);
  --border-color-hover: rgba(255, 255, 255, 0.2);
  --border-active: #6366f1;
  
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-dim: #6b7280;
  
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-glow: rgba(99, 102, 241, 0.35);
  --primary-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.25);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg-main: #f8fafc;
    --bg-card: rgba(255, 255, 255, 0.95);
    --bg-card-hover: rgba(255, 255, 255, 1);
    --bg-card-solid: #ffffff;
    --bg-input: #ffffff;
    --bg-input-focus: #ffffff;
    --border-color: rgba(203, 213, 225, 0.85);
    --border-color-hover: rgba(99, 102, 241, 0.45);
    --border-active: #4f46e5;
    
    --text-main: #0f172a;
    --text-muted: #475569;
    --text-dim: #94a3b8;
    
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-glow: rgba(79, 70, 229, 0.25);
    --primary-gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    --primary-subtle: rgba(79, 70, 229, 0.08);

    --accent-emerald: #059669;
    --accent-amber: #d97706;
    --accent-rose: #e11d48;
    --accent-cyan: #0284c7;

    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05), 0 1px 2px rgba(15, 23, 42, 0.03);
    --shadow-md: 0 4px 12px -2px rgba(15, 23, 42, 0.06), 0 2px 4px -1px rgba(15, 23, 42, 0.04), 0 0 0 1px rgba(226, 232, 240, 0.85);
    --shadow-lg: 0 12px 30px -4px rgba(15, 23, 42, 0.09), 0 4px 8px -2px rgba(15, 23, 42, 0.04), 0 0 0 1px rgba(226, 232, 240, 0.95);
    --shadow-glow: 0 0 35px rgba(79, 70, 229, 0.18);
  }
}

[data-theme="dark"] {
  --bg-main: #0b0f19;
  --bg-card: rgba(18, 24, 38, 0.85);
  --bg-card-hover: rgba(26, 34, 52, 0.95);
  --bg-input: #121826;
  --bg-input-focus: #161f33;
  --border-color: rgba(255, 255, 255, 0.1);
  --border-color-hover: rgba(255, 255, 255, 0.2);
  --border-active: #6366f1;
}

[data-theme="light"] {
  --bg-main: #f8fafc;
  --bg-card: rgba(255, 255, 255, 0.95);
  --bg-card-hover: rgba(255, 255, 255, 1);
  --bg-card-solid: #ffffff;
  --bg-input: #ffffff;
  --bg-input-focus: #ffffff;
  --border-color: rgba(203, 213, 225, 0.85);
  --border-color-hover: rgba(99, 102, 241, 0.45);
  --border-active: #4f46e5;
  
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #94a3b8;
  
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-glow: rgba(79, 70, 229, 0.25);
  --primary-gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  --primary-subtle: rgba(79, 70, 229, 0.08);

  --accent-emerald: #059669;
  --accent-amber: #d97706;
  --accent-rose: #e11d48;
  --accent-cyan: #0284c7;

  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05), 0 1px 2px rgba(15, 23, 42, 0.03);
  --shadow-md: 0 4px 12px -2px rgba(15, 23, 42, 0.06), 0 2px 4px -1px rgba(15, 23, 42, 0.04), 0 0 0 1px rgba(226, 232, 240, 0.85);
  --shadow-lg: 0 12px 30px -4px rgba(15, 23, 42, 0.09), 0 4px 8px -2px rgba(15, 23, 42, 0.04), 0 0 0 1px rgba(226, 232, 240, 0.95);
  --shadow-glow: 0 0 35px rgba(79, 70, 229, 0.18);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* ============================================== */
/* MODERN STREAMLINED HEADER */
/* ============================================== */
.app-header {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  height: 66px;
  display: flex;
  align-items: center;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

[data-theme="light"] .app-header {
  background: rgba(255, 255, 255, 0.88);
}

.header-container {
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

/* Brand Section */
.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  cursor: pointer;
  user-select: none;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.brand:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: var(--primary-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 14px var(--primary-glow);
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.brand-badge-pro {
  font-size: 0.65rem;
  font-weight: 800;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  color: #fff;
  padding: 0.12rem 0.48rem;
  border-radius: var(--radius-full);
  letter-spacing: 0.06em;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

/* Center Navigation Pills */
.nav-pills {
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 4px;
  gap: 3px;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-pills::-webkit-scrollbar {
  display: none;
}

.nav-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.95rem;
  border-radius: var(--radius-full);
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-pill:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.06);
}

.nav-pill.active {
  background: var(--primary);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 2px 10px var(--primary-glow);
}

.nav-pill svg {
  flex-shrink: 0;
}

/* Right Actions Section */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

.btn-header-signin {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 1rem;
  font-weight: 700;
  font-size: 0.85rem;
  border-radius: var(--radius-full);
}

/* Language Switcher */
.lang-switcher-wrapper {
  position: relative;
}

.lang-switcher-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.32rem 0.65rem;
  border-radius: var(--radius-full);
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
}

.lang-switcher-btn:hover {
  border-color: var(--primary);
  background: var(--bg-input-focus);
}

.lang-flag {
  font-size: 0.95rem;
}

.lang-code {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
}

.lang-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.35rem;
  min-width: 145px;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  animation: fadeInDown 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.lang-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.45rem 0.65rem;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: var(--transition);
}

.lang-dropdown-item:hover {
  background: var(--bg-input);
  color: var(--primary);
}

.lang-dropdown-item.active {
  background: rgba(99, 102, 241, 0.15);
  color: var(--primary);
  font-weight: 700;
}

.lang-item-flag {
  font-size: 1rem;
}

.lang-item-tag {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* Interactive Header User Chip */
.header-user-chip {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.28rem 0.75rem 0.28rem 0.35rem;
  border-radius: var(--radius-full);
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
}

.header-user-chip:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--primary);
  box-shadow: 0 0 14px var(--primary-glow);
  transform: translateY(-1px);
}

.user-avatar-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary-gradient);
  color: #fff;
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
}

.user-chip-meta {
  display: flex;
  flex-direction: column;
  text-align: left;
  line-height: 1.15;
}

.user-chip-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-main);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-chip-role {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--accent);
}

.user-chip-chevron {
  color: var(--text-dim);
  transition: transform 0.2s ease;
  margin-left: 2px;
}

.header-user-chip:hover .user-chip-chevron {
  color: var(--text-main);
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background: var(--bg-input);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.icon-btn:hover {
  background: var(--bg-input-focus);
  border-color: var(--border-color-hover);
  transform: scale(1.05);
}

/* Main Content */
.main-wrapper {
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem;
  flex: 1;
}

.tab-pane {
  display: none;
  animation: fadeIn 0.25s ease;
}

.tab-pane.active {
  display: block;
}

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

/* Hero Presentation Banner */
.hero-intro-banner {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(18, 24, 38, 0.9) 100%);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: var(--radius-xl);
  padding: 2.25rem 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.5), 0 0 30px rgba(99, 102, 241, 0.12);
  position: relative;
  overflow: hidden;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.35);
  color: #a5b4fc;
  padding: 0.3rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.hero-title {
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-bottom: 0.75rem;
  background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.02rem;
  color: var(--text-muted);
  max-width: 780px;
  line-height: 1.6;
  margin-bottom: 1.75rem;
}

.hero-cta-row {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 2rem;
}

/* Feature Highlights Grid */
.hero-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-feature-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  transition: var(--transition);
}

.hero-feature-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(99, 102, 241, 0.3);
  transform: translateY(-2px);
}

.hero-feature-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.hero-feature-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.35rem;
}

.hero-feature-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Studio Grid */
.studio-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 1.5rem;
  align-items: start;
  width: 100%;
  max-width: 100%;
}

.studio-left-column {
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

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

/* Cards */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
  width: 100%;
  box-sizing: border-box;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.card-title {
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-title-icon {
  color: var(--primary);
  display: flex;
  align-items: center;
}

/* Dynamic vs Static Toggle Banner */
.mode-toggle-banner {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(56, 189, 248, 0.08));
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.mode-toggle-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.mode-toggle-info i {
  font-size: 1.5rem;
}

.mode-toggle-info strong {
  display: block;
  font-size: 0.92rem;
  color: #fff;
}

.mode-toggle-info span {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.mode-switch-group {
  display: flex;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 0.2rem;
}

.mode-switch-btn {
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.mode-switch-btn.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 6px var(--primary-glow);
}

/* Type Grid */
.type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(115px, 1fr));
  gap: 0.6rem;
  margin-bottom: 1.25rem;
}

.type-card {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-muted);
  text-align: center;
}

.type-card:hover {
  background: var(--bg-input-focus);
  border-color: var(--border-color-hover);
  color: var(--text-main);
  transform: translateY(-2px);
}

.type-card.active {
  background: rgba(99, 102, 241, 0.15);
  border-color: var(--primary);
  color: var(--primary);
  font-weight: 600;
  box-shadow: 0 4px 12px var(--primary-glow);
}

.type-card i {
  font-size: 1.35rem;
}

.type-card span {
  font-size: 0.78rem;
}

/* Form inputs */
.form-group {
  margin-bottom: 1rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.75rem;
}

@media (max-width: 640px) {
  .form-row, .form-row-3 {
    grid-template-columns: 1fr;
  }
}

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--text-main);
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.85rem;
  color: var(--text-main);
  font-size: 0.88rem;
  font-family: inherit;
  transition: var(--transition);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--border-active);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
  background: var(--bg-input-focus);
}

.form-textarea {
  resize: vertical;
  min-height: 80px;
}

.form-hint {
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

/* Switch */
.switch-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0.35rem 0;
}

.switch,
.switch-control {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

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

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  transition: 0.3s;
  border-radius: var(--radius-full);
}

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

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

input:checked + .slider:before {
  transform: translateX(20px);
  background-color: #fff;
}

/* Accordion */
.accordion-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.accordion-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
}

.accordion-header {
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.accordion-header:hover {
  background: rgba(255, 255, 255, 0.02);
}

.accordion-title {
  font-size: 0.92rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.accordion-arrow {
  font-size: 0.75rem;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.accordion-item.open .accordion-arrow {
  transform: rotate(180deg);
}

.accordion-body {
  display: none;
  padding: 1.25rem;
  border-top: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.05);
}

.accordion-item.open .accordion-body {
  display: block;
}

/* Style Options Grid */
.style-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 0.5rem;
  margin-top: 0.4rem;
}

.style-opt-btn {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  color: var(--text-muted);
  transition: var(--transition);
}

.style-opt-btn:hover {
  border-color: var(--border-color-hover);
  color: var(--text-main);
}

.style-opt-btn.active {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.15);
  color: var(--primary);
}

.style-opt-preview {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.style-opt-preview svg {
  width: 100%;
  height: 100%;
}

.style-opt-btn span {
  font-size: 0.72rem;
  font-weight: 500;
}

/* Color Pickers */
.color-picker-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
}

.color-input-wrapper {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  overflow: hidden;
  cursor: pointer;
  flex-shrink: 0;
}

.color-input-wrapper input[type="color"] {
  width: 150%;
  height: 150%;
  transform: translate(-15%, -15%);
  cursor: pointer;
  border: none;
  background: none;
}

.color-hex-input {
  max-width: 100px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  font-size: 0.82rem;
}

/* Sliders */
.slider-group {
  margin-top: 0.85rem;
}

.slider-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.range-input {
  width: 100%;
  accent-color: var(--primary);
  cursor: pointer;
}

/* Preset Logos */
.preset-logos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(42px, 1fr));
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.preset-logo-btn {
  width: 42px;
  height: 42px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  padding: 8px;
}

.preset-logo-btn:hover {
  border-color: var(--primary);
  transform: scale(1.05);
}

.preset-logo-btn.active {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.2);
}

.preset-logo-btn svg, .preset-logo-btn img {
  max-width: 100%;
  max-height: 100%;
}

/* Themes Grid */
.themes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.75rem;
}

.theme-card {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: var(--transition);
}

.theme-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.theme-preview-dots {
  display: flex;
  gap: 4px;
}

.theme-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
}

.theme-name {
  font-size: 0.75rem;
  font-weight: 600;
  text-align: center;
}

/* Preview Sidebar */
.preview-sidebar {
  position: sticky;
  top: 85px;
  width: 100%;
  max-width: 380px;
  min-width: 0;
}

.preview-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 1.25rem;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.qr-preview-wrapper {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.25rem;
  max-width: 100%;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.qr-canvas-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.qr-canvas-container canvas, .qr-canvas-container svg {
  max-width: 100%;
  height: auto !important;
  display: block;
}

.qr-frame-top-text {
  margin-bottom: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.92rem;
  text-align: center;
  transition: var(--transition);
  width: 100%;
}

.qr-frame-bottom-text {
  margin-top: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.92rem;
  text-align: center;
  transition: var(--transition);
  width: 100%;
}

.qr-frame-phone-notch {
  width: 84px;
  height: 8px;
  background: rgba(15, 23, 42, 0.7);
  border-radius: 99px;
  margin-bottom: 12px;
}

.preview-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

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

.res-selector {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}

.res-selector span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.res-pills {
  display: flex;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.2rem;
  gap: 0.2rem;
}

.res-pill {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.res-pill.active {
  background: var(--primary);
  color: #fff;
}

/* Buttons */
.btn-group {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 0.95rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-decoration: none;
  box-sizing: border-box;
}

.export-buttons .btn {
  flex: 1;
  min-width: 110px;
}

.btn-primary {
  background: var(--primary-gradient);
  color: #fff;
  box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-primary:hover {
  opacity: 0.95;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px var(--primary-glow);
}

.btn-secondary {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: var(--bg-input-focus);
  border-color: var(--border-color-hover);
}

.btn-accent {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
}

.btn-warning {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
}

.btn-danger {
  background: linear-gradient(135deg, #f43f5e, #e11d48);
  color: #fff;
}

.btn-full {
  width: 100%;
}

.btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  border-radius: var(--radius-sm);
}

.btn-micro, .btn-xs {
  padding: 2px 6px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  border-radius: 4px !important;
  height: 22px !important;
  min-width: auto !important;
  width: auto !important;
  max-height: 22px !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 3px !important;
  flex: none !important;
}

.qr-table .btn {
  min-width: auto !important;
  flex: none !important;
  width: auto !important;
}

/* Dashboard Styles */
.dashboard-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.stat-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.stat-icon-primary { background: rgba(99, 102, 241, 0.15); color: var(--primary); }
.stat-icon-emerald { background: rgba(16, 185, 129, 0.15); color: var(--accent-emerald); }
.stat-icon-amber { background: rgba(245, 158, 11, 0.15); color: var(--accent-amber); }
.stat-icon-cyan { background: rgba(6, 182, 212, 0.15); color: var(--accent-cyan); }

.stat-metric-info strong {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.2;
}

.stat-metric-info span {
  font-size: 0.78rem;
  color: var(--text-muted);
}

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

.qr-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.85rem;
}

.qr-table th {
  background: var(--bg-input);
  padding: 0.85rem 1rem;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
}

.qr-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

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

/* Compact Table for Admin */
.qr-table-compact th {
  padding: 0.4rem 0.6rem !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.03em !important;
  white-space: nowrap !important;
}

.qr-table-compact td {
  padding: 0.35rem 0.6rem !important;
  font-size: 0.78rem !important;
  vertical-align: middle !important;
}

.btn-micro {
  padding: 2px 6px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  border-radius: 4px !important;
  height: 22px !important;
  min-width: auto !important;
  width: auto !important;
  max-height: 22px !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 2px !important;
  flex: none !important;
}

.table-actions-group {
  display: inline-flex !important;
  align-items: center !important;
  gap: 3px !important;
  flex-wrap: nowrap !important;
  width: auto !important;
}

/* Table Pagination Toolbar */
.table-pagination-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  border-top: 1px solid var(--border-color);
  background: var(--bg-card);
  font-size: 0.8rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 0.75rem;
  border-bottom-left-radius: var(--radius-md);
  border-bottom-right-radius: var(--radius-md);
}

.pagination-info {
  font-weight: 500;
  font-size: 0.78rem;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.page-btn {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  min-width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.page-btn:hover:not(:disabled) {
  border-color: var(--primary);
  background: var(--bg-input-focus);
}

.page-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 2px 8px var(--primary-glow);
}

.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.badge-free {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.badge-limit {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-unlimited {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Scan Progress Bar */
.scan-progress-wrapper {
  width: 140px;
}

.scan-progress-bar-bg {
  width: 100%;
  height: 6px;
  background: var(--bg-input);
  border-radius: 99px;
  overflow: hidden;
  margin-top: 4px;
}

.scan-progress-bar-fill {
  height: 100%;
  border-radius: 99px;
  background: var(--primary);
  transition: width 0.3s ease;
}

.scan-progress-bar-fill.fill-warning {
  background: var(--accent-amber);
}

.scan-progress-bar-fill.fill-danger {
  background: var(--accent-rose);
}

.scan-progress-bar-fill.fill-unlimited {
  background: var(--accent-emerald);
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: fadeIn 0.2s ease;
}

.modal-card {
  background: var(--bg-card);
  backdrop-filter: blur(24px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 480px;
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  position: relative;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.modal-title {
  font-size: 1.2rem;
  font-weight: 700;
}

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

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

.auth-tabs {
  display: flex;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.25rem;
  margin-bottom: 1.5rem;
}

.auth-tab-btn {
  flex: 1;
  padding: 0.55rem;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.auth-tab-btn.active {
  background: var(--primary);
  color: #fff;
}

/* History Grid */
.history-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
  margin-top: 1.25rem;
  width: 100%;
  box-sizing: border-box;
}

.history-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  transition: all 0.2s ease;
  box-sizing: border-box;
  overflow: hidden;
}

.history-card:hover {
  border-color: rgba(99, 102, 241, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.history-card-top {
  display: flex;
  gap: 12px;
  align-items: center;
  width: 100%;
}

.history-thumb-box {
  width: 54px;
  height: 54px;
  background: #fff;
  border-radius: 10px;
  padding: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.history-thumb-box:hover {
  transform: scale(1.08);
}

.history-meta {
  flex: 1;
  min-width: 0;
  text-align: left;
}

.history-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.history-date {
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-bottom: 3px;
}

.history-url {
  font-size: 0.74rem;
  color: #38bdf8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.history-actions {
  display: flex;
  gap: 6px;
  width: 100%;
  margin-top: 0.25rem;
  border-top: 1px solid var(--border-color);
  padding-top: 0.75rem;
}

.history-actions .btn {
  flex: 1;
  padding: 0.45rem 0.5rem;
  font-size: 0.76rem;
  font-weight: 600;
  justify-content: center;
  white-space: nowrap;
}

.history-thumb-box svg,
.history-thumb-box canvas,
.qr-table-thumb svg,
.qr-table-thumb canvas,
#view-qr-canvas-container svg,
#view-qr-canvas-container canvas,
#qr-preview-container svg,
#qr-preview-container canvas {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  display: block;
  object-fit: contain;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--primary);
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  color: var(--text-main);
  box-shadow: var(--shadow-lg);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.toast.toast-error {
  border-left-color: var(--accent-rose);
}

.toast.toast-warning {
  border-left-color: var(--accent-amber);
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Dropzone */
.dropzone {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem 1.5rem;
  text-align: center;
  background: var(--bg-input);
  cursor: pointer;
  transition: var(--transition);
}

.dropzone:hover {
  border-color: var(--primary);
  background: var(--bg-input-focus);
}

.dropzone-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: var(--primary);
}

/* Progress bar */
.progress-container {
  display: none;
  margin: 1.25rem 0;
}

.progress-bar {
  width: 0%;
  height: 8px;
  background: var(--primary-gradient);
  border-radius: var(--radius-full);
  transition: width 0.2s ease;
}

/* Scanner Video Feed */
#scanner-video-container {
  position: relative;
  max-width: 480px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #000;
  aspect-ratio: 4/3;
  display: none;
}

#scanner-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scanner-laser {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--accent-rose);
  box-shadow: 0 0 12px var(--accent-rose);
  animation: scanLaser 2s infinite ease-in-out;
}

@keyframes scanLaser {
  0% { top: 10%; }
  50% { top: 90%; }
  100% { top: 10%; }
}

/* Print View Styles */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
  .app-header, .studio-left-column, .header-actions, .btn-group, .res-selector, .preview-status, .nav-pills, .modal-overlay {
    display: none !important;
  }
  .main-wrapper {
    margin: 0;
    padding: 0;
    max-width: 100%;
  }
  .studio-grid {
    display: flex;
    justify-content: center;
    align-items: center;
  }
  .preview-card {
    border: none;
    box-shadow: none;
    background: transparent;
  }
}

/* ============================================== */
/* Overview & Presentation Landing Page */
/* ============================================== */
.overview-container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 1rem 0 4rem;
}

.overview-hero {
  text-align: center;
  padding: 3.5rem 2rem 2.5rem;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(18, 24, 38, 0.95) 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl), 0 0 60px rgba(99, 102, 241, 0.1);
  margin-bottom: 3.5rem;
  backdrop-filter: blur(20px);
}

.overview-hero-title {
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.18;
  margin: 1.25rem auto 1rem;
  max-width: 820px;
}

.gradient-text {
  background: linear-gradient(135deg, #6366f1 0%, #38bdf8 50%, #34d399 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.overview-hero-lead {
  font-size: 1.12rem;
  color: var(--text-muted);
  max-width: 740px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

.overview-hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.btn-lg {
  padding: 0.85rem 1.75rem;
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--radius-md);
}

.overview-stats-bar {
  display: inline-flex;
  align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 0.75rem 2rem;
  gap: 1.75rem;
  box-shadow: var(--shadow-sm);
  flex-wrap: wrap;
  justify-content: center;
}

.stat-pill {
  text-align: center;
}

.stat-pill-num {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  font-family: var(--font-mono);
}

.stat-pill-lbl {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.stat-pill-divider {
  width: 1px;
  height: 28px;
  background: var(--border-color);
}

/* Sections */
.overview-section {
  margin-bottom: 4rem;
  text-align: center;
}

.section-badge-center {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.75rem;
}

.overview-section-title {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.overview-section-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 2.25rem;
}

/* Workflow Steps */
.workflow-steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.25rem;
  text-align: left;
}

.workflow-step-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem;
  position: relative;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.workflow-step-card:hover {
  transform: translateY(-4px);
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 12px 30px -10px rgba(99, 102, 241, 0.2);
}

.step-badge {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--primary);
  background: rgba(99, 102, 241, 0.1);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
}

.step-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.step-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.step-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* Feature Highlights */
.features-highlight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.25rem;
  text-align: left;
}

.feature-highlight-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: var(--transition);
}

.feature-highlight-card:hover {
  border-color: var(--border-focus);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.fh-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 1rem;
}

.feature-highlight-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.feature-highlight-card p {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* Smart Routing Showcase Grid */
.smart-routing-showcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.25rem;
  text-align: left;
}

.smart-showcase-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.smart-showcase-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  opacity: 0;
  transition: opacity 0.25s ease;
}

.smart-showcase-card:hover {
  border-color: var(--border-focus);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.smart-showcase-card:hover::before {
  opacity: 1;
}

.smart-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.smart-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
}

.smart-showcase-card h3 {
  font-size: 1.08rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.smart-showcase-card p {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 1rem;
  flex-grow: 1;
}

.smart-example-box {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.9rem;
  font-size: 0.78rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.smart-example-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.smart-example-item span {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.74rem;
}

.smart-example-item strong {
  color: #38bdf8;
  font-weight: 600;
}

/* Pricing Table */
.pricing-table-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.overview-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.overview-table th, .overview-table td {
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
}

.overview-table th {
  background: rgba(0, 0, 0, 0.2);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.overview-table tr:last-child td {
  border-bottom: none;
}

.overview-table .highlight-col {
  background: rgba(99, 102, 241, 0.08);
  font-weight: 600;
}

.overview-table th.highlight-col {
  color: #38bdf8;
  background: rgba(99, 102, 241, 0.15);
}

.badge-tag {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
}

.badge-emerald {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.3);
  color: #34d399;
}

.badge-cyan {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.3);
  color: #38bdf8;
}

/* Callout Banner */
.overview-cta-banner {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(56, 189, 248, 0.15));
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: var(--radius-xl);
  padding: 3rem 2rem;
  text-align: center;
  box-shadow: 0 15px 40px -10px rgba(99, 102, 241, 0.3);
}

.cta-banner-content h2 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.cta-banner-content p {
  color: var(--text-muted);
  font-size: 1rem;
}

/* ============================================== */
/* PROFILE PAGE STYLES */
/* ============================================== */
.profile-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.profile-hero-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.profile-hero-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--primary-gradient);
}

.profile-user-info {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.profile-avatar-large {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--primary-gradient);
  color: #fff;
  font-size: 2rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px var(--primary-glow);
  flex-shrink: 0;
}

.profile-user-meta h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

.profile-user-meta .profile-email {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 0.6rem;
}

.profile-kpi-stats {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.profile-kpi-box {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 0.9rem 1.25rem;
  text-align: center;
  min-width: 120px;
}

.profile-kpi-num {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-main);
  font-family: var(--font-mono);
}

.profile-kpi-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.profile-grid-layout {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 1.5rem;
  align-items: start;
}

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

/* ============================================== */
/* APPLICATION FOOTER */
/* ============================================== */
.app-footer {
  margin-top: 5rem;
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: relative;
  overflow: hidden;
}

.app-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary-gradient);
  opacity: 0.8;
}

.footer-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 3.5rem 2rem 2rem;
}

.footer-top-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-col-brand {
  padding-right: 1.5rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.footer-brand-icon {
  width: 38px;
  height: 38px;
  background: var(--primary-gradient);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 12px var(--primary-glow);
}

.footer-brand-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.footer-description {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.footer-system-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.76rem;
  color: #10b981;
  font-weight: 600;
}

.status-indicator-dot {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 8px #10b981;
  animation: pulseStatus 2s infinite;
}

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

.footer-heading {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.2rem;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links li a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 500;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
}

.footer-links li a:hover {
  color: var(--primary);
  transform: translateX(3px);
}

.footer-perk-item {
  font-size: 0.84rem;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.footer-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.82rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-scroll-top-btn {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.footer-scroll-top-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--primary-glow);
}

@media (max-width: 960px) {
  .footer-top-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
  .footer-col-brand {
    grid-column: 1 / -1;
    padding-right: 0;
  }
}

@media (max-width: 580px) {
  .footer-top-grid {
    grid-template-columns: 1fr;
  }
  .footer-bottom-bar {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }
}

/* ============================================== */
/* Google Real-Time Website Translation Clean Skin */
/* ============================================== */
.goog-te-banner-frame.skiptranslate,
.goog-te-banner-frame,
#goog-gt-tt,
.goog-te-balloon-frame {
  display: none !important;
  visibility: hidden !important;
}

body {
  top: 0px !important;
  position: static !important;
}

.goog-logo-link,
.goog-te-gadget span {
  display: none !important;
}

.goog-te-gadget {
  color: transparent !important;
  font-size: 0px !important;
  line-height: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
}

.goog-text-highlight {
  background: none !important;
  box-shadow: none !important;
}

#google_translate_element {
  display: none !important;
}

/* ============================================== */
/* Cookie Consent Banner & Preferences Modal */
/* ============================================== */
.cookie-consent-banner {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  right: 1.5rem;
  max-width: 920px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.05);
  padding: 1.25rem 1.5rem;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  animation: slideUpCookie 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(16px);
}

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

.cookie-content {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  flex: 1;
}

.cookie-icon {
  font-size: 2.2rem;
  line-height: 1;
  flex-shrink: 0;
}

.cookie-text h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.3rem;
}

.cookie-text p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin: 0;
}

.cookie-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.cookie-category-item {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  margin-bottom: 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.cookie-category-info h5 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.2rem;
}

.cookie-category-info p {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin: 0;
}

@media (max-width: 768px) {
  .cookie-consent-banner {
    bottom: 0.75rem;
    left: 0.75rem;
    right: 0.75rem;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    gap: 1rem;
  }
  .cookie-actions {
    justify-content: stretch;
  }
  .cookie-actions button {
    flex: 1;
  }
}

/* ============================================== */
/* LUXURY MODERN LIGHT MODE ENHANCEMENTS */
/* ============================================== */

/* 1. Header & Navigation */
[data-theme="light"] .app-header {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(203, 213, 225, 0.7);
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05);
}

[data-theme="light"] .brand-title {
  color: #0f172a;
}

[data-theme="light"] .nav-pills {
  background: rgba(226, 232, 240, 0.65);
  border: 1px solid rgba(203, 213, 225, 0.8);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04) inset;
}

[data-theme="light"] .nav-pill {
  color: #475569;
}

[data-theme="light"] .nav-pill:hover {
  color: #0f172a;
  background: rgba(255, 255, 255, 0.65);
}

[data-theme="light"] .nav-pill.active {
  background: #ffffff;
  color: #4f46e5;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

/* 2. Hero & Overview Section */
[data-theme="light"] .overview-hero-badge {
  background: rgba(79, 70, 229, 0.08);
  border: 1px solid rgba(79, 70, 229, 0.25);
  color: #4f46e5;
}

[data-theme="light"] .overview-hero-title {
  color: #0f172a;
}

[data-theme="light"] .overview-hero-title-gradient {
  background: linear-gradient(135deg, #4338ca 0%, #7c3aed 50%, #0284c7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="light"] .overview-hero-lead {
  color: #475569;
}

/* 3. Quick Metrics Bar (Overview) */
[data-theme="light"] .overview-stats-bar {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(241, 245, 249, 0.92));
  backdrop-filter: blur(16px);
  border: 1px solid rgba(99, 102, 241, 0.25);
  box-shadow: 0 1px 1px 0 rgba(255, 255, 255, 1) inset, 0 10px 30px -5px rgba(99, 102, 241, 0.12), 0 2px 6px rgba(15, 23, 42, 0.04);
}

[data-theme="light"] .stat-pill-num {
  background: linear-gradient(135deg, #1e1b4b, #4338ca);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
}

[data-theme="light"] .stat-pill-lbl {
  color: #64748b;
  font-weight: 700;
}

[data-theme="light"] .stat-pill-divider {
  background: rgba(203, 213, 225, 0.8);
}

/* 4. Workflow & Feature Cards */
[data-theme="light"] .workflow-step-card,
[data-theme="light"] .feature-card,
[data-theme="light"] .faq-card {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 1px 1px 0 rgba(255, 255, 255, 0.9) inset, 0 4px 16px -2px rgba(15, 23, 42, 0.05), 0 1px 3px rgba(15, 23, 42, 0.03);
}

[data-theme="light"] .workflow-step-card:hover,
[data-theme="light"] .feature-card:hover,
[data-theme="light"] .faq-card:hover {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(99, 102, 241, 0.35);
  box-shadow: 0 1px 1px 0 rgba(255, 255, 255, 1) inset, 0 12px 28px -4px rgba(15, 23, 42, 0.08), 0 0 20px rgba(99, 102, 241, 0.08);
}

[data-theme="light"] .step-badge {
  background: rgba(79, 70, 229, 0.1);
  border: 1px solid rgba(79, 70, 229, 0.25);
  color: #4f46e5;
}

[data-theme="light"] .step-title,
[data-theme="light"] .feature-title,
[data-theme="light"] .faq-q {
  color: #0f172a;
}

[data-theme="light"] .step-desc,
[data-theme="light"] .feature-desc,
[data-theme="light"] .faq-a {
  color: #475569;
}

/* 5. Studio & Cards */
[data-theme="light"] .card {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 1px 1px 0 rgba(255, 255, 255, 0.9) inset, 0 4px 16px -2px rgba(15, 23, 42, 0.05), 0 1px 3px rgba(15, 23, 42, 0.03);
}

[data-theme="light"] .card-title {
  color: #0f172a;
}

[data-theme="light"] .mode-toggle-banner {
  background: linear-gradient(135deg, rgba(238, 242, 255, 0.95), rgba(240, 249, 255, 0.95));
  border: 1px solid rgba(99, 102, 241, 0.25);
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.08);
}

[data-theme="light"] .mode-toggle-info strong {
  color: #0f172a;
}

[data-theme="light"] .mode-toggle-info span {
  color: #475569;
}

[data-theme="light"] .mode-switch-group {
  background: rgba(226, 232, 240, 0.85);
  border: 1px solid rgba(203, 213, 225, 0.9);
}

[data-theme="light"] .mode-switch-btn {
  color: #475569;
}

[data-theme="light"] .mode-switch-btn.active {
  background: #ffffff;
  color: #4f46e5;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.1);
}

/* 6. Type Selector Grid */
[data-theme="light"] .type-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(226, 232, 240, 0.95);
  color: #334155;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

[data-theme="light"] .type-card:hover {
  background: #ffffff;
  border-color: rgba(99, 102, 241, 0.45);
  color: #1e1b4b;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.12);
}

[data-theme="light"] .type-card.active {
  background: linear-gradient(135deg, #eef2ff 0%, #faf5ff 100%);
  border: 2px solid #6366f1;
  color: #4338ca;
  font-weight: 700;
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.18);
}

/* 7. Form Controls */
[data-theme="light"] .form-label {
  color: #1e293b;
  font-weight: 600;
}

[data-theme="light"] .form-input,
[data-theme="light"] .form-select,
[data-theme="light"] .form-textarea {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #0f172a;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

[data-theme="light"] .form-input:focus,
[data-theme="light"] .form-select:focus,
[data-theme="light"] .form-textarea:focus {
  background: #ffffff;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15), 0 1px 2px rgba(15, 23, 42, 0.04);
}

[data-theme="light"] .form-hint {
  color: #64748b;
}

/* 8. Studio Patterns, Shapes & Previews */
[data-theme="light"] .shape-option,
[data-theme="light"] .corner-option {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(226, 232, 240, 0.95);
  color: #334155;
}

[data-theme="light"] .shape-option:hover,
[data-theme="light"] .corner-option:hover {
  background: #ffffff;
  border-color: #6366f1;
}

[data-theme="light"] .shape-option.active,
[data-theme="light"] .corner-option.active {
  background: #eef2ff;
  border-color: #6366f1;
  color: #4338ca;
  box-shadow: 0 0 0 1px #6366f1, 0 4px 12px rgba(99, 102, 241, 0.15);
}

[data-theme="light"] .preview-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.08);
}

[data-theme="light"] #qr-container {
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .preview-quota-widget {
  background: rgba(241, 245, 249, 0.8);
  border: 1px solid rgba(203, 213, 225, 0.8);
}

[data-theme="light"] .quota-title {
  color: #0f172a;
}

[data-theme="light"] .quota-bar-bg {
  background: rgba(203, 213, 225, 0.6);
}

[data-theme="light"] .res-pills .res-pill {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #475569;
}

[data-theme="light"] .res-pills .res-pill.active {
  background: #4f46e5;
  color: #ffffff;
  border-color: #4f46e5;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
}

/* 9. Buttons */
[data-theme="light"] .btn-secondary {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #1e293b;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

[data-theme="light"] .btn-secondary:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
}

/* 10. Tables & Dashboard */
[data-theme="light"] .data-table thead {
  background: rgba(241, 245, 249, 0.9);
  border-bottom: 2px solid #e2e8f0;
}

[data-theme="light"] .data-table thead th {
  color: #475569;
  font-weight: 700;
}

[data-theme="light"] .data-table tbody tr {
  border-bottom: 1px solid #e2e8f0;
}

[data-theme="light"] .data-table tbody tr:hover {
  background: rgba(241, 245, 249, 0.75);
}

[data-theme="light"] .badge-free {
  background: rgba(79, 70, 229, 0.1);
  border: 1px solid rgba(79, 70, 229, 0.25);
  color: #4f46e5;
}

[data-theme="light"] .badge-unlimited {
  background: rgba(5, 150, 105, 0.1);
  border: 1px solid rgba(5, 150, 105, 0.25);
  color: #059669;
}

[data-theme="light"] .badge-limit {
  background: rgba(225, 29, 72, 0.1);
  border: 1px solid rgba(225, 29, 72, 0.25);
  color: #e11d48;
}

/* 11. Modals */
[data-theme="light"] .modal-overlay {
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(8px);
}

[data-theme="light"] .modal-card {
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 25px 60px -12px rgba(15, 23, 42, 0.25);
}

[data-theme="light"] .modal-title {
  color: #0f172a;
}

[data-theme="light"] .modal-close-btn {
  color: #64748b;
}

[data-theme="light"] .modal-close-btn:hover {
  color: #0f172a;
  background: #f1f5f9;
}

/* 12. Footer & Cookie Banner */
[data-theme="light"] .app-footer {
  background: rgba(241, 245, 249, 0.8);
  border-top: 1px solid rgba(203, 213, 225, 0.7);
  color: #64748b;
}

[data-theme="light"] .cookie-consent-banner {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(203, 213, 225, 0.8);
  box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.15);
}

/* 13. Pricing Table & CTA Banner (Light Mode) */
[data-theme="light"] .pricing-table-card {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 1px 1px 0 rgba(255, 255, 255, 1) inset, 0 12px 35px -5px rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .overview-table th {
  background: #f8fafc;
  color: #475569;
  border-bottom: 2px solid #e2e8f0;
}

[data-theme="light"] .overview-table td {
  border-bottom: 1px solid #e2e8f0;
  color: #334155;
}

[data-theme="light"] .overview-table .highlight-col {
  background: rgba(79, 70, 229, 0.05);
  color: #1e1b4b;
}

[data-theme="light"] .overview-table th.highlight-col {
  background: rgba(79, 70, 229, 0.12);
  color: #4338ca;
  font-weight: 800;
}

[data-theme="light"] .overview-cta-banner {
  background: linear-gradient(135deg, rgba(238, 242, 255, 0.95), rgba(224, 242, 254, 0.9));
  border: 1px solid rgba(99, 102, 241, 0.3);
  box-shadow: 0 12px 35px -5px rgba(99, 102, 241, 0.15);
}

[data-theme="light"] .overview-cta-banner h2 {
  color: #0f172a;
}

[data-theme="light"] .overview-cta-banner p {
  color: #475569;
}

[data-theme="light"] .badge-emerald {
  background: rgba(5, 150, 105, 0.1);
  border-color: rgba(5, 150, 105, 0.25);
  color: #059669;
}

[data-theme="light"] .badge-cyan {
  background: rgba(2, 132, 199, 0.1);
  border-color: rgba(2, 132, 199, 0.25);
  color: #0284c7;
}

[data-theme="light"] .badge-tag {
  background: rgba(241, 245, 249, 0.9);
  border-color: rgba(203, 213, 225, 0.8);
  color: #334155;
}

/* 14. Pro Smart Routing Cards */
.pro-feature-card {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem 1.15rem;
  margin-bottom: 0.85rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.pro-feature-card:hover {
  border-color: rgba(99, 102, 241, 0.35);
}

.pro-feature-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.pro-feature-info {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.pro-feature-icon {
  font-size: 1.4rem;
  line-height: 1;
  padding: 6px;
  background: rgba(99, 102, 241, 0.12);
  border-radius: 8px;
  border: 1px solid rgba(99, 102, 241, 0.2);
  flex-shrink: 0;
}

.pro-feature-body {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px dashed var(--border-color);
  animation: fadeIn 0.2s ease-out;
}

/* 15. 3D Mockup Studio Bar */
.mockup-studio-bar {
  width: 100%;
  margin-bottom: 0.85rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
  box-sizing: border-box;
}

.mockup-bar-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.mockup-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  width: 100%;
  box-sizing: border-box;
}

.mockup-tab-btn {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 0.4rem 0.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
}

.mockup-tab-btn:hover {
  background: rgba(99, 102, 241, 0.12);
  color: var(--text-main);
  border-color: rgba(99, 102, 241, 0.35);
}

.mockup-tab-btn.active {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(139, 92, 246, 0.25));
  color: #a5b4fc;
  border-color: var(--primary);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.2);
}

#qr-mockup-canvas {
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  display: block;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
}

/* Terms & Conditions Modal */
.modal-card-terms {
  max-width: 860px !important;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1.75rem;
}

.terms-lang-bar {
  display: flex;
  gap: 0.4rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-color);
  overflow-x: auto;
  margin-bottom: 0.75rem;
}

.terms-lang-btn {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.3rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.terms-lang-btn:hover {
  color: var(--text-main);
  border-color: var(--primary);
}

.terms-lang-btn.active {
  background: rgba(99, 102, 241, 0.18);
  border-color: var(--primary);
  color: #a5b4fc;
}

.terms-content-box {
  overflow-y: auto;
  padding-right: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.65;
  flex: 1;
}

.terms-section {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.25rem;
  margin-bottom: 1rem;
}

.terms-section h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.terms-section ul {
  padding-left: 1.25rem;
  margin: 0.5rem 0;
}

.terms-section li {
  margin-bottom: 0.4rem;
}

.terms-section .highlight-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

