:root {
  /* Base */
  --bg: #050a14;
  --panel: rgba(255, 255, 255, 0.05);
  --panel-solid: rgba(10, 14, 22, 0.92);
  --muted: rgba(255, 255, 255, 0.68);
  --text: #ffffff;
  --nav-bg: #050a14;

  /* Blue palette */
  --primary-blue: #3b82f6;
  --primary-blue-dark: #1d4ed8;
  --accent-light: #60a5fa;

  /* Accent principal (blue) */
  --accent: var(--primary-blue);
  --accent-2: var(--primary-blue-dark);
  /* Removed glow variable */
  --accent-glow: transparent;

  /* Surfaces */
  --border: rgba(255, 255, 255, 0.12);
  --border-strong: rgba(255, 255, 255, 0.18);
  --card-bg: rgba(255, 255, 255, 0.04);

  /* Gradients - Keeping structural gradients (cards/hero) but removing text gradients on P if any */
  --grad-primary: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  --grad-surface: linear-gradient(180deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0) 100%);
  --hero-text-grad: #ffffff;
  /* Removed text gradient */

  /* Rounds */
  --radius: 24px;

  /* Glows - Removed as requested */
  --shadow-soft: 0 8px 32px rgba(0, 0, 0, 0.3);
  --shadow-glass: 0 4px 16px rgba(0, 0, 0, 0.1);
  --glow-primary: none;
}

[data-theme="light"] {
  /* Softened Light Mode */
  --bg: #f8fafc;
  /* Softer off-white background (Slate-50) */
  --panel: rgba(255, 255, 255, 0.85);
  --panel-solid: #ffffff;
  --muted: #64748b;
  /* Softer muted text */
  --text: #1e293b;
  /* Dark slate text, not harsh black */
  --border: #e2e8f0;
  /* Soft border (Slate-200) */
  --border-strong: #cbd5e1;
  --card-bg: #ffffff;
  /* Pure white cards to stand out */

  /* Vibrant Blue Accents */
  --accent: #3b82f6;
  /* Blue-500 */
  --accent-2: #1d4ed8;
  /* Blue-700 */
  --accent-glow: transparent;
  --nav-bg: #f8fafc;

  --grad-primary: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  --grad-surface: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
  /* Suburban white gradient for cards */
  --hero-text-grad: #000000;
  /* Removed text gradient */

  --shadow-soft: 0 10px 30px -10px rgba(0, 0, 0, 0.08);
  /* Smooth, diffuse shadow */
  --shadow-glass: 0 4px 12px rgba(0, 0, 0, 0.03);
  --glow-primary: none;
}

/* Logo switching */
.logo-light {
  display: none;
}

.logo-dark {
  display: block;
}

[data-theme="light"] .logo-light {
  display: block;
}

[data-theme="light"] .logo-dark {
  display: none;
}

/* Global H1 and Icon Styles */
h1 {
  color: var(--text);
  font-size: 1.6rem;
  /* -20% from browser default (2rem) */
  font-weight: 500;
  letter-spacing: -0.02em;
}

/* Lucide Icons and general icons - safer defaults */
[data-lucide],
.icon,
i {
  display: inline-block;
}

[data-theme="light"] h1 {
  color: var(--text) !important;
}

/* Exception: Keep white icons in primary buttons and icon-boxes */
[data-theme="light"] .btn.primary svg,
[data-theme="light"] .btn.primary i,
[data-theme="light"] .btn.primary [data-lucide],
[data-theme="light"] .icon-box svg,
[data-theme="light"] .icon-box i,
[data-theme="light"] .icon-box [data-lucide] {
  color: white !important;
  stroke: white !important;
}

/* Ensure no gradients on p tags globally */
p {
  background: none !important;
  -webkit-background-clip: border-box !important;
  background-clip: border-box !important;
  -webkit-text-fill-color: inherit !important;
  color: var(--muted);
}

[data-theme="light"] p {
  color: var(--text) !important;
}

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

html,
body {
  width: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  position: relative;
}

.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

@media (min-width: 768px) {
  .container {
    padding: 0 40px;
  }
}

a {
  text-decoration: none;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 17px;
  line-height: 1.65;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

[data-theme="dark"] body {
  /* Removed radial gradients for a solid clean look */
  background: var(--bg);
}

p {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
  letter-spacing: 0.01em;
}

[data-theme="light"] p {
  color: #0f172a;
  /* Dark slate text for better readability in light mode */
}

/* App Layout Shell */
.app-layout {
  display: flex;
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden;
}

/* Sidebar Styling */
.sidebar {
  width: 280px;
  background: var(--panel-solid);
  border-right: 1px solid var(--border);
  box-shadow: 2px 0 15px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  position: fixed;
  /* Changed from sticky to fixed for better stability */
  left: 0;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  /* Enable vertical scrolling */
  overflow-x: hidden;
  /* Prevent horizontal scrolling */
  z-index: 100;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.sidebar.collapsed {
  width: 80px;
}

.sidebar.collapsed .sidebar-item span,
.sidebar.collapsed .sidebar-section-title,
.sidebar.collapsed .brand,
.sidebar.collapsed .brand img,
.sidebar.collapsed .sidebar-item-badge,
.sidebar.collapsed .sidebar-item-badge.hot {
  display: none !important;
}

.sidebar.collapsed .sidebar-item {
  justify-content: center;
  padding: 12px;
}

.sidebar.collapsed .sidebar-logo {
  padding: 20px 10px;
  display: flex;
  justify-content: center;
}

/* On desktop, hide sidebar if not in app */
body:not(.has-sidebar) .sidebar {
  display: none;
}

.sidebar-logo {
  padding: 30px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-nav {
  flex: 1;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-section-title {
  padding: 24px 12px 10px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--muted);
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  color: var(--muted);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  position: relative;
  text-decoration: none;
}

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

.sidebar-item.active {
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent);
}

.sidebar-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 15%;
  height: 70%;
  width: 4px;
  background: var(--accent);
  border-radius: 0 4px 4px 0;
  box-shadow: 4px 0 12px var(--accent-glow);
}

.sidebar-item-badge {
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  line-height: 1;
}

.sidebar-item-badge.hot {
  display: inline-block !important;
  background: #ef4444;
  color: white;
}

.badge,
.vt-badge {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 100px;
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 12px;
}

[data-theme="light"] .btn:not(.primary) {
  border: 1.5px solid var(--border-strong) !important;
  background: var(--panel-solid) !important;
  color: var(--text) !important;
}

[data-theme="light"] .btn:not(.primary):hover {
  background: var(--bg) !important;
  border-color: var(--accent) !important;
}

/* Sidebar Scrollbar Styling */
.sidebar::-webkit-scrollbar {
  width: 6px;
}

.sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

[data-theme="light"] .sidebar::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.25);
}

.sidebar-footer {
  padding: 20px 16px;
  border-top: 1px solid var(--border);
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: transparent;
  margin-left: 280px;
  /* Offset for fixed sidebar */
  padding-top: 70px;
  /* Offset for fixed nav */
}

body:not(.has-sidebar) .main-content {
  margin-left: 0;
}

.sidebar.collapsed+.main-content {
  margin-left: 80px;
}

/* Navbar */
.nav {
  height: 70px;
  position: fixed;
  top: 0;
  left: 280px;
  width: calc(99% - 280px);
  /* Sync with sidebar */
  transition: none;
  z-index: 100;
  display: flex;
  align-items: center;
  padding: 0 32px;
  background: var(--nav-bg);
  border-bottom: none;
}

body:not(.has-sidebar) .nav {
  left: 0;
  width: 99%;
}

.sidebar.collapsed~.main-content .nav {
  left: 80px;
}

.desktop-only {
  display: flex !important;
}

.mobile-only {
  display: none !important;
}

.menu-toggle-container {
  display: none;
}

@media (max-width: 1523px) {
  .sidebar {
    position: fixed;
    transform: translateX(-100%);
    display: flex !important;
    overflow-y: auto;
    /* Ensure scrolling works on mobile */
    -webkit-overflow-scrolling: touch;
    /* Smooth scrolling on iOS */
  }

  .sidebar.active {
    transform: translateX(0);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
  }

  .desktop-only {
    display: none !important;
  }

  .mobile-only {
    display: flex !important;
  }

  .menu-toggle-container {
    display: flex !important;
  }

  .nav {
    padding: 0 16px;
    left: 0 !important;
    width: 99% !important;
    /* Navbar always full width on mobile */
  }

  .main-content {
    margin-left: 0 !important;
    /* No sidebar offset on mobile */
  }

  body {
    overflow-x: hidden;
    /* Prevent horizontal scroll when sidebar is open */
  }
}


.brand {
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 26px rgba(59, 130, 246, 0.3);
}


.nav-links {
  display: flex;
  gap: 24px;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: #3b82f6;
  text-shadow: 0 0 12px rgba(59, 130, 246, 0.4);
}

.spacer {
  flex: 1;
}

/* UI Components */
.btn-icon {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text);
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.badge-notif {
  position: absolute;
  top: 4px;
  right: 4px;
  background: #ef4444;
  color: white;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  font-size: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  border: 2px solid var(--bg);
}

.credits-pill {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  padding: 6px 14px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.credits-info {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.credits-value {
  font-weight: 800;
  color: var(--accent);
  font-size: 1.1rem;
}

.credits-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
}

.dropdown-panel {
  position: absolute;
  top: 55px;
  right: 0;
  background: var(--panel-solid);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(25px);
  z-index: 1200;
  display: none;
  overflow: hidden;
  animation: fadeInDown 0.2s ease-out;
}

.lang-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: 50px;
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lang-pill:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.lang-icon {
  width: 18px;
  height: 18px;
  stroke-width: 2.5;
}

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

.lang-dropdown-menu {
  width: 150px;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.spin {
  animation: spin 0.8s linear infinite;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
  vertical-align: middle;
  margin-right: 8px;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dropdown-notifications {
  width: 380px;
}

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

.dropdown-header h3 {
  margin: 0;
  font-size: 1.05rem;
}

.user-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

.notif-list {
  max-height: 400px;
  overflow-y: auto;
}

.btn-xs {
  padding: 4px 10px;
  font-size: 0.8rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  cursor: pointer;
  color: var(--muted);
}

.btn-xs:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

.avatar-wrapper {
  position: relative;
  cursor: pointer;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid var(--border);
  transition: border-color 0.2s;
}

.avatar:hover {
  border-color: var(--accent);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-dropdown {
  width: 240px;
  top: 55px;
  right: 0;
  position: absolute;
  background: var(--panel-solid);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.4);
  display: none;
  z-index: 1200;
}

.user-dropdown.active {
  display: block;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.2s;
}

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

.dropdown-item.danger {
  color: #ef4444;
}

.dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 0;
}

.app-content-wrapper {
  flex: 1;
  padding: 0px;
}

@media (max-width: 768px) {
  .app-content-wrapper {
    padding: 0px;
  }
}

/* User Profile & Credits */
.nav-user-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* The original .credits-pill, .credits-info, .credits-value, .credits-label, .avatar-wrapper, .avatar, .user-dropdown, .dropdown-item, .dropdown-divider, .dropdown-header were replaced by the new UI Components block. */

/* New Credits Widget */
.credits-widget {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  padding: 6px 8px 6px 20px;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.credits-widget:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent);
}

.credits-details {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.1;
  text-align: right;
}

.credits-label {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 2px;
}

.credits-amount {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--muted);
}

.credits-circle {
  position: relative;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.credits-circle svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.credits-circle .circle-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 2.5;
}

.credits-circle .circle-value {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.5;
  stroke-linecap: round;
  transition: stroke-dasharray 0.3s ease;
}

.credits-circle .percentage {
  position: absolute;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent);
}

.avatar-wrapper {
  position: relative;
  cursor: pointer;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--card-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: all 0.3s ease;
}

.avatar-wrapper:hover .avatar {
  border-color: var(--accent);
  box-shadow: var(--glow-cyan);
  transform: scale(1.05);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-dropdown {
  position: absolute;
  top: 55px;
  right: 0;
  width: 240px;
  background: var(--panel-solid);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow-glass), 0 10px 40px rgba(0, 0, 0, 0.4);
  padding: 8px;
  display: none;
  z-index: 1100;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.user-dropdown.active {
  display: block;
  animation: dropdownFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dropdown-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}

.dropdown-user-name {
  font-weight: 700;
  font-size: 1rem;
  display: block;
  padding: 12px 16px 2px;
  color: var(--text);
}

.dropdown-user-email {
  font-size: 0.85rem;
  color: var(--muted);
  display: block;
  padding: 0 16px 8px;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.2s ease;
  width: 100%;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
}

.dropdown-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--accent);
  padding-left: 20px;
}

.dropdown-item.danger {
  color: #ef4444;
}

.dropdown-item.danger:hover {
  background: rgba(239, 68, 68, 0.08);
  color: #ef4444;
}

.dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 0;
}

.btn-icon {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.btn-icon:hover {
  background: var(--panel);
  border-color: var(--accent);
  transform: translateY(-2px);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease, filter 0.25s ease;
  gap: 8px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
  text-decoration: none !important;
}

.btn::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.20);
  transition: width .55s ease, height .55s ease;
}

.btn:hover,
.btn:active {
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.15);
}

.btn:hover::after {
  width: 320px;
  height: 320px;
}

.btn.primary {
  background: var(--accent);
  /* Solid blue */
  color: #fff;
  border: 1px solid rgba(59, 130, 246, 0.3);
  box-shadow: none;
  /* Removed shadow/glow */
}

.btn.primary:hover {
  transform: translateY(-3px);
  filter: brightness(1.1);
  background: var(--accent-2);
  /* Darker blue on hover */
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: none;
}

[data-theme="light"] .btn.primary {
  background: #3b82f6 !important;
  color: #fff !important;
}

.btn.active {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--text);
  box-shadow: none;
}

/* Remove default browser outlines but keep accessibility for keyboard navigation */
*:focus {
  outline: none;
}

/* Focus visible (propre) - only for keyboard navigation */
.btn:focus-visible,
.input:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.20), 0 0 0 1px rgba(0, 240, 255, 0.55);
  border-color: rgba(0, 240, 255, 0.7);
}

/* Cards */
.card {
  background: var(--card-bg);
  background-image: var(--grad-surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  width: 100% !important;
  height: 100% !important;
  padding: 10px;

  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);

  box-shadow: var(--shadow-soft);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

/* Highlight “reflet” */
/* Highlight “reflet” REMOVED */
.card::before {
  content: none;
}

.card:hover {
  border-color: var(--accent);
  transform: translateY(-6px);
  box-shadow: var(--shadow-soft);
}

/* Hero Section */
.hero-wrapper {
  position: relative;
  padding: 110px 0;
  text-align: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.25;
  object-fit: cover;
  filter: blur(90px) saturate(1.2);
}

.hero-wrapper::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 40%, rgba(0, 240, 255, 0.08), transparent 60%);
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  line-height: 1.05;
  margin-bottom: 24px;
  background: none;
  -webkit-background-clip: border-box;
  background-clip: border-box;
  -webkit-text-fill-color: inherit;
  color: #ffffff;
  /* Explicit white */
  text-shadow: none;
}

[data-theme="light"] .hero-bg {
  opacity: 0.06;
  filter: blur(110px) grayscale(0.2);
}

.hero p {
  font-size: 1.2rem;
  color: var(--muted);
  max-width: 650px;
  margin: 0 auto 40px;
}

/* Grids */
.grid {
  display: grid;
  gap: 24px;
  margin-top: 40px;
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* Pricing */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 60px;
  max-width: 1200px;
  margin: 60px auto 0;
}

.price-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 40px;

  background: rgba(255, 255, 255, 0.04);
  background-image: var(--grad-surface);

  border: 1px solid var(--border);
  border-radius: 32px;

  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);

  box-shadow: var(--shadow-soft);
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
  overflow: hidden;
}

.price-card:hover {
  transform: translateY(-8px);
  border-color: var(--accent);
  box-shadow: var(--shadow-soft);
}

.price-card.featured {
  background: rgba(59, 130, 246, 0.1);
  border-color: var(--accent);
  box-shadow: var(--shadow-soft);
  transform: scale(1.05);
}

.price-card.featured::before {
  content: 'Most Popular';
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: white;
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 0.825rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: none;
}

.price-value {
  font-size: 2rem;
  font-weight: 900;
  margin: 18px 0;
  letter-spacing: -1px;
}

.price-value span {
  font-size: 1rem;
  color: var(--muted);
  font-weight: 500;
}

.feature-list {
  list-style: none;
  margin: 30px 0;
  flex-grow: 1;
}

.feature-list li {
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  color: var(--muted);
}

.feature-list li::before {
  content: '✓';
  color: var(--accent);
  font-weight: 900;
  text-shadow: 0 0 18px rgba(0, 240, 255, 0.35);
}

/* Utility */
.muted {
  color: var(--muted);
}

.badge {
  display: inline-block;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 0 18px rgba(0, 240, 255, 0.12);
}

/* Inputs */
.input {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  padding: 12px 16px;
  border-radius: 12px;
  color: var(--text);
  font-size: 0.95rem;
  width: 200px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  cursor: pointer;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.input:focus {
  outline: none;
  border-color: rgba(0, 240, 255, 0.7);
  box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.18);
  background-color: rgba(255, 255, 255, 0.06);
}

select.input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
  padding-right: 32px;
}

[data-theme="light"] select.input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
}

select.input option {
  background: var(--panel-solid);
  color: var(--text);
}

/* Drag and Drop Zone */
.drop-zone {
  border: 2px dashed var(--border);
  border-radius: 24px;
  padding: 60px 40px;
  text-align: center;
  background: rgba(255, 255, 255, 0.03);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  cursor: pointer;
  position: relative;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.drop-zone:hover,
.drop-zone.drag-over {
  border-color: rgba(0, 240, 255, 0.75);
  background: rgba(0, 240, 255, 0.06);
  transform: translateY(-3px);
}

.drop-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.drop-zone .icon-box {
  width: 64px;
  height: 64px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 1.5rem;
  transition: transform 0.3s ease, background 0.3s ease;
}

.drop-zone:hover .icon-box {
  transform: translateY(-5px);
  background: var(--grad-primary);
  color: #fff;
}

/* Workspace Switcher Items */
.workspace-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 24px;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  width: 500px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.workspace-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(0, 240, 255, 0.6);
  transform: translateY(-3px);
}

/* Action Cards */
.action-card {
  text-align: center;
  padding: 30px;
  cursor: pointer;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 24px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.action-card:hover {
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-6px);
  border-color: rgba(189, 0, 255, 0.55);
}

.action-card h3 {
  margin-bottom: 8px;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 999px;
  font-size: 0.9rem;
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Mobile Sidebar */
.mobile-nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-sidebar {
  position: fixed;
  top: 0;
  right: -300px;
  width: 300px;
  height: 100%;
  background: rgba(10, 14, 22, 0.96);
  z-index: 1001;
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.mobile-sidebar.active {
  right: 0;
}

.mobile-nav-overlay.active {
  display: block;
  opacity: 1;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 8px;
}

@media (max-width: 1030px) {
  .nav {
    padding: 16px 20px;
  }

  .hero-wrapper {
    padding: 70px 0;
  }

  .price-card.featured {
    transform: scale(1);
  }

  .menu-toggle {
    display: block;
  }

  .nav-links,
  .nav-center,
  .nav-right {
    display: none !important;
  }

  /* Mobile Sidebar Logic */
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.active {
    transform: translateX(0);
  }

  .sidebar-toggle.desktop-only {
    display: none !important;
  }
}

/* Sidebar Toggle Rotation */
.sidebar.collapsed .sidebar-toggle svg {
  transform: rotate(180deg);
}

/* Back to Top */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  z-index: 2000;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  border: none;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}

.back-to-top:hover {
  transform: translateY(-5px);
  background: var(--accent-2);
}

/* Responsive Grid */
@media (max-width: 930px) {
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 600px) {
  .nav {
    padding: 12px 20px;
    gap: 10px;
  }

  .nav-text {
    display: none;
  }

  .container {
    padding: 20px 15px;
  }

  .hero-wrapper h1 {
    font-size: 2.2rem !important;
  }

  .card {
    padding: 20px !important;
  }
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-up {
  animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

/* Alerts & Notifications */
.alert {
  padding: 16px 20px;
  border-radius: 12px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 500;
  font-size: 0.95rem;
  border: 1px solid transparent;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: dropdownFadeIn 0.3s ease-out;
}

@media (max-width: 600px) {
  .alert {
    padding: 12px 16px;
    margin-top: 10px !important;
    margin-bottom: 16px;
    font-size: 0.85rem;
  }
}

.alert-success {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.2);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.1);
}

.alert-error {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.2);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.1);
}

.alert-info {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
  border-color: rgba(59, 130, 246, 0.2);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
}

.alert-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Password Input Wrapper */
.input-group {
  position: relative;
  width: 100%;
}

.input-group .input {
  width: 100%;
  padding-right: 48px;
  /* Space for the eye icon */
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  padding: 4px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.password-toggle:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

/* Password Requirements List */
.password-requirements {
  margin-top: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 0.85rem;
  display: none;
  /* Hidden by default, shown on focus */
}

.password-requirements.visible {
  display: block;
  animation: dropdownFadeIn 0.3s ease;
}

.req-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  color: var(--muted);
  transition: color 0.2s;
}

.req-item:last-child {
  margin-bottom: 0;
}

.req-item.valid {
  color: #10b981;
}

.req-item.valid::before {
  content: '✓';
  font-weight: bold;
}

.req-item.invalid::before {
  content: '•';
  font-weight: bold;
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* Responsive settings layout */
.settings-layout-grid {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}

.settings-layout-grid>* {
  min-width: 0;
  /* Ensures child elements don't expand grid */
}

@media (max-width: 1024px) {
  .settings-layout-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }
}

/* Make tables scrollable on small screens */
.table-container {
  overflow-x: auto;
  width: 100%;
}

.settings-responsive-2-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 15px;
}

@media (max-width: 1024px) {
  .settings-responsive-2-cols {
    grid-template-columns: 1fr;
  }
}