/* ==============================================================================
   HORARIOS WC — Base Design System & Core Styles
   Dark Luxury Studio Palette • Responsive • High Contrast
   ============================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Geist+Mono:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@400;600;700;800&display=swap');

:root {
  /* Stitch Design System — Paleta Lujo Oscuro & Neón */
  --bg-main: #0a0a0b;
  --bg-surface: #121214;
  --bg-surface-elevated: #1a1a1e;
  --bg-card: rgba(18, 18, 20, 0.85);
  --bg-card-hover: rgba(28, 28, 34, 0.95);
  --bg-glass: rgba(18, 18, 20, 0.7);

  /* Bordes de Luz Glassmorphism (Stitch Specs) */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-highlight: rgba(255, 255, 255, 0.16);
  --border-focus: #a855f7;
  --border-active: rgba(168, 85, 247, 0.5);

  /* Acentos de Marca (Neon Purple & Magenta Glow) */
  --brand-primary: #a855f7;
  --brand-primary-hover: #9333ea;
  --brand-primary-light: rgba(168, 85, 247, 0.15);
  --brand-secondary: #ec4899;
  --brand-secondary-hover: #db2777;
  --brand-cyan: #06b6d4;
  
  /* Gradientes de Alta Fidelidad */
  --gradient-brand: linear-gradient(135deg, #a855f7 0%, #7c3aed 50%, #ec4899 100%);
  --gradient-glow: linear-gradient(135deg, rgba(168, 85, 247, 0.3) 0%, rgba(236, 72, 153, 0.2) 100%);
  --gradient-card: linear-gradient(180deg, rgba(26, 26, 32, 0.85) 0%, rgba(14, 14, 16, 0.95) 100%);

  /* Estados Funcionales */
  --status-active: #10b981;
  --status-active-bg: rgba(16, 185, 129, 0.15);
  --status-active-border: rgba(16, 185, 129, 0.4);

  --status-scheduled: #3b82f6;
  --status-scheduled-bg: rgba(59, 130, 246, 0.15);
  --status-scheduled-border: rgba(59, 130, 246, 0.4);

  --status-warning: #f59e0b;
  --status-warning-bg: rgba(245, 158, 11, 0.15);
  --status-warning-border: rgba(245, 158, 11, 0.4);

  --status-danger: #ef4444;
  --status-danger-bg: rgba(239, 68, 68, 0.15);
  --status-danger-border: rgba(239, 68, 68, 0.4);

  --status-muted: #64748b;
  --status-muted-bg: rgba(100, 116, 139, 0.15);

  /* Tipografía */
  --text-primary: #ffffff;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-inverse: #0a0a0b;

  --font-main: 'Inter', 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-mono: 'Geist Mono', monospace;

  /* Sombras y Luces de Neón */
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.8);
  --glow-primary: 0 0 30px rgba(168, 85, 247, 0.4);
  --glow-active: 0 0 30px rgba(16, 185, 129, 0.45);

  /* Radio de bordes */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Transiciones */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Scrollbar Personalizada */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
  background: #26262e;
  border-radius: var(--radius-full);
  border: 2px solid var(--bg-main);
}
::-webkit-scrollbar-thumb:hover {
  background: #3f3f4e;
}

/* Reset y Normalización */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  color-scheme: dark;
  scroll-behavior: smooth;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg, video, canvas {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--brand-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--brand-secondary);
}

button, input, select, textarea {
  font-family: inherit;
  font-size: 1rem;
  max-width: 100%;
}

/* Utilidades de Contenedor */
.container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 1.5rem;
  box-sizing: border-box;
}

/* Tipografía */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.mono {
  font-family: var(--font-mono);
}

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  font-weight: 600;
  font-size: 0.925rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-normal);
  text-decoration: none;
  user-select: none;
  white-space: nowrap;
}

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

.btn-primary {
  background: var(--gradient-brand);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(139, 92, 246, 0.35);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.5);
  filter: brightness(1.08);
}

.btn-secondary {
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
  border-color: var(--border-subtle);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--bg-card-hover);
  border-color: var(--border-focus);
}

.btn-success {
  background: var(--status-active);
  color: #062b1b;
  font-weight: 700;
}

.btn-danger {
  background: var(--status-danger-bg);
  color: #fca5a5;
  border-color: var(--status-danger-border);
}

.btn-danger:hover:not(:disabled) {
  background: var(--status-danger);
  color: #ffffff;
}

.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.825rem;
  border-radius: var(--radius-sm);
}

.btn-icon {
  padding: 0.5rem;
  border-radius: var(--radius-md);
}

/* Badges y Píldoras */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid transparent;
}

.badge-active {
  background: var(--status-active-bg);
  color: #34d399;
  border-color: var(--status-active-border);
}

.badge-scheduled {
  background: var(--status-scheduled-bg);
  color: #60a5fa;
  border-color: var(--status-scheduled-border);
}

.badge-finished {
  background: var(--status-muted-bg);
  color: #94a3b8;
  border-color: var(--border-subtle);
}

.badge-cancelled {
  background: var(--status-danger-bg);
  color: #f87171;
  border-color: var(--status-danger-border);
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: currentColor;
  display: inline-block;
}

.pulse-dot {
  animation: pulseGlow 1.8s infinite;
}

@keyframes pulseGlow {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; filter: drop-shadow(0 0 6px currentColor); }
  100% { transform: scale(0.95); opacity: 0.8; }
}

/* Formularios e Inputs */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1.15rem;
}

.form-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-control {
  width: 100%;
  padding: 0.7rem 0.9rem;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.form-control::placeholder {
  color: var(--text-muted);
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.2rem;
}

/* Tarjetas y Paneles Glassmorphism */
.card {
  background: var(--gradient-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-normal), border-color var(--transition-normal);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
}

.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* Sistema de Modales */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 7, 12, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
  padding: 1rem;
}

.modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.modal-dialog {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg), var(--glow-primary);
  transform: scale(0.95) translateY(10px);
  transition: all var(--transition-normal);
}

.modal-backdrop.active .modal-dialog {
  transform: scale(1) translateY(0);
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* Notificaciones Toast */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.toast {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--brand-primary);
  color: var(--text-primary);
  padding: 0.9rem 1.25rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 300px;
  max-width: 420px;
  transform: translateX(120%);
  animation: slideInToast 0.3s forwards cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

.toast.toast-success { border-left-color: var(--status-active); }
.toast.toast-error { border-left-color: var(--status-danger); }
.toast.toast-warning { border-left-color: var(--status-warning); }

@keyframes slideInToast {
  to { transform: translateX(0); }
}
