:root {
  --ness-primary: #D96D00;
  --ness-primary-2: #F28C18;
  --ness-accent: #A85000;
  --ness-bg: #f5f7fb;
  --ness-card: #ffffff;
  --ness-text: #172033;
  --ness-muted: #6b7280;
  --ness-border: #e5e7eb;
  --ness-sidebar: #111827;
  --ness-sidebar-hover: #1f2937;
  --ness-danger: #dc2626;
  --ness-success: #16a34a;
  --ness-shadow: 0 12px 35px rgba(15, 23, 42, .08);
  --ness-radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; color-scheme: light; }
html:has(body.theme-dark) { color-scheme: dark; }
body {
  margin: 0;
  background: var(--ness-bg);
  color: var(--ness-text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-height: 100vh;
}
body.theme-dark {
  --ness-bg: #0b1120;
  --ness-card: #111827;
  --ness-text: #f3f4f6;
  --ness-muted: #9ca3af;
  --ness-border: #273449;
  --ness-sidebar: #020617;
  --ness-sidebar-hover: #172033;
  --ness-shadow: 0 12px 35px rgba(0,0,0,.28);
}
a { color: var(--ness-primary); }
body.theme-dark a { color: #ffb267; }
.text-muted { color: var(--ness-muted) !important; }
.bg-surface { background: var(--ness-card) !important; }
.border-soft { border-color: var(--ness-border) !important; }

.ness-public {
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% 10%, rgba(217,109,0,.16), transparent 26%),
    radial-gradient(circle at 94% 10%, rgba(212,160,23,.13), transparent 25%),
    var(--ness-bg);
}
.public-nav {
  position: sticky;
  top: 0;
  z-index: 1030;
  backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--ness-card) 88%, transparent);
  border-bottom: 1px solid var(--ness-border);
}
.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-grid;
  place-items: center;
  background: linear-gradient(135deg, var(--ness-primary), var(--ness-primary-2));
  color: white;
  font-weight: 900;
  letter-spacing: -.04em;
  box-shadow: 0 8px 20px rgba(217,109,0,.25);
}
.hero-title {
  font-size: clamp(2rem, 6vw, 4.2rem);
  font-weight: 900;
  letter-spacing: -.055em;
  line-height: 1.02;
}
.hero-title span { color: var(--ness-primary); }
.hero-subtitle { color: var(--ness-muted); font-size: 1.06rem; max-width: 650px; }
.booking-shell {
  background: var(--ness-card);
  border: 1px solid var(--ness-border);
  border-radius: 26px;
  box-shadow: var(--ness-shadow);
  overflow: hidden;
}
.booking-stepper {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--ness-border);
  background: color-mix(in srgb, var(--ness-card) 94%, var(--ness-primary) 6%);
}
.step-pill {
  padding: 15px 8px;
  color: var(--ness-muted);
  text-align: center;
  font-size: .82rem;
  font-weight: 700;
  border-right: 1px solid var(--ness-border);
}
.step-pill:last-child { border-right: 0; }
.step-pill.active { color: var(--ness-primary); background: rgba(217,109,0,.08); }
.step-number {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-right: 5px;
  border-radius: 50%;
  border: 1px solid currentColor;
}
.booking-pane { display: none; padding: clamp(18px, 4vw, 34px); }
.booking-pane.active { display: block; animation: fadeSlide .24s ease; }
@keyframes fadeSlide { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.service-card {
  display: block;
  height: 100%;
  border: 1px solid var(--ness-border);
  border-radius: 18px;
  padding: 18px;
  cursor: pointer;
  background: var(--ness-card);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.service-card:hover { transform: translateY(-3px); box-shadow: var(--ness-shadow); border-color: rgba(217,109,0,.55); }
.service-radio { position: absolute; opacity: 0; pointer-events: none; }
.service-radio:checked + .service-card {
  border-color: var(--ness-primary-2);
  box-shadow: 0 0 0 3px rgba(217,109,0,.15), var(--ness-shadow);
}
.service-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: linear-gradient(135deg, rgba(217,109,0,.18), rgba(212,160,23,.18));
  font-size: 1.4rem;
}
.price-tag { font-size: 1.25rem; font-weight: 850; color: var(--ness-primary); }
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(105px, 1fr)); gap: 10px; }
.slot-btn {
  border: 1px solid var(--ness-border);
  background: var(--ness-card);
  color: var(--ness-text);
  border-radius: 12px;
  padding: 12px 8px;
  font-weight: 700;
  transition: .18s ease;
}
.slot-btn:hover, .slot-btn.selected { background: var(--ness-primary); color: white; border-color: var(--ness-primary); }
.summary-box { background: rgba(217,109,0,.08); border: 1px solid rgba(217,109,0,.23); border-radius: 16px; padding: 16px; }

.btn-ness {
  background: linear-gradient(135deg, var(--ness-primary), var(--ness-primary-2));
  color: white;
  border: 0;
  border-radius: 12px;
  font-weight: 750;
  padding: .72rem 1.15rem;
  box-shadow: 0 8px 18px rgba(217,109,0,.2);
}
.btn-ness:hover, .btn-ness:focus { color: white; filter: brightness(.95); }
.btn-soft { background: rgba(217,109,0,.1); color: var(--ness-primary); border: 1px solid rgba(217,109,0,.25); border-radius: 12px; }
.btn-soft:hover { background: rgba(217,109,0,.18); color: var(--ness-primary); }
.form-control, .form-select {
  background-color: var(--ness-card);
  color: var(--ness-text);
  border-color: var(--ness-border);
  border-radius: 12px;
  min-height: 44px;
}
.form-control:focus, .form-select:focus { background-color: var(--ness-card); color: var(--ness-text); border-color: var(--ness-primary-2); box-shadow: 0 0 0 .22rem rgba(217,109,0,.14); }
.form-control::placeholder { color: var(--ness-muted); opacity: .75; }
.form-check-input:checked { background-color: var(--ness-primary); border-color: var(--ness-primary); }

/* Admin */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 260px;
  background: var(--ness-sidebar);
  color: #e5e7eb;
  z-index: 1040;
  transition: transform .22s ease, width .22s ease;
  overflow-y: auto;
}
.sidebar-brand { display: flex; align-items: center; gap: 12px; padding: 20px; border-bottom: 1px solid rgba(255,255,255,.08); color: white; text-decoration: none; }
.sidebar-brand:hover { color: white; }
.sidebar-section { padding: 16px 13px 8px; font-size: .68rem; text-transform: uppercase; letter-spacing: .12em; color: #6b7280; font-weight: 800; }
.sidebar-nav { padding: 0 10px 22px; }
.sidebar-link { display: flex; align-items: center; gap: 11px; color: #cbd5e1; text-decoration: none; padding: 11px 13px; border-radius: 12px; margin-bottom: 4px; font-weight: 650; font-size: .92rem; }
.sidebar-link:hover { color: white; background: var(--ness-sidebar-hover); }
.sidebar-link.active { color: white; background: linear-gradient(135deg, rgba(217,109,0,.95), rgba(217,109,0,.8)); }
.sidebar-icon { width: 24px; text-align: center; font-size: 1.08rem; }
.admin-main { margin-left: 260px; min-width: 0; flex: 1; transition: margin-left .22s ease; }
.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 1020;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  background: color-mix(in srgb, var(--ness-card) 92%, transparent);
  border-bottom: 1px solid var(--ness-border);
  backdrop-filter: blur(14px);
}
.admin-content { padding: 24px; }
.admin-card { background: var(--ness-card); border: 1px solid var(--ness-border); border-radius: var(--ness-radius); box-shadow: var(--ness-shadow); }
.metric-card { background: var(--ness-card); border: 1px solid var(--ness-border); border-radius: 18px; padding: 18px; height: 100%; position: relative; overflow: hidden; }
.metric-card::after { content: ''; position: absolute; width: 90px; height: 90px; border-radius: 50%; right: -30px; top: -30px; background: rgba(217,109,0,.08); }
.metric-label { color: var(--ness-muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 800; }
.metric-value { font-size: 1.75rem; font-weight: 900; margin-top: 5px; }
.table { color: var(--ness-text); margin-bottom: 0; }
.table > :not(caption) > * > * { background: transparent; border-bottom-color: var(--ness-border); vertical-align: middle; }
.table thead th { color: var(--ness-muted); text-transform: uppercase; letter-spacing: .05em; font-size: .72rem; font-weight: 800; }
.modal-content { background: var(--ness-card); color: var(--ness-text); border-color: var(--ness-border); border-radius: 18px; }
.dropdown-menu { background: var(--ness-card); color: var(--ness-text); border-color: var(--ness-border); }
.dropdown-item { color: var(--ness-text); }
.dropdown-item:hover { background: rgba(217,109,0,.1); color: var(--ness-text); }
.nav-tabs { border-bottom-color: var(--ness-border); }
.nav-tabs .nav-link { color: var(--ness-muted); border-radius: 12px 12px 0 0; }
.nav-tabs .nav-link.active { color: var(--ness-primary); background: var(--ness-card); border-color: var(--ness-border) var(--ness-border) var(--ness-card); }
.status-badge { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 6px 10px; font-size: .75rem; font-weight: 800; }
.status-pending { color: #92400e; background: #fef3c7; }
.status-confirmed { color: #075985; background: #e0f2fe; }
.status-completed { color: #166534; background: #dcfce7; }
.status-cancelled, .status-no_show { color: #991b1b; background: #fee2e2; }
body.theme-dark .status-pending { color: #fde68a; background: rgba(146,64,14,.35); }
body.theme-dark .status-confirmed { color: #bae6fd; background: rgba(7,89,133,.35); }
body.theme-dark .status-completed { color: #bbf7d0; background: rgba(22,101,52,.35); }
body.theme-dark .status-cancelled, body.theme-dark .status-no_show { color: #fecaca; background: rgba(153,27,27,.35); }
.timeline-item { position: relative; padding-left: 28px; padding-bottom: 20px; }
.timeline-item::before { content: ''; position: absolute; left: 8px; top: 8px; bottom: -3px; width: 2px; background: var(--ness-border); }
.timeline-item:last-child::before { display: none; }
.timeline-dot { position: absolute; left: 2px; top: 5px; width: 14px; height: 14px; border-radius: 50%; background: var(--ness-primary-2); border: 3px solid var(--ness-card); box-shadow: 0 0 0 1px var(--ness-primary-2); }
.notification-dot { position: absolute; top: 4px; right: 4px; width: 8px; height: 8px; border-radius: 50%; background: #ef4444; display: none; }
.notification-dot.show { display: block; }
.canvas-chart { width: 100%; height: 260px; display: block; }
.inventory-photo { width: 54px; height: 54px; border-radius: 12px; object-fit: cover; background: var(--ness-border); }
.invoice-paper { background: white; color: #111827; max-width: 900px; margin: 0 auto; padding: 34px; border-radius: 8px; box-shadow: var(--ness-shadow); }
.qr-placeholder { width: 110px; height: 110px; border: 4px solid #111; display: grid; place-items: center; font-size: .65rem; text-align: center; padding: 8px; }
.footer-public { border-top: 1px solid var(--ness-border); color: var(--ness-muted); }

body.sidebar-collapsed .admin-sidebar { width: 84px; }
body.sidebar-collapsed .admin-main { margin-left: 84px; }
body.sidebar-collapsed .sidebar-label, body.sidebar-collapsed .sidebar-section, body.sidebar-collapsed .sidebar-brand-text { display: none; }
body.sidebar-collapsed .sidebar-link { justify-content: center; }

@media (max-width: 991.98px) {
  .admin-sidebar { transform: translateX(-100%); width: 270px; }
  .admin-main, body.sidebar-collapsed .admin-main { margin-left: 0; }
  body.sidebar-open .admin-sidebar { transform: translateX(0); }
  body.sidebar-open::after { content: ''; position: fixed; inset: 0; background: rgba(0,0,0,.48); z-index: 1035; }
  .admin-content { padding: 18px 13px; }
  .admin-topbar { padding: 0 14px; }
}
@media (max-width: 575.98px) {
  .booking-stepper { grid-template-columns: repeat(2, 1fr); }
  .step-pill:nth-child(2) { border-right: 0; }
  .step-pill:nth-child(-n+2) { border-bottom: 1px solid var(--ness-border); }
  .hero-title { font-size: 2.35rem; }
  .booking-shell { border-radius: 18px; }
  .admin-card { border-radius: 14px; }
  .invoice-paper { padding: 18px; }
}

@media print {
  body { background: white !important; }
  .no-print, .admin-sidebar, .admin-topbar, .footer-public { display: none !important; }
  .admin-main { margin: 0 !important; }
  .admin-content { padding: 0 !important; }
  .invoice-paper { box-shadow: none; max-width: none; padding: 0; }
}


/* NESS BARSHOP 1.0.4 - interfaz pública simplificada y responsiva */
html, body { max-width: 100%; overflow-x: hidden; }
body, .admin-layout, .admin-main, .admin-content, .row > *, .booking-wrapper { min-width: 0; }
.public-main { flex: 1 0 auto; }
.ness-public { display: flex; flex-direction: column; }
.public-nav-inner {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 8px;
  padding-bottom: 8px;
}
.public-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ness-text);
  text-decoration: none;
  min-width: 0;
}
.public-brand:hover { color: var(--ness-text); }
.public-brand strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.public-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.theme-button { width: 40px; padding-left: 0; padding-right: 0; }
.booking-wrapper { width: 100%; max-width: 760px; }
.booking-title { font-size: 1.35rem; font-weight: 850; margin-bottom: 18px; }
.booking-stepper { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.step-pill { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.step-pill.completed { color: var(--ness-primary); }
.service-list { display: grid; gap: 10px; }
.service-card-simple {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 15px;
  min-width: 0;
}
.service-card-simple:hover { transform: none; }
.service-check {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid var(--ness-border);
  color: transparent;
  font-weight: 900;
}
.service-radio:checked + .service-card .service-check {
  background: var(--ness-primary);
  border-color: var(--ness-primary);
  color: #fff;
}
.service-main { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.service-main strong { overflow: hidden; text-overflow: ellipsis; }
.service-main small { color: var(--ness-muted); }
.service-card-simple .price-tag { flex: 0 0 auto; font-size: 1rem; white-space: nowrap; }
.step-arrows { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; }
.step-arrow {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--ness-border);
  background: var(--ness-card);
  color: var(--ness-primary);
  font-size: 2rem;
  line-height: 1;
  display: grid;
  place-items: center;
  font-weight: 700;
}
.step-arrow:hover, .step-arrow:focus { border-color: var(--ness-primary); background: rgba(217,109,0,.10); }
.summary-line { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding: 7px 0; }
.summary-line span { color: var(--ness-muted); }
.summary-line strong { text-align: right; overflow-wrap: anywhere; }
.availability-ok { color: var(--ness-primary); font-weight: 800; }
.loading-slots { color: var(--ness-muted); padding: 12px 0; }
.success-mark {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(217,109,0,.13);
  color: var(--ness-primary);
  font-size: 2rem;
  font-weight: 900;
}
.whatsapp-support {
  position: fixed;
  right: max(14px, env(safe-area-inset-right));
  bottom: max(14px, env(safe-area-inset-bottom));
  z-index: 1050;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 17px;
  border-radius: 999px;
  background: #D96D00;
  color: #fff !important;
  text-decoration: none;
  font-weight: 800;
  box-shadow: 0 10px 25px rgba(0,0,0,.22);
}
.whatsapp-support:hover { color: #fff !important; filter: brightness(.94); }
.appointment-list { display: grid; gap: 12px; }
.appointment-card { border: 1px solid var(--ness-border); border-radius: 15px; padding: 15px; background: var(--ness-card); }
.form-text { color: var(--ness-muted); }
body.theme-dark .btn-outline-secondary { color: #d1d5db; border-color: #4b5563; }
body.theme-dark .btn-outline-secondary:hover { color: #fff; background: #374151; }
body.theme-dark .bg-light, body.theme-dark .text-bg-light { background-color: #1f2937 !important; color: #f3f4f6 !important; }
body.theme-dark .form-control[type="date"]::-webkit-calendar-picker-indicator,
body.theme-dark .form-control[type="time"]::-webkit-calendar-picker-indicator { filter: invert(1); }
.modal-dialog { max-width: min(500px, calc(100% - 20px)); margin-left: auto; margin-right: auto; }
.table-responsive { max-width: 100%; }
.admin-topbar > * { min-width: 0; }
.admin-topbar .dropdown-toggle { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 575.98px) {
  .public-nav-inner { gap: 8px; }
  .public-brand strong { max-width: 125px; }
  .brand-mark { width: 38px; height: 38px; border-radius: 12px; }
  .public-actions { gap: 5px; }
  .public-actions .btn { padding: .42rem .58rem; }
  .booking-stepper { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .step-pill { padding: 10px 3px; font-size: .66rem; border-bottom: 0 !important; }
  .step-pill:nth-child(2) { border-right: 1px solid var(--ness-border); }
  .step-number { width: 21px; height: 21px; margin-right: 2px; font-size: .7rem; }
  .booking-pane { padding: 17px 14px; }
  .booking-shell { border-radius: 16px; }
  .service-card-simple { padding: 13px 11px; gap: 9px; }
  .service-card-simple .price-tag { font-size: .9rem; }
  .slot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .slot-btn { min-width: 0; }
  .summary-line { align-items: flex-start; }
  .whatsapp-support { min-height: 42px; padding: 0 14px; font-size: .86rem; }
  .admin-topbar { height: auto; min-height: 64px; flex-wrap: wrap; gap: 8px; padding-top: 8px; padding-bottom: 8px; }
  .admin-topbar .dropdown-toggle { max-width: 105px; }
  .admin-content { overflow-x: hidden; }
}

/* Pantalla inicial FRIENDS: no modifica el diseño del panel de citas */
body.splash-visible { overflow: hidden; }
.friends-splash {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: radial-gradient(circle at center, #23150f 0%, #090706 72%, #000 100%);
  opacity: 1;
  visibility: visible;
  transition: opacity .7s ease, visibility .7s ease;
}
.friends-splash-inner {
  width: min(92vw, 720px);
  animation: friendsLogoEntrance 1.1s cubic-bezier(.2,.8,.2,1) both,
             friendsLogoFloat 2.4s ease-in-out 1.1s infinite alternate;
}
.friends-splash img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 82vh;
  object-fit: contain;
  filter: drop-shadow(0 18px 32px rgba(0,0,0,.55));
}
.friends-splash.splash-hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
@keyframes friendsLogoEntrance {
  from { opacity: 0; transform: scale(.90) translateY(12px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes friendsLogoFloat {
  from { transform: scale(1); }
  to { transform: scale(1.025); }
}
@media (prefers-reduced-motion: reduce) {
  .friends-splash-inner { animation: none; }
  .friends-splash { transition-duration: .2s; }
}
