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

/* ==========================================
   1. CSS VARIABLES (DESIGN TOKENS)
   ========================================== */
:root {
  /* Colors */
  --bg-color: #050505;
  --bg-surface: #0f0f13;
  --bg-surface-elevated: #1a1a20;
  
  --primary: #c99855; /* Soft gold */
  --primary-hover: #e0b070;
  --primary-transparent: rgba(201, 152, 85, 0.15);
  
  --text-main: #f5f5f7;
  --text-muted: #a1a1a6;
  --text-dark: #1d1d1f;
  
  --border-color: rgba(255, 255, 255, 0.08);
  --border-highlight: rgba(201, 152, 85, 0.3);
  
  --success: #32d74b;
  --danger: #ff453a;
  --info: #0a84ff;
  
  /* Typography */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  /* Spacing (8px Grid) */
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 40px;
  --space-6: 48px;
  --space-8: 64px;
  --space-12: 96px;
  --space-16: 128px;
  
  /* Borders */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  
  /* Transitions */
  --transition-fast: 0.15s ease-out;
  --transition-normal: 0.3s ease-in-out;
  --transition-slow: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --transition-fast: 0s;
    --transition-normal: 0s;
    --transition-slow: 0s;
  }
}

/* ==========================================
   2. RESET & BASE
   ========================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-normal);
}

button, input, select, textarea {
  font-family: inherit;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul {
  list-style: none;
}

.hidden {
  display: none !important;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-3);
}

/* ==========================================
   3. UTILITIES & COMPONENTS
   ========================================== */
.text-primary { color: var(--primary); }
.text-muted { color: var(--text-muted); }

.bg-glass {
  background: rgba(15, 15, 19, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  padding: 14px var(--space-4);
  border-radius: var(--radius-full);
  font-weight: 500;
  font-size: 1rem;
  cursor: pointer;
  transition: all var(--transition-normal);
  border: none;
  outline: none;
}

.btn-primary {
  background: var(--primary);
  color: var(--text-dark);
  box-shadow: 0 4px 20px rgba(201, 152, 85, 0.2);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(201, 152, 85, 0.4);
}

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

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--text-muted);
}

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

.btn-outline:hover {
  background: var(--primary-transparent);
}

.btn-sm {
  padding: 8px var(--space-2);
  font-size: 0.875rem;
}

/* Section Formatting */
.section {
  padding: var(--space-16) 0;
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-8);
  max-width: 700px;
  margin-inline: auto;
}

.section-tag {
  display: inline-block;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary);
  margin-bottom: var(--space-2);
  font-weight: 500;
}

.section-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: var(--space-2);
}

.section-desc {
  color: var(--text-muted);
  font-size: 1.125rem;
}

/* ==========================================
   4. LAYOUT / NAVBAR
   ========================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: var(--space-2) 0;
  transition: all var(--transition-normal);
}

.navbar.scrolled {
  background: rgba(5, 5, 5, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  padding: var(--space-1) 0;
}

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

.brand {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.nav-links {
  display: flex;
  gap: var(--space-4);
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
}

.nav-links a:hover, .nav-links a.active {
  color: var(--text-main);
}

.mobile-menu-toggle {
  display: none;
  font-size: 1.5rem;
  background: none;
  border: none;
  color: var(--text-main);
  cursor: pointer;
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    background: var(--bg-surface);
    flex-direction: column;
    padding: var(--space-4) var(--space-3);
    gap: var(--space-3);
    border-bottom: 1px solid var(--border-color);
    clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
    transition: clip-path var(--transition-normal);
  }
  .nav-links.active {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  }
  .mobile-menu-toggle {
    display: block;
  }
}

/* ==========================================
   5. LANDING PAGE SECTIONS
   ========================================== */

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: var(--space-8);
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.4;
  transform: scale(1.05);
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(5,5,5,0.2) 0%, rgba(5,5,5,1) 100%);
  z-index: -1;
}

.hero-content {
  max-width: 800px;
}

.hero-title {
  font-size: clamp(3rem, 8vw, 5rem);
  line-height: 1.1;
  margin-bottom: var(--space-3);
  font-weight: 700;
}

.hero-title span {
  background: linear-gradient(135deg, #fff 0%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: clamp(1.125rem, 3vw, 1.5rem);
  color: var(--text-muted);
  margin-bottom: var(--space-5);
  max-width: 600px;
}

.hero-actions {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

/* Marquee / Features */
.features-marquee {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: var(--space-2) 0;
  overflow: hidden;
  white-space: nowrap;
  display: flex;
  position: relative;
}

.marquee-content {
  display: flex;
  animation: scroll-left 30s linear infinite;
}

.marquee-item {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  padding: 0 var(--space-4);
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 1.1rem;
  color: var(--text-muted);
}

@keyframes scroll-left {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Services / Cards */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-4);
}

.service-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: radial-gradient(circle at top right, rgba(201,152,85,0.1) 0%, transparent 50%);
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.service-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-highlight);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.service-card:hover::before {
  opacity: 1;
}

.service-icon {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: var(--space-3);
}

.service-title {
  font-size: 1.5rem;
  margin-bottom: var(--space-2);
}

.service-desc {
  color: var(--text-muted);
}

/* About / Story */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
  align-items: center;
}

.about-img {
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
}

.about-img img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.about-img:hover img {
  transform: scale(1.05);
}

.about-img::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-lg);
  pointer-events: none;
}

.about-list {
  margin-top: var(--space-4);
}

.about-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.about-list iconify-icon {
  color: var(--primary);
  font-size: 1.5rem;
  margin-top: 4px;
}

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

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-4);
  text-align: center;
}

.stat-item {
  padding: var(--space-4);
}

.stat-num {
  font-size: 3.5rem;
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
  margin-bottom: var(--space-1);
}

.stat-label {
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.875rem;
}

/* Testimonials */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-4);
}

.testimonial-card {
  background: var(--bg-surface-elevated);
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
}

.testimonial-text {
  font-size: 1.125rem;
  font-style: italic;
  margin-bottom: var(--space-3);
  color: var(--text-main);
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.author-avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: var(--bg-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-weight: 600;
}

.author-info h4 {
  font-size: 1rem;
  margin-bottom: 2px;
}

.author-info p {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* FAQ */
.faq-container {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--border-color);
}

.faq-question {
  width: 100%;
  text-align: left;
  padding: var(--space-3) 0;
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 1.25rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-icon {
  color: var(--primary);
  transition: transform var(--transition-normal);
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-normal), padding var(--transition-normal);
  color: var(--text-muted);
}

.faq-item.active .faq-answer {
  max-height: 500px;
  padding-bottom: var(--space-3);
}

/* CTA Section */
.cta-banner {
  background: linear-gradient(135deg, var(--bg-surface-elevated) 0%, #1a1510 100%);
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-lg);
  padding: var(--space-8) var(--space-4);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%; width: 200%; height: 200%;
  background: radial-gradient(circle, rgba(201,152,85,0.05) 0%, transparent 60%);
  z-index: 0;
}

.cta-content {
  position: relative;
  z-index: 1;
}

/* Footer */
.footer {
  background: var(--bg-surface);
  padding: var(--space-8) 0 var(--space-4);
  border-top: 1px solid var(--border-color);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-6);
  margin-bottom: var(--space-6);
}

.footer-col h4 {
  margin-bottom: var(--space-3);
  font-size: 1.125rem;
}

.footer-col p {
  color: var(--text-muted);
  max-width: 300px;
  margin-bottom: var(--space-3);
}

.footer-links li {
  margin-bottom: var(--space-1);
}

.footer-links a {
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-bottom {
  text-align: center;
  padding-top: var(--space-4);
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.875rem;
}

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

/* ==========================================
   6. APP / DASHBOARD STYLES (MATCHING PREMIUM THEME)
   ========================================== */
#appPage {
  min-height: 100vh;
  padding-top: 80px; /* offset for fixed navbar */
}

/* Dashboard Nav */
.dash-nav {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
  overflow-x: auto;
  padding-bottom: var(--space-1);
  scrollbar-width: none;
}

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

.dash-nav button {
  padding: 10px var(--space-3);
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  white-space: nowrap;
}

.dash-nav button.active {
  background: var(--primary);
  color: var(--text-dark);
  border-color: var(--primary);
  font-weight: 600;
}

/* Forms & Inputs */
.form-group {
  margin-bottom: var(--space-3);
}

.form-label {
  display: block;
  font-size: 0.875rem;
  margin-bottom: 6px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-input, .form-select {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 1rem;
  transition: all var(--transition-fast);
}

.form-input:focus, .form-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-transparent);
}

/* Cards */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  margin-bottom: var(--space-4);
}

/* Badges */
.status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
}

.result-message {
  padding: var(--space-2);
  border-radius: var(--radius-sm);
  margin-top: var(--space-2);
  font-size: 0.9rem;
}

.result-message.error {
  background: rgba(255, 69, 58, 0.1);
  color: var(--danger);
  border: 1px solid rgba(255, 69, 58, 0.2);
}

.result-message.success {
  background: rgba(50, 215, 75, 0.1);
  color: var(--success);
  border: 1px solid rgba(50, 215, 75, 0.2);
}

/* Auth Section Layout */
.auth-container {
  width: 100%;
}


/* Specific elements from app.js */
.order-card {
  background: var(--bg-surface) !important;
  border-color: var(--border-color) !important;
}

.order-card:hover {
  border-color: var(--border-highlight) !important;
}

.btn-invoice {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition-fast);
}

.btn-invoice:hover {
  background: var(--primary-transparent);
  color: var(--primary);
  border-color: var(--primary);
}

/* Toast Container */
#toastContainer {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideIn 0.3s forwards;
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Utility to ensure text appears in dark mode for JS dynamic content */
.result-value {
  color: var(--text-main) !important;
}
.result-label {
  color: var(--text-muted) !important;
}

/* ==========================================
   7. PREMIUM SPLIT LAYOUT & FORMS
   ========================================== */
.app-split-container {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 200px);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-4);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

@media (min-width: 900px) {
  .app-split-container {
    flex-direction: row;
  }
}

.app-image-panel {
  flex: none;
  height: 250px;
  position: relative;
}

@media (min-width: 900px) {
  .app-image-panel {
    flex: 1;
    height: auto;
    max-width: 50%;
  }
}

.app-image-panel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.8;
}

.app-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 0%, var(--bg-surface) 100%);
}

@media (min-width: 900px) {
  .app-image-overlay {
    background: linear-gradient(to right, transparent 0%, var(--bg-surface) 100%);
  }
}

.app-form-panel {
  flex: 1;
  padding: var(--space-6) var(--space-4);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

@media (min-width: 900px) {
  .app-form-panel {
    padding: var(--space-8);
  }
}

/* Premium Inputs */
.form-group {
  margin-bottom: var(--space-4);
}

.form-input, .form-select {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  padding: 16px 20px;
  font-size: 1.05rem;
  border-radius: var(--radius-md);
}

.form-input:focus, .form-select:focus {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--primary);
  box-shadow: 0 0 15px var(--primary-transparent);
}

.form-label {
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--text-main);
  opacity: 0.8;
}

/* Admin/Profile Header Image */
.app-header-banner {
  height: 250px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  margin-bottom: var(--space-6);
  border: 1px solid var(--border-color);
}

.app-header-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.5;
}

.app-header-content {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: var(--space-6);
  background: linear-gradient(to top, var(--bg-color) 0%, transparent 100%);
}
