/* ============================================
   LEOKO BARBER — Design System
   Urban Barbershop Dark Mode
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Bebas+Neue&display=swap');
@import url('saas-upgrades.css');

/* --- TOKENS --- */
:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #111118;
  --bg-card: rgba(255,255,255,0.04);
  --bg-card-hover: rgba(255,255,255,0.07);
  --bg-glass: rgba(17,17,24,0.85);
  --border-color: rgba(255,255,255,0.06);
  --border-hover: rgba(255,255,255,0.12);

  --text-primary: #f0f0f5;
  --text-secondary: #8888a0;
  --text-muted: #55556a;

  --accent-cyan: #00f0ff;
  --accent-orange: #ff6b00;
  --accent-green: #00ff88;
  --accent-red: #ff3366;
  --accent-purple: #a855f7;

  --glow-cyan: 0 0 30px rgba(0,240,255,0.15);
  --glow-orange: 0 0 30px rgba(255,107,0,0.15);
  --glow-green: 0 0 20px rgba(0,255,136,0.15);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --font-body: 'Inter', -apple-system, sans-serif;
  --font-display: 'Bebas Neue', sans-serif;

  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* --- RESET --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-tap-highlight-color: transparent; }

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

a { color: var(--accent-cyan); text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* --- TYPOGRAPHY --- */
h1, h2, h3, h4 { line-height: 1.2; font-weight: 800; }
.font-display { font-family: var(--font-display); letter-spacing: 0.05em; }
.text-gradient {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-orange));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.text-glow {
  text-shadow: 0 0 40px rgba(0,240,255,0.3), 0 0 80px rgba(0,240,255,0.1);
}
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 2rem; }
.text-4xl { font-size: 2.5rem; }
.text-5xl { font-size: 3.5rem; }
.text-muted { color: var(--text-secondary); }
.text-cyan { color: var(--accent-cyan); }
.text-orange { color: var(--accent-orange); }
.text-green { color: var(--accent-green); }
.text-red { color: var(--accent-red); }
.fw-400 { font-weight: 400; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }
.fw-900 { font-weight: 900; }
.uppercase { text-transform: uppercase; }
.tracking-wide { letter-spacing: 0.1em; }

/* --- LAYOUT --- */
.container { max-width: 1280px; margin: 0 auto; padding: 0 20px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.gap-8 { gap: 32px; }
.w-full { width: 100%; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mt-8 { margin-top: 32px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mb-8 { margin-bottom: 32px; }
.p-2 { padding: 8px; }
.p-3 { padding: 12px; }
.p-4 { padding: 16px; }
.p-6 { padding: 24px; }
.p-8 { padding: 32px; }
.py-2 { padding-top: 8px; padding-bottom: 8px; }
.py-4 { padding-top: 16px; padding-bottom: 16px; }
.px-3 { padding-left: 12px; padding-right: 12px; }
.px-4 { padding-left: 16px; padding-right: 16px; }
.px-6 { padding-left: 24px; padding-right: 24px; }
.hidden { display: none !important; }
.relative { position: relative; }
.absolute { position: absolute; }
.overflow-hidden { overflow: hidden; }
.overflow-x-auto { overflow-x: auto; }
.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.text-center { text-align: center; }

/* --- SCROLLBAR --- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }
.hide-scroll::-webkit-scrollbar { display: none; }
.hide-scroll { -ms-overflow-style: none; scrollbar-width: none; }

/* --- CARD --- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: var(--transition);
  backdrop-filter: blur(20px);
}
.card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
}
.card-glow:hover {
  box-shadow: var(--glow-cyan);
}

/* --- BUTTONS --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.875rem;
  transition: var(--transition-bounce);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(0.97); }

.btn-primary {
  background: linear-gradient(135deg, var(--accent-cyan), #00b8d4);
  color: #000;
  box-shadow: var(--glow-cyan);
}
.btn-primary:hover { box-shadow: 0 0 40px rgba(0,240,255,0.3); }

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}
.btn-secondary:hover { border-color: var(--accent-cyan); color: var(--accent-cyan); }

.btn-orange {
  background: linear-gradient(135deg, var(--accent-orange), #ff8c00);
  color: #fff;
  box-shadow: var(--glow-orange);
}

.btn-danger {
  background: rgba(255,51,102,0.1);
  color: var(--accent-red);
  border: 1px solid rgba(255,51,102,0.2);
}
.btn-danger:hover { background: var(--accent-red); color: #fff; }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 8px 16px;
}
.btn-ghost:hover { color: var(--text-primary); background: var(--bg-card); }

.btn-sm { padding: 8px 16px; font-size: 0.75rem; }
.btn-lg { padding: 16px 32px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-icon {
  width: 40px; height: 40px; padding: 0;
  border-radius: var(--radius-md);
  display: inline-flex; align-items: center; justify-content: center;
}

/* --- INPUTS --- */
.input, .select, .textarea {
  width: 100%;
  padding: 14px 18px;
  background: rgba(255,255,255,0.04);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition);
}
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--accent-cyan);
  background: rgba(0,240,255,0.03);
  box-shadow: 0 0 0 3px rgba(0,240,255,0.08);
}
.input::placeholder { color: var(--text-muted); }
.textarea { min-height: 100px; resize: vertical; }
.select { cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%238888a0' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center;
}
.label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

/* --- BADGE --- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.badge-cyan { background: rgba(0,240,255,0.1); color: var(--accent-cyan); }
.badge-orange { background: rgba(255,107,0,0.1); color: var(--accent-orange); }
.badge-green { background: rgba(0,255,136,0.1); color: var(--accent-green); }
.badge-red { background: rgba(255,51,102,0.1); color: var(--accent-red); }
.badge-purple { background: rgba(168,85,247,0.1); color: var(--accent-purple); }

/* --- AVATAR --- */
.avatar {
  width: 48px; height: 48px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 2px solid var(--border-color);
}
.avatar-sm { width: 36px; height: 36px; }
.avatar-lg { width: 64px; height: 64px; }
.avatar-xl { width: 96px; height: 96px; border-width: 3px; }

/* --- MODAL --- */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.active { display: flex; }
.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 32px;
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalIn 0.3s ease;
}

/* --- TOAST --- */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  box-shadow: 0 10px 40px rgba(0,0,0,0.4);
  animation: slideInRight 0.4s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 280px;
}
.toast-success { border-left: 3px solid var(--accent-green); }
.toast-error { border-left: 3px solid var(--accent-red); }
.toast-info { border-left: 3px solid var(--accent-cyan); }

/* --- HEADER / NAV --- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  padding: 16px 0;
}
.nav-link {
  padding: 8px 16px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.875rem;
  transition: var(--transition);
}
.nav-link:hover, .nav-link.active {
  color: var(--accent-cyan);
  background: rgba(0,240,255,0.05);
}

/* --- SIDEBAR (Admin) --- */
.sidebar {
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: 260px;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  padding: 24px 16px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition);
}
.sidebar-link:hover { background: var(--bg-card); color: var(--text-primary); }
.sidebar-link.active {
  background: rgba(0,240,255,0.08);
  color: var(--accent-cyan);
  border: 1px solid rgba(0,240,255,0.1);
}
.main-content { margin-left: 260px; padding: 24px; min-height: 100vh; }

/* --- KPI CARD --- */
.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  backdrop-filter: blur(20px);
}
.kpi-value {
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
  margin-top: 8px;
}
.kpi-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-secondary);
}

/* --- SERVICE CARD (Client) --- */
.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-bounce);
}
.service-card:hover {
  border-color: var(--accent-cyan);
  transform: translateY(-4px);
  box-shadow: var(--glow-cyan);
}
.service-card.selected {
  border-color: var(--accent-cyan);
  background: rgba(0,240,255,0.06);
  box-shadow: var(--glow-cyan);
}
.service-icon { font-size: 2.5rem; margin-bottom: 12px; }
.service-name { font-weight: 700; margin-bottom: 4px; }
.service-price { color: var(--accent-cyan); font-weight: 800; font-size: 1.25rem; }
.service-duration { font-size: 0.75rem; color: var(--text-muted); }

/* --- BARBER SELECTOR --- */
.barber-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px;
  border-radius: var(--radius-lg);
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition-bounce);
  text-align: center;
}
.barber-card:hover { border-color: var(--border-hover); }
.barber-card.selected {
  border-color: var(--accent-cyan);
  background: rgba(0,240,255,0.04);
}
.barber-photo {
  width: 80px; height: 80px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 3px solid var(--border-color);
  transition: var(--transition);
}
.barber-card.selected .barber-photo {
  border-color: var(--accent-cyan);
  box-shadow: var(--glow-cyan);
}

/* --- TIME SLOTS --- */
.time-slot {
  padding: 10px 18px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}
.time-slot:hover { border-color: var(--accent-cyan); color: var(--accent-cyan); }
.time-slot.selected {
  background: var(--accent-cyan);
  color: #000;
  border-color: var(--accent-cyan);
}
.time-slot.unavailable {
  opacity: 0.25;
  cursor: not-allowed;
  pointer-events: none;
}

/* --- LOYALTY --- */
.loyalty-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}
.loyalty-dot {
  width: 48px; height: 48px;
  border-radius: var(--radius-full);
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: var(--transition);
}
.loyalty-dot.filled {
  background: rgba(0,240,255,0.1);
  border-color: var(--accent-cyan);
  box-shadow: var(--glow-cyan);
}
.loyalty-dot.reward {
  background: linear-gradient(135deg, var(--accent-orange), #ff8c00);
  border-color: var(--accent-orange);
  color: #fff;
}

/* --- CALENDAR --- */
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.cal-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
}
.cal-day:hover { background: var(--bg-card-hover); }
.cal-day.today { border: 1px solid var(--accent-cyan); }
.cal-day.selected { background: var(--accent-cyan); color: #000; }
.cal-day.disabled { opacity: 0.2; cursor: not-allowed; pointer-events: none; }
.cal-header {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
  text-align: center;
  padding: 8px 0;
}

/* --- BOOKING STEPS --- */
.step-indicator {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 32px;
}
.step-dot {
  width: 8px; height: 8px;
  border-radius: var(--radius-full);
  background: var(--border-color);
  transition: var(--transition);
}
.step-dot.active { width: 32px; background: var(--accent-cyan); }
.step-dot.completed { background: var(--accent-green); }

.booking-step { display: none; animation: fadeIn 0.4s ease; }
.booking-step.active { display: block; }

/* --- ANIMATIONS --- */
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideInRight { from { opacity: 0; transform: translateX(100px); } to { opacity: 1; transform: translateX(0); } }
@keyframes slideUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes modalIn { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
@keyframes glow {
  0%, 100% { box-shadow: 0 0 20px rgba(0,240,255,0.1); }
  50% { box-shadow: 0 0 40px rgba(0,240,255,0.3); }
}
.animate-fadeIn { animation: fadeIn 0.5s ease; }
.animate-slideUp { animation: slideUp 0.5s ease; }
.animate-pulse { animation: pulse 2s ease-in-out infinite; }
.animate-glow { animation: glow 3s ease-in-out infinite; }

/* ============================================
   RESPONSIVE — Mobile / Tablet / Desktop
   ============================================ */

/* --- MOBILE FIRST: up to 768px --- */
@media (max-width: 768px) {
  .sidebar { display: none; }
  .main-content { margin-left: 0; padding: 16px; padding-bottom: 90px; }

  .mobile-nav {
    position: fixed; bottom: 0; left: 0; right: 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    display: flex; justify-content: space-around;
    padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
    z-index: 200;
    backdrop-filter: blur(20px);
  }
  .mobile-nav-item {
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    font-size: 0.6rem; font-weight: 700; color: var(--text-muted);
    padding: 6px 8px; border-radius: var(--radius-md); transition: var(--transition);
    text-decoration: none; border: none; background: none; cursor: pointer;
  }
  .mobile-nav-item.active { color: var(--accent-cyan); }
  .mobile-nav-item span { font-size: 1.2rem; }

  /* All grids stack on mobile */
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr !important; }

  /* Typography scaling */
  .text-5xl { font-size: 2.2rem; }
  .text-4xl { font-size: 1.8rem; }
  .text-3xl { font-size: 1.5rem; }
  .text-2xl { font-size: 1.25rem; }

  .hide-mobile { display: none !important; }
  body { padding-bottom: 80px; }

  /* KPI cards 2-column on mobile */
  .kpi-card { padding: 14px; }
  .kpi-value { font-size: 1.5rem; }

  /* Cards thinner padding */
  .card { padding: 16px; }

  /* Modal full width */
  .modal { padding: 20px; border-radius: var(--radius-lg); margin: 10px; max-height: 85vh; }
  .modal-overlay { padding: 10px; }

  /* Buttons smaller */
  .btn-lg { padding: 14px 24px; font-size: 0.9rem; }

  /* Flex wrap helper */
  .flex { flex-wrap: wrap; }
  .flex.items-center { flex-wrap: wrap; }

  /* Input fields */
  .input, .select { padding: 12px 14px; font-size: 0.9rem; }

  /* Toast position */
  .toast-container { bottom: 90px; right: 12px; left: 12px; }
  .toast { min-width: auto; width: 100%; font-size: 0.8rem; padding: 12px 16px; }

  /* Header mobile */
  .header .container { padding: 0 12px; }

  /* Booking wizard mobile handled by booking-wizard.css */

  /* Time slots 3 columns on mobile */
  #timeSlotsGrid { grid-template-columns: repeat(3, 1fr) !important; gap: 6px !important; }

  /* Calendar responsive */
  .cal-day { font-size: 0.75rem; }

  /* Service cards 2-col on mobile */
  #bookingServices { grid-template-columns: repeat(2, 1fr) !important; }

  /* Schedule grid (calendar page) */
  .schedule-grid { font-size: 0.8rem; }
  .schedule-time-label { font-size: 0.6rem; height: 50px; }
  .schedule-row { height: 50px; }

  /* Quick actions 2x2 */
  .quick-actions { grid-template-columns: repeat(2, 1fr) !important; gap: 8px; }
  .quick-action { padding: 14px; }
  .quick-action span:first-child { font-size: 1.4rem; }
  .quick-action span:last-child { font-size: 0.65rem; }

  /* Product grids */
  .product-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px; }
  .pos-product { padding: 10px; }
  .pos-product img, .pos-product .no-img { height: 90px; }

  /* Analytics charts */
  .chart-card { padding: 16px; }
  .chart-card canvas { max-height: 200px; }

  /* Period buttons wrap */
  .period-btn { padding: 6px 14px; font-size: 0.7rem; }

  /* Shop grid mobile */
  #shopGrid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px; }

  /* Barbers list */
  #barbersList { grid-template-columns: 1fr !important; }

  /* Finance grid */
  .grid[style*="repeat(auto-fit"] { grid-template-columns: repeat(2, 1fr) !important; }

  /* TV Page responsive */
  .tv-container { padding: 20px; }
  .tv-header { flex-direction: column; gap: 16px; text-align: center; }
  .tv-body { grid-template-columns: 1fr !important; gap: 20px; }
  .tv-title { font-size: 2rem; }
  .tv-clock { font-size: 2.5rem; }
  .tv-current-name { font-size: 2.5rem; }
  .tv-queue-name { font-size: 1rem; }
  .tv-footer { flex-direction: column; gap: 12px; text-align: center; }
  .barber-status { flex-wrap: wrap; justify-content: center; gap: 16px; }

  /* Floating cart */
  #floatingCart { bottom: 80px !important; right: 16px !important; }

  /* Cal controls */
  .cal-controls { width: 100%; justify-content: center; }

  /* Services list */
  #servicesList { grid-template-columns: 1fr !important; }
}

/* --- TABLET: 769px - 1024px --- */
@media (min-width: 769px) and (max-width: 1024px) {
  .mobile-nav { display: none; }
  .show-mobile-only { display: none !important; }

  .sidebar { width: 220px; }
  .sidebar-link { font-size: 0.8rem; padding: 10px 12px; }
  .main-content { margin-left: 220px; padding: 20px; }

  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(3, 1fr); }

  .kpi-value { font-size: 1.7rem; }

  .product-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)) !important; }
  #shopGrid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)) !important; }
  #timeSlotsGrid { grid-template-columns: repeat(4, 1fr) !important; }
  #barbersList { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important; }
  #servicesList { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important; }

  .chart-card canvas { max-height: 250px; }

  /* TV page tablet */
  .tv-container { padding: 30px; }
  .tv-current-name { font-size: 3rem; }
}

/* --- DESKTOP: 1025px+ --- */
@media (min-width: 1025px) {
  .mobile-nav { display: none; }
  .show-mobile-only { display: none !important; }
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* --- PRINT --- */
@media print {
  .sidebar, .mobile-nav, .toast-container, .btn { display: none !important; }
  .main-content { margin-left: 0; }
  body { background: #fff; color: #000; }
}



/* ============================================ */
/* EXTRACTED STYLES FROM HTML FILES */
/* ============================================ */

/* --- FROM admin.html --- */
.sidebar-logo { display:flex;align-items:center;gap:12px;padding:8px 0 32px;border-bottom:1px solid var(--border-color);margin-bottom:24px; }
    .sidebar-logo-icon { width:40px;height:40px;border-radius:50%;background:linear-gradient(135deg,var(--accent-cyan),var(--accent-orange));display:flex;align-items:center;justify-content:center;font-size:1.2rem; }
    .sidebar-section { font-size:0.65rem;font-weight:800;text-transform:uppercase;letter-spacing:0.2em;color:var(--text-muted);padding:16px 16px 8px;margin-top:8px; }
    .sidebar-bottom { margin-top:auto;padding-top:16px;border-top:1px solid var(--border-color); }
    .timeline-item { display:flex;gap:16px;padding:16px 0;border-bottom:1px solid var(--border-color); }
    .timeline-item:last-child { border-bottom:none; }
    .timeline-time { min-width:60px;font-weight:700;font-size:0.85rem;color:var(--text-secondary); }
    .timeline-dot { width:12px;height:12px;border-radius:50%;margin-top:4px;flex-shrink:0; }
    .dot-pending { background:#f59e0b;box-shadow:0 0 10px rgba(245,158,11,0.3); }
    .dot-confirmed { background:var(--accent-cyan);box-shadow:0 0 10px rgba(0,240,255,0.3); }
    .dot-progress { background:var(--accent-orange);box-shadow:0 0 10px rgba(255,107,0,0.3); }
    .dot-completed { background:var(--accent-green); }
    .dot-cancelled { background:var(--accent-red);opacity:0.5; }
    .quick-actions { display:grid;grid-template-columns:repeat(2,1fr);gap:12px;margin-top:24px; }
    .quick-action { display:flex;flex-direction:column;align-items:center;gap:8px;padding:20px;background:var(--bg-card);border:1px solid var(--border-color);border-radius:var(--radius-lg);cursor:pointer;transition:var(--transition);text-decoration:none;color:var(--text-primary); }
    .quick-action:hover { border-color:var(--accent-cyan);transform:translateY(-2px); }
    .quick-action span:first-child { font-size:1.8rem; }
    .quick-action span:last-child { font-size:0.75rem;font-weight:700; }

/* --- FROM calendar.html --- */
.cal-controls {
      display: flex;
      align-items: center;
      gap: 16px;
      flex-wrap: wrap;
    }

    .schedule-grid {
      display: grid;
      grid-template-columns: 70px 1fr;
      gap: 0;
      border: 1px solid var(--border-color);
      border-radius: var(--radius-lg);
      overflow: hidden;
      background: var(--bg-card);
    }

    .schedule-time-col {
      border-right: 1px solid var(--border-color);
    }

    .schedule-time-label {
      height: 60px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 0.7rem;
      font-weight: 700;
      color: var(--text-muted);
      border-bottom: 1px solid var(--border-color);
    }

    .schedule-slots-col {
      position: relative;
    }

    .schedule-row {
      height: 60px;
      border-bottom: 1px solid var(--border-color);
      position: relative;
    }

    .schedule-row:hover {
      background: rgba(0, 240, 255, 0.02);
    }

    .appt-block {
      position: absolute;
      left: 4px;
      right: 4px;
      border-radius: 8px;
      padding: 6px 10px;
      font-size: 0.75rem;
      font-weight: 700;
      cursor: grab;
      z-index: 10;
      overflow: hidden;
      transition: box-shadow 0.2s;
      border: 1px solid transparent;
    }

    .appt-block:hover {
      box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    }

    .appt-block.dragging {
      opacity: 0.5;
      cursor: grabbing;
    }

    .appt-confirmed {
      background: rgba(0, 240, 255, 0.12);
      border-color: rgba(0, 240, 255, 0.2);
      color: var(--accent-cyan);
    }

    .appt-progress {
      background: rgba(255, 107, 0, 0.12);
      border-color: rgba(255, 107, 0, 0.2);
      color: var(--accent-orange);
    }

    .appt-completed {
      background: rgba(0, 255, 136, 0.08);
      border-color: rgba(0, 255, 136, 0.15);
      color: var(--accent-green);
    }

    .appt-blocked {
      background: rgba(255, 255, 255, 0.03);
      border: 1px dashed var(--border-hover);
      color: var(--text-muted);
    }

    .drop-indicator {
      background: rgba(0, 240, 255, 0.05);
      border: 2px dashed var(--accent-cyan);
    }

    .barber-tab {
      padding: 8px 20px;
      border-radius: var(--radius-full);
      font-weight: 700;
      font-size: 0.8rem;
      border: 1px solid var(--border-color);
      background: transparent;
      color: var(--text-secondary);
      cursor: pointer;
      transition: var(--transition);
    }

    .barber-tab.active {
      background: rgba(0, 240, 255, 0.1);
      border-color: var(--accent-cyan);
      color: var(--accent-cyan);
    }

/* --- FROM inventory.html --- */
.product-grid { display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:16px; }
    .pos-product { background:var(--bg-card);border:1px solid var(--border-color);border-radius:var(--radius-lg);padding:16px;cursor:pointer;transition:var(--transition);text-align:center; }
    .pos-product:hover { border-color:var(--accent-cyan);transform:translateY(-2px); }
    .pos-product img { width:100%;height:120px;object-fit:cover;border-radius:var(--radius-md);margin-bottom:10px; }
    .pos-product .no-img { width:100%;height:120px;background:var(--bg-card-hover);border-radius:var(--radius-md);display:flex;align-items:center;justify-content:center;font-size:2rem;margin-bottom:10px; }
    .stock-low { color:var(--accent-red); }
    .cart-item { display:flex;align-items:center;justify-content:space-between;padding:10px 0;border-bottom:1px solid var(--border-color); }
    .qty-btn { width:28px;height:28px;border-radius:50%;border:1px solid var(--border-color);background:transparent;color:var(--text-primary);font-weight:800;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;transition:var(--transition); }
    .qty-btn:hover { background:var(--accent-cyan);color:#000;border-color:var(--accent-cyan); }

/* --- FROM analytics.html --- */
.chart-card { background:var(--bg-card);border:1px solid var(--border-color);border-radius:var(--radius-lg);padding:24px; }
    .chart-card canvas { max-height:300px; }
    .period-btn { padding:8px 20px;border-radius:var(--radius-full);font-weight:700;font-size:0.8rem;border:1px solid var(--border-color);background:transparent;color:var(--text-secondary);cursor:pointer;transition:var(--transition); }
    .period-btn.active { background:rgba(0,240,255,0.1);border-color:var(--accent-cyan);color:var(--accent-cyan); }
    .period-btn:hover { border-color:var(--accent-cyan); }
    .sales-row { display:flex;justify-content:space-between;align-items:center;padding:12px 0;border-bottom:1px solid var(--border-color); }
    .sales-row:last-child { border-bottom:none; }

/* --- FROM weekly.html --- */
.weekly-grid {
      display: grid;
      grid-template-columns: repeat(7, 1fr);
      gap: 12px;
      min-width: 1000px; /* Force horizontal scroll on small screens */
    }
    .weekly-col {
      background: var(--bg-card);
      border: 1px solid var(--border-color);
      border-radius: var(--radius-lg);
      padding: 12px;
      min-height: 500px;
    }
    .weekly-col-header {
      text-align: center;
      padding-bottom: 12px;
      border-bottom: 1px solid var(--border-color);
      margin-bottom: 12px;
    }
    .weekly-card {
      background: rgba(255,255,255,0.02);
      border: 1px solid var(--border-color);
      border-radius: var(--radius-md);
      padding: 12px;
      margin-bottom: 12px;
      font-size: 0.8rem;
    }
    .filter-chip {
      padding: 6px 16px;
      border-radius: 20px;
      background: var(--bg-card);
      border: 1px solid var(--border-color);
      color: var(--text-muted);
      cursor: pointer;
      transition: all 0.2s;
      font-weight: 600;
      font-size: 0.8rem;
    }
    .filter-chip.active {
      background: rgba(0, 240, 255, 0.1);
      border-color: var(--accent-cyan);
      color: var(--accent-cyan);
    }
    .scroll-container {
      overflow-x: auto;
      padding-bottom: 12px;
    }

/* --- FROM tv.html --- */
body.tv-mode {
  background: #050508;
  overflow: hidden;
}

    .tv-container {
      height: 100vh;
      display: grid;
      grid-template-rows: auto 1fr auto;
      padding: 40px 60px;
    }

    .tv-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding-bottom: 30px;
      border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }

    .tv-logo {
      display: flex;
      align-items: center;
      gap: 16px;
    }

    .tv-logo-icon {
      width: 60px;
      height: 60px;
      border-radius: 50%;
      background: linear-gradient(135deg, var(--accent-cyan), var(--accent-orange));
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 2rem;
      box-shadow: 0 0 40px rgba(0, 240, 255, 0.2);
    }

    .tv-title {
      font-family: 'Bebas Neue', sans-serif;
      font-size: 3rem;
      letter-spacing: 0.08em;
    }

    .tv-clock {
      font-family: 'Bebas Neue', sans-serif;
      font-size: 4rem;
      color: var(--accent-cyan);
      text-shadow: 0 0 30px rgba(0, 240, 255, 0.3);
    }

    .tv-date {
      font-size: 1rem;
      color: var(--text-muted);
      letter-spacing: 0.1em;
    }

    .tv-body {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 40px;
      padding: 40px 0;
      align-content: start;
    }

    .tv-current {
      background: rgba(0, 240, 255, 0.03);
      border: 1px solid rgba(0, 240, 255, 0.1);
      border-radius: 24px;
      padding: 40px;
    }

    .tv-current-label {
      font-size: 0.8rem;
      font-weight: 800;
      text-transform: uppercase;
      letter-spacing: 0.2em;
      color: var(--accent-cyan);
      margin-bottom: 16px;
    }

    .tv-current-name {
      font-family: 'Bebas Neue', sans-serif;
      font-size: 4rem;
      letter-spacing: 0.05em;
      color: var(--text-primary);
    }

    .tv-current-service {
      font-size: 1.2rem;
      color: var(--text-secondary);
      margin-top: 8px;
    }

    .tv-current-barber {
      font-size: 1rem;
      color: var(--accent-orange);
      font-weight: 700;
      margin-top: 4px;
    }

    .tv-queue-title {
      font-size: 0.8rem;
      font-weight: 800;
      text-transform: uppercase;
      letter-spacing: 0.2em;
      color: var(--text-muted);
      margin-bottom: 16px;
    }

    .tv-queue-item {
      display: flex;
      align-items: center;
      gap: 20px;
      padding: 20px 0;
      border-bottom: 1px solid var(--border-color);
      animation: fadeIn 0.5s ease;
    }

    .tv-queue-pos {
      width: 50px;
      height: 50px;
      border-radius: 50%;
      background: var(--bg-card);
      border: 1px solid var(--border-color);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.2rem;
      font-weight: 900;
    }

    .tv-queue-name {
      font-size: 1.4rem;
      font-weight: 700;
    }

    .tv-queue-time {
      font-size: 0.9rem;
      color: var(--text-muted);
    }

    .tv-footer {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding-top: 20px;
      border-top: 1px solid rgba(255, 255, 255, 0.04);
    }

    .barber-status {
      display: flex;
      gap: 30px;
    }

    .barber-status-item {
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .status-dot {
      width: 12px;
      height: 12px;
      border-radius: 50%;
    }

    .status-available {
      background: var(--accent-green);
      box-shadow: 0 0 10px rgba(0, 255, 136, 0.4);
    }

    .status-busy {
      background: var(--accent-orange);
      box-shadow: 0 0 10px rgba(255, 107, 0, 0.4);
      animation: pulse 2s infinite;
    }

    .status-break {
      background: var(--text-muted);
    }

/* --- FROM checkin.html --- */
.checkin-page {
      min-height: 100vh;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 20px;
      background: radial-gradient(ellipse at 50% 30%, rgba(0, 240, 255, 0.06) 0%, transparent 60%);
    }

    .checkin-card {
      max-width: 420px;
      width: 100%;
      text-align: center;
    }

    .checkin-logo {
      width: 80px;
      height: 80px;
      border-radius: 50%;
      background: linear-gradient(135deg, var(--accent-cyan), var(--accent-orange));
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 2.2rem;
      margin: 0 auto 24px;
      box-shadow: var(--glow-cyan);
    }

    .checkin-success {
      background: rgba(0, 255, 136, 0.05);
      border: 1px solid rgba(0, 255, 136, 0.15);
      border-radius: var(--radius-xl);
      padding: 40px;
      animation: modalIn 0.5s ease;
    }

/* --- FROM index.html --- */
body {
      background: linear-gradient(rgba(10, 10, 15, 0.90), rgba(10, 10, 15, 0.97)),
        url('https://i.postimg.cc/HsYgdkLs/vintage-vibes-logos-elegantes-barberia-cortes-tradicionales-cuidado-refinado-610874-12462.avif') center/cover fixed;
    }

    /* Partículas/Blobs animados de fondo (sin afectar navegación) */
    .bg-animation-layer {
      position: fixed;
      top: 0;
      left: 0;
      width: 100vw;
      height: 100vh;
      pointer-events: none;
      z-index: -1;
      overflow: hidden;
    }

    .blob {
      position: absolute;
      filter: blur(80px);
      z-index: -1;
      opacity: 0.35;
      animation: floatBlob 12s infinite alternate ease-in-out;
    }

    .blob-1 {
      width: 400px;
      height: 400px;
      background: rgba(0, 240, 255, 0.2);
      top: -10%;
      left: -10%;
    }

    .blob-2 {
      width: 500px;
      height: 500px;
      background: rgba(255, 107, 0, 0.15);
      bottom: -20%;
      right: -10%;
      animation-delay: -5s;
      animation-duration: 18s;
    }

    @keyframes floatBlob {
      0% {
        transform: translate(0, 0) scale(1);
      }

      100% {
        transform: translate(100px, 100px) scale(1.2);
      }
    }

    /* Animación del texto de la cabecera (dos colores) */
    .hero-title.text-gradient {
      background: linear-gradient(to right, var(--accent-cyan), var(--accent-orange), var(--accent-cyan));
      background-size: 200% auto;
      -webkit-background-clip: text;
      background-clip: text;
      -webkit-text-fill-color: transparent;
      color: transparent;
      animation: shineText 4s linear infinite;
    }

    @keyframes shineText {
      to {
        background-position: 200% center;
      }
    }

    /* Hover effects mejorados para las tarjetas */
    .service-card,
    .barber-card {
      transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    }

    .service-card:hover,
    .barber-card:hover {
      transform: translateY(-8px) scale(1.03) !important;
      box-shadow: 0 15px 30px rgba(0, 240, 255, 0.15) !important;
      border-color: var(--accent-cyan) !important;
    }

    /* Primera animación intacta */
    .hero {
      min-height: 50vh;
      display: flex;
      align-items: center;
      justify-content: center;
      text-align: center;
      padding: 60px 20px;
      background: radial-gradient(ellipse at 50% 0%, rgba(0, 240, 255, 0.08) 0%, transparent 60%);
      position: relative;
      overflow: hidden;
    }

    .hero::before {
      content: '';
      position: absolute;
      top: -50%;
      left: -50%;
      width: 200%;
      height: 200%;
      background: conic-gradient(from 0deg, transparent, rgba(0, 240, 255, 0.03), transparent, rgba(255, 107, 0, 0.03), transparent);
      animation: rotateBg 20s linear infinite;
    }

    @keyframes rotateBg {
      to {
        transform: rotate(360deg);
      }
    }

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

    .hero-title {
      font-family: 'Bebas Neue', sans-serif;
      font-size: 5rem;
      letter-spacing: 0.08em;
      line-height: 0.9;
      margin-bottom: 16px;
    }

    .hero-sub {
      color: var(--text-secondary);
      font-size: 1.1rem;
      max-width: 400px;
      margin: 0 auto 32px;
    }

    @media (max-width: 768px) {
      .hero-title {
        font-size: 3rem;
      }

      .hero {
        min-height: 50vh;
        padding: 100px 20px 40px 20px;
      }

      .header .container {
        flex-direction: column;
        gap: 12px;
      }

      .header .container>div:last-child {
        justify-content: center !important;
      }
    }

    .section-title {
      font-size: 0.7rem;
      font-weight: 800;
      text-transform: uppercase;
      letter-spacing: 0.2em;
      color: var(--text-muted);
      margin-bottom: 20px;
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .section-title::before {
      content: '';
      width: 20px;
      height: 2px;
      background: var(--accent-cyan);
    }

    #services-section,
    #barbers-section,
    #booking-section,
    #loyalty-section {
      padding: 40px 0;
    }

    .barbers-scroll {
      display: flex;
      gap: 20px;
      overflow-x: auto;
      padding: 10px 0;
    }

    .barbers-scroll .barber-card {
      min-width: 160px;
      flex-shrink: 0;
    }

    .booking-panel {
      background: var(--bg-card);
      border: 1px solid var(--border-color);
      border-radius: var(--radius-xl);
      padding: 32px;
      max-width: 600px;
      margin: 0 auto;
      backdrop-filter: blur(20px);
    }

    .confirmation-card {
      background: rgba(0, 255, 136, 0.04);
      border: 1px solid rgba(0, 255, 136, 0.15);
      border-radius: var(--radius-lg);
      padding: 24px;
      text-align: center;
    }

    .summary-row {
      display: flex;
      justify-content: space-between;
      padding: 10px 0;
      border-bottom: 1px solid var(--border-color);
    }

    .summary-row:last-child {
      border-bottom: none;
    }

    /* Animaciones al hacer scroll */
    .reveal {
      opacity: 0;
      transform: translateY(40px);
      transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }

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

    .reveal-delay-1 {
      transition-delay: 0.1s;
    }

    .reveal-delay-2 {
      transition-delay: 0.2s;
    }

    .reveal-delay-3 {
      transition-delay: 0.3s;
    }

/* --- FROM login.html --- */
.login-page {
      min-height: 100vh; display: flex; align-items: center; justify-content: center;
      background: var(--bg-primary); padding: 20px;
      background-image: radial-gradient(ellipse at 30% 20%, rgba(0,240,255,0.06) 0%, transparent 50%),
                        radial-gradient(ellipse at 70% 80%, rgba(255,107,0,0.04) 0%, transparent 50%);
    }
    .login-card {
      background: var(--bg-card); border: 1px solid var(--border-color);
      border-radius: var(--radius-xl); padding: 48px 40px;
      max-width: 420px; width: 100%; backdrop-filter: blur(20px);
      animation: modalIn 0.5s ease;
    }
    .login-logo {
      width: 80px; height: 80px; border-radius: 50%; margin: 0 auto 24px;
      background: linear-gradient(135deg, var(--accent-cyan), var(--accent-orange));
      display: flex; align-items: center; justify-content: center; font-size: 2.2rem;
      box-shadow: var(--glow-cyan);
    }
    .login-title { font-family: 'Bebas Neue', sans-serif; font-size: 2.5rem; text-align: center;
      letter-spacing: 0.08em; margin-bottom: 8px; }
    .login-sub { text-align: center; color: var(--text-muted); font-size: 0.9rem; margin-bottom: 32px; }
    .form-group { margin-bottom: 20px; }
    .login-footer { text-align: center; margin-top: 24px; }
    .login-footer a { color: var(--accent-cyan); font-weight: 600; font-size: 0.85rem; }

.mobile-menu {
  display: none;
  flex-direction: column;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  position: absolute;
  top: 100%;
  left: 0;
  width: 220px;
  border-bottom-right-radius: 12px;
  border-bottom: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  padding: 10px 0;
  z-index: 200;
  box-shadow: 4px 4px 20px rgba(0,0,0,0.6);
}
.mobile-menu.active {
  display: flex;
}
.mobile-menu-link {
  color: var(--text-primary);
  text-decoration: none;
  padding: 14px 20px;
  font-weight: 700;
  font-size: 0.95rem;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  transition: all 0.3s ease;
}
.mobile-menu-link:last-child {
  border-bottom: none;
}
.mobile-menu-link:hover {
  background: rgba(0, 240, 255, 0.05);
  color: var(--accent-cyan);
  padding-left: 25px;
}
