:root {
  /* Color Palette - Luxury Dark & Gold */
  --bg-dark: #0a0a0a;
  --bg-card: #141414;
  --bg-input: #1a1a1a;
  
  --primary-gold: #d4af37;
  --primary-gold-rgb: 212, 175, 55;
  --gold-gradient: linear-gradient(135deg, #d4af37 0%, #f9e29c 50%, #b38e2d 100%);
  
  --text-main: #ffffff;
  --text-muted: #a0a0a0;
  --text-gold: #d4af37;
  
  --accent-chrome: #e5e5e5;
  --status-sold-out: #ff4d4d;
  --status-pending: #f1c40f;
  --status-authorized: #2ecc71;

  /* Typography */
  --font-header: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Spacing & Borders */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --border-gold: 1px solid rgba(212, 175, 55, 0.3);
  --shadow-gold: 0 4px 20px rgba(212, 175, 55, 0.15);
  
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4, .premium-font {
  font-family: var(--font-header);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Luxury Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
  background: var(--primary-gold);
  border-radius: 10px;
}

/* Utils */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

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

.gold-border {
  border: var(--border-gold);
}

.btn-premium {
  background: var(--gold-gradient);
  border: none;
  color: #000;
  padding: 0.8rem 1.5rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-header);
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.btn-premium:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-gold);
  filter: brightness(1.1);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--primary-gold);
  color: var(--primary-gold);
  padding: 0.8rem 1.5rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-header);
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

/* Header & Nav */
header {
  padding: 1.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.nav-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}

/* Splash Screen */
.splash-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: url('https://images.unsplash.com/photo-1544636331-e26879cd4d9b?auto=format&fit=crop&q=80&w=1920') no-repeat center center;
  background-size: cover;
  z-index: 1000;
  transition: transform 0.8s cubic-bezier(1, 0, 0, 1);
}

.splash-screen:not(.active-section) {
  transform: translateY(-100%);
}

.splash-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.9) 100%);
}

.splash-content {
  position: relative;
  z-index: 10;
  text-align: center;
  animation: splashFadeIn 1.5s ease;
}

.splash-logo h1 {
  font-size: 6rem;
  margin-bottom: 0.5rem;
  letter-spacing: 0.2em;
}

.splash-logo .subtitle {
  font-size: 1.5rem;
  color: var(--text-muted);
  letter-spacing: 0.5em;
  margin-bottom: 4rem;
}

.btn-premium.lg {
  padding: 1.5rem 4rem;
  font-size: 1.25rem;
  letter-spacing: 0.2em;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0 auto;
}

.access-notice {
  margin-top: 2rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

@keyframes splashFadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* Modifying the main header for the splash context */
#main-header {
  transition: opacity 0.5s ease;
}

body:has(.splash-screen.active-section) #main-header {
  opacity: 0;
  pointer-events: none;
}

/* Auth Section */
.auth-card {
  max-width: 450px;
  margin: 4rem auto;
  padding: 3rem;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.form-group input {
  width: 100%;
  padding: 0.8rem;
  background: var(--bg-input);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  color: #fff;
  transition: var(--transition);
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary-gold);
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.1);
}

/* Store Section */
.store-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3rem;
  padding-top: 3rem;
}

.weekly-balance-preview {
  padding: 1rem 2rem;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.filters {
  display: flex;
  gap: 1rem;
  margin-bottom: 3rem;
}

.filters input, .filters select {
  padding: 1rem;
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff;
  border-radius: var(--radius-md);
}

#search-car { flex-grow: 1; }

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  margin-bottom: 5rem;
}

/* Product Card */
.product-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  border: 1px solid rgba(255,255,255,0.05);
  position: relative;
}

.product-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary-gold);
  box-shadow: var(--shadow-gold);
}

.product-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: #1a1a1a;
}

.product-info {
  padding: 1.5rem;
}

.product-brand {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.product-price {
  font-size: 1.25rem;
  color: var(--primary-gold);
  font-weight: 700;
  margin: 0.5rem 0;
}

.badge-agotado {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--status-sold-out);
  color: #fff;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
}

/* Admin Tabs */
.admin-tabs {
  display: flex;
  gap: 1rem;
  margin: 2rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding-bottom: 1rem;
}

.admin-tab-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 0.5rem 1rem;
  cursor: pointer;
  font-family: var(--font-header);
  font-size: 0.9rem;
  transition: var(--transition);
}

.admin-tab-btn.active {
  color: var(--primary-gold);
  box-shadow: 0 2px 0 var(--primary-gold);
}

/* Admin Elements */
.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.admin-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.admin-item {
  background: var(--bg-card);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition);
}

.admin-item:hover {
  background: rgba(212, 175, 55, 0.05);
}

.report-box {
  background: var(--bg-card);
  padding: 2rem;
  border-radius: var(--radius-lg);
}

.report-box p {
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.status-box {
  text-align: center;
  padding: 3rem;
  background: rgba(212, 175, 55, 0.05);
  border-radius: var(--radius-lg);
}

.status-box i {
  color: var(--primary-gold);
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
}

/* Footer */
footer {
  margin-top: 5rem;
  padding: 3rem 0;
  border-top: 1px solid rgba(255,255,255,0.05);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

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

main section {
  animation: fadeIn 0.5s ease forwards;
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  padding: 1rem;
}

.modal-content {
  background: var(--bg-card);
  width: 100%;
  max-width: 600px;
  padding: 3rem;
  border-radius: var(--radius-lg);
  position: relative;
  animation: modalIn 0.4s ease;
}

.form-row {
  display: flex;
  gap: 1.5rem;
}

.form-row .form-group {
  flex: 1;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 2rem;
}

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

/* Helpers */
.hidden { display: none !important; }
.w-full { width: 100%; }
@media (max-width: 768px) {
  .hero h1 { font-size: 2.5rem; }
  .store-header { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .filters { flex-direction: column; }
  .form-row { flex-direction: column; gap: 0; }
}

/* Orders Table Styles */
.orders-detail-container {
    background: rgba(255, 255, 255, 0.02);
    padding: 2rem;
    border-radius: 8px;
    overflow-x: auto;
}

.orders-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.orders-table th {
    color: var(--primary-gold);
    border-bottom: 2px solid var(--border-gold);
    padding: 1rem;
    font-family: 'Outfit', sans-serif;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

.orders-table td {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.9rem;
}

.orders-table tr:hover td {
    background: rgba(212, 175, 55, 0.03);
}

#weekly-total-trigger:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.1);
    border-color: var(--primary-gold);
}
