: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: 1rem; flex-wrap: wrap; }
.header-inner > div:first-child { flex: 1 1 auto; min-width: 0; }
.app-header h1 { 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; }
.header-actions { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; flex-shrink: 0; }
.lang-switch { display: flex; gap: 2px; background: rgba(255,255,255,0.08); border-radius: 6px; padding: 2px; }
.lang-btn { padding: 0.3rem 0.6rem; font-size: 0.75rem; font-weight: 600; border-radius: 4px; color: var(--header-muted); }
.lang-btn.active { background: var(--teal); color: #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-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; }

/* 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; }

/* 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; }
.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; }
.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; }
.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-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); }
.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-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; }

/* Neoprene assignment column (select + actual-size input) */
.recap-assign-col { display: flex; flex-direction: column; gap: 0.35rem; min-width: 180px; }
.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-members { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.6rem; }
.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; }
.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; 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-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; }
