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

/* src/css/global.css */
:root {
  --background: #121212;
  --foreground: #f0f0f0;
  --primary: #ea580c; /* Orange-600 */
  --primary-hover: #c2410c;
  --secondary: #1e1e1e;
  --accent: #ff4500;
  --border: #333333;

  /* Semantic Variables */
  --card-bg: rgba(30, 30, 30, 0.6);
  --text-muted: #9ca3af;
  --text: #f0f0f0;
  --warning: #f59e0b;
  --success: #10b981;
  --danger: #ef4444;
}

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

html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  font-family: 'Outfit', system-ui, -apple-system, sans-serif;
  color: var(--foreground);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  background-attachment: fixed;
  background-image: 
    radial-gradient(circle at 50% 15%, rgba(234, 88, 12, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(255, 69, 0, 0.05) 0%, transparent 40%),
    linear-gradient(180deg, #0d0d0f 0%, #060608 100%);
  overflow-x: hidden;
}

/* Global Ambient Glow Orbs */
body::before, body::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  filter: blur(140px);
  z-index: -2;
  pointer-events: none;
  opacity: 0.55;
  animation: orbFloatGlobal 25s infinite alternate ease-in-out;
}

body::before {
  top: -10%;
  left: 10%;
  width: 45vw;
  height: 45vw;
  background: radial-gradient(circle, rgba(234, 88, 12, 0.22) 0%, transparent 80%);
}

body::after {
  bottom: -10%;
  right: -5%;
  width: 45vw;
  height: 45vw;
  background: radial-gradient(circle, rgba(255, 69, 0, 0.18) 0%, transparent 80%);
  animation-duration: 30s;
  animation-delay: -5s;
}

@keyframes orbFloatGlobal {
  0% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(4vw, -6vh) scale(1.1);
  }
  100% {
    transform: translate(-3vw, 5vh) scale(0.9);
  }
}

/* Utilities */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
}

.text-center { text-align: center; }
.hidden { display: none !important; }

/* Botones Premium */
.btn-primary {
  background-color: var(--primary);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-block;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.4);
}

.btn-secondary {
  background-color: var(--secondary);
  color: var(--foreground);
  border: 1px solid var(--border);
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-block;
}

.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Tarjetas (Glassmorphism) */
.card {
  background-color: rgba(30, 30, 30, 0.6);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1rem; /* Reducido de 1.5rem a 1rem para móviles */
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

@media (min-width: 600px) {
  .card {
    padding: 1.5rem;
  }
}

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  background-color: rgba(18, 18, 18, 0.9);
  position: sticky;
  top: 0;
  z-index: 50;
}

@media (max-width: 600px) {
  .header {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
  .btn-primary, .btn-secondary {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
  }
}

/* Drawer Overlay (Checkout) */
.drawer-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.drawer-overlay.open {
    opacity: 1;
    pointer-events: auto;
}
.drawer {
    position: fixed;
    top: 0; right: -450px;
    width: 100%; max-width: 420px;
    height: 100vh;
    background: #121212; /* Fondo oscuro sólido */
    border-left: 1px solid var(--border);
    box-shadow: -5px 0 20px rgba(0,0,0,0.8);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    transition: right 0.3s ease;
}
.drawer-overlay.open .drawer {
    right: 0;
}
.drawer-header {
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex; justify-content: space-between; align-items: center;
}
.btn-cerrar {
    background: transparent; border: none; color: var(--text-muted); font-size: 1.5rem; cursor: pointer;
}
.drawer-content {
    padding: 1.2rem 1.5rem;
    flex: 1;
    overflow-y: auto;
}
.cart-item-checkout {
    display: flex; justify-content: space-between; padding-bottom: 0.8rem; border-bottom: 1px dashed var(--border);
}

/* Formularios Licorera Style */
.form-group {
    margin-bottom: 1rem;
}
.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}
.form-control {
    width: 100%;
    background: rgba(30,30,30,0.6);
    border: 1px solid var(--border);
    padding: 0.7rem 0.9rem;
    border-radius: 8px;
    color: var(--text);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}
.form-control:focus {
    outline: none;
    border-color: var(--accent);
}

/* Image Preview Modal (comprobante) */
.modal-image-preview {
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.9) !important;
  z-index: 1200;
}

.modal-image-preview.open {
  display: flex !important;
  opacity: 1;
  pointer-events: auto;
}

.image-preview-wrapper {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.btn-cerrar-preview {
  position: absolute;
  top: -40px;
  right: 0;
  color: white;
  font-size: 2.5rem;
  background: transparent;
  border: none;
  cursor: pointer;
  line-height: 1;
}

.image-preview-content {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid var(--border);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
}

.btn-full-size {
  background: var(--accent);
  text-decoration: none;
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-weight: bold;
  font-size: 0.9rem;
}

.comprobante-link {
  color: var(--accent);
  font-weight: bold;
  text-decoration: underline;
  cursor: pointer;
  background: transparent;
  border: none;
  font-size: 0.9rem;
  padding: 0;
  display: inline-block;
}

/* Status Badges */
.status-badge {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: bold;
  text-transform: uppercase;
}

.status-pendiente {
  background: rgba(234, 179, 8, 0.1);
  color: var(--warning);
  border: 1px solid rgba(234, 179, 8, 0.3);
}

.status-cocina {
  background: rgba(59, 130, 246, 0.1);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.status-preparando {
  background: rgba(168, 85, 247, 0.1);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.status-listo {
  background: rgba(34, 197, 94, 0.1);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.status-entregado {
  background: rgba(20, 184, 166, 0.1);
  color: #2dd4bf;
  border: 1px solid rgba(20, 184, 166, 0.3);
}

.status-despachado {
  background: rgba(156, 163, 175, 0.1);
  color: #9ca3af;
  border: 1px solid rgba(156, 163, 175, 0.3);
}

.status-cancelado {
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Tablas Premium (Estilo Licorera) */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  background: rgba(30, 30, 30, 0.4);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  margin-top: 1rem;
  margin-bottom: 2rem;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.admin-table th {
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--border);
  background: rgba(18, 18, 26, 0.8);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

.admin-table td {
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--border);
  color: var(--foreground);
  vertical-align: middle;
}

.admin-table tr:last-child td {
  border-bottom: none;
}

.admin-table tr {
  transition: all 0.2s ease;
}

.admin-table tbody tr:hover td {
  background-color: rgba(255, 255, 255, 0.02);
}

/* Encabezados Ordenables */
.admin-table th.sortable {
  cursor: pointer;
  user-select: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.admin-table th.sortable:hover {
  background-color: rgba(255, 255, 255, 0.05) !important;
  color: var(--foreground) !important;
}

