:root {
  --bg: #F2EEE3;
  --header: #1D2B28;
  --header-muted: #9FB3AE;
  --teal: #2C7A7B;
  --rust: #C1652C;
  --red: #A3372E;
  --green: #4B7A51;
  --muted: #8A8478;
  --border: #DAD3C3;
  --text: #262421;
  --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: #fff; padding: 2rem; border-radius: 10px; width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 0.5rem; }
.login-card h1 { color: var(--header); font-size: 1.5rem; letter-spacing: 0.03em; }
.login-card .subtitle { color: var(--muted); margin: 0 0 1rem 0; font-size: 0.85rem; }
.login-card label { font-size: 0.75rem; 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: 0.95rem; }
.login-card button { margin-top: 1rem; background: var(--teal); color: #fff; padding: 0.7rem; border-radius: 6px; font-weight: 600; }
.error-text { color: var(--red); font-size: 0.85rem; }

/* 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: #fff; font-size: 1.6rem; letter-spacing: 0.03em; }
.app-header .subtitle { color: var(--header-muted); font-size: 0.85rem; margin: 0.15rem 0 0; }
.sync-indicator { font-size: 0.78rem; 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: #205C5D; }
.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: #fff; 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: 0.85rem; cursor: pointer; color: var(--text, #1D2B28); }
.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: #fff;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 6px;
  padding: 0.3rem 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}
.lang-select option { color: #1D2B28; background: #fff; }
.btn-primary { display: inline-flex; align-items: center; gap: 0.4rem; background: var(--teal); color: #fff; padding: 0.55rem 1rem; border-radius: 6px; font-weight: 600; font-size: 0.9rem; }
.btn-ghost { color: var(--header-muted); padding: 0.5rem 0.75rem; font-size: 0.9rem; }
.btn-outline { border: 1px solid var(--border); padding: 0.5rem 0.9rem; border-radius: 6px; color: var(--teal); font-weight: 500; font-size: 0.85rem; white-space: nowrap; }
.btn-danger { background: var(--red); color: #fff; padding: 0.55rem 1rem; border-radius: 6px; font-weight: 600; }
.icon-btn { color: rgba(255,255,255,0.7); font-size: 1.4rem; 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: 0.9rem; }
.banner-error { background: #FBEAE8; color: var(--red); }
.banner-ok { background: #E7F2E8; color: #2F5C33; }
.banner-warning { background: #FBF0E6; color: #C1652C; }

/* 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, #fff); border: 1px solid var(--border); border-radius: 10px; padding: 1rem 1.1rem; }
.dash-card h3 { margin: 0 0 0.75rem; font-size: 0.8rem; 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: #2C7A7B; font-size: 0.8rem; 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: 0.82rem; }
.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: 0.85rem; margin-top: 0.15rem; }
.dash-sin-guia-tag { font-size: 0.75rem; padding: 0.1rem 0.5rem; border-radius: 4px; background: #FBE4E1; color: #A3372E; 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: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 0.85rem 1rem; }
.stat-value { font-family: var(--font-mono); font-size: 1.5rem; font-weight: 700; }
.stat-label { font-size: 0.75rem; 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: 1.15rem; }
.dash-stat-grid .stat-label { font-size: 0.66rem; 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: #2C7A7B; }

.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: 1rem; color: var(--header); 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: 0.9rem; font-family: inherit; }
.dash-pago-row:last-child { border-bottom: none; }
.dash-pago-row:hover { color: #2C7A7B; }
.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: 0.88rem; }
.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: 0.78rem; text-transform: uppercase; }
.dash-meteo-item-icon { font-size: 1.05rem; }
.dash-meteo-item-rain { color: var(--muted); font-size: 0.8rem; }
.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: 0.65rem; 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: #fff; cursor: pointer; font-family: inherit; }
.dash-mini-cal-day:hover { border-color: #2C7A7B; }
.dash-mini-cal-day-hoy { background: #2C7A7B14; border-color: #2C7A7B; }
.dash-mini-cal-num { font-size: 0.9rem; font-weight: 600; }
.dash-mini-cal-dot { width: 5px; height: 5px; border-radius: 50%; background: #2C7A7B; }

/* Alerts */
.alerts-box { margin-top: 1rem; background: #fff; 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: 0.9rem; color: var(--header); 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: 0.9rem; }
.alert-row:hover { background: #F7F5EF; }

/* 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: 0.9rem; }
.filters input { flex: 1; min-width: 200px; }
.filtro-activo-banner { display: flex; align-items: center; gap: 0.6rem; background: #2C7A7B1A; color: #205C5D; padding: 0.5rem 0.9rem; border-radius: 6px; margin-top: 0.6rem; font-size: 0.88rem; }
.filtro-activo-banner button { margin-left: auto; background: none; border: 1px solid #205C5D; color: #205C5D; border-radius: 5px; padding: 0.2rem 0.6rem; font-size: 0.8rem; cursor: pointer; }

/* Batch bar */
.batch-bar { margin-top: 1rem; background: #EAF3F1; 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: #fff; 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: #F2EEE3; font-family: var(--font-head); font-weight: 600; letter-spacing: 0.02em; color: var(--header); }
.category-count { background: var(--header); color: #F2EEE3; font-family: var(--font-mono); font-size: 0.75rem; padding: 0.1rem 0.5rem; border-radius: 4px; }
.item-row { display: flex; gap: 0.75rem; padding: 0.75rem 1rem; border-top: 1px solid #EDEAE0; align-items: flex-start; }
.item-row.selected { background: #EAF3F1; }
.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: 0.72rem; background: var(--header); color: #EDEAE0; padding: 0.1rem 0.35rem; border-radius: 4px; }
.item-name { font-weight: 500; font-size: 0.9rem; }
.item-meta { margin-top: 0.25rem; font-size: 0.78rem; 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); }

.badge { display: inline-flex; align-items: center; padding: 0.1rem 0.5rem; border-radius: 4px; font-size: 0.7rem; font-weight: 600; text-transform: uppercase; }
.pill { display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.1rem 0.5rem; border-radius: 4px; font-size: 0.72rem; font-weight: 500; }

.empty-state { text-align: center; padding: 3rem 1rem; background: #fff; 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: #fff; 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: #fff; font-size: 1.05rem; 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: 0.72rem; 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: 0.9rem; }
.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: 0.85rem; font-weight: 600; color: var(--header-muted); border-radius: 6px 6px 0 0; white-space: nowrap; }
.module-tab.active { background: var(--bg); color: var(--header); }

@media (max-width: 640px) {
  .app-header { padding: 1rem; }
  .app-header h1 { font-size: 1.25rem; }
  .module-nav { padding: 0 1rem; gap: 0.15rem; }
  .module-tab { padding: 0.5rem 0.7rem; font-size: 0.78rem; }
  .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: 0.95rem; }
  .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: #fff; 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: 1rem; min-width: 4.5rem; color: var(--header); }
.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: 0.92rem; }
.booking-meta { margin-top: 0.25rem; font-size: 0.8rem; 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: 0.72rem; 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: 0.9rem; }

.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: 0.85rem; letter-spacing: 0.02em; color: var(--header); }
.optional-tag { font-family: var(--font-body); font-size: 0.68rem; font-weight: 600; text-transform: uppercase; color: var(--muted); background: #EDEAE0; padding: 0.15rem 0.5rem; border-radius: 4px; }
.hint-text { font-size: 0.8rem; 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: 0.9rem; }
.participant-meta { font-size: 0.78rem; 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: 0.85rem; 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: 0.85rem; 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: 0.72rem; 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: 0.85rem; }
.link-btn { background: none; border: none; color: var(--teal); font-size: 0.78rem; 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: 0.82rem; 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: #fff; 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: 1rem; min-width: 4.5rem; color: var(--header); }
.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: 0.8rem; 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: #EDEAE0; 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: #fff; 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: 1rem; color: var(--header); background: #F2EEE3; padding: 0.2rem 0.6rem; border-radius: 4px; }
.descuento-main { flex: 1; min-width: 0; }
.descuento-meta { margin-top: 0.25rem; font-size: 0.8rem; 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: #F2EEE3; border-radius: 8px; padding: 0.85rem 1rem; font-size: 0.85rem; }
.price-row { display: flex; justify-content: space-between; padding: 0.15rem 0; }
.price-row.total { font-weight: 700; font-size: 1rem; border-top: 1px solid var(--border); margin-top: 0.4rem; padding-top: 0.5rem; color: var(--header); }
.price-row.discount { color: var(--teal); }
.price-warning { color: var(--red); font-size: 0.8rem; margin-top: 0.3rem; }

/* Users module */
.user-card { background: #fff; 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: 0.92rem; font-family: var(--font-mono); }
.user-meta { margin-top: 0.25rem; font-size: 0.8rem; 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: #F7F5EF; 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: #fff; border: 1px solid var(--border); min-width: 4.5rem; }
.neoprene-chip span { font-size: 0.65rem; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.neoprene-chip strong { font-family: var(--font-mono); font-size: 1rem; color: var(--text); }
.neoprene-chip.ideal { border-color: var(--teal); background: #EAF3F1; }
.neoprene-chip.ideal strong { color: var(--teal); }
.neoprene-empty { font-size: 0.82rem; color: var(--muted); }

/* Facturación / company settings */
.settings-card { background: #fff; 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: 0.95rem; color: var(--header); 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: 0.9rem; }
.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: #F7F5EF; overflow: hidden; flex-shrink: 0; }
.logo-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.logo-preview .logo-empty { font-size: 0.72rem; 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: #EAF3F1; border: 1px solid var(--teal); border-radius: 8px; padding: 0.6rem 1rem; font-family: var(--font-mono); font-size: 1.1rem; font-weight: 700; color: var(--teal); }
.booking-code-chip button { color: var(--teal); font-size: 0.8rem; font-weight: 600; font-family: var(--font-body); }
.public-link-row { margin-top: 0.5rem; font-size: 0.8rem; 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(--header); }

/* Guides module */
.guia-card { background: #fff; 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: 0.92rem; }
.guia-meta { margin-top: 0.25rem; font-size: 0.8rem; 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: 0.85rem; }
.guia-assign-row .sg-valor { width: 5.5rem; }
.guia-importe { font-family: var(--font-mono); font-weight: 600; color: var(--teal); font-size: 0.85rem; }
.guia-assign-row .sg-remove { color: var(--red); font-size: 0.8rem; margin-left: auto; }

/* Barrancos module */
.barranco-card { background: #fff; 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: 0.92rem; }
.clasificacion-chip { font-family: var(--font-mono); font-size: 0.78rem; background: #F2EEE3; color: var(--header); padding: 0.15rem 0.5rem; border-radius: 4px; }
.barranco-meta { margin-top: 0.3rem; font-size: 0.8rem; }
.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: 0.85rem; padding: 0.5rem 0.7rem; background: #EAF3F1; 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: 0.9rem; }
.recap-meta { margin-top: 0.25rem; font-size: 0.8rem; 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: 0.82rem; 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: 0.85rem; }
.neopreno-assigned { font-size: 0.85rem; font-weight: 600; color: var(--teal); background: #EAF3F1; 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: #F7F5EF; overflow: hidden; flex-shrink: 0; }
.item-foto-preview img { width: 100%; height: 100%; object-fit: cover; }
.item-foto-preview .logo-empty { font-size: 0.68rem; 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: 0.9rem; }
.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: 0.75rem; 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: 0.88rem; }
.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: 0.8rem; }
.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: 0.85rem; 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: 0.9rem; }
.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: 0.75rem; 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: #A3372E; }
.revision-row-meta { color: var(--muted); font-size: 0.82rem; margin-top: 0.15rem; }
.revision-row-obs { margin-top: 0.25rem; }
.pendiente-main { flex: 1; min-width: 160px; font-size: 0.88rem; }
.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: #C1652C; }
.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: 0.85rem; font-weight: 600; }
.salida-cobro-chip.cobrado { background: #E7F2E8; color: #2F5C33; }
.salida-cobro-chip.restante { background: #FDF3E7; color: #7A4A1E; }
.booking-pago-toggle { font-size: 0.75rem; padding: 0.25rem 0.55rem; border-radius: 4px; font-weight: 600; }
.booking-pago-toggle.pagado { background: #E7F2E8; color: #2F5C33; }
.booking-pago-toggle.pendiente { background: #FBEAE8; color: #A3372E; }

/* 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: 0.85rem; padding: 0.35rem 0.6rem; border: 1px solid var(--border); border-radius: 6px; cursor: pointer; background: #fff; }
.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: #fff; padding: 4px; }
.icono-actividad-option img { width: 100%; height: 100%; }
.icono-actividad-option.selected { border-color: #2C7A7B; 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: #fff; }
.actividad-card:hover { border-color: #2C7A7B; }
.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: 1rem; }
.actividad-card-count { font-size: 0.82rem; 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: #fff; }
.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: 0.82rem; }

/* Wetsuit sizing statistics table */
.tallaje-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.tallaje-table th { text-align: left; padding: 0.4rem 0.6rem; border-bottom: 2px solid var(--border); color: var(--muted); font-size: 0.75rem; 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: #fff; }
.conjunto-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; }
.conjunto-card-header strong { font-size: 0.95rem; }
.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: #fff; }
.conjunto-row:hover { border-color: var(--teal); }
.conjunto-rename-row { margin-bottom: 1rem; }
.conjunto-rename-row label { display: block; font-size: 0.85rem; 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: #F2EEE3; padding: 0.25rem 0.5rem; border-radius: 999px; font-size: 0.8rem; }
.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: 0.85rem; }
.inventory-code-tag { font-family: var(--font-mono); font-size: 0.72rem; background: #EAF3F1; color: #2C7A7B; 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: #fff; margin-bottom: 0.4rem; font-size: 0.88rem; 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: 0.72rem; color: transparent; }
.prep-toggle.checked { background: #E7F2E8; border-color: var(--green); }
.prep-toggle.checked .prep-toggle-icon { background: var(--green); border-color: var(--green); color: #fff; }
.prep-toggle.checked .prep-toggle-label { color: #2F5C33; 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: #fff; border: 1px solid var(--border); border-radius: 8px;
  padding: 0.7rem 0.9rem; margin: 1rem 0; font-size: 0.9rem; font-weight: 600;
  color: var(--text); text-align: left;
}
.ajustes-drawer-toggle-btn .drawer-icon { font-size: 1.1rem; 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: #fff; 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: 0.95rem; }
.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: 0.9rem; font-weight: 600; border-radius: 6px;
  color: var(--text); cursor: pointer;
}
.drawer-tab.active { background: var(--teal); color: #fff; }
.drawer-subtab {
  display: block; width: 100%; text-align: left; background: none; border: none;
  padding: 0.6rem 0.9rem 0.6rem 2rem; font-size: 0.83rem; color: var(--muted);
  border-radius: 6px; cursor: pointer;
}
.drawer-subtab.active { background: #EAF3F1; 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: #F7F5EF; 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: #EAF3F1; border-radius: 6px; }
.meteo-day-date { flex: 1; min-width: 140px; font-weight: 600; font-size: 0.88rem; display: flex; align-items: center; gap: 0.4rem; }
.meteo-day-icon { font-size: 1.3rem; }
.meteo-day-temp { font-size: 0.85rem; color: var(--muted); min-width: 70px; }
.meteo-day-rain { font-size: 0.85rem; min-width: 90px; }
.meteo-rain-high { color: #A3372E; 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: #fff; font-size: 0.82rem; font-weight: 600; color: var(--muted); cursor: pointer; }
.calendar-view-btn.active { background: var(--teal); color: #fff; border-color: var(--teal); }
.calendar-nav { display: flex; align-items: center; gap: 0.3rem; }
.calendar-nav .icon-btn { font-size: 1.2rem; padding: 0.2rem 0.6rem; color: var(--text); font-weight: 700; }
.calendar-label { text-align: center; font-family: var(--font-head); font-size: 1rem; 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: 0.68rem; 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: #fff; 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: #EAF3F1; }
.calendar-day-number { font-size: 0.76rem; font-weight: 700; }
.calendar-day-week-item { font-size: 0.68rem; padding: 0.1rem 0.25rem; border-radius: 4px; color: #fff; 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: 0.62rem; 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: 0.82rem; }
.calendar-legend { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 0.6rem; font-size: 0.78rem; 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: #2C7A7B;
  animation: globalLoadingSpin 0.8s linear infinite;
}
@keyframes globalLoadingSpin { to { transform: rotate(360deg); } }
.global-loading-text { color: var(--muted); font-size: 0.85rem; }
.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: #fff; }
.checkin-verificado-check {
  font-size: 3rem;
  line-height: 1;
  margin-bottom: 0.4rem;
  animation: checkinVerificadoPop 0.3s ease;
}
.checkin-verificado-texto { font-size: 1.1rem; 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: #fff;
  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: #fff; font-size: 1.1rem; 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: #fff; font-size: 0.68rem; 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: #fff; border: none; border-radius: 5px; font-size: 0.7rem; padding: 0.15rem 0.35rem; cursor: pointer; }
.media-grid-caption { font-size: 0.68rem; 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: #fff; }
.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: 0.72rem; font-weight: 700; }
.disp-turno-chip { font-size: 0.62rem; padding: 0.12rem 0.2rem; border-radius: 4px; border: 1px solid var(--border); background: #fff; color: var(--muted); cursor: pointer; text-align: center; }
.disp-turno-chip.activo { background: var(--teal); border-color: var(--teal); color: #fff; }
.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: #fff; 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: 0.72rem; 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: 0.68rem; 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: 0.82rem; }
.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: 1.3rem; font-weight: 700; font-family: "Oswald", sans-serif; }
.colab-resumen-label { font-size: 0.68rem; 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: 0.65rem; text-transform: uppercase; color: var(--muted); }
.datos-solo-lectura .dato-item span { font-size: 0.88rem; }
.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: 0.78rem; }
.colab-solicitud-item .colab-solicitud-fecha { color: var(--muted); font-size: 0.68rem; }
.colab-solicitud-item .colab-solicitud-estado { float: right; font-size: 0.65rem; padding: 0.05rem 0.4rem; border-radius: 4px; background: var(--border); }
.colab-solicitud-item .colab-solicitud-estado.atendida { background: var(--teal); color: #fff; }
