/* La misma identidad, con superficies y contraste adecuados a cada apariencia. */
:root{--theme-bg:#f7f7f5;--theme-surface:#fff;--theme-soft:#edede7;--theme-ink:#171717;--theme-line:#deded6}
.portal-tabs button{position:relative}
.filters{flex-wrap:wrap}
.nav-pending-count{display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;margin-left:7px;padding:0 5px;border-radius:999px;background:var(--theme-ink);color:var(--theme-surface);font-size:10px;font-weight:600;line-height:1}
.nav-pending-count[hidden]{display:none}
@media(max-width:700px){.operation-layout .portal-tabs .nav-pending-count{position:absolute;top:4px;right:calc(50% - 29px);margin:0;min-width:17px;height:17px;font-size:9px}}
.theme-control{display:inline-flex;align-items:center;position:relative;margin:0;flex-shrink:0;font-size:12px;color:var(--theme-ink);font-weight:400;isolation:isolate;z-index:30}
.theme-trigger{display:grid;place-items:center;width:44px;height:44px;padding:0;border:1px solid transparent;border-radius:50%;color:var(--theme-ink);background:transparent;cursor:pointer;transition:background .15s,border-color .15s}
.theme-trigger:hover,.theme-trigger[aria-expanded=true]{background:var(--theme-soft);border-color:var(--theme-line)}
.theme-control svg{display:block;width:19px;height:19px;flex-shrink:0;pointer-events:none}
.theme-menu{position:absolute;top:calc(100% + 8px);right:0;width:188px;max-width:calc(100vw - 32px);padding:7px;background:var(--theme-surface);border:1px solid var(--theme-line);border-radius:12px;box-shadow:0 12px 32px #0002;color:var(--theme-ink)}
.theme-menu-label{margin:0;padding:8px 10px;font-size:10px;font-weight:500;line-height:1.5;letter-spacing:.3px;color:var(--muted)}
.theme-option{display:flex;align-items:center;gap:10px;width:100%;min-height:44px;padding:10px;border:0;border-radius:7px;background:transparent;color:var(--theme-ink);font:inherit;font-size:12px;font-weight:400;text-align:left;cursor:pointer}
.theme-option:hover,.theme-option[aria-pressed=true]{background:var(--theme-soft)}
.theme-check{margin-left:auto;visibility:hidden}.theme-check svg{width:15px;height:15px}.theme-option[aria-pressed=true] .theme-check{visibility:visible}
.theme-trigger:focus-visible,.theme-option:focus-visible{outline:3px solid #3676e8;outline-offset:2px}
.site-header .theme-control{margin-left:0}.topbar .breadcrumb{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-right:auto}.topbar .theme-control{margin-left:0}
.checkout-topbar .theme-control{margin-left:0}.operation-controls .theme-control{margin:0}.login-card>.theme-control{display:flex;width:max-content;margin:0 0 26px auto;font-weight:400}.unavailable>.theme-control{align-self:flex-end;margin-top:-42px}

/* Acciones del portal: iconos consistentes y área táctil de 44 px. */
.ui-icon{display:block;width:19px;height:19px;flex-shrink:0;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
.button.portal-action{min-height:44px;gap:8px;border-radius:24px;padding:11px 17px;font-size:12px;font-weight:500;white-space:nowrap}
.button.portal-action.icon-only{width:44px;height:44px;min-width:44px;min-height:44px;padding:0;flex-shrink:0;border:1px solid var(--theme-line);background:var(--theme-surface);color:var(--theme-ink);border-radius:50%}
.button.portal-action:hover{transform:none}
.button.portal-action.icon-only:hover,.button.portal-action.icon-only[aria-pressed=true]{background:var(--theme-soft)}
.button.portal-action:disabled{cursor:wait;opacity:.45}
.button.portal-action:focus-visible{outline:3px solid #3676e8;outline-offset:3px}
.connection-status{display:inline-flex;align-items:center;gap:7px;min-height:28px;padding:5px 9px;border-radius:7px;background:var(--theme-soft);color:var(--muted);font-size:10px;font-weight:500;line-height:1.4;white-space:nowrap}
.connection-dot{display:block;width:6px;height:6px;border-radius:50%;background:currentColor;flex-shrink:0}
.connection-status.active .connection-dot{background:var(--green)}
.operation-layout .business-identity{flex:1;min-width:0}
.operation-controls{flex-shrink:0;gap:10px}
.operation-tools{flex-wrap:wrap;gap:8px}
@media(max-width:550px){
  .operation-controls{gap:6px}
  .connection-status{padding:8px;gap:0}
  .connection-label{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
  .operation-layout .tablet-topbar{gap:10px}
  .operation-layout .business-identity{padding-left:10px}
  .operation-tools .fine{margin-right:auto}
}

:root[data-theme="dark"]{color-scheme:dark;--theme-bg:#141414;--theme-surface:#1d1d1c;--theme-soft:#282827;--theme-ink:#edede9;--theme-line:#3d3d39;--muted:#b2b2a8;--border:#3d3d39;--green:#98d1ae;background:var(--theme-bg);color:var(--theme-ink)}
:root[data-theme="dark"] body{background:var(--theme-bg);color:var(--theme-ink)}
:root[data-theme="dark"] :is(.sidebar,.directory,.stats,.calendar-box,.agenda-card,.catalog-card,.catalog-schedule-row,.reservation-card,.today-wrap,.week-panel,.checkout-summary,.payment-method){background:var(--theme-surface);border-color:var(--theme-line)}
:root[data-theme="dark"] :is(.detail-panel,.consumption-health,.login-story,.sound-box,.simulation-note,.catalog-visual,.nav-active,.avatar,.count-badge,.calendar-count,.status-pill,.checkout-meta span,.method-icon,.week-booking){background:var(--theme-soft);color:var(--theme-ink);border-color:var(--theme-line)}
:root[data-theme="dark"] :is(.primary,.filter.selected,.calendar-day.selected,.is-today .week-day-number,.confirmation-mark,.toast){background:var(--theme-ink);color:var(--theme-bg)}
:root[data-theme="dark"] .primary:hover{background:#d6d6cf}
:root[data-theme="dark"] .secondary{background:var(--theme-surface);color:var(--theme-ink);border-color:var(--theme-line)}
:root[data-theme="dark"] :is(.secondary:hover,.calendar-day:hover,.week-day:hover,.week-day.is-today){background:var(--theme-soft)}
:root[data-theme="dark"] .filter{background:var(--theme-surface);color:var(--muted)}
:root[data-theme="dark"] .filter.selected{background:var(--theme-ink);color:var(--theme-bg)}
:root[data-theme="dark"] .business-table tbody tr.selected{background:#30302c}
:root[data-theme="dark"] .business-table tbody tr:hover{background:#262624}
:root[data-theme="dark"] :is(input,select,textarea){color:var(--theme-ink);caret-color:var(--theme-ink);accent-color:#d7d7cb}
:root[data-theme="dark"] :is(.private-link,.featured-form input[type=date],.booking-settings input,.booking-settings select,.consumption-period input,.login-card input,.editor-dialog input:not([type=checkbox]),.editor-dialog select,.editor-dialog textarea){background:var(--theme-surface);color:var(--theme-ink);border-color:#55554d}
:root[data-theme="dark"] input::placeholder,:root[data-theme="dark"] textarea::placeholder{color:#96968b;opacity:1}
:root[data-theme="dark"] .editor-dialog{background:var(--theme-bg);color:var(--theme-ink);border-color:var(--theme-line)}
:root[data-theme="dark"] .editor-dialog::backdrop{background:#000a}
:root[data-theme="dark"] .editor-dialog input:disabled{background:var(--theme-soft);color:var(--muted)}
:root[data-theme="dark"] .business-tabs button.selected{color:var(--theme-ink);border-bottom-color:var(--theme-ink)}
:root[data-theme="dark"] :is(.calendar-day,.week-day){color:var(--theme-ink)}
:root[data-theme="dark"] .calendar-day.selected{background:var(--theme-ink);color:var(--theme-bg)}
:root[data-theme="dark"] .calendar-day.today{border-color:#929286}
:root[data-theme="dark"] .calendar-day.selected .calendar-count{background:#44443f;color:#fff}
:root[data-theme="dark"] .business-identity{border-color:var(--theme-line)}
:root[data-theme="dark"] :is(td,.week-day,.week-booking,.waiting-item,.reservation-card,.empty-card,.orbit,.orbit:before,.orbit:after){border-color:var(--theme-line)}
:root[data-theme="dark"] .empty-card{background:var(--theme-surface);color:var(--muted)}
:root[data-theme="dark"] .empty-card strong{color:var(--theme-ink)}
:root[data-theme="dark"] :is(.brand span,.sidebar-label,.sidebar-bottom p,.breadcrumb,.account,.business-meta,.location-cell,.row-button,.contact-line,.contact-label,.page-footer,.stats span,.approval-deadline,.sound-box p,.reservation-info,.reservation-money span,.access-revoked p,.story-copy>p:last-child,.week-day-name,.week-booking-time,.week-booking>small,.week-more,.approval-footer){color:var(--muted)}
:root[data-theme="dark"] :is(.breadcrumb strong,.consumption-health strong){color:var(--theme-ink)}
:root[data-theme="dark"] .week-free{color:#77776e}
:root[data-theme="dark"] .approval-stack.has-stack::before,:root[data-theme="dark"] .approval-stack.deep-stack::after{background:#2b2b28;border-color:var(--theme-line)}
:root[data-theme="dark"] .approval-stack.deep-stack::after{background:#353530}
:root[data-theme="dark"] .status-pill.active{color:#a0dbb6;background:#1c3425;border-color:#355642}
:root[data-theme="dark"] .reservation-card .status-pill{background:var(--theme-soft);color:var(--muted)}
:root[data-theme="dark"] .error{background:#3d2520;color:#f2b4a6}
:root[data-theme="dark"] .featured-badge{background:#333124;color:#d9d1a6}
:root[data-theme="dark"] .access-qr{background:#fff;border-color:#ddd}
:root[data-theme="dark"] .access-qr figcaption{color:#62625b}
:root[data-theme="dark"] :fullscreen{background:var(--theme-bg)}

/* Checkout: estados, importes y selección de método. */
:root[data-theme="dark"] :is(.checkout-header-label,.summary-heading .eyebrow,.summary-heading>span:last-child,.checkout-business,.checkout-breakdown dt,.deposit-row dt span,.checkout-summary-note,.hold-note,.method-copy>span,.simulation-note p,.simulation-symbol,.checkout-fine,.reservation-pass>span,.reservation-pass>small,.checkout-paid-note){color:var(--muted)}
:root[data-theme="dark"] .checkout-header-label{border-color:var(--theme-line)}
:root[data-theme="dark"] .checkout-breakdown .deposit-row dt,:root[data-theme="dark"] .hold-note strong{color:var(--theme-ink)}
:root[data-theme="dark"] .payment-method{border-color:#55554d}
:root[data-theme="dark"] .payment-method:hover{border-color:#929286}
:root[data-theme="dark"] .payment-method:has(input:checked){background:#30302c;border-color:var(--theme-ink)}
:root[data-theme="dark"] .payment-method input{accent-color:#deded5}
:root[data-theme="dark"] .payment-method:has(input:checked) .method-icon{background:var(--theme-ink);border-color:var(--theme-ink);color:var(--theme-bg)}

/* Landing y muestras ilustrativas; las fotos y el QR conservan sus colores. */
:root[data-theme="dark"] .landing{--ink:var(--theme-ink);--paper:var(--theme-bg);--soft:var(--theme-soft);--line:var(--theme-line)}
:root[data-theme="dark"] :is(.hello-card,.business-preview,.mini-reservation){background:var(--theme-surface);border-color:var(--theme-line)}
:root[data-theme="dark"] :is(.journey-preview,.preview-tag){background:var(--theme-soft);border-color:var(--theme-line)}
:root[data-theme="dark"] .preview-tag{background:var(--theme-surface)}
:root[data-theme="dark"] :is(.hero-description,.hero-note,.hello-heading div>span,.hello-card>small,.visual-index,.section-intro>p:last-child,.step-number,.step>span>span,.preview-top>span:nth-child(2),.preview-counter,.preview-content p,.preview-caption,.mini-top>span:nth-child(2),.mini-heading>span,.mini-week>span,.mini-label,.mini-reservation>p,.mini-caption,.tool-index,.business-tools p,.faq-list details>p,.pilot-disclosure,.registration-note,.site-footer>span,.site-footer>p){color:var(--muted)}
:root[data-theme="dark"] :is(.preview-caption,.mini-top){border-color:var(--theme-line)}
:root[data-theme="dark"] .chat-mark{background:var(--theme-ink);color:var(--theme-bg)}
:root[data-theme="dark"] .business-section{background:#0e0e0e;color:var(--theme-ink)}
:root[data-theme="dark"] .business-copy .eyebrow,:root[data-theme="dark"] .business-access{color:#aaa99f}
:root[data-theme="dark"] .business-copy>p:not(.eyebrow):not(.business-access){color:#bebeb4}
:root[data-theme="dark"] .light-button{background:var(--theme-ink);color:var(--theme-bg)}
:root[data-theme="dark"] .light-button:hover{background:#d6d6cf}
:root[data-theme="dark"] .mini-week .mini-today,:root[data-theme="dark"] .mini-time{background:var(--theme-soft);color:var(--theme-ink)}
:root[data-theme="dark"] .mini-reservation{box-shadow:0 7px 0 -3px #282827,0 8px 0 -3px #44443e}
:root[data-theme="dark"] .mini-actions>span:last-child{background:var(--theme-ink);color:var(--theme-bg);border-color:var(--theme-ink)}
:root[data-theme="dark"] .landing-qr{background:#fff;border-color:#ddd;color:#171717}
:root[data-theme="dark"] .landing-qr figcaption{color:#62625b}

@media(max-width:760px){.site-header nav{display:flex;gap:14px}.site-header .theme-control{margin-left:auto}.site-header{gap:12px}.topbar{gap:12px}.checkout-topbar{flex-wrap:wrap;padding-block:15px;gap:12px}.checkout-topbar .status-pill{margin-left:auto}.checkout-topbar .theme-control{margin-left:auto}.login-card>.theme-control{margin-bottom:22px}}
@media(max-width:380px){.site-header nav a:first-child{display:none}.topbar .account{display:none}}
