:root {
  --bg: #F2EEE3;
  --header: #1D2B28;
  --header-muted: #9FB3AE;
  --teal: #2C7A7B;
  --rust: #A8531F;
  --red: #A3372E;
  --green: #4B7A51;
  --muted: #6F695D;  /* antes #8A8478: no llegaba a contraste AA sobre el fondo beige */
  --border: #DAD3C3;
  --text: #262421;
  --white: #fff;
  --on-accent: #fff;
  --ink: var(--header);
  --surface: #fff;
  --fs-2xs: 0.7rem; --fs-xs: 0.78rem; --fs-sm: 0.85rem; --fs-md: 0.95rem; --fs-base: 1rem; --fs-lg: 1.15rem; --fs-xl: 1.5rem;
  --sp-1: 0.25rem; --sp-2: 0.5rem; --sp-3: 0.75rem; --sp-4: 1rem; --sp-5: 1.5rem;
  --radius: 8px;
  --teal-soft: #EAF3F1;
  --teal-dark: #205C5D;
  --surface-alt: #F7F5EF;
  --bg-2: #EDEAE0;
  --green-soft: #E7F2E8;
  --green-dark: #2F5C33;
  --red-soft: #FBEAE8;
  --font-head: "Oswald", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-mono: "JetBrains Mono", monospace;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-body); }
.hidden { display: none !important; }
h1, h2, h3 { font-family: var(--font-head); margin: 0; }
button { cursor: pointer; font-family: var(--font-body); border: none; background: none; }
input, select, textarea { font-family: var(--font-body); }

/* Login */
.login-view { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--header); }
.login-card { background: var(--surface); padding: 2rem; border-radius: 10px; width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 0.5rem; }
.login-card h1 { color: var(--ink); font-size: var(--fs-xl); letter-spacing: 0.03em; }
.login-card .subtitle { color: var(--muted); margin: 0 0 1rem 0; font-size: var(--fs-sm); }
.login-card label { font-size: var(--fs-xs); font-weight: 600; text-transform: uppercase; color: var(--muted); margin-top: 0.5rem; }
.login-card input { padding: 0.6rem 0.75rem; border: 1px solid var(--border); border-radius: 6px; font-size: var(--fs-md); }
.login-card button { margin-top: 1rem; background: var(--teal); color: var(--on-accent); padding: 0.7rem; border-radius: 6px; font-weight: 600; }
.error-text { color: var(--red); font-size: var(--fs-sm); }

/* Header */
.app-header { background: var(--header); padding: 1.25rem 1.5rem; }
.header-inner { max-width: 1100px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: nowrap; }
.app-header h1 { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--on-accent); font-size: var(--fs-xl); letter-spacing: 0.03em; }
.app-header .subtitle { color: var(--header-muted); font-size: var(--fs-sm); margin: 0.15rem 0 0; }
.sync-indicator { font-size: var(--fs-xs); padding: 0.3rem 0.7rem; border-radius: 20px; display: inline-flex; align-items: center; gap: 0.4rem; margin-top: 0.4rem; }
.sync-indicator.offline { background: #C9A22733; color: #C9A227; }
.sync-indicator.syncing { background: #2C7A7B33; color: var(--teal-dark); }
.sync-indicator.synced { background: #4B7A5133; color: #3A5F3F; }
.header-actions { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; flex-shrink: 0; }
.gear-menu-wrap { position: relative; }
.gear-menu-dropdown { position: absolute; top: calc(100% + 0.3rem); right: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 4px 16px rgba(0,0,0,0.15); min-width: 160px; z-index: 40; overflow: hidden; }
.gear-menu-dropdown.hidden { display: none; }
.gear-menu-item { display: block; width: 100%; text-align: left; padding: 0.6rem 0.9rem; border: none; background: none; font-size: var(--fs-sm); cursor: pointer; color: var(--text, var(--header)); }
.gear-menu-item:hover { background: var(--bg-soft, #f2f2ef); }
.gear-menu-item + .gear-menu-item { border-top: 1px solid var(--border); }
.lang-select {
  background: rgba(255,255,255,0.08);
  color: var(--on-accent);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 6px;
  padding: 0.3rem 0.5rem;
  font-size: var(--fs-sm);
  font-weight: 600;
  cursor: pointer;
}
.lang-select option { color: var(--ink); background: var(--surface); }
.btn-primary { display: inline-flex; align-items: center; gap: 0.4rem; background: var(--teal); color: var(--on-accent); padding: 0.55rem 1rem; border-radius: 6px; font-weight: 600; font-size: var(--fs-md); }
.btn-ghost { color: var(--header-muted); padding: 0.5rem 0.75rem; font-size: var(--fs-md); }
.btn-outline { border: 1px solid var(--border); padding: 0.5rem 0.9rem; border-radius: 6px; color: var(--teal); font-weight: 500; font-size: var(--fs-sm); white-space: nowrap; }
.btn-danger { background: var(--red); color: var(--on-accent); padding: 0.55rem 1rem; border-radius: 6px; font-weight: 600; }
.icon-btn { color: rgba(255,255,255,0.7); font-size: var(--fs-xl); line-height: 1; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem 3rem; }

.banner { margin-top: 1rem; padding: 0.7rem 1rem; border-radius: 8px; font-size: var(--fs-md); }
.banner-error { background: var(--red-soft); color: var(--red); }
.banner-ok { background: var(--green-soft); color: var(--green-dark); }
.banner-warning { background: #FBF0E6; color: var(--rust); }

/* Dashboard */
.dashboard { margin-top: 1.5rem; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }

.dashboard-widgets { display: grid; grid-template-columns: 1fr; gap: 1rem; margin-top: 1rem; }
.dash-card { background: var(--card-bg, var(--white)); border: 1px solid var(--border); border-radius: 10px; padding: 1rem 1.1rem; }
.dash-card h3 { margin: 0 0 0.75rem; font-size: var(--fs-sm); letter-spacing: 0.04em; color: var(--muted); }
.dash-card-header-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; }
.dash-card-header-row h3 { margin: 0; }
.dash-card-link { background: none; border: none; color: var(--teal); font-size: var(--fs-sm); cursor: pointer; font-family: inherit; padding: 0; }
.dash-card-link:hover { text-decoration: underline; }
.dash-quick-buttons { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.dash-aviso-row {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  padding: 0.55rem 0; border-bottom: 1px solid var(--border); cursor: pointer; background: none; border-left: none; border-right: none; border-top: none;
  width: 100%; text-align: left; font: inherit; color: inherit;
}
.dash-aviso-row:last-child { border-bottom: none; }
.dash-aviso-count { font-weight: 700; padding: 0.1rem 0.55rem; border-radius: 100px; font-size: var(--fs-sm); }
.dash-salida-row { padding: 0.6rem 0; border-bottom: 1px solid var(--border); }
.dash-salida-row:last-child { border-bottom: none; }
.dash-salida-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; flex-wrap: wrap; }
.dash-salida-meta { color: var(--muted); font-size: var(--fs-sm); margin-top: 0.15rem; }
.dash-sin-guia-tag { font-size: var(--fs-xs); padding: 0.1rem 0.5rem; border-radius: 4px; background: #FBE4E1; color: var(--red); font-weight: 600; }

@media (min-width: 720px) {
  .dashboard-widgets { grid-template-columns: 1fr 1fr; }
  #dash-salidas-card { grid-column: 1 / -1; }
}
@media (min-width: 640px) { .dashboard { grid-template-columns: repeat(4, 1fr); } }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 0.85rem 1rem; }
.stat-value { font-family: var(--font-mono); font-size: var(--fs-xl); font-weight: 700; }
.stat-label { font-size: var(--fs-xs); text-transform: uppercase; color: var(--muted); margin-top: 0.2rem; }

.dash-stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
@media (min-width: 640px) { .dash-stat-grid { grid-template-columns: repeat(5, 1fr); } }
.dash-stat-grid .stat-card { padding: 0.55rem 0.6rem; }
.dash-stat-grid .stat-value { font-size: var(--fs-lg); }
.dash-stat-grid .stat-label { font-size: var(--fs-2xs); margin-top: 0.1rem; }
.stat-card-clickable { width: 100%; text-align: left; cursor: pointer; font-family: inherit; transition: border-color 0.15s; }
.stat-card-clickable:hover { border-color: var(--teal); }

.dashboard-logo-header { display: flex; flex-direction: row; align-items: center; justify-content: center; padding: 1.25rem 0 0.5rem; }
.dashboard-logo-completo { width: 100%; max-width: 420px; height: auto; }
.dash-welcome-text { margin: 0; font-family: var(--font-head); font-size: var(--fs-base); color: var(--ink); text-align: center; }

.dash-pago-row { width: 100%; display: flex; align-items: center; gap: 0.6rem; text-align: left; background: none; border: none; border-bottom: 1px solid var(--border); padding: 0.55rem 0.1rem; cursor: pointer; font-size: var(--fs-md); font-family: inherit; }
.dash-pago-row:last-child { border-bottom: none; }
.dash-pago-row:hover { color: var(--teal); }
.dash-pago-row strong { margin-left: auto; }

.dash-meteo-linea { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.4rem; font-size: var(--fs-sm); }
.dash-meteo-item { display: flex; align-items: center; gap: 0.35rem; padding: 0.2rem 0.5rem; border-radius: 6px; }
.dash-meteo-item-hoy { background: #2C7A7B14; font-weight: 600; }
.dash-meteo-item-label { color: var(--muted); font-size: var(--fs-xs); text-transform: uppercase; }
.dash-meteo-item-icon { font-size: var(--fs-base); }
.dash-meteo-item-rain { color: var(--muted); font-size: var(--fs-sm); }
.dash-meteo-sep { color: var(--border); }

.dash-mini-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0.3rem; }
.dash-mini-cal-dow { font-size: var(--fs-2xs); font-weight: 700; text-transform: uppercase; color: var(--muted); }
.dash-mini-cal-day { display: flex; flex-direction: column; align-items: center; gap: 0.2rem; padding: 0.4rem 0.1rem; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); cursor: pointer; font-family: inherit; }
.dash-mini-cal-day:hover { border-color: var(--teal); }
.dash-mini-cal-day-hoy { background: #2C7A7B14; border-color: var(--teal); }
.dash-mini-cal-num { font-size: var(--fs-md); font-weight: 600; }
.dash-mini-cal-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--teal); }

/* Alerts */
.alerts-box { margin-top: 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 0.85rem 1rem; }
.alerts-title { display: flex; align-items: center; gap: 0.4rem; font-family: var(--font-head); font-size: var(--fs-md); color: var(--ink); margin-bottom: 0.5rem; }
.alert-row { display: flex; align-items: center; justify-content: space-between; width: 100%; text-align: left; padding: 0.4rem 0.5rem; border-radius: 6px; font-size: var(--fs-md); }
.alert-row:hover { background: var(--surface-alt); }

/* Filters */
.filters { margin-top: 1.5rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.filters input, .filters select { padding: 0.55rem 0.75rem; border: 1px solid var(--border); border-radius: 6px; font-size: var(--fs-md); }
.filters input { flex: 1; min-width: 200px; }
.filtro-activo-banner { display: flex; align-items: center; gap: 0.6rem; background: #2C7A7B1A; color: var(--teal-dark); padding: 0.5rem 0.9rem; border-radius: 6px; margin-top: 0.6rem; font-size: var(--fs-sm); }
.filtro-activo-banner button { margin-left: auto; background: none; border: 1px solid var(--teal-dark); color: var(--teal-dark); border-radius: 5px; padding: 0.2rem 0.6rem; font-size: var(--fs-sm); cursor: pointer; }

/* Batch bar */
.batch-bar { margin-top: 1rem; background: var(--teal-soft); border: 1px solid var(--teal); border-radius: 8px; padding: 0.85rem 1rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }
.batch-bar input { padding: 0.4rem 0.5rem; border: 1px solid var(--teal); border-radius: 6px; font-family: var(--font-mono); width: 8rem; }

/* Category sections */
.category-section { margin-top: 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.category-header { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 0.75rem 1rem; background: var(--bg); font-family: var(--font-head); font-weight: 600; letter-spacing: 0.02em; color: var(--ink); }
.category-count { background: var(--header); color: var(--bg); font-family: var(--font-mono); font-size: var(--fs-xs); padding: 0.1rem 0.5rem; border-radius: 4px; }
.item-row { display: flex; gap: 0.75rem; padding: 0.75rem 1rem; border-top: 1px solid var(--bg-2); align-items: flex-start; }
.item-row.selected { background: var(--teal-soft); }
.item-check { flex-shrink: 0; margin-top: 2px; cursor: pointer; }
.item-bar { width: 4px; border-radius: 2px; align-self: stretch; }
.item-main { flex: 1; min-width: 0; }
.item-top { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; }
.tag-id { font-family: var(--font-mono); font-size: var(--fs-xs); background: var(--header); color: var(--bg-2); padding: 0.1rem 0.35rem; border-radius: 4px; }
.item-name { font-weight: 500; font-size: var(--fs-md); }
.item-meta { margin-top: 0.25rem; font-size: var(--fs-xs); color: var(--muted); display: flex; flex-wrap: wrap; gap: 0.4rem 0.6rem; }
.item-pill-row { margin-top: 0.35rem; }
.item-actions { display: flex; flex-direction: column; gap: 0.3rem; }
.item-actions button { color: var(--teal); padding: 0.3rem; }
.item-actions button.danger { color: var(--red); }

/* Insignia unificada: el color llega en --b (hex del estado) y el fondo se deriva de él */
.badge { --b: var(--muted); display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.1rem 0.5rem; border-radius: 4px; font-size: var(--fs-2xs); font-weight: 600; text-transform: uppercase; color: var(--b); background: color-mix(in srgb, var(--b) 12%, transparent); }
.badge-ok { --b: var(--green); } .badge-warn { --b: var(--rust); } .badge-error { --b: var(--red); } .badge-info { --b: var(--teal); }
.pill { display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.1rem 0.5rem; border-radius: 4px; font-size: var(--fs-xs); font-weight: 500; }

.empty-state { text-align: center; padding: 3rem 1rem; background: var(--surface); border: 1px dashed var(--border); border-radius: 8px; color: var(--muted); }

/* Modal */
.modal-backdrop { position: fixed; inset: 0; background: rgba(29,43,40,0.55); display: flex; align-items: flex-start; justify-content: center; padding: 1rem; overflow-y: auto; z-index: 50; }
.modal-card { background: var(--surface); border-radius: 10px; width: 100%; max-width: 640px; margin: 1.5rem 0; border: 1px solid var(--border); }
.modal-small { max-width: 400px; padding: 1.25rem; }
.modal-header { display: flex; align-items: center; justify-content: space-between; background: var(--header); padding: 1rem 1.25rem; border-radius: 10px 10px 0 0; }
.modal-header h2 { color: var(--on-accent); font-size: var(--fs-base); letter-spacing: 0.02em; }
.modal-body { padding: 1.25rem; display: grid; grid-template-columns: 1fr; gap: 1rem; max-height: 65vh; overflow-y: auto; }
@media (min-width: 640px) { .modal-body { grid-template-columns: 1fr 1fr; } }
.field-full { grid-column: 1 / -1; }
.modal-body label { display: block; font-size: var(--fs-xs); font-weight: 600; text-transform: uppercase; color: var(--muted); margin-bottom: 0.25rem; }
.modal-body input, .modal-body select, .modal-body textarea { width: 100%; padding: 0.55rem 0.7rem; border: 1px solid var(--border); border-radius: 6px; font-size: var(--fs-md); }
.modal-footer { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.5rem; padding: 1rem 1.25rem; border-top: 1px solid var(--border); }

/* Module nav */
.module-nav { max-width: 1100px; margin: 0.75rem auto 0; display: flex; flex-wrap: wrap; gap: 0.25rem; padding: 0 1.5rem; }
.module-tab { padding: 0.55rem 1rem; font-size: var(--fs-sm); font-weight: 600; color: var(--header-muted); border-radius: 6px 6px 0 0; white-space: nowrap; }
.module-tab.active { background: var(--bg); color: var(--ink); }

@media (max-width: 640px) {
  .app-header { padding: 1rem; }
  .app-header h1 { font-size: var(--fs-lg); }
  .module-nav { padding: 0 1rem; gap: 0.15rem; }
  .module-tab { padding: 0.5rem 0.7rem; font-size: var(--fs-xs); }
  .header-actions { gap: 0.35rem; }

  .container { padding: 0 1rem 3rem; }

  .modal-backdrop { padding: 0.5rem; }
  .modal-body, .modal-body-single { padding: 1rem; }
  .modal-header { padding: 0.85rem 1rem; }
  .modal-header h2 { font-size: var(--fs-md); }
  .modal-footer { padding: 0.85rem 1rem; }
  .modal-footer button { flex: 1; min-width: 45%; text-align: center; justify-content: center; }

  /* Card rows: let the fixed-width date/code column drop above the main
     content instead of squeezing everything into one line. */
  .booking-card, .salida-card, .guia-card, .barranco-card, .user-card,
  .descuento-card, .conjunto-card, .item-row {
    flex-wrap: wrap;
  }
  .booking-date, .salida-date { min-width: auto; }

  .recap-row, .pendiente-row { flex-direction: column; align-items: stretch; }
  .recap-main, .pendiente-main { min-width: 0; }
  .recap-assigned { align-self: stretch; }
  .recap-assign-col { min-width: 0; width: 100%; }
  .pendiente-row { gap: 0.4rem; }

  .filters { flex-direction: column; align-items: stretch; }
  .filters input, .filters select { min-width: 0; width: 100%; }

  .settings-card { padding: 1rem; }
}

/* Any wide data table gets a horizontal scroll container instead of
   overflowing the page — used for the wetsuit-sizing stats table. */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-scroll table { min-width: 480px; }
.module-toolbar { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.5rem; margin-top: 1.25rem; }

/* Booking cards */
.booking-card { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 0.9rem 1rem; margin-top: 0.75rem; display: flex; gap: 1rem; align-items: center; cursor: pointer; }
.booking-card:hover { border-color: var(--teal); }
.booking-date { font-family: var(--font-mono); font-weight: 700; font-size: var(--fs-base); min-width: 4.5rem; color: var(--ink); }
.booking-main { flex: 1; min-width: 0; }
.booking-top { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.booking-contact { font-weight: 500; font-size: var(--fs-md); }
.booking-meta { margin-top: 0.25rem; font-size: var(--fs-sm); color: var(--muted); display: flex; flex-wrap: wrap; gap: 0.5rem 0.8rem; }
.booking-actions button { color: var(--red); padding: 0.3rem; }

/* Modal variants */
.modal-wide { max-width: 760px; }
.modal-body-single { display: block; padding: 1.25rem; max-height: 72vh; overflow-y: auto; }
.booking-fields-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 640px) { .booking-fields-grid { grid-template-columns: 1fr 1fr; } }
.booking-fields-grid label { display: block; font-size: var(--fs-xs); font-weight: 600; text-transform: uppercase; color: var(--muted); margin-bottom: 0.25rem; }
.booking-fields-grid input, .booking-fields-grid select, .booking-fields-grid textarea { width: 100%; padding: 0.55rem 0.7rem; border: 1px solid var(--border); border-radius: 6px; font-size: var(--fs-md); }

.section-divider { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; font-family: var(--font-head); font-size: var(--fs-sm); letter-spacing: 0.02em; color: var(--ink); }
.optional-tag { font-family: var(--font-body); font-size: var(--fs-2xs); font-weight: 600; text-transform: uppercase; color: var(--muted); background: var(--bg-2); padding: 0.15rem 0.5rem; border-radius: 4px; }
.hint-text { font-size: var(--fs-sm); color: var(--muted); margin: 0.35rem 0 0.75rem 0; }

.participant-card { border: 1px solid var(--border); border-radius: 8px; padding: 0.7rem 0.9rem; margin-top: 0.6rem; display: flex; justify-content: space-between; align-items: flex-start; gap: 0.75rem; }
.participant-name { font-weight: 600; font-size: var(--fs-md); }
.participant-meta { font-size: var(--fs-xs); color: var(--muted); margin-top: 0.2rem; }
.participant-actions button { color: var(--teal); padding: 0.25rem; }
.participant-actions button.danger { color: var(--red); }
.empty-inline { font-size: var(--fs-sm); color: var(--muted); padding: 0.5rem 0; }

.checkbox-row { display: flex; align-items: flex-start; gap: 0.5rem; margin-bottom: 0.6rem; }
.checkbox-row input[type="checkbox"], .checkbox-row input[type="radio"] { margin-top: 3px; width: auto !important; }
.checkbox-row label { font-size: var(--fs-sm); text-transform: none; font-weight: 400; color: var(--text); margin-bottom: 0; }

.material-category { margin-top: 0.75rem; }
.prep-participant-material { padding: 0.6rem 0.7rem; border: 1px solid var(--border); border-radius: 8px; }
.material-category-title { font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; color: var(--muted); margin-bottom: 0.3rem; }
.material-item-row { display: flex; align-items: center; gap: 0.5rem; padding: 0.3rem 0; font-size: var(--fs-sm); }
.link-btn { background: none; border: none; color: var(--teal); font-size: var(--fs-xs); text-decoration: underline; cursor: pointer; padding: 0; margin-left: auto; }
.material-item-row input[type="checkbox"] { width: auto !important; margin: 0; }

/* Sub-nav within Reservas */
.subnav { display: flex; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; gap: 0.4rem; margin-top: 1.25rem; border-bottom: 1px solid var(--border); }
.subnav-tab { padding: 0.5rem 0.15rem; font-size: var(--fs-sm); font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.subnav-tab.active { color: var(--teal); border-bottom-color: var(--teal); }

/* Salida cards */
.salida-card { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 0.9rem 1rem; margin-top: 0.75rem; display: flex; gap: 1rem; align-items: center; }
.salida-date { font-family: var(--font-mono); font-weight: 700; font-size: var(--fs-base); min-width: 4.5rem; color: var(--ink); }
.salida-main { flex: 1; min-width: 0; }
.salida-top { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.salida-meta { margin-top: 0.25rem; font-size: var(--fs-sm); color: var(--muted); display: flex; flex-wrap: wrap; gap: 0.5rem 0.8rem; }
.capacity-bar { margin-top: 0.4rem; height: 6px; border-radius: 3px; background: var(--bg-2); overflow: hidden; max-width: 200px; }
.capacity-bar-fill { height: 100%; background: var(--teal); }
.capacity-bar-fill.full { background: var(--red); }
.salida-actions { display: flex; gap: 0.3rem; }
.salida-actions button { color: var(--teal); padding: 0.3rem; }
.salida-actions button.danger { color: var(--red); }

/* Discount code cards */
.descuento-card { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 0.9rem 1rem; margin-top: 0.75rem; display: flex; gap: 1rem; align-items: center; }
.descuento-code { font-family: var(--font-mono); font-weight: 700; font-size: var(--fs-base); color: var(--ink); background: var(--bg); padding: 0.2rem 0.6rem; border-radius: 4px; }
.descuento-main { flex: 1; min-width: 0; }
.descuento-meta { margin-top: 0.25rem; font-size: var(--fs-sm); color: var(--muted); display: flex; flex-wrap: wrap; gap: 0.5rem 0.8rem; }
.descuento-actions button { color: var(--red); padding: 0.3rem; }

/* Price summary inside booking modal */
.price-summary { margin-top: 1rem; background: var(--bg); border-radius: 8px; padding: 0.85rem 1rem; font-size: var(--fs-sm); }
.price-row { display: flex; justify-content: space-between; padding: 0.15rem 0; }
.price-row.total { font-weight: 700; font-size: var(--fs-base); border-top: 1px solid var(--border); margin-top: 0.4rem; padding-top: 0.5rem; color: var(--ink); }
.price-row.discount { color: var(--teal); }
.price-warning { color: var(--red); font-size: var(--fs-sm); margin-top: 0.3rem; }

/* Users module */
.user-card { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 0.9rem 1rem; margin-top: 0.75rem; display: flex; gap: 1rem; align-items: center; }
.user-main { flex: 1; min-width: 0; }
.user-top { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.user-name { font-weight: 600; font-size: var(--fs-md); font-family: var(--font-mono); }
.user-meta { margin-top: 0.25rem; font-size: var(--fs-sm); color: var(--muted); }
.user-actions { display: flex; gap: 0.3rem; }
.user-actions button { color: var(--teal); padding: 0.3rem; }
.user-actions button.danger { color: var(--red); }

/* Wetsuit size suggestion */
.neoprene-box { background: var(--surface-alt); border: 1px solid var(--border); border-radius: 8px; padding: 0.75rem 0.9rem; }
.neoprene-result { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.5rem; }
.neoprene-chip { display: flex; flex-direction: column; align-items: center; gap: 0.1rem; padding: 0.4rem 0.8rem; border-radius: 6px; background: var(--surface); border: 1px solid var(--border); min-width: 4.5rem; }
.neoprene-chip span { font-size: var(--fs-2xs); text-transform: uppercase; color: var(--muted); font-weight: 600; }
.neoprene-chip strong { font-family: var(--font-mono); font-size: var(--fs-base); color: var(--text); }
.neoprene-chip.ideal { border-color: var(--teal); background: var(--teal-soft); }
.neoprene-chip.ideal strong { color: var(--teal); }
.neoprene-empty { font-size: var(--fs-sm); color: var(--muted); }

/* Facturación / company settings */
.settings-card { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 1.25rem; margin-top: 1.25rem; }
.settings-card h3 { font-family: var(--font-head); font-size: var(--fs-md); color: var(--ink); letter-spacing: 0.02em; margin-bottom: 1rem; }
.version-detail-row { display: flex; justify-content: space-between; padding: 0.5rem 0; border-bottom: 1px solid var(--border); font-size: var(--fs-md); }
.version-detail-row:last-child { border-bottom: none; }
.version-detail-row span { color: var(--muted); }
.adventurebase-logo { max-width: 220px; width: 100%; height: auto; display: block; margin: 16px 0 6px; }
.logo-row { display: flex; gap: 1.25rem; align-items: flex-start; flex-wrap: wrap; }
.logo-preview { width: 140px; height: 90px; border: 1px dashed var(--border); border-radius: 8px; display: flex; align-items: center; justify-content: center; background: var(--surface-alt); overflow: hidden; flex-shrink: 0; }
.logo-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.logo-preview .logo-empty { font-size: var(--fs-xs); color: var(--muted); text-align: center; padding: 0.5rem; }
.logo-controls { display: flex; flex-direction: column; align-items: flex-start; gap: 0.4rem; }

/* Booking code + invoice box */
.booking-code-chip { display: inline-flex; align-items: center; gap: 0.6rem; background: var(--teal-soft); border: 1px solid var(--teal); border-radius: 8px; padding: 0.6rem 1rem; font-family: var(--font-mono); font-size: var(--fs-lg); font-weight: 700; color: var(--teal); }
.booking-code-chip button { color: var(--teal); font-size: var(--fs-sm); font-weight: 600; font-family: var(--font-body); }
.public-link-row { margin-top: 0.5rem; font-size: var(--fs-sm); color: var(--muted); word-break: break-all; }
.public-link-row a { color: var(--teal); }
.invoice-box { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.invoice-number { font-family: var(--font-mono); font-weight: 700; color: var(--ink); }

/* Guides module */
.guia-card { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 0.9rem 1rem; margin-top: 0.75rem; display: flex; gap: 1rem; align-items: center; }
.guia-main { flex: 1; min-width: 0; }
.guia-top { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.guia-name { font-weight: 600; font-size: var(--fs-md); }
.guia-meta { margin-top: 0.25rem; font-size: var(--fs-sm); color: var(--muted); display: flex; flex-wrap: wrap; gap: 0.5rem 0.8rem; }
.guia-actions { display: flex; gap: 0.3rem; }
.guia-actions button { color: var(--teal); padding: 0.3rem; }
.guia-actions button.danger { color: var(--red); }

.guia-assign-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; padding: 0.6rem 0; border-bottom: 1px solid var(--border); }
.guia-assign-row select, .guia-assign-row input[type="number"] { padding: 0.4rem 0.5rem; border: 1px solid var(--border); border-radius: 6px; font-size: var(--fs-sm); }
.guia-assign-row .sg-valor { width: 5.5rem; }
.guia-importe { font-family: var(--font-mono); font-weight: 600; color: var(--teal); font-size: var(--fs-sm); }
.guia-assign-row .sg-remove { color: var(--red); font-size: var(--fs-sm); margin-left: auto; }

/* Barrancos module */
.barranco-card { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 0.9rem 1rem; margin-top: 0.75rem; display: flex; gap: 1rem; align-items: center; }
.barranco-main { flex: 1; min-width: 0; }
.barranco-top { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.barranco-name { font-weight: 600; font-size: var(--fs-md); }
.clasificacion-chip { font-family: var(--font-mono); font-size: var(--fs-xs); background: var(--bg); color: var(--ink); padding: 0.15rem 0.5rem; border-radius: 4px; }
.barranco-meta { margin-top: 0.3rem; font-size: var(--fs-sm); }
.barranco-meta a { color: var(--teal); font-weight: 500; }
.barranco-meta span { color: var(--muted); }
.barranco-actions { display: flex; gap: 0.3rem; }
.barranco-actions button { color: var(--teal); padding: 0.3rem; }
.barranco-actions button.danger { color: var(--red); }

.punto-encuentro { font-size: var(--fs-sm); padding: 0.5rem 0.7rem; background: var(--teal-soft); border-radius: 6px; }
.punto-encuentro a { color: var(--teal); font-weight: 600; }

/* Participant recap / complete salida */
.recap-row { display: flex; gap: 1rem; align-items: flex-start; justify-content: space-between; padding: 0.75rem 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.recap-main { flex: 1; min-width: 200px; }
.recap-name { font-weight: 600; font-size: var(--fs-md); }
.recap-meta { margin-top: 0.25rem; font-size: var(--fs-sm); color: var(--muted); display: flex; flex-wrap: wrap; gap: 0.4rem 0.8rem; }
.recap-suggestion { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.5rem; }
.recap-material-details summary { cursor: pointer; font-size: var(--fs-sm); font-weight: 600; color: var(--teal); }
.recap-assigned { flex-shrink: 0; align-self: center; }
.recap-assigned select { padding: 0.4rem 0.5rem; border: 1px solid var(--border); border-radius: 6px; font-size: var(--fs-sm); }
.neopreno-assigned { font-size: var(--fs-sm); font-weight: 600; color: var(--teal); background: var(--teal-soft); padding: 0.3rem 0.6rem; border-radius: 6px; }

/* EPI item photo */
.item-foto-row { display: flex; gap: 1.25rem; align-items: flex-start; flex-wrap: wrap; margin-bottom: 0.5rem; }
.item-foto-preview { width: 110px; height: 110px; border: 1px dashed var(--border); border-radius: 8px; display: flex; align-items: center; justify-content: center; background: var(--surface-alt); overflow: hidden; flex-shrink: 0; }
.item-foto-preview img { width: 100%; height: 100%; object-fit: cover; }
.item-foto-preview .logo-empty { font-size: var(--fs-2xs); color: var(--muted); text-align: center; padding: 0.4rem; }
.item-thumb { width: 36px; height: 36px; border-radius: 6px; object-fit: cover; flex-shrink: 0; border: 1px solid var(--border); }

/* Contabilidad / accounting stats */
.periodo-row { display: flex; justify-content: space-between; padding: 0.5rem 0; border-bottom: 1px solid var(--border); font-size: var(--fs-md); }
.periodo-row:last-child { border-bottom: none; }
.periodo-row strong { color: var(--teal); font-family: var(--font-mono); }
.periodo-row-stack { border-bottom: 1px solid var(--border); padding: 0.4rem 0; }
.periodo-row-stack:last-child { border-bottom: none; }
.periodo-row-stack .periodo-row { border-bottom: none; padding: 0.1rem 0; }
.periodo-row-stack .hint-text { padding: 0 0 0.1rem; }

.gastos-mes-header { font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; color: var(--muted); margin: 1rem 0 0.3rem; }
.gastos-mes-header:first-child { margin-top: 0.2rem; }
.gasto-row-min { display: flex; align-items: center; gap: 0.6rem; padding: 0.35rem 0; border-bottom: 1px solid var(--border); font-size: var(--fs-sm); }
.gasto-row-min:last-child { border-bottom: none; }
.gasto-dia { flex-shrink: 0; width: 1.6rem; text-align: center; color: var(--muted); font-family: var(--font-mono); font-size: var(--fs-sm); }
.gasto-concepto { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gasto-importe { flex-shrink: 0; font-family: var(--font-mono); color: var(--rust); }
.gasto-row-min .icon-btn { flex-shrink: 0; padding: 0.1rem; font-size: var(--fs-sm); color: var(--muted); }
.gasto-row-min .icon-btn:hover { color: var(--red); }
.pendiente-row { display: flex; align-items: center; gap: 0.75rem; padding: 0.6rem 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.pendiente-row:last-child { border-bottom: none; }

.revision-form-row { display: flex; gap: 0.5rem; margin-bottom: 0.5rem; flex-wrap: wrap; }
.revision-form-row input[type="date"] { flex: 1; min-width: 140px; }
.revision-form-row select { flex: 1; min-width: 140px; }
#nueva-revision-observaciones { width: 100%; margin-bottom: 0.5rem; }
.revision-row { padding: 0.6rem 0; border-bottom: 1px solid var(--border); font-size: var(--fs-md); }
.revision-row:last-child { border-bottom: none; }
.revision-row-head { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.revision-badge { font-size: var(--fs-xs); padding: 0.1rem 0.5rem; border-radius: 4px; font-weight: 600; }
.revision-badge-apto { background: #E3F1E5; color: #2E6B3E; }
.revision-badge-apto_con_reservas { background: #FDF1DC; color: #92650B; }
.revision-badge-no_apto { background: #FBE4E1; color: var(--red); }
.revision-row-meta { color: var(--muted); font-size: var(--fs-sm); margin-top: 0.15rem; }
.revision-row-obs { margin-top: 0.25rem; }
.pendiente-main { flex: 1; min-width: 160px; font-size: var(--fs-sm); }
.pendiente-thumb { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; flex-shrink: 0; background: var(--border); }
.pendiente-amount { font-family: var(--font-mono); font-weight: 700; color: var(--rust); }
.salida-cobro-summary { display: flex; gap: 1rem; margin: 0.5rem 0 1rem; flex-wrap: wrap; }
.salida-cobro-chip { padding: 0.4rem 0.8rem; border-radius: 6px; font-size: var(--fs-sm); font-weight: 600; }
.salida-cobro-chip.cobrado { background: var(--green-soft); color: var(--green-dark); }
.salida-cobro-chip.restante { background: #FDF3E7; color: #7A4A1E; }
.booking-pago-toggle { font-size: var(--fs-xs); padding: 0.25rem 0.55rem; border-radius: 4px; font-weight: 600; }
.booking-pago-toggle.pagado { background: var(--green-soft); color: var(--green-dark); }
.booking-pago-toggle.pendiente { background: var(--red-soft); color: var(--red); }

/* Guide languages checkbox group */
.idiomas-checkbox-group { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.4rem; }
.idioma-checkbox { display: flex; align-items: center; gap: 0.3rem; font-size: var(--fs-sm); padding: 0.35rem 0.6rem; border: 1px solid var(--border); border-radius: 6px; cursor: pointer; background: var(--surface); }
.idioma-checkbox input { margin: 0; }

/* Selector de icono para tipos de actividad */
.icono-actividad-picker { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.4rem; }
.icono-actividad-option { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 2px solid var(--border); border-radius: 8px; cursor: pointer; background: var(--surface); padding: 4px; }
.icono-actividad-option img { width: 100%; height: 100%; }
.icono-actividad-option.selected { border-color: var(--teal); background: #2C7A7B14; }

/* Tarjetas de actividad, en la pantalla principal de Actividades */
.actividad-card { display: flex; flex-wrap: wrap; align-items: center; gap: 0.8rem; padding: 0.9rem; border: 1px solid var(--border); border-radius: 10px; margin-bottom: 0.6rem; cursor: pointer; background: var(--surface); }
.actividad-card:hover { border-color: var(--teal); }
.actividad-card-icon { width: 40px; height: 40px; flex-shrink: 0; }
.actividad-card-main { flex: 1; min-width: 160px; }
.actividad-card-name { font-weight: 600; font-size: var(--fs-base); }
.actividad-card-count { font-size: var(--fs-sm); color: var(--muted); }
.actividad-card-actions { display: flex; gap: 0.3rem; flex-wrap: wrap; margin-left: auto; }

/* Neoprene assignment column (select + actual-size input) */
.recap-assign-col { display: flex; flex-direction: column; gap: 0.35rem; min-width: 180px; }
.conflicto-card { border: 1px solid var(--border); border-radius: 8px; padding: 0.9rem; margin-bottom: 0.75rem; background: var(--surface); }
.conflicto-top { display: flex; justify-content: space-between; align-items: baseline; gap: 0.8rem; margin-bottom: 0.3rem; }
.conflicto-actions { display: flex; gap: 0.5rem; margin-top: 0.7rem; }
.prep-neopreno-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.5rem 0; border-bottom: 1px solid var(--border); }
.prep-neopreno-row:last-child { border-bottom: none; }
.prep-neopreno-select-col { display: flex; flex-direction: column; gap: 0.2rem; align-items: flex-end; min-width: 160px; }
.recap-talla-real-input { padding: 0.35rem 0.5rem; border: 1px solid var(--border); border-radius: 6px; font-size: var(--fs-sm); }

/* Wetsuit sizing statistics table */
.tallaje-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.tallaje-table th { text-align: left; padding: 0.4rem 0.6rem; border-bottom: 2px solid var(--border); color: var(--muted); font-size: var(--fs-xs); text-transform: uppercase; }
.tallaje-table td { padding: 0.45rem 0.6rem; border-bottom: 1px solid var(--border); }

/* Conjuntos (equipment sets) */
.conjunto-new-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.conjunto-new-row input { flex: 1; min-width: 200px; padding: 0.55rem 0.7rem; border: 1px solid var(--border); border-radius: 6px; }
.conjunto-card { border: 1px solid var(--border); border-radius: 8px; padding: 0.9rem 1rem; margin-bottom: 0.75rem; background: var(--surface); }
.conjunto-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; }
.conjunto-card-header strong { font-size: var(--fs-md); }
.conjunto-row { display: flex; justify-content: space-between; align-items: center; border: 1px solid var(--border); border-radius: 8px; padding: 0.75rem 1rem; margin-bottom: 0.5rem; background: var(--surface); }
.conjunto-row:hover { border-color: var(--teal); }
.conjunto-rename-row { margin-bottom: 1rem; }
.conjunto-rename-row label { display: block; font-size: var(--fs-sm); font-weight: 600; margin-bottom: 0.3rem; }
#conjunto-detalle-members { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.9rem; }
.conjunto-member-chip { display: flex; align-items: center; gap: 0.35rem; background: var(--bg); padding: 0.25rem 0.5rem; border-radius: 999px; font-size: var(--fs-sm); }
.conjunto-member-chip button { color: var(--red); font-weight: 700; line-height: 1; padding: 0; }
.conjunto-add-row { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.conjunto-add-row select { flex: 1; min-width: 160px; padding: 0.4rem 0.5rem; border: 1px solid var(--border); border-radius: 6px; font-size: var(--fs-sm); }
.inventory-code-tag { font-family: var(--font-mono); font-size: var(--fs-xs); background: var(--teal-soft); color: var(--teal); padding: 0.1rem 0.4rem; border-radius: 4px; }

/* Preparación salida: toggle buttons (checkbox replacement), green when checked */
.prep-toggle { display: flex; align-items: center; gap: 0.6rem; width: 100%; text-align: left; padding: 0.6rem 0.8rem; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); margin-bottom: 0.4rem; font-size: var(--fs-sm); color: var(--text); }
.prep-toggle-icon { width: 1.2rem; height: 1.2rem; border-radius: 50%; border: 2px solid var(--border); flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: var(--fs-xs); color: transparent; }
.prep-toggle.checked { background: var(--green-soft); border-color: var(--green); }
.prep-toggle.checked .prep-toggle-icon { background: var(--green); border-color: var(--green); color: var(--on-accent); }
.prep-toggle.checked .prep-toggle-label { color: var(--green-dark); font-weight: 600; }

/* Second-level subnav (used inside Ajustes: Contabilidad's and Estadísticas' own tabs) */
/* ---- Menú lateral de Ajustes (sustituye a las barras horizontales de
   pestañas, que se salían de pantalla en móvil en cuanto había más de
   4-5 opciones) ---- */
.ajustes-drawer-toggle-btn {
  display: flex; align-items: center; gap: 0.6rem; width: 100%;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  padding: 0.7rem 0.9rem; margin: 1rem 0; font-size: var(--fs-md); font-weight: 600;
  color: var(--text); text-align: left;
}
.ajustes-drawer-toggle-btn .drawer-icon { font-size: var(--fs-lg); color: var(--teal); flex-shrink: 0; }
.drawer-overlay { position: fixed; inset: 0; background: rgba(29, 43, 40, 0.45); z-index: 60; }
.ajustes-drawer {
  position: fixed; top: 0; left: 0; bottom: 0; width: 84%; max-width: 320px;
  background: var(--surface); z-index: 61; overflow-y: auto; -webkit-overflow-scrolling: touch;
  box-shadow: 2px 0 20px rgba(0, 0, 0, 0.25);
}
.drawer-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1rem 1.1rem; border-bottom: 1px solid var(--border);
}
.drawer-header h3 { margin: 0; font-size: var(--fs-md); }
.drawer-tree { padding: 0.6rem; }
.drawer-tab-group { margin-bottom: 0.3rem; }
.drawer-tab {
  display: block; width: 100%; text-align: left; background: none; border: none;
  padding: 0.75rem 0.9rem; font-size: var(--fs-md); font-weight: 600; border-radius: 6px;
  color: var(--text); cursor: pointer;
}
.drawer-tab.active { background: var(--teal); color: var(--on-accent); }
.drawer-subtab {
  display: block; width: 100%; text-align: left; background: none; border: none;
  padding: 0.6rem 0.9rem 0.6rem 2rem; font-size: var(--fs-sm); color: var(--muted);
  border-radius: 6px; cursor: pointer;
}
.drawer-subtab.active { background: var(--teal-soft); color: var(--teal); font-weight: 600; }

/* Barrancos grouped view (collapsible <details> groups) */
.barranco-group { border: 1px solid var(--border); border-radius: 8px; margin-bottom: 0.75rem; overflow: hidden; }
.barranco-group summary { cursor: pointer; padding: 0.7rem 1rem; font-weight: 600; background: var(--surface-alt); list-style: none; }
.barranco-group summary::-webkit-details-marker { display: none; }
.barranco-group summary::before { content: "▸"; display: inline-block; margin-right: 0.5rem; transition: transform 0.15s; }
.barranco-group[open] summary::before { transform: rotate(90deg); }
.barranco-group-items { padding: 0.6rem; }

/* Meteorología widget */
.meteo-day-row { display: flex; align-items: center; gap: 0.75rem; padding: 0.55rem 0.7rem; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.meteo-day-row:last-child { border-bottom: none; }
.meteo-day-highlight { background: var(--teal-soft); border-radius: 6px; }
.meteo-day-date { flex: 1; min-width: 140px; font-weight: 600; font-size: var(--fs-sm); display: flex; align-items: center; gap: 0.4rem; }
.meteo-day-icon { font-size: var(--fs-lg); }
.meteo-day-temp { font-size: var(--fs-sm); color: var(--muted); min-width: 70px; }
.meteo-day-rain { font-size: var(--fs-sm); min-width: 90px; }
.meteo-rain-high { color: var(--red); font-weight: 700; }

/* ---- Calendario visual de salidas ---- */
.calendar-toolbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.6rem; margin-top: 1rem; }
.calendar-view-toggle { display: flex; gap: 0.3rem; }
.calendar-view-btn { padding: 0.4rem 0.8rem; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); font-size: var(--fs-sm); font-weight: 600; color: var(--muted); cursor: pointer; }
.calendar-view-btn.active { background: var(--teal); color: var(--on-accent); border-color: var(--teal); }
.calendar-nav { display: flex; align-items: center; gap: 0.3rem; }
.calendar-nav .icon-btn { font-size: var(--fs-lg); padding: 0.2rem 0.6rem; color: var(--text); font-weight: 700; }
.calendar-label { text-align: center; font-family: var(--font-head); font-size: var(--fs-base); margin: 0.8rem 0 0.5rem; text-transform: capitalize; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0.3rem; }
.calendar-day-header { text-align: center; font-size: var(--fs-2xs); font-weight: 700; text-transform: uppercase; color: var(--muted); padding-bottom: 0.3rem; }
.calendar-day-cell { min-height: 60px; border: 1px solid var(--border); border-radius: 6px; padding: 0.3rem; background: var(--surface); cursor: pointer; display: flex; flex-direction: column; gap: 0.25rem; }
.calendar-day-cell.today { border-color: var(--teal); border-width: 2px; }
.calendar-day-cell.other-month { opacity: 0.4; }
.calendar-day-cell.selected { background: var(--teal-soft); }
.calendar-day-number { font-size: var(--fs-xs); font-weight: 700; }
.calendar-day-week-item { font-size: var(--fs-2xs); padding: 0.1rem 0.25rem; border-radius: 4px; color: var(--on-accent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.calendar-day-week-item.libre { background: var(--green); }
.calendar-day-week-item.casi-lleno { background: var(--rust); }
.calendar-day-week-item.completo { background: var(--red); }
.calendar-day-dot-row { display: flex; flex-wrap: wrap; align-items: center; gap: 3px; }
.calendar-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.calendar-dot.libre { background: var(--green); }
.calendar-dot.casi-lleno { background: var(--rust); }
.calendar-dot.completo { background: var(--red); }
.calendar-activity-pair { display: inline-flex; align-items: center; }
.calendar-activity-icon { width: 11px; height: 11px; border-radius: 3px; flex-shrink: 0; }
/* Variante más grande, reutilizada en las cabeceras de tarjeta de
   salida/reserva, las filas de texto de la vista semanal, y "Próximas
   salidas" del panel de Inicio — siempre junto a texto legible (fecha,
   nivel, nombre), así que no lleva anillo de color como en la celda
   del calendario mensual (ahí el icono era casi lo único que había). */
.calendar-activity-icon-lg { width: 22px; height: 22px; border-radius: 5px; }
.calendar-day-week-item .calendar-activity-icon { width: 14px; height: 14px; vertical-align: -2.5px; margin-right: 2px; }
/* Icono del calendario mensual en concreto: más grande que la base, con
   un anillo de color alrededor (el mismo verde/naranja/rojo que antes
   era un punto aparte) en vez de un punto suelto fácil de pasar por
   alto — un selector propio para no afectar a los demás usos de
   .calendar-activity-icon (listas, vista semanal), que ya fijan su
   propio tamaño con estilo en línea y no llevan ningún anillo. */
.calendar-day-dot-row .calendar-activity-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2.5px solid transparent;
  padding: 1.5px;
  box-sizing: border-box;
  background-clip: content-box;
}
.calendar-day-dot-row .calendar-activity-icon.libre { border-color: var(--green); }
.calendar-day-dot-row .calendar-activity-icon.casi-lleno { border-color: var(--rust); }
.calendar-day-dot-row .calendar-activity-icon.completo { border-color: var(--red); }
.calendar-day-overflow { font-size: var(--fs-2xs); color: var(--muted); }
.dia-detalle-actividad-tag { display: inline-flex; align-items: center; gap: 0.3rem; font-weight: 600; background: #2C7A7B14; padding: 0.15rem 0.5rem; border-radius: 20px; font-size: var(--fs-sm); }
.calendar-legend { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 0.6rem; font-size: var(--fs-xs); color: var(--muted); }
.calendar-legend span { display: inline-flex; align-items: center; gap: 0.3rem; }
.calendar-legend .calendar-dot { width: 9px; height: 9px; }

/* Verificación de carga por pestaña/módulo — un círculo de carga
   sencillo, superpuesto sobre el contenido mientras se piden los
   datos, y un aviso claro con botón de reintentar si algo falla en
   vez de dejar la pantalla a medio cargar sin ninguna explicación. */
.global-loading-overlay, .global-loading-error {
  position: absolute;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  background: rgba(245, 243, 236, 0.92);
  min-height: 240px;
}
.global-loading-spinner {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 4px solid #2C7A7B22;
  border-top-color: var(--teal);
  animation: globalLoadingSpin 0.8s linear infinite;
}
@keyframes globalLoadingSpin { to { transform: rotate(360deg); } }
.global-loading-text { color: var(--muted); font-size: var(--fs-sm); }
.global-loading-error-text { color: var(--red); font-weight: 600; text-align: center; max-width: 320px; }

/* Aviso translúcido de "Reserva verificada" al escanear un QR con
   éxito (o marcar manualmente) — se superpone brevemente sobre el
   propio modal de check-in y desaparece solo, sin bloquear nada. */
.checkin-verificado-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(75, 122, 81, 0.82);
  border-radius: 10px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.checkin-verificado-overlay.visible { opacity: 1; }
.checkin-verificado-content { text-align: center; color: var(--on-accent); }
.checkin-verificado-check {
  font-size: 3rem;
  line-height: 1;
  margin-bottom: 0.4rem;
  animation: checkinVerificadoPop 0.3s ease;
}
.checkin-verificado-texto { font-size: var(--fs-lg); font-weight: 600; letter-spacing: 0.01em; }
@keyframes checkinVerificadoPop {
  0% { transform: scale(0.6); opacity: 0; }
  60% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(1); }
}

/* Visor de fotos ampliadas — reutilizable para cualquier foto de la
   app (material, barrancos, guías, logo), con delegación de eventos
   en vez de cablear cada sitio por separado. */
.zoomable-photo { cursor: zoom-in; }
.photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(29, 43, 40, 0.92);
  padding: 2rem;
  cursor: zoom-out;
}
.photo-lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 6px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  cursor: default;
}
.photo-lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.2rem;
  background: none;
  border: none;
  color: var(--on-accent);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.3rem 0.6rem;
}

/* Barra de progreso — reutilizada tanto para la subida de fotos/vídeos
   (avance real por bytes) como para la compresión de vídeo en el
   servidor (avance estimado por ffmpeg). */
.progress-track {
  width: 100%;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 0.35rem;
}
.progress-fill {
  height: 100%;
  background: var(--teal);
  border-radius: 3px;
  width: 0%;
  transition: width 0.2s ease;
}

.s3-test-row { display: flex; gap: 0.6rem; margin-top: 0.6rem; flex-wrap: wrap; }

/* Mosaico de fotos/vídeos ya subidos — miniaturas cuadradas en vez de
   una lista, para ocupar mucho menos espacio vertical. */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 0.6rem; margin-top: 0.5rem; }
.media-grid-item { display: flex; flex-direction: column; gap: 0.2rem; }
.media-grid-thumb-wrap { position: relative; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: var(--border); }
.media-grid-thumb { width: 100%; height: 100%; object-fit: cover; display: block; cursor: pointer; }
.media-grid-thumb-generico { display: flex; align-items: center; justify-content: center; font-size: 1.8rem; cursor: default; }
.media-grid-play-badge { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); color: var(--on-accent); font-size: var(--fs-lg); text-shadow: 0 1px 3px rgba(0,0,0,0.6); pointer-events: none; }
.media-grid-overlay { position: absolute; bottom: 3px; left: 3px; background: rgba(29,43,40,0.8); color: var(--on-accent); font-size: var(--fs-2xs); padding: 0.1rem 0.35rem; border-radius: 4px; }
.media-grid-overlay-error { background: rgba(163,55,46,0.9); }
.media-grid-delete { position: absolute; top: 3px; right: 3px; background: rgba(29,43,40,0.7); color: var(--on-accent); border: none; border-radius: 5px; font-size: var(--fs-2xs); padding: 0.15rem 0.35rem; cursor: pointer; }
.media-grid-caption { font-size: var(--fs-2xs); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Calendario de disponibilidad de guías — reutiliza .calendar-grid,
   añadiendo una casilla propia con dos chips marcables (mañana/tarde)
   por día. */
.disponibilidad-nav { display: flex; align-items: center; justify-content: center; gap: 1rem; margin: 0.5rem 0 0.75rem; font-weight: 700; }
.disp-day-cell { min-height: 60px; border: 1px solid var(--border); border-radius: 6px; padding: 0.25rem; display: flex; flex-direction: column; gap: 0.2rem; background: var(--surface); }
.disp-day-cell.other-month { opacity: 0.35; pointer-events: none; }
.disp-day-cell.past { opacity: 0.4; pointer-events: none; }
.disp-day-number { font-size: var(--fs-xs); font-weight: 700; }
.disp-turno-chip { font-size: var(--fs-2xs); padding: 0.12rem 0.2rem; border-radius: 4px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); cursor: pointer; text-align: center; }
.disp-turno-chip.activo { background: var(--teal); border-color: var(--teal); color: var(--on-accent); }
.disp-turno-chip:disabled { cursor: default; opacity: 0.85; }
.disp-turno-chip.info { cursor: default; }

/* Calendario agregado de empresas colaboradoras: celda compacta con un
   único punto de color por día, en vez de las dos cajas Mañana/Tarde
   (que en móvil obligaban a una fila por día y descuadraban el grid). */
.colab-day-cell { min-height: 40px; border: 1px solid var(--border); border-radius: 6px; padding: 0.25rem; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.2rem; background: var(--surface); cursor: pointer; }
.colab-day-cell.other-month { opacity: 0.35; pointer-events: none; }
.colab-day-cell.past { opacity: 0.4; pointer-events: none; }
.colab-day-cell.selected { border-color: var(--teal); border-width: 2px; }
.colab-day-number { font-size: var(--fs-xs); font-weight: 700; }
.colab-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; background: var(--border); }
.colab-dot.verde { background: #2e9e5b; }
.colab-dot.amarillo { background: #e0a800; }
.colab-dot.rojo { background: #d9534f; }
.colab-leyenda { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 0.6rem; font-size: var(--fs-2xs); color: var(--muted); }
.colab-leyenda-item { display: flex; align-items: center; gap: 0.3rem; }
.colab-detalle-dia { margin-top: 0.75rem; padding: 0.6rem 0.75rem; border: 1px solid var(--border); border-radius: 6px; background: var(--bg-soft, #f7f7f5); font-size: var(--fs-sm); }
.colab-detalle-dia.hidden { display: none; }
.colab-resumen-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
.colab-resumen-item { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 0.75rem 0.5rem; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-soft, #f7f7f5); }
.colab-resumen-valor { font-size: var(--fs-lg); font-weight: 700; font-family: "Oswald", sans-serif; }
.colab-resumen-label { font-size: var(--fs-2xs); color: var(--muted); margin-top: 0.2rem; }
.datos-solo-lectura { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem 1rem; margin: 0.75rem 0; }
.datos-solo-lectura .dato-item { display: flex; flex-direction: column; padding: 0.4rem 0; border-bottom: 1px solid var(--border); }
.datos-solo-lectura .dato-item label { font-size: var(--fs-2xs); text-transform: uppercase; color: var(--muted); }
.datos-solo-lectura .dato-item span { font-size: var(--fs-sm); }
.colab-solicitudes-historial { margin-top: 0.75rem; }
.colab-solicitud-item { padding: 0.5rem 0.6rem; border: 1px solid var(--border); border-radius: 6px; margin-bottom: 0.4rem; font-size: var(--fs-xs); }
.colab-solicitud-item .colab-solicitud-fecha { color: var(--muted); font-size: var(--fs-2xs); }
.colab-solicitud-item .colab-solicitud-estado { float: right; font-size: var(--fs-2xs); padding: 0.05rem 0.4rem; border-radius: 4px; background: var(--border); }
.colab-solicitud-item .colab-solicitud-estado.atendida { background: var(--teal); color: var(--on-accent); }

/* Ajustes: bloque "Avanzado" plegado por defecto */
.drawer-avanzado { margin-top: 0.75rem; border-top: 1px solid var(--border); padding-top: 0.5rem; }
.drawer-avanzado > summary { cursor: pointer; font-size: var(--fs-xs); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); padding: 0.5rem 0.25rem; list-style: none; }
.drawer-avanzado > summary::-webkit-details-marker { display: none; }
.drawer-avanzado > summary::before { content: "▸ "; }
.drawer-avanzado[open] > summary::before { content: "▾ "; }

/* Inicio: lista de primeros pasos */
.pp-list { list-style: none; margin: 0.5rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 0.15rem; }
.pp-list button { width: 100%; text-align: left; padding: 0.55rem 0.4rem; border-radius: 6px; font-size: var(--fs-md); color: var(--text); }
.pp-list button:hover { background: var(--bg-2); }
.pp-list .pp-hecho button { color: var(--muted); text-decoration: line-through; cursor: default; }


/* ================= v0.82 — modo oscuro ================= */
:root { color-scheme: light; }
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121817; --header: #0b100f; --header-muted: #8fa5a0;
  --teal: #27807F; --rust: #E0803F; --red: #E5675B; --green: #6FB077;
  --muted: #A29D91; --border: #2d3936; --text: #E8E4D8;
  --surface: #1c2423; --surface-alt: #182020; --bg-2: #243030;
  --teal-soft: #1a2f2f; --teal-dark: #8BD3D3; --green-soft: #1c2e1f; --green-dark: #9AD6A2; --red-soft: #3a1f1c; --white: var(--surface); --on-accent: #fff; --ink: var(--text);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #121817; --header: #0b100f; --header-muted: #8fa5a0;
    --teal: #27807F; --rust: #E0803F; --red: #E5675B; --green: #6FB077;
    --muted: #A29D91; --border: #2d3936; --text: #E8E4D8;
    --surface: #1c2423; --surface-alt: #182020; --bg-2: #243030;
    --teal-soft: #1a2f2f; --teal-dark: #8BD3D3; --green-soft: #1c2e1f; --green-dark: #9AD6A2; --red-soft: #3a1f1c; --white: var(--surface); --on-accent: #fff; --ink: var(--text);
  }
}
:root[data-theme="dark"] input, :root[data-theme="dark"] select, :root[data-theme="dark"] textarea { background: var(--surface-alt); color: var(--text); border-color: var(--border); }

/* ================= v0.82 — accesibilidad ================= */
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; border-radius: 4px; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--header); color: var(--on-accent); padding: 0.6rem 1rem; z-index: 10000; }
.skip-link:focus { left: 0; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; } }
html { -webkit-text-size-adjust: 100%; }

/* ================= v0.82 — iconos SVG ================= */
.ico { width: 1.1em; height: 1.1em; vertical-align: -0.18em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ================= v0.82 — esqueletos y estados vacíos ================= */
.skeleton-list { display: flex; flex-direction: column; gap: 0.6rem; }
.skeleton-card { height: 4.2rem; border-radius: var(--radius); background: linear-gradient(90deg, var(--bg-2) 25%, var(--surface-alt) 50%, var(--bg-2) 75%); background-size: 200% 100%; animation: sk-shimmer 1.3s infinite linear; }
@keyframes sk-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.empty-state-rich { text-align: center; padding: 2.5rem 1rem; color: var(--muted); }
.empty-state-rich img { width: 84px; height: 84px; opacity: 0.55; margin-bottom: 0.75rem; filter: grayscale(0.3); }
.empty-state-rich p { margin: 0 0 1rem; font-size: var(--fs-md); }

/* ================= v0.82 — reservas: lotes, acciones, edición en línea ================= */
.booking-card { position: relative; touch-action: pan-y; }
.booking-select { align-self: center; width: 1.2rem; height: 1.2rem; margin-right: 0.5rem; accent-color: var(--teal); flex: none; }
.booking-inline { display: flex; gap: 0.4rem; align-items: center; flex-wrap: wrap; margin-top: 0.35rem; }
.booking-inline select { font-size: var(--fs-xs); padding: 0.15rem 0.3rem; border-radius: 4px; border: 1px solid var(--border); background: var(--surface); color: var(--text); }
.btn-next { background: var(--teal); color: var(--on-accent); padding: 0.3rem 0.7rem; border-radius: 6px; font-size: var(--fs-xs); font-weight: 600; white-space: nowrap; }
.btn-next:hover { background: var(--teal-dark); }
.menu-more { position: relative; }
.menu-more-panel { position: absolute; right: 0; top: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 6px 20px rgba(0,0,0,0.18); z-index: 50; min-width: 9rem; padding: 0.25rem; }
.menu-more-panel button { display: flex; gap: 0.5rem; align-items: center; width: 100%; text-align: left; padding: 0.5rem 0.6rem; border-radius: 6px; color: var(--text); font-size: var(--fs-sm); }
.menu-more-panel button:hover { background: var(--bg-2); }
.bulk-bar { position: sticky; bottom: 0.5rem; z-index: 40; display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; background: var(--header); color: var(--on-accent); padding: 0.6rem 0.9rem; border-radius: 10px; margin-top: 0.75rem; box-shadow: 0 6px 20px rgba(0,0,0,0.3); }
.bulk-bar button { background: rgba(255,255,255,0.14); color: var(--on-accent); padding: 0.35rem 0.7rem; border-radius: 6px; font-size: var(--fs-sm); }
.bulk-bar button:hover { background: rgba(255,255,255,0.26); }
.swipe-hint-ok { background: var(--green-soft) !important; }
.swipe-hint-arch { background: var(--bg-2) !important; }
.tab-count { display: inline-block; min-width: 1.2rem; padding: 0 0.35rem; margin-left: 0.3rem; border-radius: 10px; background: var(--rust); color: var(--on-accent); font-size: var(--fs-2xs); font-weight: 700; text-align: center; }
.tab-count.zero { display: none; }

/* Formulario de reserva en pasos */
.steps-bar { display: flex; gap: 0.35rem; margin: 0 0 1rem; }
.steps-bar span { flex: 1; text-align: center; font-size: var(--fs-xs); padding: 0.4rem 0.2rem; border-bottom: 3px solid var(--border); color: var(--muted); font-weight: 600; }
.steps-bar span.activo { border-color: var(--teal); color: var(--teal); }
.steps-bar span.hecho { border-color: var(--green); color: var(--green); }
.steps-nav { display: flex; justify-content: space-between; gap: 0.5rem; margin-top: 1rem; }
.paso-oculto { display: none !important; }

/* Modo simple */
body.modo-simple .solo-avanzado { display: none !important; }

/* ================= v0.82 — búsqueda global y atajos ================= */
.gsearch-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 9000; display: flex; align-items: flex-start; justify-content: center; padding-top: 10vh; }
.gsearch-box { background: var(--surface); width: min(640px, 94vw); border-radius: 12px; overflow: hidden; box-shadow: 0 12px 40px rgba(0,0,0,0.4); }
.gsearch-box input { width: 100%; border: none; border-bottom: 1px solid var(--border); padding: 1rem; font-size: var(--fs-lg); background: transparent; color: var(--text); outline: none; }
.gsearch-results { max-height: 55vh; overflow: auto; padding: 0.4rem; }
.gsearch-group { font-size: var(--fs-2xs); text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); padding: 0.5rem 0.6rem 0.2rem; font-weight: 700; }
.gsearch-item { display: flex; gap: 0.6rem; align-items: center; width: 100%; text-align: left; padding: 0.55rem 0.6rem; border-radius: 6px; color: var(--text); font-size: var(--fs-md); }
.gsearch-item:hover, .gsearch-item.sel { background: var(--teal-soft); }
.gsearch-item small { color: var(--muted); margin-left: auto; }
.shortcuts-table td { padding: 0.25rem 0.75rem 0.25rem 0; } .shortcuts-table kbd { background: var(--bg-2); border: 1px solid var(--border); border-radius: 4px; padding: 0.05rem 0.4rem; font-family: var(--font-mono); font-size: var(--fs-xs); }
.autosave-chip { position: fixed; right: 1rem; bottom: 1rem; background: var(--green); color: var(--on-accent); padding: 0.4rem 0.8rem; border-radius: 20px; font-size: var(--fs-sm); z-index: 9500; opacity: 0; transition: opacity .25s; pointer-events: none; }
.autosave-chip.on { opacity: 1; }

/* ================= v0.82 — móvil para guías ================= */
.bottom-nav { display: none; }
@media (max-width: 720px) {
  body.rol-campo .module-tabs, body.rol-campo .module-nav { display: none !important; }
  body.rol-campo .bottom-nav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 800; background: var(--header); padding: 0.25rem 0 calc(0.25rem + env(safe-area-inset-bottom)); box-shadow: 0 -4px 16px rgba(0,0,0,0.25); }
  body.rol-campo .bottom-nav button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 0.15rem; color: var(--header-muted); padding: 0.45rem 0.2rem; font-size: var(--fs-2xs); min-height: 48px; position: relative; }
  body.rol-campo .bottom-nav button.activo { color: var(--on-accent); }
  body.rol-campo .bottom-nav .ico { width: 1.5rem; height: 1.5rem; }
  body.rol-campo #app-view { padding-bottom: 5rem; }
}
.hoy-card { background: var(--surface); border: 2px solid var(--teal); border-radius: 14px; padding: 1.1rem; margin-bottom: 1rem; }
.hoy-card h2 { font-size: var(--fs-xl); margin-bottom: 0.4rem; }
.hoy-fila { display: flex; gap: 0.6rem; align-items: baseline; padding: 0.35rem 0; border-bottom: 1px solid var(--border); font-size: var(--fs-md); }
.hoy-fila:last-child { border-bottom: none; }
.hoy-fila b { min-width: 6.5rem; color: var(--muted); font-weight: 600; font-size: var(--fs-sm); }
.hoy-acciones { display: flex; gap: 0.6rem; margin-top: 1rem; flex-wrap: wrap; }
.hoy-acciones button { flex: 1; min-height: 52px; font-size: var(--fs-base); border-radius: 10px; font-weight: 700; }
.stepper { display: inline-flex; align-items: center; gap: 0.3rem; }
.stepper button { width: 2.75rem; height: 2.75rem; border-radius: 50%; background: var(--bg-2); color: var(--text); font-size: 1.4rem; font-weight: 700; border: 1px solid var(--border); }
.stepper button:active { background: var(--teal-soft); }
.stepper input { width: 3.25rem !important; text-align: center; font-size: 1.15rem; padding: 0.5rem 0.2rem; }

/* v0.82 — selector de idioma en el acceso, ajustes autoguardados, modo simple, tacto en campo */
.login-lang { display: flex; gap: 0.4rem; justify-content: center; margin-top: 1rem; }
.login-lang button { padding: 0.4rem 0.9rem; border: 1px solid var(--border); border-radius: 20px; font-size: var(--fs-sm); font-weight: 700; color: var(--muted); min-height: 36px; }
.login-lang button[aria-pressed="true"] { background: var(--teal); border-color: var(--teal); color: var(--on-accent); }
body.autosave-ajustes .save-company-btn { display: none; }
body.modo-simple .drawer-avanzado { display: none; }
body.rol-campo button, body.rol-campo select, body.rol-campo .prep-neopreno-row select { min-height: 44px; }
body.rol-campo .prep-neopreno-row { padding: 0.6rem 0; gap: 0.6rem; }
body.rol-campo input[type="checkbox"] { width: 1.4rem; height: 1.4rem; }

/* ===================== v0.84 — vistas nuevas y núcleo ===================== */
:root { --cb-fila-py: 0.6rem; --cb-fs: var(--fs-md); --cb-touch: 40px; }
:root[data-densidad="campo"] { --cb-fila-py: 1rem; --cb-fs: var(--fs-lg); --cb-touch: 52px; }
:root[data-densidad="campo"] .btn-primary, :root[data-densidad="campo"] .btn-outline { min-height: var(--cb-touch); font-size: var(--fs-md); }
:root[data-densidad="campo"] .booking-card { padding-block: 1rem; }
:root[data-densidad="oficina"] .cb-fila { padding-block: 0.4rem; }

.cb-vista { display: flex; flex-direction: column; gap: var(--sp-3); }
.cb-cabecera { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); flex-wrap: wrap; }
.cb-titulo { font-size: var(--fs-xl); letter-spacing: 0.02em; text-transform: uppercase; }
.cb-sub { color: var(--muted); font-size: var(--fs-sm); display: block; }
.cb-acciones { display: flex; gap: var(--sp-2); flex-wrap: wrap; align-items: center; }
.cb-aviso-offline { background: #FFF4DD; color: #7A4B00; border: 1px solid #E8C77B; border-radius: var(--radius); padding: var(--sp-2) var(--sp-3); font-size: var(--fs-sm); }
.cb-atajos { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--sp-3); }
.cb-atajo { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--sp-2); text-align: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--sp-4) var(--sp-3); color: var(--teal-dark); font-weight: 600; text-decoration: none; min-height: 84px; }
.cb-atajo .ico { width: 28px; height: 28px; }
.cb-atajo:hover, .cb-atajo:focus-visible { border-color: var(--teal); background: var(--teal-soft); }
.cb-chips { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.cb-chip { border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 0.35rem 0.85rem; font-size: var(--fs-sm); cursor: pointer; font-family: inherit; color: var(--text); }
.cb-chip.activo { background: var(--teal); border-color: var(--teal); color: #fff; }
.cb-chip b { margin-left: 0.25rem; }
.cb-fila { display: flex; align-items: center; gap: var(--sp-3); padding: var(--cb-fila-py) var(--sp-3); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; font-size: var(--cb-fs); width: 100%; box-sizing: border-box; height: 100%; }
.cb-fila:hover { border-color: var(--teal); }
.cb-fila-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cb-fila-main strong, .cb-fila-main .cb-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cb-importe { white-space: nowrap; font-variant-numeric: tabular-nums; }
.cb-punto { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); flex: none; }
.prio-alta .cb-punto { background: var(--red); } .prio-media .cb-punto { background: var(--rust); } .prio-baja .cb-punto { background: var(--teal); }
.cb-mini { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; border: 1px solid var(--border); border-radius: 6px; font-size: var(--fs-xs); font-weight: 700; color: var(--teal-dark); text-decoration: none; }
.cb-vlista { width: 100%; } .cb-vfila { padding-bottom: 6px; box-sizing: border-box; }
.cb-grupo-cab { display: flex; justify-content: space-between; align-items: end; height: 100%; padding: 0 var(--sp-1) 6px; font-family: var(--font-head); text-transform: uppercase; letter-spacing: 0.04em; color: var(--teal-dark); }
.cb-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: var(--sp-3); }
.cb-kpi-n { font-family: var(--font-head); font-size: var(--fs-xl); font-variant-numeric: tabular-nums; }
.cb-alerta { border-color: var(--red); } .cb-alerta .cb-kpi-n { color: var(--red); }
.cb-dia h3 { text-transform: capitalize; margin-bottom: var(--sp-2); } .cb-dia h3 small { color: var(--muted); font-family: var(--font-body); font-weight: 400; margin-left: var(--sp-2); }
.cb-salida { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--rust); border-radius: var(--radius); padding: var(--sp-3); margin-bottom: var(--sp-2); cursor: pointer; display: flex; flex-direction: column; gap: var(--sp-2); }
.cb-salida.listo { border-left-color: var(--green); }
.cb-salida-top { display: flex; gap: var(--sp-3); align-items: center; } .cb-lista { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.cb-buscador input { width: 100%; font-size: var(--fs-lg); padding: 0.8rem 1rem; border: 1px solid var(--border); border-radius: var(--radius); }
.cb-resultados { display: flex; flex-direction: column; gap: var(--sp-1); margin-top: var(--sp-2); }
.cb-resultado { text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--sp-3); cursor: pointer; font-family: inherit; display: flex; flex-direction: column; }
.cb-ficha { display: flex; flex-direction: column; gap: var(--sp-3); } .cb-ficha-cab { display: flex; justify-content: space-between; gap: var(--sp-3); flex-wrap: wrap; align-items: start; }
.cb-ficha h4 { margin: var(--sp-3) 0 0; font-family: var(--font-head); text-transform: uppercase; color: var(--teal-dark); }
.cb-tabla { width: 100%; border-collapse: collapse; margin-top: var(--sp-2); } .cb-tabla td { border-top: 1px solid var(--border); padding: 0.3rem 0.4rem; font-size: var(--fs-sm); }
.cb-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--sp-3); } .cb-swatch { display: flex; flex-direction: column; gap: 2px; font-size: var(--fs-xs); }
.cb-swatch i { height: 44px; border-radius: 6px; border: 1px solid var(--border); display: block; }
.cb-esp { display: flex; align-items: center; gap: var(--sp-3); margin: 4px 0; } .cb-esp i { height: 14px; background: var(--teal); border-radius: 3px; display: block; }
.cb-iconos { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: var(--sp-3); } .cb-iconos div { display: flex; flex-direction: column; align-items: center; gap: 4px; } .cb-iconos .ico { width: 26px; height: 26px; } .cb-iconos small { font-size: var(--fs-2xs); color: var(--muted); }
.cb-form-demo { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--sp-3); } .cb-form-demo label { display: flex; flex-direction: column; gap: 4px; font-size: var(--fs-sm); }

/* Inicio configurable */
.cb-oculta { display: none !important; }
.cb-personalizar { margin: 0 0 var(--sp-2); font-size: var(--fs-sm); } .cb-home-panel { margin-bottom: var(--sp-3); }
.cb-home-fila { display: flex; justify-content: space-between; align-items: center; padding: 0.3rem 0; border-top: 1px solid var(--border); } .cb-home-fila button { margin-left: 4px; min-width: 32px; }

/* Vista compacta de reservas */
.cb-res-toggle { margin-bottom: var(--sp-2); } .cb-res-fecha { width: 5.6rem; flex: none; font-variant-numeric: tabular-nums; font-weight: 600; }
@media (max-width: 640px) { .cb-res .badge:nth-of-type(2) { display: none; } .cb-res-fecha { width: 4.6rem; font-size: var(--fs-sm); } }

/* Historial y sugerencias en la ficha de reserva */
.cb-sugerencia { display: flex; gap: var(--sp-3); align-items: center; flex-wrap: wrap; background: var(--teal-soft); border: 1px solid var(--teal); border-radius: var(--radius); padding: var(--sp-2) var(--sp-3); margin-bottom: var(--sp-3); font-size: var(--fs-sm); }
.cb-historial { margin-bottom: var(--sp-3); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--sp-2) var(--sp-3); } .cb-historial summary { cursor: pointer; font-weight: 600; }
.cb-linea { display: flex; gap: var(--sp-3); padding: 0.3rem 0; border-top: 1px dashed var(--border); font-size: var(--fs-sm); } .cb-linea-fecha { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Deshacer */
.cb-toast { position: fixed; left: 50%; bottom: 1.2rem; transform: translate(-50%, 140%); opacity: 0; transition: transform .2s, opacity .2s; background: var(--header); color: #fff; padding: 0.7rem 1rem; border-radius: 10px; display: flex; gap: var(--sp-4); align-items: center; z-index: 9999; box-shadow: 0 6px 22px rgba(0,0,0,.3); max-width: calc(100vw - 1.5rem); }
.cb-toast.visible { transform: translate(-50%, 0); opacity: 1; }
.cb-toast-btn { background: transparent; border: 1px solid #fff8; color: #fff; border-radius: 6px; padding: 0.3rem 0.8rem; font-weight: 700; cursor: pointer; font-family: inherit; min-height: 36px; }
@media (max-width: 640px) { .cb-toast { bottom: 5rem; } }

/* Visitas guiadas */
.cb-tour { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 9990; }
.cb-tour-caja { position: fixed; width: min(310px, calc(100vw - 16px)); background: var(--surface); color: var(--text); border-radius: 10px; padding: var(--sp-4); box-shadow: 0 8px 28px rgba(0,0,0,.35); display: flex; flex-direction: column; gap: var(--sp-2); }
.cb-tour-caja p { margin: 0; font-size: var(--fs-sm); }
.cb-tour-foco { position: relative; z-index: 9995; box-shadow: 0 0 0 4px var(--teal), 0 0 0 9999px rgba(0,0,0,.0); border-radius: 6px; }

@media (prefers-reduced-motion: reduce) { .cb-toast { transition: none; } }

/* v0.84.2 reservas compacta: selección en lote */
.cb-res .booking-select { flex: none; width: 1.15rem; height: 1.15rem; }
.cb-res.cb-sel { background: color-mix(in srgb, var(--accent, #2a7f7a) 10%, transparent); }
.cb-res-todas { display: flex; align-items: center; gap: .5rem; font-size: var(--fs-sm); margin: .25rem 0 .5rem; }
.cb-lotes-slot { position: sticky; top: 0; z-index: 40; }
.cb-lotes-slot .bulk-bar { margin-top: 0; }
.cb-buscar { width: 100%; margin: 0 0 var(--sp-2, .5rem); padding: .55rem .75rem; border: 1px solid var(--border, #d8d2c4); border-radius: 8px; font: inherit; }

/* v0.85.6 oferta de visita guiada (descartable) */
.cb-tour-oferta { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin-bottom: var(--sp-3, .75rem); }
.cb-tour-oferta p { margin: 0; flex: 1 1 14rem; }

/* v0.85.8 modo oscuro: pestaña activa, tarjetas y chips legibles */
:root[data-theme="dark"] .module-tab.active { background: var(--teal); color: var(--on-accent); }
:root[data-theme="dark"] .banner-warning { background: #3a2a1a; }
:root[data-theme="dark"] .dash-sin-guia-tag,:root[data-theme="dark"] .revision-badge-no_apto { background: var(--red-soft); }
:root[data-theme="dark"] .revision-badge-apto { background: var(--green-soft); color: var(--green-dark); }
:root[data-theme="dark"] .revision-badge-apto_con_reservas,:root[data-theme="dark"] .salida-cobro-chip.restante { background: #3a2f1a; color: #E8C77B; }
:root[data-theme="dark"] .cb-aviso-offline { background: #3a2f1a; color: #E8C77B; border-color: #6b5520; }
:root[data-theme="dark"] .gear-menu-item:hover { background: var(--bg-2); }
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) .module-tab.active { background: var(--teal); color: var(--on-accent); }
:root:not([data-theme="light"]) .banner-warning { background: #3a2a1a; }
:root:not([data-theme="light"]) .dash-sin-guia-tag,:root:not([data-theme="light"]) .revision-badge-no_apto { background: var(--red-soft); }
:root:not([data-theme="light"]) .revision-badge-apto { background: var(--green-soft); color: var(--green-dark); }
:root:not([data-theme="light"]) .revision-badge-apto_con_reservas,:root:not([data-theme="light"]) .salida-cobro-chip.restante { background: #3a2f1a; color: #E8C77B; }
:root:not([data-theme="light"]) .cb-aviso-offline { background: #3a2f1a; color: #E8C77B; border-color: #6b5520; }
:root:not([data-theme="light"]) .gear-menu-item:hover { background: var(--bg-2); }
}

/* v0.85.8 Reservas en móvil: botón y conmutador ordenados */
.cb-res-toggle { margin-top: var(--sp-3); }
@media (max-width: 640px) { .module-toolbar .btn-primary { width: 100%; justify-content: center; } .filters input, .filters select { flex: 1 1 100%; } }
/* visita guiada: la caja siempre visible abajo en móvil */
@media (max-width: 640px) { .cb-tour-caja { top: auto !important; bottom: 12px; left: 8px !important; right: 8px; width: auto; } }

@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) input, :root:not([data-theme="light"]) select, :root:not([data-theme="light"]) textarea { background: var(--surface-alt); color: var(--text); border-color: var(--border); } }

/* v0.85.9 estado del sistema */
.cb-sis-fallo { display: flex; flex-direction: column; gap: var(--sp-2); padding: var(--sp-3) 0; border-bottom: 1px solid var(--border); }
.cb-sis-fallo:last-child { border-bottom: none; }
.cb-sis-error { margin: var(--sp-2) 0 0; padding: var(--sp-2); background: var(--surface-alt); border: 1px solid var(--border); border-radius: 6px; font-family: var(--font-mono); font-size: var(--fs-xs); white-space: pre-wrap; word-break: break-word; max-height: 8rem; overflow: auto; color: var(--text); }
.cb-toast-btn[hidden] { display: none; }

/* =====================================================================
   v0.86 — rediseño: barra compacta, navegación inferior en móvil,
   una sola tipografía (Inter), tarjetas y botones más finos, modo oscuro neutro
   ===================================================================== */
:root { --font-head: "Inter", sans-serif; --bg: #F6F4EE; --border: #E4DFD3; --line: #EFEBE2; --accent-text: #2C7A7B; --radius-card: 14px; --radius-ctl: 10px; }
:root[data-theme="dark"] { --bg: #111413; --header: #111413; --header-muted: #A39E92;
    --teal: #2C7A7B; --rust: #E0803F; --red: #E5675B; --green: #6FB077;
    --muted: #A39E92; --border: #2A302E; --text: #ECEAE4;
    --surface: #1A1F1E; --surface-alt: #161A19; --bg-2: #222827;
    --teal-soft: #1A2F2F; --teal-dark: #8BD3D3; --green-soft: #1C2E1F; --green-dark: #9AD6A2; --red-soft: #3A1F1C;
    --white: var(--surface); --on-accent: #fff; --ink: var(--text); --accent-text: #5FC0BC; --line: #262C2A; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --bg: #111413; --header: #111413; --header-muted: #A39E92;
    --teal: #2C7A7B; --rust: #E0803F; --red: #E5675B; --green: #6FB077;
    --muted: #A39E92; --border: #2A302E; --text: #ECEAE4;
    --surface: #1A1F1E; --surface-alt: #161A19; --bg-2: #222827;
    --teal-soft: #1A2F2F; --teal-dark: #8BD3D3; --green-soft: #1C2E1F; --green-dark: #9AD6A2; --red-soft: #3A1F1C;
    --white: var(--surface); --on-accent: #fff; --ink: var(--text); --accent-text: #5FC0BC; --line: #262C2A; } }

h1, h2, h3 { letter-spacing: -0.01em; font-weight: 700; }
body { -webkit-font-smoothing: antialiased; }

/* Cabecera clara y compacta */
.app-header { background: var(--bg); border-bottom: 1px solid var(--border); padding: 0 1.5rem; }
.header-inner { min-height: 60px; gap: 0.75rem; }
.brand-mark { width: 34px; height: 34px; flex: none; border-radius: 9px; background: #1D2B28; display: inline-flex; align-items: center; justify-content: center; }
.brand-mark svg { width: 19px; height: 19px; fill: none; stroke: #8BD3D3; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
:root[data-theme="dark"] .brand-mark { background: #1F2B29; }
.header-titulos { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.app-header h1 { color: var(--muted); font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.02em; text-transform: none; flex: none; }
.app-header .subtitle { color: var(--text); font-size: 1.05rem; font-weight: 600; margin: 0; order: -1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn, .header-icon-btn { color: var(--text); width: 44px; height: 44px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-size: var(--fs-base); }
.icon-btn:hover, .header-icon-btn:hover { background: var(--bg-2); }
.icon-btn .ico, .header-icon-btn .ico { width: 20px; height: 20px; }
.lang-select { background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-ctl); height: 36px; }
.sync-indicator { margin: 0 auto 0.5rem; }
.gear-menu-dropdown { border-radius: 12px; min-width: 210px; box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.gear-menu-item { display: flex; align-items: center; gap: 0.5rem; min-height: 44px; }
.gear-menu-langs { display: flex; gap: 6px; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.gear-menu-langs button { flex: 1; height: 34px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-weight: 600; font-size: var(--fs-sm); }
.gear-menu-langs button.activo { background: var(--teal); border-color: var(--teal); color: var(--on-accent); }

/* Pestañas (escritorio): píldoras discretas */
.module-nav { margin: 0 auto; padding: 0 1.5rem 0.6rem; gap: 0.35rem; }
.module-tab { display: inline-flex; align-items: center; gap: 0.45rem; border-radius: 999px; padding: 0.45rem 0.9rem; color: var(--muted); font-weight: 600; }
.module-tab:hover { background: var(--bg-2); color: var(--text); }
.module-tab.active, :root[data-theme="dark"] .module-tab.active { background: var(--teal-soft); color: var(--accent-text); }
.module-tab .tab-ico .ico { width: 18px; height: 18px; }
.tab-txt-corto { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .module-tab.active { background: var(--teal-soft); color: var(--accent-text); } }

/* Inicio */
.dashboard-logo-header, #dash-welcome-text { display: none; }
.dash-saludo { display: flex; flex-direction: column; gap: 2px; margin: 1.25rem 0 1rem; }
.dash-fecha { font-size: var(--fs-sm); color: var(--muted); }
.dash-saludo h2 { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; color: var(--text); }
.dash-hoy { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 1rem; }
.dash-hoy-card { text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 14px; display: flex; flex-direction: column; gap: 4px; color: var(--text); }
.dash-hoy-card:hover { border-color: var(--teal); }
.dash-hoy-et { font-size: var(--fs-xs); color: var(--muted); font-weight: 500; }
.dash-hoy-num { font-size: 1.35rem; font-weight: 700; }
.dash-hoy-num.dash-hoy-aviso { color: var(--rust); }
.dash-hoy-det { font-size: var(--fs-xs); color: var(--muted); }
.dash-card { border-radius: var(--radius-card); background: var(--surface); }
.dash-card h3 { font-size: var(--fs-md); font-weight: 600; letter-spacing: 0; color: var(--text); }
.dash-card-header-row { gap: 0.5rem; }
.pp-cuenta { margin-left: auto; font-size: var(--fs-xs); color: var(--muted); font-weight: 500; }
.pp-barra { height: 6px; border-radius: 999px; background: var(--bg-2); overflow: hidden; margin: 0.6rem 0 0.75rem; }
.pp-barra > div { height: 6px; border-radius: 999px; background: var(--teal); width: 0; transition: width .3s; }
.pp-list { flex-direction: row; flex-wrap: wrap; gap: 8px; margin: 0; }
.pp-list .pp-btn, .pp-list button { width: auto; min-height: 36px; padding: 0 12px; border-radius: var(--radius-ctl); border: 1px solid var(--teal-soft); background: var(--teal-soft); color: var(--accent-text); font-size: var(--fs-sm); font-weight: 500; }
.cb-personalizar { margin: 0 0 0.75rem; }
.btn-sm { padding: 0.35rem 0.75rem; font-size: var(--fs-xs); min-height: 32px; }

/* Botones y enlaces */
.btn-primary, .btn-outline, .btn-danger { border-radius: var(--radius-ctl); }
.btn-outline { background: var(--surface); }
.link-btn, .dash-card-link { text-decoration: none; font-weight: 500; font-size: var(--fs-sm); color: var(--accent-text); padding: 0.25rem 0.4rem; border-radius: 6px; }
.link-btn:hover, .dash-card-link:hover { background: var(--teal-soft); text-decoration: none; }

/* Reservas: selector segmentado */
.subnav { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 0; background: var(--bg-2); padding: 3px; border-radius: 12px; border-bottom: none; }
.subnav-tab { height: 36px; border-radius: 9px; border-bottom: none; padding: 0 0.5rem; color: var(--muted); font-weight: 500; }
.subnav-tab.active { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.08); border-bottom: none; }
.filters input, .filters select { border-radius: var(--radius-ctl); min-height: 44px; background: var(--surface); }

/* ---------- Móvil: barra inferior para todos, cabecera de una línea ---------- */
@media (max-width: 760px) {
  .app-header { padding: 0 0.5rem 0 1rem; position: sticky; top: 0; z-index: 30; }
  .header-inner { min-height: 56px; }
  .app-header h1 { display: none; }
  .lang-select { display: none; }
  .container { padding-bottom: calc(6rem + env(safe-area-inset-bottom)); }
  body:not(.rol-campo) .module-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 800; max-width: none; margin: 0; padding: 4px 4px calc(8px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--border); display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 0; }
  body:not(.rol-campo) .module-tab { flex-direction: column; gap: 3px; padding: 6px 2px; min-height: 56px; border-radius: 10px; font-size: 11px; font-weight: 500; position: relative; background: transparent; }
  body:not(.rol-campo) .module-nav .module-tab.module-tab.active { background: transparent; color: var(--accent-text); font-weight: 600; }
  body:not(.rol-campo) .module-tab .tab-ico .ico { width: 22px; height: 22px; }
  body:not(.rol-campo) .module-tab .tab-count { position: absolute; top: 3px; left: 50%; margin-left: 5px; }
  body:not(.rol-campo) .module-tab[data-module="dashboard"] { order: 1; }
  body:not(.rol-campo) .module-tab[data-module="tareas"] { order: 2; }
  body:not(.rol-campo) .module-tab[data-module="reservas"] { order: 3; }
  body:not(.rol-campo) .module-tab[data-module="misSalidas"] { order: 4; }
  body:not(.rol-campo) .module-tab[data-module="epi"] { order: 5; }
  body:not(.rol-campo) .module-tab[data-module="ajustes"] { order: 6; }
  body:not(.rol-campo) .module-tab[data-module="epi"] .tab-txt { display: none; }
  body:not(.rol-campo) .module-tab[data-module="epi"] .tab-txt-corto { display: inline; }
  .cb-toast { bottom: calc(5.5rem + env(safe-area-inset-bottom)); }
  .autosave-chip { bottom: calc(5.5rem + env(safe-area-inset-bottom)); }
  /* «Nueva reserva» como botón flotante */
  #reservas-sub-view .module-toolbar { margin: 0; }
  #add-booking-btn { position: fixed; right: 16px; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 700; width: auto !important; height: 52px; padding: 0 18px 0 14px; border-radius: 16px; box-shadow: 0 6px 16px rgba(29,43,40,.28); font-size: var(--fs-md); }
  .cb-tour-caja { bottom: calc(84px + env(safe-area-inset-bottom)); }
}

/* Tarjetas de reserva más limpias */
.booking-card { border-radius: var(--radius-card); }
.booking-actions .btn-next { color: var(--on-accent); padding: 0.4rem 0.8rem; border-radius: 8px; }
.booking-actions .icon-btn { color: var(--muted); }
.booking-meta span:empty { display: none; }
@media (max-width: 760px) {
  #bookings-list .booking-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "chk fecha acc" "chk main acc"; column-gap: 12px; row-gap: 2px; align-items: start; padding: 12px 14px; margin-top: 8px; }
  #bookings-list .booking-select { grid-area: chk; margin-top: 3px; }
  #bookings-list .booking-date { grid-area: fecha; font-family: var(--font-body); font-size: var(--fs-xs); font-weight: 600; color: var(--muted); min-width: 0; }
  #bookings-list .booking-main { grid-area: main; }
  #bookings-list .booking-actions { grid-area: acc; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
  #bookings-list .booking-meta { gap: 0.15rem 0.4rem; font-size: var(--fs-xs); }
  #bookings-list .booking-inline { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
  #bookings-list .booking-inline select { min-height: 36px; border-radius: 8px; max-width: 100%; }
}
/* Tareas y vistas nuevas: títulos sin mayúsculas forzadas, atajos compactos, filas como tarjetas */
.cb-titulo { text-transform: none; letter-spacing: -0.02em; font-size: 1.5rem; font-weight: 700; }
.cb-fila { border-radius: 12px; }
.cb-fila-main strong { font-weight: 600; }
@media (max-width: 760px) {
  .cb-atajos { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .cb-atajo { padding: 10px 6px; min-height: 72px; font-size: var(--fs-xs); border-radius: 12px; gap: 4px; }
  .cb-atajo .ico { width: 22px; height: 22px; }
  .cb-titulo { font-size: 1.3rem; }
}
/* Barra inferior de guías con el mismo estilo que la del resto */
@media (max-width: 720px) {
  body.rol-campo .bottom-nav { background: var(--surface); border-top: 1px solid var(--border); box-shadow: none; }
  body.rol-campo .bottom-nav button { color: var(--muted); }
  body.rol-campo .bottom-nav button.activo { color: var(--accent-text); font-weight: 600; }
}
.container { padding-top: 0.75rem; }

/* v0.86.1: marca con el emblema de Canyon Base */
img.brand-mark { width: 36px; height: 36px; border-radius: 0; background: none; object-fit: contain; flex: none; }
:root[data-theme="dark"] img.brand-mark { background: #ECEAE4; border-radius: 10px; padding: 3px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) img.brand-mark { background: #ECEAE4; border-radius: 10px; padding: 3px; } }

/* =====================================================================
   v0.87 — estética unificada en toda la app (ventanas, formularios, EPI,
   Ajustes, guías, insignias). Mismos radios, alturas, etiquetas y colores.
   ===================================================================== */
:root { --field-border: #DAD3C3; --label: #4A463D; }
:root[data-theme="dark"] { --field-border: #343B39; --label: #C9C4B8; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --field-border: #343B39; --label: #C9C4B8; } }

/* Etiquetas en frase normal, no en mayúsculas */
.login-card label, .modal-body label, .booking-fields-grid label, .settings-card label, .datos-solo-lectura .dato-item label {
  text-transform: none; font-size: var(--fs-sm); font-weight: 500; color: var(--label); letter-spacing: 0; }
.checkbox-row label { color: var(--text); }
.optional-tag { text-transform: none; font-weight: 500; border-radius: 999px; }

/* Campos: altura táctil, esquinas y foco iguales en todas partes */
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]), select, textarea {
  border-radius: var(--radius-ctl); border: 1px solid var(--field-border); background: var(--surface); color: var(--text); font-size: var(--fs-md); }
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]), select { min-height: 44px; padding: 0 0.75rem; }
textarea { padding: 0.6rem 0.75rem; line-height: 1.45; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px color-mix(in srgb, var(--teal) 22%, transparent); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--teal); width: 18px; height: 18px; }

/* Ventanas: cabecera clara, esquinas amplias; en móvil, hoja desde abajo */
.modal-backdrop { background: rgba(17,20,19,0.45); }
.modal-card { border-radius: 18px; border: 1px solid var(--border); box-shadow: 0 20px 50px rgba(0,0,0,.18); overflow: hidden; }
.modal-header { background: var(--surface); border-bottom: 1px solid var(--line); border-radius: 18px 18px 0 0; padding: 1rem 1.25rem; }
.modal-header h2 { color: var(--text); font-size: 1.1rem; font-weight: 700; letter-spacing: -0.01em; }
.modal-header .icon-btn { color: var(--text); background: var(--bg); width: 40px; height: 40px; border-radius: 12px; font-size: 1.4rem; }
.modal-footer { border-top: 1px solid var(--line); }
.modal-footer .btn-ghost, .modal-footer .btn-outline { min-height: 44px; }
@media (max-width: 760px) {
  .modal-backdrop { align-items: flex-end; padding: 0; }
  .modal-card { margin: 0; max-width: none; border-radius: 22px 22px 0 0; max-height: 94vh; display: flex; flex-direction: column; }
  .modal-card::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 999px; background: var(--field-border); margin: 8px auto 0; }
  .modal-header { border-radius: 0; padding: 0.6rem 1rem 0.85rem; }
  .modal-body, .modal-body-single { max-height: none; flex: 1; overflow-y: auto; }
  .modal-footer { padding-bottom: calc(1rem + env(safe-area-inset-bottom)); }
  .modal-small { padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom)); }
}

/* Botones secundarios coherentes */
.btn-ghost { color: var(--muted); border-radius: var(--radius-ctl); }
.btn-ghost:hover { background: var(--bg-2); color: var(--text); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-outline:hover { border-color: var(--teal); background: var(--teal-soft); }
.btn-danger { background: var(--red); }

/* Insignias: píldoras en frase normal */
.badge { border-radius: 999px; text-transform: none; font-size: var(--fs-xs); padding: 0.15rem 0.55rem; }

/* Avisos */
.banner { border-radius: 12px; border: 1px solid transparent; }
.banner-error { border-color: color-mix(in srgb, var(--red) 25%, transparent); }
.banner-ok { border-color: color-mix(in srgb, var(--green) 25%, transparent); }
.banner-warning { border-color: color-mix(in srgb, var(--rust) 22%, transparent); }

/* Tarjetas de toda la app con el mismo radio */
.settings-card, .stat-card, .salida-card, .guia-card, .barranco-card, .user-card, .descuento-card, .conjunto-card, .item-row, .empty-state, .alerts-box, .category-header { border-radius: var(--radius-card); }
.settings-card { padding: 1.1rem 1.15rem; }
.settings-card h3 { font-family: var(--font-body); font-size: 1.02rem; font-weight: 600; letter-spacing: -0.01em; }
.stat-value, .booking-date, .salida-date { font-family: var(--font-body); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.stat-label { text-transform: none; font-size: var(--fs-xs); }
.alerts-title { font-family: var(--font-body); font-weight: 600; }
.cb-ficha h4 { font-family: var(--font-body); text-transform: none; font-size: var(--fs-md); }
.drawer-avanzado > summary { text-transform: none; letter-spacing: 0; font-size: var(--fs-sm); }

/* EPI y otras barras de herramientas: principal arriba, secundarias como fila */
@media (max-width: 760px) {
  .module-toolbar { justify-content: flex-start; gap: 6px; }
  .module-toolbar .btn-outline { font-size: var(--fs-xs); padding: 0.4rem 0.75rem; min-height: 36px; }
}

/* Guías: «Hoy» como la tarjeta oscura de las maquetas */
.hoy-card { background: #1D2B28; color: #FFFFFF; border: none; border-radius: 18px; padding: 1.1rem 1.15rem; }
.hoy-card h2 { color: #FFFFFF; font-size: 1.4rem; letter-spacing: -0.02em; }
.hoy-card .hoy-fila { border-bottom-color: rgba(255,255,255,0.12); }
.hoy-card .hoy-fila b { color: #A9C6C1; font-weight: 500; }
.hoy-card .hint-text { color: #D6E4E1; }
.hoy-card .btn-primary { background: #8BD3D3; color: #102321; width: 100%; justify-content: center; min-height: 52px; border-radius: 12px; font-size: var(--fs-md); }
:root[data-theme="dark"] .hoy-card { background: #1F2B29; }
/* Las ventanas quedan por encima de la barra inferior y del botón flotante */
.modal-backdrop { z-index: 900; }
/* Cifras con color fijo oscuro (pintado desde JS) legibles en modo oscuro */
:root[data-theme="dark"] .stat-value[style*="#1D2B28"] { color: var(--text) !important; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .stat-value[style*="#1D2B28"] { color: var(--text) !important; } }
.cb-toast { background: #1B2220; border-radius: 12px; }
:root[data-theme="dark"] .cb-toast { background: #2A302E; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cb-toast { background: #2A302E; } }

/* =====================================================================
   v0.90 — pantallas de campo (Mi día, salida en curso, material, disponibilidad)
   ===================================================================== */
.cp-pantalla { display: flex; flex-direction: column; gap: 14px; padding: 4px 0 24px; }
.cp-cab-fila { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cp-fecha { font-size: var(--fs-sm); color: var(--muted); }
.cp-sync { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 999px; background: var(--green-soft); color: var(--green-dark); font-size: var(--fs-xs); font-weight: 600; }
.cp-sync::before { content: ""; width: 7px; height: 7px; border-radius: 999px; background: currentColor; }
.cp-sync-pend { background: #FBF0E6; color: #8A4419; }
:root[data-theme="dark"] .cp-sync-pend { background: #3a2f1a; color: #E8C77B; }
.cp-hero { background: #1D2B28; color: #fff; border-radius: 18px; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
:root[data-theme="dark"] .cp-hero { background: #1F2B29; }
.cp-hero-et { font-size: var(--fs-xs); color: #A9C6C1; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; }
.cp-hero h2 { font-size: 1.6rem; color: #fff; letter-spacing: -0.02em; }
.cp-hero-sub { color: #D6E4E1; font-size: var(--fs-md); }
.cp-hero-datos { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: var(--fs-md); }
.cp-hero-datos li { display: flex; gap: 10px; align-items: center; }
.cp-hero-datos .ico { width: 18px; height: 18px; stroke: #8BD3D3; flex: none; }
.cp-hero-acciones { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; margin-top: 4px; }
.cp-btn-hero { min-height: 52px; border-radius: 12px; border: 1px solid #35504B; background: transparent; color: #fff; font-weight: 600; font-size: var(--fs-md); display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.cp-btn-hero-pri { background: #8BD3D3; border-color: #8BD3D3; color: #102321; font-weight: 700; }
.cp-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.cp-tile { text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 14px; display: flex; flex-direction: column; gap: 4px; color: var(--text); }
.cp-tile span { font-size: var(--fs-xs); color: var(--muted); }
.cp-tile b { font-size: 1.05rem; }
.cp-aviso { color: var(--rust); }
.cp-ok { color: var(--green-dark); }
.cp-seccion { font-size: var(--fs-xs); font-weight: 600; color: var(--muted); letter-spacing: 0.03em; text-transform: uppercase; margin: 6px 0 -4px; }
.cp-lista { display: flex; flex-direction: column; gap: 8px; }
.cp-fila { text-align: left; display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 12px 14px; color: var(--text); }
.cp-fila-hora { width: 52px; font-size: var(--fs-md); }
.cp-fila-main { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cp-fila-main span { font-size: var(--fs-xs); color: var(--muted); }
.cp-fila > .ico { width: 18px; height: 18px; stroke: var(--muted); }
.cp-acciones-pie, .cp-pie-fila { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; }
.cp-acciones-pie .btn-outline, .cp-pie-fila > * { min-height: 48px; justify-content: center; text-align: center; }
.cp-vacio { display: flex; flex-direction: column; gap: 10px; align-items: center; }
.cp-btn-claro { background: transparent !important; color: #fff !important; border-color: #35504B !important; width: 100%; justify-content: center; margin-top: 6px; }

/* Salida en curso */
.cp-curso-cab { background: #1D2B28; color: #fff; border-radius: 18px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
:root[data-theme="dark"] .cp-curso-cab { background: #1F2B29; }
.cp-curso-fila { display: flex; align-items: center; gap: 10px; }
.cp-curso-tit { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.cp-curso-tit b { font-size: 1.05rem; }
.cp-curso-tit span { font-size: var(--fs-xs); color: #A9C6C1; }
.cp-reloj { font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.cp-icono-btn { width: 40px; height: 40px; border-radius: 12px; background: #24363A; color: #fff; display: inline-flex; align-items: center; justify-content: center; flex: none; font-size: 1.3rem; }
.cp-icono-btn .ico { width: 20px; height: 20px; stroke: currentColor; }
.cp-icono-claro { background: var(--bg-2); color: var(--text); }
.cp-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.cp-chip-osc { height: 28px; padding: 0 10px; border-radius: 999px; background: #24363A; color: #fff; display: inline-flex; align-items: center; font-size: var(--fs-xs); font-weight: 600; }
.cp-chip-aviso { background: #3A2F1A; color: #F0C674; }
.cp-btn-grande { min-height: 56px; border-radius: 14px; background: var(--teal); color: var(--on-accent); font-size: 1.05rem; font-weight: 700; }
.cp-persona { display: flex; align-items: flex-start; gap: 12px; min-height: 60px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); cursor: pointer; }
.cp-persona input[type="checkbox"] { width: 26px; height: 26px; margin-top: 2px; flex: none; }
.cp-persona-salud { border: 2px solid #E8C77B; }
.cp-persona-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cp-persona-main > b { font-size: 1.02rem; }
.cp-persona-main > span { font-size: var(--fs-xs); color: var(--muted); }
.cp-persona-main > .cp-salud { color: #8A4419; font-weight: 600; }
:root[data-theme="dark"] .cp-persona-main > .cp-salud { color: #F0C674; }
.cp-emerg-contacto { font-size: var(--fs-xs); color: var(--accent-text); text-decoration: none; font-weight: 500; }
.cp-nota { border-radius: var(--radius-card); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; background: var(--surface); border: 1px solid var(--border); }
.cp-nota-aviso { background: #FBF0E6; border-color: #E8C77B; color: #6B3D12; }
:root[data-theme="dark"] .cp-nota-aviso { background: #2e2616; border-color: #6b5520; color: #E8C77B; }
.cp-nota-fila { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: var(--fs-sm); }
.cp-incidencia { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); font-size: var(--fs-sm); }
.cp-incidencia-emerg { border-color: var(--red); background: var(--red-soft); }
.cp-pie { position: sticky; bottom: calc(76px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 8px; padding: 10px 0 0; background: linear-gradient(to bottom, transparent, var(--bg) 18px); }
@media (min-width: 761px) { .cp-pie { bottom: 0; } }
.cp-btn-emerg { min-height: 52px; border-radius: 12px; background: #A3372E; color: #fff; font-weight: 700; font-size: var(--fs-md); display: inline-flex; align-items: center; justify-content: center; text-decoration: none; width: 100%; }
.cp-ancho { width: 100%; justify-content: center; min-height: 48px; }

/* Diálogo de campo (hoja inferior) */
.cp-dialogo-fondo { position: fixed; inset: 0; z-index: 950; background: rgba(17,20,19,.45); display: flex; align-items: flex-end; justify-content: center; }
.cp-dialogo { width: 100%; max-width: 520px; background: var(--surface); color: var(--text); border-radius: 22px 22px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; box-shadow: 0 -10px 30px rgba(0,0,0,.18); }
@media (min-width: 761px) { .cp-dialogo-fondo { align-items: center; } .cp-dialogo { border-radius: 18px; } }
.cp-dialogo h3 { font-size: 1.15rem; }
.cp-dialogo p { margin: 0; color: var(--label); }
.cp-emerg-tit { color: var(--red); }
.cp-lbl { font-size: var(--fs-sm); font-weight: 500; color: var(--label); }
.cp-ubic { display: flex; flex-direction: column; gap: 2px; font-size: var(--fs-sm); color: var(--muted); }
.cp-ubic b { font-size: 1.3rem; color: var(--text); font-variant-numeric: tabular-nums; }
.cp-video { width: 100%; max-height: 40vh; border-radius: 12px; background: #000; object-fit: cover; }

/* Material */
.cp-subcab { display: flex; align-items: center; gap: 10px; }
.cp-subcab > div { display: flex; flex-direction: column; }
.cp-subcab > div > span { font-size: var(--fs-xs); color: var(--muted); }
.cp-progreso-txt { display: flex; justify-content: space-between; align-items: baseline; }
.cp-progreso-txt span { font-size: var(--fs-sm); color: var(--muted); }
.cp-barra { height: 8px; border-radius: 999px; background: var(--bg-2); overflow: hidden; }
.cp-barra > div { height: 8px; background: var(--teal); border-radius: 999px; transition: width .25s; }
.cp-segmentado { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); padding: 3px; background: var(--bg-2); border-radius: 12px; }
.cp-segmentado button { height: 38px; border-radius: 9px; color: var(--muted); font-weight: 500; }
.cp-segmentado button[aria-selected="true"] { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.cp-mat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.cp-mat-activo { border: 2px solid var(--teal); }
.cp-mat-cab { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.cp-mat-cab span { font-size: var(--fs-xs); font-weight: 600; color: var(--muted); }
.cp-mat-items { display: flex; gap: 6px; flex-wrap: wrap; }
.cp-item { min-height: 36px; padding: 0 12px; border-radius: 10px; background: var(--bg); border: 1px solid var(--border); color: var(--text); font-size: var(--fs-sm); font-weight: 500; }
.cp-item-ok { background: var(--green-soft); border-color: transparent; color: var(--green-dark); font-weight: 600; }

/* Disponibilidad */
.cp-leyenda { display: flex; flex-wrap: wrap; gap: 10px; font-size: var(--fs-xs); color: var(--label); }
.cp-leyenda span { display: inline-flex; align-items: center; gap: 6px; }
.cp-leyenda i { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }
.cp-cal { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.cp-cal-cab { display: flex; justify-content: space-between; align-items: center; }
.cp-cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cp-cal-dow { text-align: center; font-size: var(--fs-xs); font-weight: 600; color: var(--muted); }
.cp-dia { height: 42px; border-radius: 10px; font-weight: 600; font-size: var(--fs-sm); }
.cp-dia-si { background: var(--teal); color: #fff; }
.cp-dia-man { background: #CFE3E0; color: #205C5D; }
.cp-dia-tar { background: linear-gradient(135deg, #EDEAE0 50%, #CFE3E0 50%); color: #205C5D; }
.cp-dia-no { background: var(--bg-2); color: var(--muted); }
.cp-dia-salida { box-shadow: inset 0 0 0 2px var(--rust); }
.cp-dia-salida-l { box-shadow: inset 0 0 0 2px var(--rust); background: transparent; }
.cp-dia:disabled { opacity: .85; cursor: default; }
:root[data-theme="dark"] .cp-dia-man { background: #2A4644; color: #BDE6E3; }
:root[data-theme="dark"] .cp-dia-tar { background: linear-gradient(135deg, #222827 50%, #2A4644 50%); color: #BDE6E3; }
a.btn-outline, a.btn-primary, a.btn-ghost { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.cp-pie-fila > *, .cp-acciones-pie > * { white-space: normal; line-height: 1.2; }

/* =====================================================================
   v0.90 — gestión: ficha de reserva (hoja), salidas en tarjetas, calendario semanal, cliente
   ===================================================================== */
.cb-hoja-fondo { position: fixed; inset: 0; z-index: 900; background: rgba(17,20,19,.4); display: flex; align-items: flex-end; justify-content: center; }
.cb-hoja { width: 100%; max-width: 560px; max-height: 92vh; background: var(--surface); color: var(--text); border-radius: 22px 22px 0 0; display: flex; flex-direction: column; box-shadow: 0 -10px 30px rgba(0,0,0,.18); }
@media (min-width: 900px) { .cb-hoja-fondo { justify-content: flex-end; align-items: stretch; } .cb-hoja { max-height: none; height: 100%; border-radius: 0; max-width: 460px; } .cb-hoja-asa { display: none; } }
.cb-hoja-asa { width: 40px; height: 4px; border-radius: 999px; background: var(--field-border); margin: 8px auto 0; flex: none; }
.cb-hoja-cab { display: flex; gap: 12px; align-items: flex-start; padding: 12px 20px 14px; border-bottom: 1px solid var(--line); }
.cb-avatar { width: 48px; height: 48px; flex: none; border-radius: 14px; background: var(--teal-soft); color: var(--accent-text); display: flex; align-items: center; justify-content: center; font-weight: 700; }
.cb-avatar-g { width: 64px; height: 64px; border-radius: 20px; font-size: 1.3rem; }
.cb-hoja-tit { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.cb-hoja-tit h2 { font-size: 1.2rem; }
.cb-chips-fila { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.cb-chip-estado { font-size: var(--fs-xs); font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--bg-2); color: var(--label); }
.cb-chip-estado.e-confirmada, .cb-chip-estado.e-completada { background: var(--teal-soft); color: var(--accent-text); }
.cb-chip-estado.e-pendiente { background: var(--bg-2); color: var(--label); }
.cb-chip-estado.e-cancelada, .cb-chip-estado.e-no_presentado, .cb-chip-estado.e-cancelada_tarde { background: var(--red-soft); color: var(--red); }
.cb-chip-estado.e-pagada { background: var(--green-soft); color: var(--green-dark); }
.cb-chip-estado.e-porcobrar { background: #FBF0E6; color: #8A4419; }
:root[data-theme="dark"] .cb-chip-estado.e-porcobrar { background: #3a2f1a; color: #E8C77B; }
.cb-hoja-x { width: 40px; height: 40px; flex: none; border-radius: 12px; background: var(--bg); color: var(--text); display: inline-flex; align-items: center; justify-content: center; }
.cb-hoja-x .ico { width: 18px; height: 18px; }
.cb-hoja-cuerpo { flex: 1; overflow-y: auto; padding: 16px 20px; display: flex; flex-direction: column; gap: 14px; }
.cb-hoja-rapidas { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; }
.cb-rapida-btn { min-height: 64px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: var(--fs-xs); font-weight: 500; text-decoration: none; }
.cb-rapida-btn .ico { width: 20px; height: 20px; stroke: var(--teal); }
.cb-plantillas { display: flex; gap: 6px; flex-wrap: wrap; }
.cb-tabla-datos { border: 1px solid var(--border); border-radius: var(--radius-card); overflow: hidden; display: flex; flex-direction: column; }
.cb-dato { display: flex; justify-content: space-between; gap: 12px; padding: 12px 14px; text-align: left; background: transparent; color: var(--text); width: 100%; }
.cb-dato + .cb-dato { border-top: 1px solid var(--line); }
.cb-dato span { font-size: var(--fs-sm); color: var(--muted); }
.cb-dato b { font-size: var(--fs-md); font-weight: 600; text-align: right; }
button.cb-dato:hover { background: var(--bg); }
.cb-txt-alerta { color: var(--red); }
.cb-bloque { border: 1px solid var(--border); border-radius: var(--radius-card); padding: 14px; display: flex; flex-direction: column; gap: 10px; background: var(--surface); }
.cb-bloque h3, .cb-bloque h4 { font-size: var(--fs-md); font-weight: 600; margin: 0; font-family: var(--font-body); text-transform: none; color: var(--text); }
.cb-bloque-cab { display: flex; justify-content: space-between; align-items: baseline; }
.cb-total { font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.cb-pago-fila { display: flex; justify-content: space-between; font-size: var(--fs-sm); color: var(--muted); }
.cb-mini-tit { font-size: var(--fs-xs) !important; font-weight: 600 !important; color: var(--muted) !important; letter-spacing: 0.03em; text-transform: uppercase !important; }
.cb-linea-tiempo { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.cb-linea-tiempo li { display: flex; flex-direction: column; padding-left: 16px; position: relative; font-size: var(--fs-sm); }
.cb-linea-tiempo li::before { content: ""; position: absolute; left: 0; top: 6px; width: 8px; height: 8px; border-radius: 999px; background: var(--teal); }
.cb-linea-tiempo li span { color: var(--muted); font-size: var(--fs-xs); }
.cb-hoja-pie { padding: 12px 20px calc(16px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); display: flex; gap: 10px; }
.cb-hoja-pie > * { min-height: 48px; justify-content: center; }
.cb-hoja-pie .btn-primary { flex: 1; }

/* Nueva reserva: salidas como tarjetas */
.cb-salidas-tarjetas { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.cb-salida-tarjeta { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: var(--radius-card); border: 1px solid var(--border); background: var(--surface); color: var(--text); text-align: left; }
.cb-salida-tarjeta.activa { border: 2px solid var(--teal); }
.cb-salida-tarjeta:disabled { opacity: .5; }
.cb-salida-tarjeta .ico { width: 22px; height: 22px; stroke: var(--teal); }
.cb-st-dia { width: 44px; display: flex; flex-direction: column; align-items: center; }
.cb-st-dia small { font-size: var(--fs-2xs); color: var(--muted); font-weight: 600; text-transform: uppercase; }
.cb-st-dia b { font-size: 1.2rem; }
.cb-st-main { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cb-st-main small { color: var(--muted); font-size: var(--fs-xs); }
.cb-salida-nueva { min-height: 44px; border-radius: 12px; border: 1px dashed var(--field-border); color: var(--accent-text); font-weight: 600; background: transparent; }

/* Calendario semanal */
.cb-cal-semana { display: flex; flex-direction: column; gap: 12px; position: relative; padding-bottom: 80px; }
.cb-cal-cab { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.cb-cal-dias { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cb-cal-dia { min-height: 60px; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--text); background: transparent; }
.cb-cal-dia small { font-size: var(--fs-2xs); color: var(--muted); text-transform: uppercase; }
.cb-cal-dia b { font-size: 1rem; }
.cb-cal-dia i { width: 6px; height: 6px; border-radius: 999px; }
.cb-cal-dia i.p-ok { background: var(--teal); } .cb-cal-dia i.p-alerta { background: var(--rust); }
.cb-cal-dia.activo { background: var(--text); }
.cb-cal-dia.activo small, .cb-cal-dia.activo b { color: var(--bg); }
.cb-linea-horas { position: relative; margin-left: 48px; }
.cb-hora { position: absolute; left: -48px; right: 0; border-top: 1px solid var(--border); }
.cb-hora span { position: absolute; left: 0; top: -8px; font-size: var(--fs-2xs); color: var(--muted); background: var(--bg); padding-right: 6px; }
.cb-bloques { position: absolute; inset: 0; }
.cb-bloque-salida { position: absolute; left: 0; right: 0; border-radius: 12px; background: var(--teal-soft); border-left: 4px solid var(--teal); padding: 8px 12px; text-align: left; color: var(--text); display: flex; flex-direction: column; gap: 4px; overflow: hidden; }
.cb-bloque-salida.sin-guia { background: var(--red-soft); border-left-color: var(--red); }
.cb-bloque-salida span { font-size: var(--fs-xs); color: var(--label); }
.cb-ocupacion { display: flex; align-items: center; gap: 8px; }
.cb-ocupacion i { display: block; height: 6px; border-radius: 999px; background: var(--teal); flex: none; max-width: 70%; }
.cb-ocupacion em { font-style: normal; font-weight: 600; }
.cb-fab { position: fixed; right: 16px; bottom: calc(88px + env(safe-area-inset-bottom)); width: 56px; height: 56px; border-radius: 18px; background: var(--teal); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 16px rgba(29,43,40,.28); z-index: 700; }
.cb-fab .ico { width: 24px; height: 24px; stroke: #fff; }
@media (min-width: 761px) { .cb-fab { bottom: 24px; } }

/* Ficha de cliente */
.cb-ficha-cliente { display: flex; flex-direction: column; gap: 14px; }
.cb-cli-cab { display: flex; gap: 14px; align-items: center; }
.cb-cli-datos { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cb-cli-datos h3 { font-size: 1.35rem; font-family: var(--font-body); text-transform: none; }
.cb-cli-acciones { display: flex; gap: 8px; flex-wrap: wrap; }
.cb-cli-acciones > * { min-height: 44px; }
#cb-cli-notas { width: 100%; }
.hoy-card .btn-outline { min-height: 48px; border-radius: 12px; }
.cb-hoja-cuerpo > *, .cp-pantalla > *, .cb-cal-semana > *, .cb-ficha-cliente > * { flex-shrink: 0; }

/* v0.90: mismas variantes oscuras cuando el tema sigue al sistema */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .cp-sync-pend { background: #3a2f1a; color: #E8C77B; }
  :root:not([data-theme="light"]) .cp-hero { background: #1F2B29; }
  :root:not([data-theme="light"]) .cp-curso-cab { background: #1F2B29; }
  :root:not([data-theme="light"]) .cp-persona-main > .cp-salud { color: #F0C674; }
  :root:not([data-theme="light"]) .cp-nota-aviso { background: #2e2616; border-color: #6b5520; color: #E8C77B; }
  :root:not([data-theme="light"]) .cp-dia-man { background: #2A4644; color: #BDE6E3; }
  :root:not([data-theme="light"]) .cp-dia-tar { background: linear-gradient(135deg, #222827 50%, #2A4644 50%); color: #BDE6E3; }
  :root:not([data-theme="light"]) .cb-chip-estado.e-porcobrar { background: #3a2f1a; color: #E8C77B; }
}

/* =====================================================================
   v0.90 — Ajustes: índice, buscador, equipo, plantillas, zona de cuidado
   ===================================================================== */
.cb-aj-en-indice > :not(#cb-ajustes-indice) { display: none !important; }
.cb-aj-indice { display: flex; flex-direction: column; gap: 14px; padding-top: 6px; }
.cb-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.cb-aj-buscar { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.cb-aj-buscar .ico { width: 18px; height: 18px; stroke: var(--muted); flex: none; }
.cb-aj-buscar input { flex: 1; border: none !important; box-shadow: none !important; background: transparent !important; min-height: 44px; padding: 0; }
.cb-aj-grupos { display: flex; flex-direction: column; gap: 10px; }
.cb-aj-grupo { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; }
.cb-aj-cab { width: 100%; display: flex; align-items: center; gap: 14px; padding: 14px; text-align: left; color: var(--text); }
.cb-aj-ico { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex: none; }
.cb-aj-ico .ico { width: 20px; height: 20px; }
.t-teal { background: #EAF3F1; } .t-teal .ico { stroke: #205C5D; }
.t-rust { background: #FBF0E6; } .t-rust .ico { stroke: #8A4419; }
.t-green { background: #E7F2E8; } .t-green .ico { stroke: #2F5C33; }
.t-purple { background: #EEE8F3; } .t-purple .ico { stroke: #5B4470; }
.t-gris { background: var(--bg-2); } .t-gris .ico { stroke: var(--label); }
.cb-avatar.t-teal { color: #205C5D; } .cb-avatar.t-rust { color: #8A4419; } .cb-avatar.t-green { color: #2F5C33; } .cb-avatar.t-purple { color: #5B4470; }
.cb-aj-txt { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cb-aj-txt span { font-size: var(--fs-xs); color: var(--muted); }
.cb-aj-flecha { width: 18px; height: 18px; stroke: var(--muted); }
.cb-aj-items { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 14px 68px; }
@media (max-width: 500px) { .cb-aj-items { padding-left: 14px; } }
.cb-aj-resultados { display: flex; flex-direction: column; gap: 6px; }
.cb-aj-res { text-align: left; display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); color: var(--text); }
.cb-aj-res span { font-size: var(--fs-xs); color: var(--muted); }
.cb-aj-volver { margin-right: 6px; }
.cb-resaltado { outline: 3px solid color-mix(in srgb, var(--teal) 45%, transparent); outline-offset: 4px; border-radius: 10px; transition: outline-color .4s; }
.cb-campo-ok { display: inline-block; margin-left: 8px; font-size: var(--fs-xs); font-weight: 600; color: var(--green-dark); opacity: 0; transition: opacity .25s; }
.cb-campo-ok.on { opacity: 1; }
.cb-campo-ok.error { color: var(--red); }
.cb-zona-cuidado { border-color: color-mix(in srgb, var(--red) 40%, transparent); background: color-mix(in srgb, var(--red) 5%, var(--surface)); }
.cb-zona-cuidado h3 { color: var(--red) !important; }
.cb-fila-campo { display: flex; gap: 8px; flex-wrap: wrap; }
.cb-fila-campo input { flex: 1 1 220px; }
.cb-btn-peligro { color: var(--red) !important; border-color: color-mix(in srgb, var(--red) 45%, transparent) !important; }
/* Equipo */
.cb-eq-lista { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.cb-eq-tarjeta { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.cb-eq-cab { display: flex; gap: 12px; align-items: center; }
.cb-eq-nombre { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.cb-eq-nombre span { font-size: var(--fs-xs); color: var(--muted); }
.cb-eq-semana { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.cb-eq-semana span { height: 26px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: var(--fs-2xs); font-weight: 600; }
.eq-libre { background: var(--teal); color: #fff; } .eq-man, .eq-tar { background: #CFE3E0; color: #205C5D; } .eq-no { background: var(--bg-2); color: var(--muted); }
.eq-salida { background: var(--rust); color: #fff; }
.cp-leyenda i.eq-libre, .cp-leyenda i.eq-man, .cp-leyenda i.eq-tar, .cp-leyenda i.eq-no, .cp-leyenda i.eq-salida { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }
.cb-eq-tarjeta .btn-ghost { align-self: flex-start; }
/* Plantillas */
.cb-chip-var { background: var(--teal-soft); border-color: transparent; color: var(--accent-text); font-weight: 600; }
.cb-wa { background: #E9E4D8; border-radius: 16px; padding: 14px; }
.cb-wa-burbuja { max-width: 320px; background: #fff; color: #1B2220; border-radius: 4px 14px 14px 14px; padding: 10px 12px; font-size: var(--fs-md); line-height: 1.45; white-space: pre-wrap; box-shadow: 0 1px 1px rgba(0,0,0,.06); }
:root[data-theme="dark"] .cb-wa { background: #1E2624; } :root[data-theme="dark"] .cb-wa-burbuja { background: #2A3B37; color: #ECEAE4; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .cb-wa { background: #1E2624; } :root:not([data-theme="light"]) .cb-wa-burbuja { background: #2A3B37; color: #ECEAE4; }
  :root:not([data-theme="light"]) .t-teal { background: #1A2F2F; } :root:not([data-theme="light"]) .t-rust { background: #3a2a1a; } :root:not([data-theme="light"]) .t-green { background: #1C2E1F; } :root:not([data-theme="light"]) .t-purple { background: #2C2436; }
  :root:not([data-theme="light"]) .t-teal .ico { stroke: #8BD3D3; } :root:not([data-theme="light"]) .t-rust .ico { stroke: #F0A066; } :root:not([data-theme="light"]) .t-green .ico { stroke: #9AD6A2; } :root:not([data-theme="light"]) .t-purple .ico { stroke: #C6B0DA; }
  :root:not([data-theme="light"]) .eq-man, :root:not([data-theme="light"]) .eq-tar { background: #2A4644; color: #BDE6E3; }
}
:root[data-theme="dark"] .t-teal { background: #1A2F2F; } :root[data-theme="dark"] .t-rust { background: #3a2a1a; } :root[data-theme="dark"] .t-green { background: #1C2E1F; } :root[data-theme="dark"] .t-purple { background: #2C2436; }
:root[data-theme="dark"] .t-teal .ico { stroke: #8BD3D3; } :root[data-theme="dark"] .t-rust .ico { stroke: #F0A066; } :root[data-theme="dark"] .t-green .ico { stroke: #9AD6A2; } :root[data-theme="dark"] .t-purple .ico { stroke: #C6B0DA; }
:root[data-theme="dark"] .eq-man, :root[data-theme="dark"] .eq-tar { background: #2A4644; color: #BDE6E3; }

/* ===== v0.91 — gestión de material ===== */
.cb-tabs-scroll { display: flex; gap: var(--sp-2); overflow-x: auto; padding: 2px 0 var(--sp-3); margin-bottom: var(--sp-2); scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.cb-tabs-scroll::-webkit-scrollbar { display: none; }
.cb-tabs-scroll .cb-chip { flex-shrink: 0; white-space: nowrap; }
.cb-kpi { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: var(--sp-3); display: flex; flex-direction: column; gap: 2px; }
.cb-kpi b { font-family: var(--font-head); font-size: var(--fs-lg); font-variant-numeric: tabular-nums; } .cb-kpi b small { font-size: var(--fs-xs); color: var(--muted); font-family: var(--font-body); }
.cb-kpi span { font-size: var(--fs-xs); color: var(--muted); }
.mg-stock { display: flex; flex-direction: column; gap: var(--sp-3); }
.mg-tallas { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: var(--sp-2); margin-top: var(--sp-2); }
.mg-talla { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: var(--sp-2) var(--sp-3); border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-alt); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.mg-talla b { font-size: var(--fs-sm); } .mg-num { font-family: var(--font-head); font-size: var(--fs-lg); font-variant-numeric: tabular-nums; color: var(--green-dark); } .mg-num small { font-size: var(--fs-xs); color: var(--muted); }
.mg-talla.mg-cero { border-color: var(--red); background: var(--red-soft); } .mg-talla.mg-cero .mg-num { color: var(--red); }
.mg-mini { display: inline-block; font-size: var(--fs-2xs); padding: 1px 6px; border-radius: 999px; background: var(--bg-2); color: var(--muted); font-weight: 600; }
.mg-rojo { background: var(--red-soft); color: var(--red); } .mg-ambar { background: #FBF0DF; color: #8A4B12; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .mg-ambar { background: #3a2c17; color: #F2B872; } }
:root[data-theme="dark"] .mg-ambar { background: #3a2c17; color: #F2B872; }
.mg-tabla th { text-align: left; font-size: var(--fs-xs); color: var(--muted); font-weight: 600; padding: 0.3rem 0.4rem; }
.mg-tabla .mg-sub td:first-child { padding-left: 1.2rem; color: var(--muted); }
.mg-tabla .mg-falta td { color: var(--red); font-weight: 600; }
.mg-filtros { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-4); align-items: center; margin: var(--sp-3) 0; } .mg-filtros input[type="search"] { flex: 1 1 220px; }
.mg-rev-lista { display: flex; flex-direction: column; gap: var(--sp-2); }
.mg-rev-fila { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; justify-content: space-between; padding: var(--sp-2) var(--sp-3); border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.mg-rev-info { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; background: none; border: 0; padding: 0; font: inherit; color: var(--text); text-align: left; cursor: pointer; flex: 1 1 180px; }
.mg-rev-info span { font-size: var(--fs-xs); color: var(--muted); }
.mg-rev-btns { display: flex; gap: 4px; flex-shrink: 0; }
.mg-res { min-height: 40px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-alt); color: var(--text); font: inherit; font-size: var(--fs-xs); font-weight: 600; cursor: pointer; }
.mg-res-apto.activo { background: var(--green); border-color: var(--green); color: #fff; }
.mg-res-apto_con_reservas.activo { background: var(--rust); border-color: var(--rust); color: #fff; }
.mg-res-no_apto.activo { background: var(--red); border-color: var(--red); color: #fff; }
.mg-foto { display: block; max-width: 100%; max-height: 220px; border-radius: var(--radius); margin: var(--sp-2) 0; object-fit: cover; }
.mg-nuevo summary { cursor: pointer; padding: var(--sp-1) 0; }
.mg-form { display: flex; flex-direction: column; gap: var(--sp-2); margin-top: var(--sp-3); }
.mg-form label { font-size: var(--fs-sm); color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
.mg-dos { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--sp-2); } .mg-dos > *, .mg-dos input { min-width: 0; width: 100%; box-sizing: border-box; }
.mg-cant { display: flex; align-items: center; gap: var(--sp-2); flex-shrink: 0; } .mg-cant b { min-width: 2ch; text-align: center; font-variant-numeric: tabular-nums; }
.mg-num-input { width: 6rem; }
.mg-chk { border-top: 1px solid var(--border); padding-top: var(--sp-3); }
.mg-inf-barra { display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: center; justify-content: space-between; margin-bottom: var(--sp-3); }
.mg-informe { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--sp-4); overflow-x: auto; }
.mg-informe h3 { margin-top: var(--sp-4); }
.mg-inc-linea { font-size: var(--fs-sm); padding: var(--sp-1) 0; border-top: 1px solid var(--border); }
.mg-vida-foto { object-fit: cover; }
/* Campo: material no apto y devoluciones con incidencia */
.cp-item small { display: block; font-size: var(--fs-2xs); font-weight: 500; opacity: 0.9; }
.cp-item-noapto { background: var(--red-soft); border-color: var(--red); color: var(--red); }
.cp-item-inc { background: #FBF0DF; border-color: transparent; color: #8A4B12; font-weight: 600; }
:root[data-theme="dark"] .cp-item-inc { background: #3a2c17; color: #F2B872; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cp-item-inc { background: #3a2c17; color: #F2B872; } }
.cp-item-incbtn { border-style: dashed; background: transparent; color: var(--muted); }
.cp-prop { max-height: 50vh; overflow-y: auto; }
.cp-chk { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.cp-chk-cab, .cp-chk-fila { display: grid; grid-template-columns: 1fr 64px 64px; align-items: center; gap: var(--sp-2); padding: 6px var(--sp-3); }
.cp-chk-cab { font-size: var(--fs-2xs); color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; text-align: center; } .cp-chk-cab span:first-child { text-align: left; }
.cp-chk-fila { border-top: 1px solid var(--border); font-size: var(--fs-sm); }
.cp-chk-btn { justify-self: center; width: 44px; height: 40px; border-radius: 10px; border: 1.5px solid var(--border); background: var(--surface-alt); color: #fff; font-weight: 700; font-size: 1.1rem; cursor: pointer; }
.cp-chk-btn.ok { background: var(--green); border-color: var(--green); }
.cp-segmentado label { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; cursor: pointer; }
/* Informe imprimible */
@media print {
  body.cb-imprimiendo * { visibility: hidden !important; }
  body.cb-imprimiendo #mg-informe, body.cb-imprimiendo #mg-informe * { visibility: visible !important; color: #000 !important; background: #fff !important; }
  body.cb-imprimiendo #mg-informe { position: absolute; left: 0; top: 0; width: 100%; border: 0; padding: 0; }
  .no-print { display: none !important; }
}
.mg-dos > label { justify-content: flex-end; }

/* ===== v0.92 — Ajustes → Sitio web ===== */
.w-sr-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.sw-subir { position: relative; cursor: pointer; display: inline-flex; align-items: center; }
.sw-subir:focus-within { outline: 2px solid var(--teal); outline-offset: 2px; }
.sw-interruptor input { width: 22px !important; height: 22px; }
.sw-temas { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--sp-3); }
.sw-tema { display: flex; flex-direction: column; gap: 6px; padding: var(--sp-3); border: 2px solid var(--border); border-radius: var(--radius-card); cursor: pointer; background: var(--surface); }
.sw-tema.activo { border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-soft); }
.sw-tema input { position: absolute; opacity: 0; }
.sw-tema-muestra { display: flex; gap: 4px; height: 44px; border-radius: 6px; overflow: hidden; }
.sw-tema-muestra i { flex: 1; }
.sw-tema-cascada i:nth-child(1) { background: #0F172A; } .sw-tema-cascada i:nth-child(2) { background: #4E9E8A; } .sw-tema-cascada i:nth-child(3) { background: #EEF5EE; }
.sw-tema-musgo i:nth-child(1) { background: #12201F; } .sw-tema-musgo i:nth-child(2) { background: #2F7D73; } .sw-tema-musgo i:nth-child(3) { background: #6CC3B5; }
.sw-tema-musgo { border-radius: 22px; }
.mg-campo { display: flex; flex-direction: column; gap: 4px; font-size: var(--fs-sm); color: var(--label); }
.mg-campo input, .mg-campo textarea, .mg-campo select { color: var(--text); }
.sw-video { width: 100%; max-width: 560px; border-radius: 10px; background: #000; }
.sw-fila-medios { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--sp-4); }
.sw-fila-medios > div { display: flex; flex-direction: column; gap: 8px; }
.sw-mini { width: 120px; height: 90px; object-fit: cover; border-radius: 8px; background: var(--surface-alt); border: 1px solid var(--border); display: block; flex-shrink: 0; }
.sw-mini-vacia { background: repeating-linear-gradient(45deg, var(--surface-alt), var(--surface-alt) 6px, var(--bg-2) 6px, var(--bg-2) 12px); }
.sw-galeria { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.sw-galeria figure { position: relative; margin: 0; }
.sw-galeria img { width: 100%; height: 90px; object-fit: cover; border-radius: 8px; display: block; }
.sw-x { position: absolute; top: 4px; right: 4px; width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, 0.65); color: #fff; font-size: 18px; cursor: pointer; }
.sw-det { border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; }
.sw-det summary { cursor: pointer; padding: 4px 0; }
.sw-cont-fila { display: flex; flex-wrap: wrap; gap: var(--sp-4); margin-top: var(--sp-3); }
.sw-cont-foto { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.sw-cont-txt { flex: 1 1 320px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.sw-lista { display: flex; flex-direction: column; gap: 8px; }
.sw-lugar { align-items: center; gap: 12px; }
.sw-lugar .sw-mini { width: 64px; height: 48px; }
.sw-lugar span { display: flex; flex-direction: column; }
.sw-mapa { height: 320px; }
.sw-guia { border-top: 1px solid var(--border); padding-top: var(--sp-3); display: flex; flex-direction: column; gap: 8px; }
.sw-guia-cab { display: flex; align-items: center; gap: 10px; }
.sw-guia-cab .cb-avatar { width: 40px; height: 40px; object-fit: cover; }
.sw-destinos { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.sw-destinos li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 10px; background: var(--surface-alt); border-radius: 8px; }
.sw-dest-form { display: grid; grid-template-columns: 2fr 1.4fr 1.6fr auto; gap: 8px; }
@media (max-width: 720px) { .sw-dest-form { grid-template-columns: 1fr 1fr; } }
.sw-colab { display: flex; gap: var(--sp-3); align-items: flex-start; padding: var(--sp-2) 0; border-top: 1px solid var(--border); }
.sw-colab .sw-mini { width: 80px; height: 60px; object-fit: contain; background: #fff; }
.sw-colab-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.sw-inactivo { opacity: 0.6; }
.sw-resena { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; padding: 8px 0; border-top: 1px solid var(--border); }
.sw-oficina { display: grid; grid-template-columns: 1.2fr 2fr 1.3fr; gap: 8px; }
@media (max-width: 720px) { .sw-oficina { grid-template-columns: 1fr; } }
.sw-no-leido { border-color: var(--teal); }
/* Mapa reutilizado de la web pública */
.w-mapa { position: relative; border-radius: 10px; overflow: hidden; background: #DDE6E3; touch-action: none; cursor: grab; user-select: none; }
.w-mapa-capa { position: absolute; left: 0; top: 0; }
.w-mapa-capa img { position: absolute; width: 256px; height: 256px; max-width: none; pointer-events: none; }
.w-mapa-pin { position: absolute; width: 30px; height: 40px; margin: -40px 0 0 -15px; padding: 0; border: 0; background: transparent; cursor: pointer; }
.w-mapa-pin svg { width: 30px; height: 40px; }
.w-mapa-ctrl { position: absolute; left: 10px; top: 10px; display: flex; flex-direction: column; background: #fff; border-radius: 6px; box-shadow: 0 2px 8px rgba(0,0,0,.2); overflow: hidden; z-index: 2; }
.w-mapa-ctrl button { width: 40px; height: 40px; border: 0; background: #fff; font-size: 20px; font-weight: 700; cursor: pointer; color: #0F172A; }
.w-mapa-attr { position: absolute; right: 0; bottom: 0; background: rgba(255,255,255,.85); font-size: 11px; padding: 2px 6px; z-index: 2; color: #333; }
.w-mapa-pop { position: absolute; z-index: 3; transform: translate(-50%, calc(-100% - 46px)); background: #fff; color: #0F172A; border-radius: 8px; box-shadow: 0 4px 14px rgba(0,0,0,.25); padding: 6px 10px; font-size: 13px; white-space: nowrap; pointer-events: none; }
.w-mapa-pop b { display: block; }
.w-oculto { display: none !important; }
/* v0.93 — un único menú de Ajustes: barra «‹ Ajustes | ☰ Grupo › Apartado» y cajón con los mismos 5 grupos del índice */
.cb-aj-barra { display: flex; align-items: center; gap: 8px; margin: 1rem 0; }
.cb-aj-barra .ajustes-drawer-toggle-btn { flex: 1; min-width: 0; margin: 0; }
.cb-aj-barra .ajustes-drawer-toggle-btn span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cb-aj-barra .cb-aj-volver { margin: 0; flex-shrink: 0; }
.cb-aj-migas { margin-top: 0.5rem; }
.drawer-grupo { display: flex; align-items: center; gap: 8px; padding: 0.7rem 0.6rem 0.25rem; font-size: var(--fs-xs); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.drawer-grupo .cb-aj-ico { width: 22px; height: 22px; border-radius: 6px; }
.drawer-grupo .cb-aj-ico .ico { width: 14px; height: 14px; }
.drawer-indice { margin-bottom: 0.2rem; }
/* v0.93 — Espacio en disco (Estado del sistema) */
.cb-espacio-barra { display: flex; height: 10px; border-radius: 99px; overflow: hidden; background: var(--border); margin: 10px 0 12px; }
.cb-espacio-barra span { display: block; height: 100%; }
.cb-espacio .t0 { background: var(--teal); } .cb-espacio .t1 { background: var(--rust, #A4562F); } .cb-espacio .t2 { background: #7C6BB1; } .cb-espacio .t3 { background: #6E8F5A; } .cb-espacio .t4 { background: #9AA5A2; }
.cb-espacio-lista { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 6px; }
.cb-espacio-lista li { display: flex; align-items: center; gap: 8px; font-size: var(--fs-sm); }
.cb-espacio-lista li i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.cb-espacio-lista li span { flex: 1; min-width: 0; } .cb-espacio-lista li small { color: var(--muted); }
.cb-espacio details { margin: 4px 0 10px; } .cb-espacio summary { cursor: pointer; font-size: var(--fs-sm); color: var(--teal); }
.cb-espacio details .cb-espacio-lista { margin-top: 8px; padding-left: 18px; }
.cb-espacio-acciones { display: grid; gap: 12px; margin: 10px 0; }
.cb-espacio-acciones p { margin: 0 0 6px; font-size: var(--fs-sm); }
/* v0.93 — Sitio web: lugares con su contenido web, pasos de Takeout */
.sw-lugar-det > summary { list-style: none; cursor: pointer; }
.sw-lugar-det > summary::-webkit-details-marker { display: none; }
.sw-lugar-det .sw-lugar { display: flex; }
.sw-lugar-det .sw-lugar > span { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.sw-lugar-det .sw-lugar input[type="checkbox"] { width: 22px; height: 22px; flex: none; }
.sw-lugar-txt { padding: 10px 0 4px; }
.sw-subtit { margin: 14px 0 4px; font-size: var(--fs-sm); color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.sw-pasos { margin: 4px 0 10px; padding-left: 20px; display: grid; gap: 4px; font-size: var(--fs-sm); }
.sw-lugar-det .sw-lugar .sw-mini { width: 64px; height: 48px; flex: none; }
