/* 
  Cureva Premium Aesthetics 
  Luxury Minimalist Theme & Professional UI System
*/

@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;800&family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Colors */
  --bg-midnight: #050a15;
  --bg-card: rgba(255, 255, 255, 0.04);
  --primary-cyan: #00d4ff;
  --primary-gradient: linear-gradient(135deg, #00bfff 0%, #00d4ff 100%);
  --accent-glow: rgba(0, 212, 255, 0.3);
  --border-glass: rgba(255, 255, 255, 0.08);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-gradient: linear-gradient(to right, #f8fafc, #00d4ff);
  
  /* Spacing & Borders */
  --radius-xl: 20px;
  --radius-lg: 12px;
  --section-gap: 100px;
  --container-width: 1100px;
  --container-padding: clamp(20px, 5vw, 40px);
  
  /* Transitions */
  --transition-premium: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.2s ease;
}

/* Global Reset & Body */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-midnight);
  color: var(--text-main);
  font-family: 'Tajawal', 'Inter', sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Global Arabic Typography Fix */
[dir="rtl"], .arabic-text {
  font-family: 'Tajawal', sans-serif;
  letter-spacing: 0 !important;
  word-spacing: normal !important;
}

/* Typography */
h1, h2, h3, h4 {
  font-weight: 800;
  line-height: 1.2;
}

.text-gradient {
  background: var(--text-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

/* Layout Utilities */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
  width: 100%;
}

.section-padding {
  padding: var(--section-gap) 0;
}

/* Premium Glassmorphism */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  transition: var(--transition-premium);
}

@media (hover: hover) {
  .glass-panel:hover {
    border-color: rgba(0, 212, 255, 0.2);
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  }
}

/* Buttons */
.btn-premium {
  background: var(--primary-gradient);
  color: #fff;
  border: none;
  padding: 16px 36px;
  border-radius: var(--radius-lg);
  font-weight: 700;
  font-size: 1rem;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition-premium);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  box-shadow: 0 8px 20px var(--accent-glow);
  min-height: 52px;
}

.btn-premium:hover {
  transform: scale(1.02) translateY(-2px);
  box-shadow: 0 12px 30px var(--accent-glow);
  filter: brightness(1.1);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--primary-cyan);
  color: var(--primary-cyan);
}

.btn-outline:hover {
  background: var(--primary-cyan);
  color: #fff;
}

/* Forms */
.premium-input {
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  color: #fff;
  width: 100%;
  transition: var(--transition-fast);
  font-family: inherit;
  font-size: 1rem;
  min-height: 52px;
  -webkit-appearance: none;
  appearance: none;
}

.premium-input:focus {
  outline: none;
  border-color: var(--primary-cyan);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 4px rgba(0, 212, 255, 0.1);
}

.premium-label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Reveal Animations */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-midnight);
}

::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: #334155;
}

/* Modals */
.premium-modal {
  position: fixed;
  inset: 0;
  background: rgba(5, 10, 21, 0.8);
  backdrop-filter: blur(20px);
  z-index: 3000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}

.premium-modal.open {
  display: flex;
}

.modal-content {
  max-width: 500px;
  width: 100%;
  background: #fff;
  color: #000;
  border-radius: 24px;
  overflow: hidden;
  position: relative;
  animation: modalIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* --- Component Specific Refinements --- */

/* 1. Navigation */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 20px 0;
  z-index: 1000;
  transition: var(--transition-premium);
}

.navbar.scrolled {
  padding: 12px 0;
  background: rgba(5, 10, 21, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-glass);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-img {
  height: 40px;
  filter: drop-shadow(0 0 10px rgba(0, 212, 255, 0.2));
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition-fast);
  padding: 8px 16px;
  border-radius: var(--radius-lg);
}

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

.nav-cta {
  background: var(--primary-gradient);
  color: #fff !important;
  box-shadow: 0 4px 15px var(--accent-glow);
}

/* 2. Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: 80px;
}

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 800px;
}

.hero-title {
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  margin-bottom: 24px;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 40px;
  max-width: 600px;
}

/* 3. Features & Cards */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
}

.feature-card {
  padding: 40px;
  text-align: center;
}

.feature-icon {
  width: 64px;
  height: 64px;
  background: var(--primary-gradient);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  box-shadow: 0 10px 20px var(--accent-glow);
}

/* 4. Order Form */
.order-section {
  background: #080f1e;
  position: relative;
}

.order-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

@media (max-width: 992px) {
  .order-container {
    grid-template-columns: 1fr;
  }
}

/* 5. Invoice UI - Professional Makeover */
.invoice-card {
  background: #fff;
  color: #0f172a;
  padding: 0;
  border-radius: 24px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 500px;
  margin: auto;
  overflow: hidden;
}

.invoice-header {
  background: #f8fafc;
  padding: 32px;
  border-bottom: 1px dashed #e2e8f0;
  text-align: center;
}

.invoice-body {
  padding: 32px;
}

.invoice-item {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid #f1f5f9;
}

.invoice-total {
  margin-top: 24px;
  padding: 24px;
  background: #0f172a;
  color: #fff;
  border-radius: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.invoice-footer {
  padding: 24px 32px;
  text-align: center;
  font-size: 0.85rem;
  color: #64748b;
}

/* 6. Admin Dashboard Components */
.admin-sidebar {
  background: #0a101e;
  border-right: 1px solid var(--border-glass);
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: var(--radius-lg);
  margin-bottom: 8px;
  transition: var(--transition-fast);
}

.admin-nav-item.active {
  background: rgba(0, 212, 255, 0.1);
  color: var(--primary-cyan);
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  padding: 24px;
}

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary-cyan);
}

/* 7. Tables */
.premium-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 8px;
}

.premium-table th {
  padding: 16px;
  text-align: left;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.premium-table tr td {
  padding: 16px;
  background: rgba(255, 255, 255, 0.02);
  transition: var(--transition-fast);
}

.premium-table tr td:first-child { border-radius: 12px 0 0 12px; }
.premium-table tr td:last-child { border-radius: 0 12px 12px 0; }

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

/* ===== RESPONSIVE SYSTEM ===== */

/* Tablet */
@media (max-width: 1024px) {
  :root {
    --section-gap: 80px;
    --container-padding: 28px;
  }
}

/* Mobile */
@media (max-width: 768px) {
  :root {
    --section-gap: 64px;
    --container-padding: 20px;
    --radius-xl: 16px;
    --radius-lg: 12px;
  }
  
  .section-padding {
    padding: 56px 0;
  }
  
  .hero-title {
    font-size: clamp(1.8rem, 7vw, 2.4rem);
    line-height: 1.2;
  }
  
  .hero-subtitle {
    font-size: 0.95rem;
    line-height: 1.7;
  }
  
  .btn-premium {
    padding: 14px 28px;
    font-size: 0.95rem;
    min-height: 48px;
    width: 100%;
    max-width: 400px;
  }
  
  .premium-input {
    padding: 14px 16px;
    font-size: 1rem;
    min-height: 48px;
  }

  /* Prevent card hover lift on touch */
  .glass-panel:hover {
    transform: none;
    box-shadow: none;
  }
}

/* Small Mobile */
@media (max-width: 480px) {
  :root {
    --section-gap: 48px;
    --container-padding: 16px;
  }
  
  .hero-title {
    font-size: clamp(1.6rem, 7vw, 2rem);
  }
  
  .section-padding {
    padding: 40px 0;
  }
}

/* Tiny screens */
@media (max-width: 360px) {
  :root {
    --container-padding: 14px;
  }
}

/* 8. Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0) rotate(45deg); }
  40% { transform: translateY(-10px) rotate(45deg); }
  60% { transform: translateY(-5px) rotate(45deg); }
}

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

.reveal {
  opacity: 0;
  animation: fadeIn 0.8s ease forwards;
  animation-delay: var(--delay, 0s);
}
