: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.step-arrow-text {
  width: auto;
  min-width: 132px;
  padding: 0 18px;
  border-radius: 12px;
  font-size: .88rem;
  letter-spacing: .02em;
  white-space: nowrap;
}
.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; }
}

/* NESS BARSHOP 1.2.0 - maestros verticales, POS y acciones visibles */
.pos-invoice-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(330px, 390px); gap: 18px; align-items: start; }
.pos-sale-panel, .pos-payment-panel { min-width: 0; }
.pos-search-input { font-weight: 750; letter-spacing: .01em; }
.pos-search-results { position: absolute; left: 12px; right: 12px; z-index: 1060; margin-top: 3px; max-height: 430px; overflow-y: auto; border: 1px solid var(--ness-border); border-radius: 12px; background: var(--ness-card); box-shadow: var(--ness-shadow); }
.pos-search-results .pos-result { width: 100%; border: 0; border-bottom: 1px solid var(--ness-border); background: transparent; color: var(--ness-text); padding: 11px 13px; display: flex; justify-content: space-between; gap: 16px; text-align: left; }
.pos-search-results .pos-result:last-child { border-bottom: 0; }
.pos-search-results .pos-result:hover, .pos-search-results .pos-result:focus { background: rgba(217,109,0,.10); }
.pos-search-results .pos-result > span:last-child { display: flex; flex-direction: column; white-space: nowrap; }
.pos-lines-wrap { min-height: 360px; max-height: calc(100vh - 310px); overflow: auto; }
.pos-lines-table thead th { position: sticky; top: 0; z-index: 2; background: var(--ness-card); }
.pos-lines-table .form-control { min-width: 72px; }
.pos-lines-table .line-description { min-width: 220px; }
.pos-total-box { border: 2px solid var(--ness-primary); }
.pos-grand-total { font-size: clamp(1.55rem, 3vw, 2.15rem); line-height: 1; color: var(--ness-primary); white-space: nowrap; }
.appointments-grid { overflow-x: auto; overflow-y: visible; }
.actions-sticky { position: sticky; right: 0; z-index: 3; background: var(--ness-card) !important; min-width: 330px; box-shadow: -8px 0 14px rgba(0,0,0,.04); }
thead .actions-sticky { z-index: 4; }
body.theme-dark .actions-sticky { box-shadow: -8px 0 14px rgba(0,0,0,.20); }
@media (max-width: 1199.98px) {
  .pos-invoice-layout { grid-template-columns: 1fr; }
  .pos-payment-panel .sticky-xl-top { position: static !important; }
  .pos-lines-wrap { max-height: none; }
}
@media (max-width: 767.98px) {
  .actions-sticky { position: static; min-width: 300px; box-shadow: none; }
  .pos-search-results { left: 0; right: 0; }
}
.pos-sale-panel > .admin-card:first-child { position: relative; overflow: visible; }

/* NESS BARSHOP 1.3 - historial gráfico y Front Desk */
.session-photo-date{margin:1rem 0 .65rem;padding:.55rem .8rem;border-left:4px solid var(--ness-primary,#d96d00);background:rgba(127,127,127,.08);border-radius:.5rem}
.session-photo-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:1rem;margin-bottom:1.5rem}
.session-photo-card{border:1px solid rgba(127,127,127,.22);border-radius:.85rem;overflow:hidden;background:var(--bs-body-bg);box-shadow:0 3px 14px rgba(0,0,0,.06)}
.session-photo-link{display:block;aspect-ratio:4/3;background:#111;overflow:hidden}
.session-photo-link img{width:100%;height:100%;object-fit:cover;display:block}
.celebration-card{position:relative;overflow:hidden;border:1px solid rgba(217,109,0,.35);background:linear-gradient(135deg,rgba(217,109,0,.12),rgba(255,193,7,.12));border-radius:1rem;padding:1rem 1.1rem}
.celebration-card:before,.celebration-card:after{content:"🎉";position:absolute;font-size:2.2rem;opacity:.25;transform:rotate(-15deg)}
.celebration-card:before{right:1rem;top:.2rem}.celebration-card:after{right:4rem;bottom:-.5rem;transform:rotate(18deg)}
.points-card-front{border-radius:1rem;padding:1rem;background:rgba(13,110,253,.08);border:1px solid rgba(13,110,253,.18)}
.points-card-front .points-number{font-size:2rem;font-weight:800;line-height:1}
.payment-link-box{word-break:break-all;background:rgba(127,127,127,.08);border:1px dashed rgba(127,127,127,.35);border-radius:.75rem;padding:.75rem}
.party-strip{font-size:1.35rem;letter-spacing:.2rem;white-space:nowrap;overflow:hidden}
/* v1.4.6 - sidebar agrupado */
.sidebar-nav-groups { padding-top: 8px; }
.sidebar-group { margin-bottom: 6px; }
.sidebar-group-toggle { width:100%; border:0; background:transparent; display:flex; align-items:center; gap:11px; color:#e5e7eb; padding:11px 13px; border-radius:12px; font-weight:800; font-size:.92rem; }
.sidebar-group-toggle:hover,.sidebar-group-toggle.active { color:#fff; background:rgba(255,255,255,.07); }
.sidebar-group-toggle .sidebar-chevron { transition:transform .2s ease; font-size:1rem; opacity:.65; }
.sidebar-group-toggle[aria-expanded="true"] .sidebar-chevron { transform:rotate(180deg); }
.sidebar-submenu { padding:3px 0 4px 11px; }
.sidebar-sublink { font-size:.86rem; padding:9px 11px; margin-bottom:2px; font-weight:600; }
.sidebar-sublink .sidebar-icon { opacity:.8; }
body.sidebar-collapsed .sidebar-group-toggle { justify-content:center; }
body.sidebar-collapsed .sidebar-group-toggle .sidebar-chevron,body.sidebar-collapsed .sidebar-submenu { display:none !important; }
.client-pos-card { min-height:58px; padding:9px 12px; border:1px solid var(--ness-border,#e5e7eb); border-radius:12px; background:rgba(255,255,255,.04); }


/* v1.4.9: submenús nativos del sidebar; no dependen de Bootstrap collapse */
.sidebar-group > summary { list-style:none; cursor:pointer; }
.sidebar-group > summary::-webkit-details-marker { display:none; }
.sidebar-group[open] > .sidebar-group-toggle .sidebar-chevron { transform:rotate(180deg); }
.sidebar-group:not([open]) > .sidebar-submenu { display:none; }
.sidebar-group[open] > .sidebar-submenu { display:block; }
.sidebar-group-toggle .sidebar-chevron { transition:transform .2s ease; }
body.sidebar-collapsed .sidebar-group > .sidebar-submenu { display:none !important; }

/* MOSAS VIP 1.4.12 · header con accesos, retractil y fijable */
.admin-topbar {height:auto; min-height:68px; display:block; padding:9px 17px 0;}
.admin-topbar-primary {min-height:45px; display:flex; align-items:center; justify-content:space-between; gap:12px;}
.admin-topbar-actions {display:flex; align-items:center; justify-content:flex-start; gap:6px; padding:7px 0 10px; overflow-x:auto; scrollbar-width:thin;}
.topbar-action {display:inline-flex; align-items:center; justify-content:center; gap:8px; text-decoration:none; white-space:nowrap; padding:8px 15px; border:1px solid var(--ness-border); border-radius:10px; font-weight:750; font-size:.79rem; color:var(--ness-text); background:var(--ness-card);}
.topbar-action:hover,.topbar-action.active{background:var(--ness-primary);color:white; border-color:var(--ness-primary);}
.topbar-action i {font-size:.96rem;}
.header-company-pill {display:inline-flex;gap:6px;align-items:center;max-width:210px;border:1px solid var(--ness-border);border-radius:99px;padding:7px 10px;font-size:.75rem;white-space:nowrap;}
.header-company-pill span{overflow:hidden;text-overflow:ellipsis;}
.header-branch-switch {max-width:185px;}
.header-branch-switch .form-select{max-width:185px;}
body.header-collapsed .admin-topbar-actions,body.header-collapsed .admin-topbar-context {display:none !important;}
body.header-collapsed .admin-topbar {padding-bottom:8px;}
body.header-collapsed [data-header-collapse] i{transform:rotate(180deg);}
body.header-unpinned .admin-topbar{position:relative;}
body.header-unpinned [data-header-pin]{opacity:.55;}
body.header-unpinned [data-header-pin] i{transform:rotate(45deg);}
.topbar-page-title{font-size:.94rem;}
/* El selector de sucursal es esencial: jamás ocultarlo por breakpoint. */
@media(max-width:1199.98px){.header-company-pill{display:none;}}
@media(max-width:767.98px){.admin-topbar{padding:8px 10px 0;}.admin-topbar-primary{align-items:flex-start;}.topbar-controls{flex-wrap:wrap;justify-content:flex-end}.topbar-action{padding:7px 11px;font-size:.74rem}.admin-topbar .dropdown-toggle{max-width:110px;}}
/* POS a ancho completo, cobro exclusivamente en modal */
.pos-invoice-layout{grid-template-columns:minmax(0,1fr);gap:0;}
.pos-payment-panel{display:none;}
.pos-lines-wrap{max-height:none;min-height:220px;}
.pos-invoice-actions{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px 15px;border-top:1px solid var(--ness-border);}
.pos-invoice-actions .pos-grand-total{font-size:1.5rem;}
.pos-catalog-modal .modal-dialog{max-width:min(980px,calc(100% - 24px));}
.pos-catalog-modal .modal-body{max-height:65vh;overflow-y:auto;}
.pos-catalog-modal .catalog-choice{width:100%;text-align:left;border:none;border-bottom:1px solid var(--ness-border);padding:11px;background:var(--ness-card);color:var(--ness-text);display:flex;gap:12px;align-items:center;justify-content:space-between;}
.pos-catalog-modal .catalog-choice:hover{background:rgba(217,109,0,.09);}
.pos-catalog-modal .catalog-meta{font-size:.75rem;color:var(--ness-muted);}
.pos-checkout-modal .modal-dialog{max-width:min(780px,calc(100% - 20px));}
.pos-checkout-modal .modal-body{max-height:75vh;overflow-y:auto;}
.pos-checkout-modal .pos-total-box{position:static;}
body.pos-fullscreen-mode .admin-sidebar,body.pos-fullscreen-mode .admin-topbar,body.pos-fullscreen-mode .footer-public{display:none !important;}
body.pos-fullscreen-mode .admin-main,body.pos-fullscreen-mode.sidebar-collapsed .admin-main{margin-left:0 !important;}
body.pos-fullscreen-mode .admin-content{padding:8px 14px;}
body.pos-fullscreen-mode .pos-lines-wrap{max-height:calc(100vh - 340px);overflow:auto;}
@media print{.pos-invoice-actions{display:none;}}

/* 1.4.13 · UI centralizada para mantenimiento. */
.header-shortcuts{display:flex;align-items:center;gap:6px;flex-shrink:0}
.header-shortcut{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;border:1px solid var(--ness-border);background:var(--ness-card);border-radius:11px;color:var(--ness-text);text-decoration:none;font-size:17px;transition:background .18s,transform .18s}
.header-shortcut:hover,.header-shortcut.active{background:var(--ness-primary);border-color:var(--ness-primary);color:#fff;transform:translateY(-1px)}
.topbar-controls{min-width:0;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:thin}
.admin-topbar{position:sticky;top:0;z-index:300}
body.header-collapsed .header-shortcuts{display:flex!important}
body.header-collapsed .topbar-controls{display:flex!important}
.pos-step-controls{display:flex;gap:8px;flex-wrap:wrap}
.pos-step{appearance:none;border:1px solid var(--ness-border);background:var(--ness-card);color:var(--ness-text);padding:10px 13px;border-radius:10px;cursor:pointer;font-weight:700;flex:1;min-width:135px;white-space:nowrap}
.pos-step:hover,.pos-step.active{border-color:var(--ness-primary);background:var(--ness-primary);color:#fff}
.payment-row{background:var(--ness-card)}
.celebrate-symbol{font-size:42px;margin-bottom:15px}
.dashboard-chart-card{background:var(--ness-card);border:1px solid var(--ness-border);border-radius:18px;overflow:hidden;box-shadow:0 8px 25px rgba(14,24,49,.045)}
.dashboard-chart-card .chart-title-wrap{display:flex;justify-content:space-between;align-items:start;gap:12px;margin-bottom:16px}
.dashboard-chart-card .chart-icon{height:42px;width:42px;flex-shrink:0;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#fdd6aa,#fff0db);color:#995000;border-radius:12px;font-size:19px}
.dashboard-chart-card canvas{width:100%;height:255px;display:block}
.dashboard-highlight-bar{height:5px;background:linear-gradient(90deg,#f49a23,#a855f7,#38bdf8)}
@media(max-width:1350px){.header-shortcut{width:35px;height:35px}.header-company-pill{display:none}}
@media(max-width:650px){.topbar-controls{gap:4px!important}.header-shortcuts{gap:3px}.header-shortcut{width:31px;height:32px;font-size:14px}.admin-topbar-primary{flex-wrap:wrap}.topbar-controls{width:100%;justify-content:space-between;}.pos-step{font-size:12px;min-width:100px;padding:9px 7px}}

/* Cobro: formas individuales mediante botones, MULTIPAGO solo a petición. */
.pos-pay-buttons{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;}
.pos-pay-method{appearance:none;background:var(--ness-card);color:var(--ness-text);border:1px solid var(--ness-border);border-radius:12px;padding:13px 6px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;font-weight:700;min-height:76px;cursor:pointer;transition:background .15s,border-color .15s;}
.pos-pay-method i{font-size:21px;}
.pos-pay-method:hover,.pos-pay-method.active{background:var(--ness-primary);color:#fff;border-color:var(--ness-primary);}
.pos-pay-mixed{border:2px solid var(--ness-primary);}
@media(max-width:520px){.pos-pay-buttons{grid-template-columns:repeat(2,minmax(0,1fr));}.pos-pay-method{min-height:68px;}}

/* 1.4.19: cobro compacto. Información del cliente y condiciones en una sola tarjeta. */
.pos-checkout-modal .pos-customer-summary{background:var(--ness-card);border-color:var(--ness-border)!important}
.pos-checkout-modal .pos-customer-summary #checkoutClientName{font-size:1.08rem;line-height:1.2}
.pos-checkout-modal .pos-customer-stat{border:1px solid var(--ness-border);border-radius:9px;padding:8px 10px;display:flex;align-items:center;justify-content:space-between;gap:7px;min-height:43px}
.pos-checkout-modal .pos-customer-stat span{color:var(--ness-muted);font-size:.76rem;line-height:1.2}
.pos-checkout-modal .pos-customer-stat strong{font-size:1.02rem;font-variant-numeric:tabular-nums}
.pos-checkout-modal .pos-pay-buttons{grid-template-columns:repeat(6,minmax(0,1fr));gap:7px}
.pos-checkout-modal .pos-pay-method{min-height:58px;padding:7px 3px;gap:4px;border-radius:9px;font-size:.7rem;font-weight:650;line-height:1.2;white-space:normal;text-align:center}
.pos-checkout-modal .pos-pay-method i{font-size:19px}
.pos-checkout-modal .pos-pay-mixed{border-width:1.5px}
@media(max-width:600px){.pos-checkout-modal .pos-pay-buttons{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.pos-checkout-modal .pos-pay-method{min-height:56px;padding:6px 3px}}


/* MOSAS VIP 1.4.20: contexto de la sucursal al pie del sidebar.
   El menú conserva su scroll y la tarjeta permanece visible al fondo. */
.admin-sidebar {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.admin-sidebar .sidebar-brand { flex: 0 0 auto; }
.admin-sidebar .sidebar-nav {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
.sidebar-context-card {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  margin: 8px 12px 14px;
  padding: 10px;
  color: #e5e7eb;
  background: rgba(255,255,255,.055);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(0,0,0,.10);
}
.sidebar-context-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: rgba(217,109,0,.2);
  color: #ffbf75;
  font-size: 14px;
}
.sidebar-context-info { display: flex; flex-direction: column; min-width: 0; gap: 3px; }
.sidebar-context-eyebrow {
  color: #aeb6c5;
  font-size: .67rem;
  letter-spacing: .02em;
  font-weight: 650;
}
.sidebar-context-name {
  color: #fff;
  font-size: .76rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.sidebar-context-date { color: #bfc6d2; font-size: .69rem; white-space: nowrap; }
.sidebar-context-date i { margin-right: 3px; }
body.sidebar-collapsed .sidebar-context-card {
  justify-content: center;
  margin-left: 14px;
  margin-right: 14px;
  padding: 10px 7px;
}
body.sidebar-collapsed .sidebar-context-info { display: none; }
@media (max-width: 991.98px) {
  .sidebar-context-card { margin-bottom: max(14px, env(safe-area-inset-bottom)); }
}

/* 1.4.21 · Sucursal siempre visible, incluso con sidebar retraído o viewport estrecho. */
.admin-topbar .header-branch-switch{display:flex!important;flex:0 0 185px;min-width:145px;max-width:185px;align-items:center;margin:0}
.admin-topbar .header-branch-switch .form-select{max-width:185px;width:100%;font-weight:650;border-color:var(--ness-primary);background-color:var(--ness-card);color:var(--ness-text)}
.admin-topbar .topbar-controls{min-width:0}
@media(max-width:650px){.admin-topbar .header-branch-switch{flex-basis:165px;max-width:165px}}
