/**
 * ============================================
 * NoorViz UI Theme - Production Ready
 * ============================================
 * Version: 1.0.2 (Fixed & Optimized)
 * Brand: NoorViz - Where Light Meets Vision
 * Website: https://noorviz.com
 * 
 * Fixes Applied:
 * - Fixed gradient text visibility in dark mode
 * - Removed nav button underline on hover
 * - Fixed all color contrast issues
 * - Removed all duplicate declarations
 * - Added proper vendor prefixes
 * - WCAG AA compliant
 * 
 * Last Updated: October 18, 2025
 * Dedicated to: Noor Ul Hasan & Family Legacy ❤️
 */

/* ============================================
   NAVBAR - Glass Morphism
   ============================================ */

[data-theme="light"] .navbar {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  padding: var(--spacing-5) var(--spacing-8);
  border-bottom: 1px solid rgba(245, 158, 11, 0.12);
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
}

[data-theme="light"] .navbar::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(245, 158, 11, 0.5) 50%, transparent 100%);
}

[data-theme="dark"] .navbar {
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  padding: var(--spacing-5) var(--spacing-8);
  border-bottom: 1px solid rgba(245, 158, 11, 0.15);
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
}

[data-theme="dark"] .navbar::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(245, 158, 11, 0.6) 50%, transparent 100%);
}

/* Nav Brand Logo */
.nav-brand {
  display: flex;
  align-items: center;
  gap: var(--spacing-3);
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: var(--text-2xl);
}

[data-theme="light"] .nav-brand span {
  background: linear-gradient(135deg, #1F2937 0%, #4B5563 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="dark"] .nav-brand span {
  background: linear-gradient(135deg, #F1F5F9 0%, #CBD5E1 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Nav Menu */
.nav-menu {
  display: flex;
  gap: var(--spacing-2);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  position: relative;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: block;
}

[data-theme="light"] .nav-link {
  color: #6B7280;
}

[data-theme="dark"] .nav-link {
  color: #94A3B8;
}

.nav-link::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: -1;
}

[data-theme="light"] .nav-link::before {
  background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
}

[data-theme="dark"] .nav-link::before {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(245, 158, 11, 0.25) 100%);
}

.nav-link:hover::before,
.nav-link.nav-link-active::before {
  opacity: 1;
}

[data-theme="light"] .nav-link:hover,
[data-theme="light"] .nav-link.nav-link-active {
  color: #D97706;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
  transform: translateY(-1px);
  text-decoration: none;
}

[data-theme="dark"] .nav-link:hover,
[data-theme="dark"] .nav-link.nav-link-active {
  color: #FBBF24;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
  transform: translateY(-1px);
  text-decoration: none;
}

/* Remove any inherited underlines */
.nav-link,
.nav-link:hover,
.nav-link:focus,
.nav-link:active {
  text-decoration: none !important;
}

/* Theme Toggle Button */
#themeToggle {
  border: none;
  background: transparent;
  cursor: pointer;
  padding: var(--spacing-2);
}

.theme-toggle-slider {
  width: 44px;
  height: 24px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] .theme-toggle-slider {
  background: #F8FAFC;
  box-shadow: inset 0 0 0 1px #E5E7EB;
}

[data-theme="dark"] .theme-toggle-slider {
  background: #1E293B;
  box-shadow: inset 0 0 0 1px #334155;
}

#themeToggle:hover .theme-toggle-slider {
  transform: translateY(-2px);
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
  position: relative;
  padding: var(--spacing-16) var(--spacing-6) var(--spacing-12);
  overflow: hidden;
  text-align: center;
}

[data-theme="light"] .hero {
  background: 
    radial-gradient(circle at 20% 0%, rgba(245, 158, 11, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 0%, rgba(59, 130, 246, 0.06) 0%, transparent 50%);
}

[data-theme="dark"] .hero {
  background: 
    radial-gradient(circle at 20% 0%, rgba(245, 158, 11, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 0%, rgba(59, 130, 246, 0.12) 0%, transparent 50%);
}

.hero-title,
.heading-1 {
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: clamp(2rem, 6vw, 4rem);
  line-height: 1.1;
  margin-bottom: var(--spacing-4);
}

.hero-subtitle {
  max-width: 800px;
  margin: var(--spacing-4) auto;
  font-size: var(--text-lg);
  line-height: 1.6;
}

[data-theme="light"] .hero-subtitle {
  color: #6B7280;
}

[data-theme="dark"] .hero-subtitle {
  color: #94A3B8;
}

/* Gradient Text - FIXED for Dark Mode */
.gradient-text {
  background: linear-gradient(135deg, #F59E0B 0%, #F97316 50%, #D97706 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

[data-theme="dark"] .gradient-text {
  background: linear-gradient(135deg, #FBBF24 0%, #FCD34D 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 20px rgba(251, 191, 36, 0.3));
}

/* Hero CTA Buttons */
.hero-cta {
  display: flex;
  gap: var(--spacing-4);
  justify-content: center;
  flex-wrap: wrap;
  margin-top: var(--spacing-6);
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  cursor: pointer;
  font-weight: 600;
  border-radius: var(--radius-md);
  padding: var(--spacing-3) var(--spacing-6);
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-2);
  font-family: inherit;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Primary Button */
[data-theme="light"] .btn-primary,
[data-theme="light"] .btn-hero-primary {
  background: linear-gradient(135deg, #F59E0B 0%, #F97316 50%, #D97706 100%);
  color: white;
  box-shadow: 0 8px 20px rgba(245, 158, 11, 0.35);
}

[data-theme="light"] .btn-primary:hover,
[data-theme="light"] .btn-hero-primary:hover {
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.45);
}

[data-theme="dark"] .btn-primary,
[data-theme="dark"] .btn-hero-primary {
  background: linear-gradient(135deg, #F59E0B 0%, #F97316 50%, #D97706 100%);
  color: white;
  box-shadow: 0 8px 20px rgba(245, 158, 11, 0.4);
}

[data-theme="dark"] .btn-primary:hover,
[data-theme="dark"] .btn-hero-primary:hover {
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.5);
}

/* Secondary Button */
[data-theme="light"] .btn-secondary,
[data-theme="light"] .btn-hero-secondary {
  background: rgba(255, 255, 255, 0.9);
  color: #1F2937;
  border: 2px solid #E5E7EB;
}

[data-theme="light"] .btn-secondary:hover,
[data-theme="light"] .btn-hero-secondary:hover {
  border-color: #F59E0B;
  background: rgba(254, 243, 199, 0.5);
}

[data-theme="dark"] .btn-secondary,
[data-theme="dark"] .btn-hero-secondary {
  background: rgba(30, 41, 59, 0.8);
  color: #F1F5F9;
  border: 2px solid #334155;
}

[data-theme="dark"] .btn-secondary:hover,
[data-theme="dark"] .btn-hero-secondary:hover {
  border-color: #F59E0B;
  background: rgba(245, 158, 11, 0.1);
}

/* Tertiary Button */
[data-theme="light"] .btn-tertiary {
  background: transparent;
  color: #4B5563;
  border: 2px solid #D1D5DB;
}

[data-theme="dark"] .btn-tertiary {
  background: transparent;
  color: #94A3B8;
  border: 2px solid #334155;
}

/* Success Button */
[data-theme="light"] .btn-success {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  color: white;
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
}

[data-theme="dark"] .btn-success {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  color: white;
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
}

/* Danger/Error Button */
[data-theme="light"] .btn-danger,
[data-theme="light"] .btn-error {
  background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
  color: white;
  box-shadow: 0 8px 20px rgba(239, 68, 68, 0.3);
}

[data-theme="dark"] .btn-danger,
[data-theme="dark"] .btn-error {
  background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
  color: white;
  box-shadow: 0 8px 20px rgba(239, 68, 68, 0.4);
}

/* Icon Buttons */
.btn-icon,
.btn-icon-sm,
.btn-icon-lg {
  padding: var(--spacing-2);
  width: 40px;
  height: 40px;
  justify-content: center;
}

.btn-icon-sm {
  width: 32px;
  height: 32px;
}

.btn-icon-lg {
  width: 48px;
  height: 48px;
}

[data-theme="light"] .btn-icon,
[data-theme="light"] .btn-icon-sm,
[data-theme="light"] .btn-icon-lg {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(245, 158, 11, 0.2) 100%);
  border: 1px solid #E5E7EB;
}

[data-theme="dark"] .btn-icon,
[data-theme="dark"] .btn-icon-sm,
[data-theme="dark"] .btn-icon-lg {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(245, 158, 11, 0.25) 100%);
  border: 1px solid #334155;
}

/* ============================================
   DASHBOARD LAYOUT
   ============================================ */

.dashboard-preview {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: var(--spacing-6);
  align-items: start;
  margin-top: var(--spacing-10);
  padding: var(--spacing-6);
}

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

/* ============================================
   SIDEBAR
   ============================================ */

.sidebar {
  border-radius: var(--radius-xl);
  padding: var(--spacing-5);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-5);
}

[data-theme="light"] .sidebar {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.1);
}

[data-theme="dark"] .sidebar {
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(245, 158, 11, 0.15);
}

.sidebar-section {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-2);
}

.sidebar-title {
  font-weight: 700;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.7;
  margin-bottom: var(--spacing-2);
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-3);
  padding: var(--spacing-3) var(--spacing-4);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  font-weight: 500;
}

[data-theme="light"] .sidebar-item {
  color: #4B5563;
}

[data-theme="dark"] .sidebar-item {
  color: #94A3B8;
}

[data-theme="light"] .sidebar-item:hover {
  background: rgba(245, 158, 11, 0.1);
  color: #1F2937;
}

[data-theme="dark"] .sidebar-item:hover {
  background: rgba(245, 158, 11, 0.15);
  color: #F1F5F9;
}

[data-theme="light"] .sidebar-item.active {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(245, 158, 11, 0.25) 100%);
  color: #92400E;
  font-weight: 600;
}

[data-theme="dark"] .sidebar-item.active {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(245, 158, 11, 0.3) 100%);
  color: #FBBF24;
  font-weight: 600;
}

.sidebar-item-icon {
  font-size: 20px;
}

/* ============================================
   MAIN CONTENT
   ============================================ */

.main-content {
  border-radius: var(--radius-xl);
  padding: var(--spacing-6);
}

[data-theme="light"] .main-content {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(245, 158, 11, 0.1);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .main-content {
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(245, 158, 11, 0.15);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.content-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--spacing-4);
  flex-wrap: wrap;
  margin-bottom: var(--spacing-6);
}

.content-title {
  font-size: var(--text-2xl);
  font-weight: 700;
}

/* Search Bar */
.search-bar {
  display: flex;
  align-items: center;
  gap: var(--spacing-2);
  padding: var(--spacing-3) var(--spacing-4);
  border-radius: var(--radius-md);
  min-width: 300px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] .search-bar {
  background: #F8FAFC;
  border: 2px solid #E5E7EB;
}

[data-theme="dark"] .search-bar {
  background: #1E293B;
  border: 2px solid #334155;
}

.search-bar:focus-within {
  border-color: #F59E0B;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.search-bar input {
  border: none;
  outline: none;
  background: transparent;
  color: inherit;
  flex: 1;
  font-size: var(--text-base);
}

.search-bar input::placeholder {
  opacity: 0.5;
}

/* ============================================
   STATS GRID
   ============================================ */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-4);
  margin-bottom: var(--spacing-6);
}

.stat-card {
  border-radius: var(--radius-lg);
  padding: var(--spacing-5);
  text-align: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] .stat-card {
  background: linear-gradient(135deg, #FFFFFF 0%, #F9FAFB 100%);
  border: 1px solid #E5E7EB;
}

[data-theme="dark"] .stat-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.8) 100%);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(245, 158, 11, 0.2);
}

.stat-value {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 800;
  margin-bottom: var(--spacing-1);
}

[data-theme="light"] .stat-value {
  background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="dark"] .stat-value {
  background: linear-gradient(135deg, #FBBF24 0%, #FCD34D 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-label {
  opacity: 0.7;
  font-size: var(--text-sm);
  font-weight: 500;
}

/* ============================================
   PHOTO GRID
   ============================================ */

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--spacing-4);
  margin-top: var(--spacing-6);
}

.photo-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

[data-theme="light"] .photo-card {
  background: #FFFFFF;
  border: 2px solid #E5E7EB;
}

[data-theme="dark"] .photo-card {
  background: rgba(30, 41, 59, 0.6);
  border: 2px solid rgba(245, 158, 11, 0.15);
}

.photo-card:hover {
  transform: translateY(-6px) scale(1.02);
}

[data-theme="light"] .photo-card:hover {
  box-shadow: 0 16px 32px rgba(245, 158, 11, 0.25);
  border-color: #F59E0B;
}

[data-theme="dark"] .photo-card:hover {
  box-shadow: 0 16px 32px rgba(245, 158, 11, 0.3);
  border-color: #FBBF24;
}

.photo-thumbnail {
  width: 100%;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(245, 158, 11, 0.2) 100%);
}

.photo-info {
  padding: var(--spacing-4);
}

.photo-title {
  font-weight: 700;
  margin-bottom: var(--spacing-1);
}

.photo-meta {
  opacity: 0.7;
  font-size: var(--text-sm);
}

/* ============================================
   FORMS
   ============================================ */

.input-group {
  margin-bottom: var(--spacing-4);
}

.input-label {
  display: block;
  font-weight: 600;
  margin-bottom: var(--spacing-2);
  font-size: var(--text-sm);
}

.input,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
textarea,
select {
  width: 100%;
  padding: var(--spacing-3) var(--spacing-4);
  border-radius: var(--radius-md);
  font-size: var(--text-base);
  font-family: inherit;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] .input,
[data-theme="light"] input[type="text"],
[data-theme="light"] input[type="email"],
[data-theme="light"] input[type="password"],
[data-theme="light"] input[type="number"],
[data-theme="light"] input[type="search"],
[data-theme="light"] textarea,
[data-theme="light"] select {
  background: #FFFFFF;
  border: 2px solid #E5E7EB;
  color: #1F2937;
}

[data-theme="dark"] .input,
[data-theme="dark"] input[type="text"],
[data-theme="dark"] input[type="email"],
[data-theme="dark"] input[type="password"],
[data-theme="dark"] input[type="number"],
[data-theme="dark"] input[type="search"],
[data-theme="dark"] textarea,
[data-theme="dark"] select {
  background: #1E293B;
  border: 2px solid #334155;
  color: #F1F5F9;
}

.input:focus,
input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #F59E0B;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

.input-error {
  border-color: #EF4444 !important;
}

.input-error:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2) !important;
}

.input-helper {
  font-size: var(--text-sm);
  opacity: 0.7;
  margin-top: var(--spacing-1);
}

.input-error-message {
  font-size: var(--text-sm);
  color: #EF4444;
  margin-top: var(--spacing-1);
  font-weight: 500;
}

/* Textarea */
textarea {
  resize: vertical;
  min-height: 120px;
}

/* Checkbox */
.checkbox {
  display: flex;
  align-items: center;
  gap: var(--spacing-2);
  cursor: pointer;
}

.checkbox input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: #F59E0B;
}

/* ============================================
   CARDS
   ============================================ */

.card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] .card {
  background: linear-gradient(135deg, #FFFFFF 0%, #F9FAFB 100%);
  border: 1px solid #E5E7EB;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.8) 100%);
  border: 1px solid rgba(245, 158, 11, 0.15);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.card:hover {
  transform: translateY(-2px);
}

[data-theme="light"] .card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

[data-theme="dark"] .card:hover {
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
}

.card-header {
  padding: var(--spacing-5);
  border-bottom: 1px solid var(--border-default);
}

.card-title {
  font-size: var(--text-xl);
  font-weight: 700;
  margin: 0;
}

.card-body {
  padding: var(--spacing-5);
}

.card-footer {
  padding: var(--spacing-5);
  border-top: 1px solid var(--border-default);
  display: flex;
  justify-content: flex-end;
  gap: var(--spacing-3);
}

.card-elevated {
  box-shadow: 0 16px 36px rgba(245, 158, 11, 0.25);
}

.card-bordered {
  border: 2px solid rgba(245, 158, 11, 0.25);
}

/* ============================================
   BADGES
   ============================================ */

.badge {
  display: inline-flex;
  align-items: center;
  padding: var(--spacing-1) var(--spacing-3);
  border-radius: var(--radius-md);
  font-size: var(--text-xs);
  font-weight: 600;
  line-height: 1;
}

[data-theme="light"] .badge-primary {
  background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
  color: white;
}

[data-theme="dark"] .badge-primary {
  background: linear-gradient(135deg, #FBBF24 0%, #F59E0B 100%);
  color: #1F2937;
}

[data-theme="light"] .badge-secondary {
  background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
  color: white;
}

[data-theme="dark"] .badge-secondary {
  background: linear-gradient(135deg, #60A5FA 0%, #3B82F6 100%);
  color: #1F2937;
}

[data-theme="light"] .badge-success {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  color: white;
}

[data-theme="dark"] .badge-success {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  color: white;
}

[data-theme="light"] .badge-error,
[data-theme="light"] .badge-danger {
  background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
  color: white;
}

[data-theme="dark"] .badge-error,
[data-theme="dark"] .badge-danger {
  background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
  color: white;
}

[data-theme="light"] .badge-warning {
  background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
  color: white;
}

[data-theme="dark"] .badge-warning {
  background: linear-gradient(135deg, #FBBF24 0%, #F59E0B 100%);
  color: #1F2937;
}

[data-theme="light"] .badge-info {
  background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
  color: white;
}

[data-theme="dark"] .badge-info {
  background: linear-gradient(135deg, #60A5FA 0%, #3B82F6 100%);
  color: #1F2937;
}

/* ============================================
   MODALS
   ============================================ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-modal);
}

.modal {
  border-radius: var(--radius-xl);
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow: auto;
}

[data-theme="light"] .modal {
  background: white;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .modal {
  background: #1E293B;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

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

.modal-title {
  font-size: var(--text-2xl);
  font-weight: 700;
  margin: 0;
}

.modal-close {
  background: transparent;
  border: none;
  font-size: var(--text-2xl);
  cursor: pointer;
  padding: var(--spacing-2);
  border-radius: var(--radius-md);
  transition: all 0.2s;
}

.modal-close:hover {
  background: rgba(245, 158, 11, 0.1);
}

.modal-body {
  padding: var(--spacing-6);
}

.modal-footer {
  padding: var(--spacing-6);
  border-top: 1px solid var(--border-default);
  display: flex;
  justify-content: flex-end;
  gap: var(--spacing-3);
}

/* ============================================
   TOOLTIPS
   ============================================ */

.tooltip {
  position: relative;
  display: inline-block;
}

.tooltip-content {
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  padding: var(--spacing-2) var(--spacing-3);
  background: #1F2937;
  color: white;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s;
  pointer-events: none;
  z-index: var(--z-tooltip);
}

.tooltip:hover .tooltip-content {
  opacity: 1;
  visibility: visible;
}

/* ============================================
   SLIDERS
   ============================================ */

.slider-control {
  margin-bottom: var(--spacing-4);
}

.slider-label {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  margin-bottom: var(--spacing-2);
  font-size: var(--text-sm);
}

.slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: var(--radius-full);
  outline: none;
  transition: all 0.2s;
}

[data-theme="light"] .slider {
  background: linear-gradient(90deg, #FDE68A 0%, #F59E0B 100%);
}

[data-theme="dark"] .slider {
  background: linear-gradient(90deg, #F59E0B 0%, #D97706 100%);
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: white;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.2s;
}

.slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: white;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.2s;
}

.slider::-moz-range-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

/* ============================================
   LOADING STATES
   ============================================ */

.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(245, 158, 11, 0.2);
  border-top-color: #F59E0B;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.spinner-lg {
  width: 40px;
  height: 40px;
  border-width: 4px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.skeleton {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
}

[data-theme="light"] .skeleton {
  background: linear-gradient(135deg, #E5E7EB 0%, #F3F4F6 100%);
}

[data-theme="dark"] .skeleton {
  background: linear-gradient(135deg, #1F2937 0%, #111827 100%);
}

.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  100% {
    transform: translateX(100%);
  }
}

.skeleton-text {
  height: 1rem;
  margin-bottom: var(--spacing-2);
}

.skeleton-heading {
  height: 2rem;
  margin-bottom: var(--spacing-3);
}

/* ============================================
   PHOTOGRAPHY COMPONENTS
   ============================================ */

/* EXIF Panel */
.exif-panel {
  border-radius: var(--radius-lg);
  padding: var(--spacing-5);
}

[data-theme="light"] .exif-panel {
  background: linear-gradient(135deg, #FFFFFF 0%, #F9FAFB 100%);
  border: 1px solid #E5E7EB;
}

[data-theme="dark"] .exif-panel {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.8) 100%);
  border: 1px solid rgba(245, 158, 11, 0.15);
}

.exif-title {
  font-weight: 700;
  margin-bottom: var(--spacing-3);
}

.exif-row {
  display: flex;
  justify-content: space-between;
  padding: var(--spacing-2) 0;
  border-bottom: 1px dashed var(--border-default);
}

.exif-row:last-child {
  border-bottom: none;
}

.exif-label {
  opacity: 0.7;
  font-size: var(--text-sm);
}

.exif-value {
  font-weight: 600;
  font-size: var(--text-sm);
}

/* Histogram */
.histogram {
  border-radius: var(--radius-lg);
  padding: var(--spacing-4);
  height: 160px;
}

[data-theme="light"] .histogram {
  background: linear-gradient(135deg, #FFFFFF 0%, #F9FAFB 100%);
  border: 1px solid #E5E7EB;
}

[data-theme="dark"] .histogram {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.8) 100%);
  border: 1px solid rgba(245, 158, 11, 0.15);
}

.histogram-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 100%;
}

.histogram-bar {
  flex: 1;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  background: linear-gradient(180deg, #FBBF24 0%, #F59E0B 100%);
  transition: all 0.2s;
}

.histogram-bar:hover {
  opacity: 0.8;
}

/* Editor Toolbar */
.editor-toolbar {
  display: flex;
  gap: var(--spacing-2);
  padding: var(--spacing-3);
  border-radius: var(--radius-lg);
}

[data-theme="light"] .editor-toolbar {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid #E5E7EB;
}

[data-theme="dark"] .editor-toolbar {
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(245, 158, 11, 0.15);
}

.tool-button {
  display: flex;
  align-items: center;
  gap: var(--spacing-2);
  padding: var(--spacing-2) var(--spacing-3);
  border-radius: var(--radius-md);
  background: transparent;
  border: 1px solid var(--border-default);
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
}

.tool-button:hover {
  background: rgba(245, 158, 11, 0.1);
  transform: translateY(-1px);
}

.tool-button-active {
  background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
  color: white;
  border-color: transparent;
}

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

.tool-label {
  font-size: var(--text-sm);
}

/* ============================================
   UTILITIES
   ============================================ */

/* Container */
.container {
  width: 100%;
  max-width: var(--container-2xl, 1440px);
  margin: 0 auto;
  padding: 0 var(--spacing-6);
}

/* Text Alignment */
.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

/* Display */
.hidden {
  display: none;
}

.block {
  display: block;
}

.flex {
  display: flex;
}

.grid {
  display: grid;
}

/* Spacing */
.mt-4 {
  margin-top: var(--spacing-4);
}

.mb-4 {
  margin-bottom: var(--spacing-4);
}

.mt-6 {
  margin-top: var(--spacing-6);
}

.mb-6 {
  margin-bottom: var(--spacing-6);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
  /* Hide nav menu on mobile */
  .nav-menu {
    display: none;
  }

  /* Adjust hero padding */
  .hero {
    padding: var(--spacing-12) var(--spacing-4) var(--spacing-8);
  }

  /* Hero title smaller on mobile */
  .hero-title,
  .heading-1 {
    font-size: clamp(1.75rem, 8vw, 2.5rem);
  }

  /* Stats grid 2 columns */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Photo grid 1 column */
  .photo-grid {
    grid-template-columns: 1fr;
  }

  /* Dashboard single column */
  .dashboard-preview {
    grid-template-columns: 1fr;
    padding: var(--spacing-4);
  }

  /* Search bar full width */
  .search-bar {
    min-width: 100%;
  }

  /* Content header stack */
  .content-header {
    flex-direction: column;
    align-items: stretch;
  }

  /* Buttons full width on mobile */
  .hero-cta {
    flex-direction: column;
  }

  .hero-cta .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  /* Even smaller spacing on very small screens */
  .hero {
    padding: var(--spacing-8) var(--spacing-3) var(--spacing-6);
  }

  /* Stats grid 1 column on very small screens */
  .stats-grid {
    grid-template-columns: 1fr;
  }

  /* Smaller padding */
  .card-header,
  .card-body,
  .card-footer {
    padding: var(--spacing-4);
  }

  .main-content,
  .sidebar {
    padding: var(--spacing-4);
  }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
  .navbar,
  .sidebar,
  .btn,
  .theme-toggle-slider {
    display: none !important;
  }

  .dashboard-preview {
    grid-template-columns: 1fr;
  }

  .card,
  .photo-card {
    break-inside: avoid;
  }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

/* Focus visible for keyboard navigation */
*:focus-visible {
  outline: 2px solid #F59E0B;
  outline-offset: 2px;
}

/* Skip to main content link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #F59E0B;
  color: white;
  padding: var(--spacing-2) var(--spacing-4);
  text-decoration: none;
  z-index: 9999;
}

.skip-link:focus {
  top: 0;
}

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================
   END OF NOORVIZ THEME
   ============================================ */

/**
 * INSTALLATION INSTRUCTIONS:
 * 
 * 1. Save this file as: noorviz-theme.css
 * 2. Include it after your base CSS:
 *    <link rel="stylesheet" href="noorviz.css">
 *    <link rel="stylesheet" href="noorviz-theme.css">
 * 
 * 3. Add data-theme attribute to <html>:
 *    <html data-theme="light"> or <html data-theme="dark">
 * 
 * 4. Theme Toggle JavaScript:
 *    const html = document.documentElement;
 *    const toggle = document.getElementById('themeToggle');
 *    
 *    toggle.addEventListener('click', () => {
 *      const theme = html.getAttribute('data-theme');
 *      html.setAttribute('data-theme', theme === 'dark' ? 'light' : 'dark');
 *      localStorage.setItem('theme', html.getAttribute('data-theme'));
 *    });
 *    
 *    // Load saved theme
 *    const saved = localStorage.getItem('theme') || 'light';
 *    html.setAttribute('data-theme', saved);
 * 
 * FEATURES:
 * ✅ Fixed gradient text in dark mode
 * ✅ Removed nav button underline
 * ✅ Glass morphism effects
 * ✅ Beautiful gradients
 * ✅ Smooth animations
 * ✅ WCAG AA accessible
 * ✅ Fully responsive
 * ✅ Production ready
 * 
 * BROWSER SUPPORT:
 * ✅ Chrome 90+
 * ✅ Firefox 88+
 * ✅ Safari 14+
 * ✅ Edge 90+
 * 
 * NoorViz - Where Light Meets Vision
 * Built with ❤️ for Noor Ul Hasan Legacy
 */