:root {
  --app-bg: #f5f7fb;
  --card-radius: 1.5rem;
  --shadow-soft: 0 12px 30px rgba(15, 23, 42, 0.08);
}

body {
  background: var(--app-bg);
  color: #111827;
}

.app-shell {
  min-height: 100vh;
  min-height: 100dvh;
  min-height: -webkit-fill-available;
  height: 100vh;
  height: 100dvh;
  height: -webkit-fill-available;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.login-container {
  min-height: 100vh;
  min-height: 100dvh;
  min-height: -webkit-fill-available;
  display: flex;
  align-items: center;
}

.app-badge {
  width: 72px;
  height: 72px;
  border-radius: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  background: linear-gradient(135deg, #0d6efd, #5ba3ff);
  color: #fff;
  box-shadow: var(--shadow-soft);
}

.hero-card {
  background: linear-gradient(135deg, #0d6efd 0%, #2a7fff 100%);
  border-radius: 1.75rem;
  padding: 1.5rem;
  box-shadow: var(--shadow-soft);
}

.section-title {
  font-size: .9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #6b7280;
  margin-bottom: .85rem;
}

.stacked-menu {
  display: grid;
  gap: .9rem;
}

.menu-card {
  text-decoration: none;
  color: inherit;
  background: #fff;
  border-radius: var(--card-radius);
  padding: 1rem 1rem;
  box-shadow: var(--shadow-soft);
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: transform .15s ease, box-shadow .15s ease;
}

.menu-card:hover,
.menu-card:focus {
  transform: translateY(-1px);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.12);
}

.menu-icon {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: #eef4ff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  flex: 0 0 58px;
}

.menu-content {
  flex: 1 1 auto;
  min-width: 0;
}

.menu-title {
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: .2rem;
}

.menu-desc {
  color: #6b7280;
  font-size: .92rem;
}

.menu-arrow {
  font-size: 1.75rem;
  color: #9ca3af;
  line-height: 1;
}

.card, .surface-card {
  box-shadow: var(--shadow-soft);
}

.form-control,
.form-select,
.btn,
.card,
.alert,
.list-group-item,
.badge-soft,
.table {
  border-radius: 1rem !important;
}

.module-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}

.surface-card {
  background: #fff;
  border-radius: 1.5rem;
  padding: 1.25rem;
}

.info-kicker {
  font-size: .78rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  font-weight: 700;
  color: #6b7280;
}

.badge-soft {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .45rem .7rem;
  background: #eef4ff;
  color: #174ea6;
  font-weight: 600;
}

.color-dot {
  width: .9rem;
  height: .9rem;
  border-radius: 999px;
  display: inline-block;
  border: 1px solid rgba(0,0,0,.08);
}

.table-modern thead th {
  font-size: .8rem;
  text-transform: uppercase;
  color: #6b7280;
  border-bottom-width: 1px;
}

.table-modern td,
.table-modern th {
  vertical-align: middle;
}

.inline-actions form {
  display: inline-block;
}

.toolbar {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  align-items: center;
}

.card-title-tight {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: .25rem;
}

.empty-state {
  border: 2px dashed #dbe4f0;
  padding: 1.5rem;
  text-align: center;
  color: #6b7280;
  border-radius: 1.25rem;
}

.stat-chip {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: #f8fafc;
  padding: .5rem .75rem;
  border-radius: 999px;
  font-size: .9rem;
}

@media (max-width: 767.98px) {
  .surface-card {
    padding: 1rem;
  }

  .menu-card {
    padding: .95rem;
  }
}

/* Calendario coordinación — modules/disponibilidad/index.php */
.dispo-page {
  --dispo-gap: 5px;
  --dispo-cell-min-h: 6.25rem;
  --dispo-count-size: 2rem;
}

.dispo-page .dispo-month-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.dispo-page .dispo-month-nav__title {
  flex: 1 1 auto;
  text-align: center;
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.25;
  min-width: 0;
}

.dispo-page .dispo-month-nav__actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.dispo-page .dispo-month-nav__btn {
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0.35rem 0.65rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  line-height: 1;
}

.dispo-page .dispo-layout {
  display: grid;
  gap: 1rem;
}

@media (min-width: 992px) {
  .dispo-page .dispo-layout {
    grid-template-columns: minmax(260px, 300px) minmax(0, 1fr);
    align-items: start;
  }

  .dispo-page .dispo-sidebar {
    position: sticky;
    top: calc(4.5rem + env(safe-area-inset-top, 0px));
  }
}

.dispo-page .dispo-filters details summary {
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  font-size: 0.95rem;
}

.dispo-page .dispo-filters details summary::-webkit-details-marker {
  display: none;
}

.dispo-page .dispo-filters details summary::after {
  content: '▾';
  float: right;
  color: #6c757d;
  font-size: 0.85rem;
}

.dispo-page .dispo-filters details[open] summary::after {
  content: '▴';
}

@media (min-width: 992px) {
  .dispo-page .dispo-filters details summary {
    display: none;
  }

  .dispo-page .dispo-filters details > .dispo-filters__body {
    display: block !important;
  }
}

.dispo-page .dispo-filters .dispo-toolbar,
.dispo-page > form .dispo-toolbar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.dispo-page > form .dispo-toolbar > .flex-grow-1 {
  grid-column: 1 / -1;
}

.dispo-page > form .dispo-toolbar > button[type="submit"] {
  grid-column: 1 / -1;
}

@media (min-width: 992px) {
  .dispo-page > form .dispo-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
  }

  .dispo-page > form .dispo-toolbar > .flex-grow-1,
  .dispo-page > form .dispo-toolbar > button[type="submit"] {
    grid-column: auto;
  }
}

.dispo-page .dispo-toolbar .dispo-field--volunteer {
  grid-column: 1 / -1;
}

.dispo-page .dispo-toolbar .dispo-field--submit {
  grid-column: 1 / -1;
}

@media (min-width: 576px) {
  .dispo-page .dispo-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.dispo-page .dispo-view-toggle .btn {
  min-height: 2.5rem;
}

.dispo-page .dispo-view-toggle .dispo-view-label-long {
  display: none;
}

.dispo-page .dispo-view-toggle .dispo-view-label-short {
  display: inline;
}

@media (min-width: 768px) {
  .dispo-page .dispo-view-toggle .dispo-view-label-long {
    display: inline;
  }

  .dispo-page .dispo-view-toggle .dispo-view-label-short {
    display: none;
  }
}

.dispo-page .dispo-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.85rem;
  font-size: 0.82rem;
}

.dispo-page .dispo-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}

.dispo-page .dispo-legend-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dispo-page .dispo-cal-scroller {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -0.25rem;
  padding: 0 0.25rem 0.35rem;
}

.dispo-page .dispo-scroll-hint {
  font-size: 0.75rem;
  color: #6c757d;
  text-align: center;
  margin-bottom: 0.5rem;
}

@media (min-width: 768px) {
  .dispo-page .dispo-scroll-hint {
    display: none;
  }
}

.dispo-page .dispo-cal-wrap {
  width: 100%;
  max-width: none;
  margin: 0;
  min-width: min(100%, 36rem);
}

.dispo-page .dispo-cal-wrap--extended {
  min-width: min(100%, 52rem);
}

.dispo-page .dispo-cal {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: var(--dispo-gap);
}

.dispo-page .dispo-cal-head {
  display: contents;
}

.dispo-page .dispo-cal-dow {
  position: sticky;
  top: 0;
  z-index: 2;
  font-size: 0.7rem;
  font-weight: 700;
  text-align: center;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.35rem 0;
  line-height: 1.2;
  background: #fff;
  border-bottom: 1px solid #eef2f7;
}

.dispo-page .dispo-cal-cell {
  border: 1px solid #e2e8f0;
  border-radius: 0.65rem;
  background: #fff;
  min-height: var(--dispo-cell-min-h);
  display: flex;
  flex-direction: column;
  padding: 0.35rem 0.4rem 0.45rem;
  box-sizing: border-box;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

@media (hover: hover) {
  .dispo-page .dispo-cal-cell:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
  }
}

.dispo-page .dispo-cal-cell.is-outside {
  opacity: 0.45;
  background: #f8fafc;
}

.dispo-page .dispo-cal-cell.is-today {
  border-color: #0d6efd;
  box-shadow: inset 0 0 0 1px rgba(13, 110, 253, 0.35);
  background: #f8fbff;
}

.dispo-page .dispo-cal-daynum {
  font-size: 0.88rem;
  font-weight: 800;
  text-align: center;
  line-height: 1.15;
  flex-shrink: 0;
  margin-bottom: 0.2rem;
}

.dispo-page .dispo-period-rows {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.35rem;
  flex: 1;
  min-height: 0;
}

.dispo-page .dispo-period-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  font-size: 0.72rem;
  line-height: 1.2;
  min-width: 0;
}

.dispo-page .dispo-period-name {
  flex: 0 0 auto;
  min-width: 1.1rem;
  font-weight: 700;
  font-size: 0.78rem;
  color: #495057;
}

.dispo-page .dispo-period-placeholder {
  flex-shrink: 0;
  width: var(--dispo-count-size);
  height: var(--dispo-count-size);
  visibility: hidden;
  pointer-events: none;
}

.dispo-page .dispo-count-btn {
  flex-shrink: 0;
  width: var(--dispo-count-size);
  height: var(--dispo-count-size);
  padding: 0;
  margin: 0;
  border-radius: 50%;
  background: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #212529;
  touch-action: manipulation;
}

.dispo-page .dispo-count-btn:focus-visible {
  outline: 2px solid #0d6efd;
  outline-offset: 2px;
}

.dispo-page .dispo-count-btn.dispo-count-btn--plus {
  font-size: 1.1rem;
}

.dispo-page .dispo-cal-wrap--extended .dispo-cal-cell--extended {
  min-height: 8rem;
  max-height: 22rem;
}

.dispo-page .dispo-ext-rows {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.dispo-page .dispo-ext-slot {
  font-size: 0.68rem;
  line-height: 1.25;
  border-top: 1px solid #eef2f7;
  padding-top: 0.35rem;
  margin-top: 0.2rem;
}

.dispo-page .dispo-ext-slot:first-child {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

.dispo-page .dispo-ext-slot-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  font-weight: 700;
  color: #495057;
  margin-bottom: 0.15rem;
}

.dispo-page .dispo-ext-slot-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dispo-page .dispo-ext-vol {
  margin: 0;
  padding-left: 0.75rem;
  font-size: 0.65rem;
}

.dispo-page .dispo-ext-vol li {
  margin-bottom: 0.15rem;
}

.dispo-page .dispo-modal-row + .dispo-modal-row {
  border-top: 1px solid #eef2f7;
  padding-top: 0.75rem;
  margin-top: 0.75rem;
}

@media (min-width: 576px) {
  .dispo-page {
    --dispo-cell-min-h: 6.75rem;
    --dispo-count-size: 2.15rem;
  }
}

@media (min-width: 768px) {
  .dispo-page {
    --dispo-gap: 6px;
    --dispo-cell-min-h: 7.25rem;
  }

  .dispo-page .dispo-cal-wrap {
    min-width: 100%;
  }
}

@media (min-width: 1200px) {
  .dispo-page {
    --dispo-cell-min-h: 7.75rem;
    --dispo-count-size: 2.25rem;
  }

  .dispo-page .dispo-cal-wrap--extended .dispo-cal-cell--extended {
    min-height: 9rem;
  }
}

@media (max-width: 767.98px) {
  .dispo-page {
    --dispo-gap: 3px;
    --dispo-cell-min-h: 4.85rem;
    --dispo-count-size: 1.7rem;
  }

  .dispo-page .dispo-cal-scroller {
    margin-left: calc(-1 * var(--bs-gutter-x, 0.75rem) * 0.5);
    margin-right: calc(-1 * var(--bs-gutter-x, 0.75rem) * 0.5);
    padding-left: calc(var(--bs-gutter-x, 0.75rem) * 0.5);
    padding-right: calc(var(--bs-gutter-x, 0.75rem) * 0.5);
  }

  .dispo-page .dispo-cal-wrap {
    min-width: 100%;
  }

  .dispo-page .dispo-cal-wrap--extended {
    min-width: 36rem;
  }

  .dispo-page .dispo-cal-dow {
    font-size: 0.58rem;
    letter-spacing: -0.02em;
    padding: 0.2rem 0;
  }

  .dispo-page .dispo-cal-cell {
    padding: 0.22rem 0.18rem 0.28rem;
    border-radius: 0.45rem;
  }

  .dispo-page .dispo-cal-daynum {
    font-size: 0.76rem;
    margin-bottom: 0.12rem;
  }

  .dispo-page .dispo-period-line {
    font-size: 0.62rem;
    gap: 0.2rem;
  }

  .dispo-page .dispo-period-name {
    font-size: 0.64rem;
    min-width: 0.85rem;
  }

  .dispo-page .dispo-period-rows {
    gap: 0.22rem;
  }

  .dispo-page .dispo-cal-wrap--extended .dispo-cal-cell--extended {
    min-height: 6.25rem;
    max-height: 13rem;
  }

  .dispo-page .dispo-ext-slot {
    font-size: 0.6rem;
  }

  .dispo-page .dispo-ext-slot-head {
    gap: 0.2rem;
  }

  .dispo-page .dispo-month-nav__title {
    font-size: 0.92rem;
  }

  .dispo-page > form .dispo-toolbar .d-flex.ms-auto {
    margin-left: 0 !important;
    width: 100%;
    justify-content: flex-start;
  }

  .dispo-page > form .dispo-toolbar .btn-group {
    flex: 1 1 auto;
  }

  .dispo-page > form .dispo-toolbar .btn-group .btn {
    flex: 1 1 0;
    padding-left: 0.35rem;
    padding-right: 0.35rem;
  }
}

/* Dashboard — dashboard.php */
.dashboard-page {
  max-width: 920px;
  margin-left: auto;
  margin-right: auto;
}

.dashboard-kpis {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.dashboard-section-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b7280;
  margin: 1.25rem 0 0.65rem;
}

.dashboard-section-title:first-of-type {
  margin-top: 0;
}

/* Servicios — modules/servicios/index.php */
.servicios-index-hero {
  background: #fff;
  border: 1px solid #e6edf5;
  border-radius: 1.15rem;
  box-shadow: 0 0.35rem 1.2rem rgba(15, 23, 42, 0.06);
  padding: 1rem;
}

.servicios-index-hero__top {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  justify-content: space-between;
}

.servicios-index-hero__title-wrap {
  align-items: center;
  display: flex;
  gap: 0.75rem;
  min-width: 14rem;
}

.servicios-index-hero__icon {
  align-items: center;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  border-radius: 0.9rem;
  display: flex;
  flex: 0 0 2.9rem;
  font-size: 1.45rem;
  height: 2.9rem;
  justify-content: center;
  width: 2.9rem;
}

.servicios-index-hero__tenant {
  color: #6b7280;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.servicios-index-hero__title {
  color: #0f172a;
  font-size: clamp(1.25rem, 2.2vw, 1.65rem);
  font-weight: 800;
  line-height: 1.1;
  margin: 0.05rem 0 0.15rem;
}

.servicios-index-hero__subtitle {
  color: #64748b;
  font-size: 0.86rem;
  margin: 0;
  max-width: 42rem;
}

.servicios-index-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.servicios-stat-card {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e6edf5;
  border-radius: 0.9rem;
  display: flex;
  gap: 0.75rem;
  height: 100%;
  justify-content: space-between;
  padding: 0.75rem 0.85rem;
}

.servicios-stat-card__label {
  color: #6b7280;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.servicios-stat-card__value {
  font-size: 1.35rem;
  font-weight: 850;
  line-height: 1.1;
  margin: 0;
}

.servicios-stat-card__hint {
  color: #64748b;
  font-size: 0.8rem;
  margin-top: 0.1rem;
}

.servicios-list-panel > .card-body {
  padding: 1.1rem;
}

.servicios-quick-views {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.servicios-quick-views__label {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  margin-right: 0.15rem;
  text-transform: uppercase;
}

.servicios-filter-form {
  background: #f9fbfd;
  border: 1px solid #e5edf7;
  border-radius: 0.95rem;
  padding: 0.75rem;
}

.servicios-form-card > .card-body {
  padding: 1rem;
}

.servicios-form .form-label {
  color: #475569;
  font-size: 0.78rem;
  font-weight: 800;
  margin-bottom: 0.3rem;
}

.servicios-form .form-control,
.servicios-form .form-select {
  border-radius: 0.75rem !important;
  min-height: 2.45rem;
  padding-bottom: 0.42rem;
  padding-top: 0.42rem;
}

.servicios-form textarea.form-control {
  min-height: auto;
}

.servicios-form-section {
  background: #f8fafc;
  border: 1px solid #e5edf7;
  border-radius: 1rem;
  padding: 0.8rem;
}

.servicios-form-section__title {
  color: #0f172a;
  font-size: 0.86rem;
  font-weight: 850;
  margin-bottom: 0.55rem;
}

.servicio-datetime-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.95rem;
  padding: 0.7rem;
}

.servicio-datetime-card__row {
  align-items: center;
  display: grid;
  gap: 0.5rem;
  grid-template-columns: minmax(0, 1fr) minmax(6.5rem, 8rem);
}

.servicio-datetime-input {
  font-size: 0.9rem;
  min-height: 2.35rem !important;
}

.servicio-slot-select {
  border-radius: 0.7rem !important;
  font-size: 0.82rem;
  min-height: 2.35rem;
}

.servicio-map-preview-wrap {
  position: relative;
}

.servicio-map-preview {
  height: 280px;
  min-height: 280px;
  pointer-events: none;
}

.servicio-map-preview.leaflet-container {
  height: 280px !important;
  min-height: 280px !important;
}

.servicio-map-preview-empty {
  align-items: center;
  background: #f8fafc;
  color: #64748b;
  display: flex;
  flex-direction: column;
  font-size: 0.88rem;
  gap: 0.35rem;
  height: 280px;
  justify-content: center;
  min-height: 280px;
  padding: 1rem;
  text-align: center;
}

.servicio-map-preview-edit-btn {
  bottom: 0.75rem;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.15);
  position: absolute;
  right: 0.75rem;
  z-index: 500;
}

.servicio-map-modal .modal-dialog {
  max-height: 100dvh;
}

.servicio-map-modal .modal-content {
  display: flex;
  flex-direction: column;
  max-height: min(100dvh, 100%);
  overflow: hidden;
}

.servicio-map-modal .modal-header {
  flex: 0 0 auto;
  position: relative;
  z-index: 20;
  background: #fff;
}

.servicio-map-modal .servicio-map-editor {
  display: block;
  flex: 1 1 auto;
  height: min(38vh, 18rem);
  min-height: 12rem;
  max-height: 38vh;
  position: relative;
  width: 100%;
  z-index: 1;
}

.servicio-map-modal .servicio-map-editor.leaflet-container {
  height: min(38vh, 18rem) !important;
  min-height: 12rem !important;
  max-height: 38vh !important;
  width: 100% !important;
}

.servicio-map-modal .modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

#servicio-affected-preview-text {
  white-space: pre-line;
}

.servicio-map-modal .leaflet-control-layers {
  z-index: 1000;
}

.servicio-map-base-picker {
  background: #f8fafc;
  border: 1px dashed #dbe3ef;
  border-radius: 0.85rem;
  padding: 0.55rem 0.75rem;
}

.servicio-map-base-picker .form-select {
  min-width: 11rem;
}

.servicio-map-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: -0.25rem 0 0.65rem;
}

.servicio-map-layers {
  background: #f8fafc;
}

.servicio-map-layers__head {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: space-between;
  margin-bottom: 0.35rem;
}

.servicio-map-layers__head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.servicio-map-layers__types {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.servicio-map-layers__type-btn {
  align-items: center;
  display: inline-flex;
  gap: 0.35rem;
  padding: 0.25rem 0.55rem;
}

.servicio-map-layers__type-btn.active {
  background: #e7f1ff;
  border-color: #0d6efd;
  color: #0d6efd;
}

.servicio-map-icon {
  align-items: center;
  border: 3px solid #fff;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.28);
  color: #fff;
  display: inline-flex;
  font-size: 1.1rem;
  height: 2.15rem;
  justify-content: center;
  line-height: 1;
  width: 2.15rem;
}

.servicio-map-icon--lg {
  font-size: 1.45rem;
  height: 2.65rem;
  width: 2.65rem;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.38);
}

.servicio-map-service-point {
  background: #dc3545;
  border: 3px solid #fff;
  border-radius: 999px;
  box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.45), 0 2px 8px rgba(15, 23, 42, 0.35);
  display: block;
  height: 22px;
  width: 22px;
}

.servicio-map-service-point--lg {
  height: 30px;
  width: 30px;
}

.servicio-map-icon-label {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 0.3rem;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.22);
  color: #212529;
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1.15;
  margin-top: 3px;
  max-width: 6rem;
  overflow: hidden;
  padding: 2px 5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.servicio-map-icon-label--lg {
  font-size: 0.72rem;
  max-width: 7rem;
}

.servicio-map-leaflet-marker--lg {
  z-index: 650 !important;
}

.servicio-map-layers__type-icon,
.servicio-map-layers__item-icon {
  align-items: center;
  border: 2px solid #fff;
  border-radius: 999px;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.18);
  color: #fff;
  display: inline-flex;
  font-size: 0.95rem;
  height: 1.75rem;
  justify-content: center;
  width: 1.75rem;
}

.servicio-map-layers__type-name {
  font-size: 0.72rem;
  font-weight: 600;
}

.servicio-map-layers__toggles {
  border-top: 1px dashed #dbe3ef;
  padding-top: 0.45rem;
}

.servicio-map-layers__toggle .form-check-label {
  font-size: 0.78rem;
}

.servicio-map-layers__list {
  border-top: 1px dashed #dbe3ef;
  margin-top: 0.45rem;
  max-height: 8.5rem;
  overflow-y: auto;
  padding-top: 0.45rem;
}

.servicio-map-layers__item {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.45rem;
  margin-bottom: 0.35rem;
}

.servicio-map-layers__item-text {
  flex: 1 1 auto;
  font-size: 0.78rem;
  min-width: 8rem;
}

.servicio-map-vol-picker,
.servicio-map-capa-edit-panel {
  background: #fff;
}

.servicio-map-vol-picker {
  border: 1px dashed #bfdbfe;
  border-radius: 0.75rem;
  padding: 0.55rem 0.65rem;
}

.servicio-map-capa-edit-panel {
  background: #f0fdf4;
  border-color: #bbf7d0 !important;
}

.servicio-map-leaflet-marker {
  background: transparent !important;
  border: none !important;
}

.servicio-map-marker-wrap {
  align-items: center;
  display: flex;
  flex-direction: column;
  pointer-events: none;
  text-align: center;
}

.servicio-address-suggestion {
  align-items: flex-start;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 0.9rem;
  color: #1e3a8a;
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
  margin-bottom: 0.7rem;
  padding: 0.7rem 0.8rem;
}

.servicio-address-suggestion__text {
  color: #334155;
  font-size: 0.82rem;
  line-height: 1.35;
  margin-top: 0.15rem;
}

.servicio-affected-preview {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 0.85rem;
  color: #334155;
  font-size: 0.82rem;
  line-height: 1.4;
  margin-bottom: 0.75rem;
  padding: 0.65rem 0.75rem;
}

.servicio-map-canvas {
  background: #eef2f7;
  display: block;
  height: 420px;
  min-height: 420px;
  overflow: hidden;
  width: 100%;
  z-index: 1;
}

#servicio-map.servicio-map-canvas.leaflet-container,
.servicio-map-canvas.leaflet-container {
  font: inherit;
  height: 420px !important;
  min-height: 420px !important;
  width: 100%;
}

.servicio-map-editor {
  background: #eef2f7;
  display: block;
  height: 420px;
  min-height: 420px;
  overflow: hidden;
  width: 100%;
  z-index: 1;
}

.servicio-map-editor.leaflet-container {
  font: inherit;
  height: 420px !important;
  min-height: 420px !important;
  width: 100%;
}

.servicio-map-inline-editor {
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.03);
}

/* Bootstrap modal stacking defaults (do not raise backdrop globally). */
.modal {
  z-index: 1055;
}
.modal-backdrop {
  z-index: 1050;
}

/* Servicio map modal: elevated only while .show (no :has() needed).
   Backdrop elevation uses .servicio-map-backdrop class set via JS on open. */
.servicio-map-modal.show {
  z-index: 3000;
}
.modal-backdrop.servicio-map-backdrop {
  z-index: 2990;
}

.servicio-map-editor-footer {
  align-items: center;
  background: #fff;
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0;
  padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
  position: relative;
  z-index: 30;
  box-shadow: 0 -6px 16px rgba(15, 23, 42, 0.08);
}

body.servicio-map-modal-open .app-bottom-nav {
  display: none !important;
}

@media (max-width: 575.98px) {
  .servicios-form-card > .card-body {
    padding: 0.85rem;
  }

  .servicio-datetime-card__row {
    grid-template-columns: 1fr;
  }

  .servicio-address-suggestion {
    display: block;
  }

  .servicio-address-suggestion .btn {
    margin-top: 0.55rem;
    width: 100%;
  }

  .servicio-map-modal .servicio-map-editor,
  .servicio-map-modal .servicio-map-editor.leaflet-container {
    height: min(32vh, 14rem) !important;
    min-height: 10rem !important;
    max-height: 32vh !important;
  }

  .servicio-map-editor {
    height: min(32vh, 14rem);
    min-height: 10rem;
  }

  .servicio-map-canvas {
    height: 220px;
    min-height: 220px;
  }
}

.servicio-list-card {
  --servicio-accent: #0d6efd;
  --servicio-card-bg: #ffffff;
  --servicio-card-border: #dbeafe;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.94)),
    var(--servicio-card-bg);
  border: 1px solid var(--servicio-card-border);
  border-radius: 1rem;
  box-shadow: 0 0.55rem 1.35rem rgba(15, 23, 42, 0.08);
  overflow: hidden;
  padding: 1rem;
  position: relative;
}

.servicio-list-card + .servicio-list-card {
  margin-top: 0.25rem;
}

.servicio-list-card--primary {
  --servicio-card-bg: #eaf3ff;
  --servicio-card-border: #b8d7ff;
}

.servicio-list-card--warning {
  --servicio-card-bg: #fff4d6;
  --servicio-card-border: #ffd76a;
}

.servicio-list-card--success {
  --servicio-card-bg: #e9f8ef;
  --servicio-card-border: #a7dfba;
}

.servicio-list-card--muted {
  --servicio-card-bg: #f1f5f9;
  --servicio-card-border: #cbd5e1;
}

.servicio-list-card--draft {
  --servicio-card-bg: #f8fafc;
  --servicio-card-border: #d8e1ec;
}

.servicio-list-card::before {
  background: var(--servicio-accent);
  bottom: 0;
  content: "";
  left: 0;
  position: absolute;
  top: 0;
  width: 0.28rem;
}

.servicio-list-card__main {
  min-width: 13rem;
}

.servicio-list-card__head {
  align-items: center;
  display: flex;
  gap: 0.75rem;
}

.servicio-list-card__icon {
  align-items: center;
  background: #fff;
  border: 1px solid var(--servicio-card-border);
  border-radius: 0.85rem;
  display: flex;
  flex: 0 0 2.75rem;
  font-size: 1.35rem;
  height: 2.75rem;
  justify-content: center;
  width: 2.75rem;
}

.servicio-list-card__type {
  color: #64748b;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.servicio-list-card__title {
  color: #111827;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.2;
  margin: 0;
}

.servicio-list-card__date {
  color: #64748b;
  font-size: 0.88rem;
  font-weight: 600;
  margin: 0.65rem 0 0;
}

.servicio-list-card__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.5rem;
}

.servicio-list-card__coverage {
  align-items: stretch;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 11rem;
}

@media (max-width: 575.98px) {
  .servicios-index-hero {
    padding: 0.85rem;
  }

  .servicios-index-hero__icon {
    flex-basis: 2.75rem;
    font-size: 1.45rem;
    height: 2.75rem;
    width: 2.75rem;
  }

  .servicios-index-hero__actions,
  .servicios-index-hero__actions .btn,
  .servicio-list-card__coverage,
  .servicio-list-card__coverage .btn {
    width: 100%;
  }

  .servicio-list-card__head {
    align-items: flex-start;
  }
}

.dashboard-menu-grid {
  display: grid;
  gap: 0.75rem;
}

/* Chat — modules/chat/index.php */
.chat-page {
  max-width: 1180px;
}

.chat-shell {
  background: #fff;
  border: 1px solid #e5edf7;
  border-radius: 1rem;
  box-shadow: 0 1rem 2.5rem rgba(15, 23, 42, 0.08);
  display: grid;
  grid-template-columns: minmax(15rem, 19.5rem) 1fr;
  min-height: min(76vh, 820px);
  overflow: hidden;
}

.chat-sidebar {
  background: #f8fafc;
  border-right: 1px solid #eef2f6;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 1rem 0.85rem;
}

.chat-sidebar__header {
  align-items: flex-start;
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.chat-channel-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  overflow: auto;
  padding: 0.1rem 0.15rem 0.35rem;
}

.chat-channel {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 1.05rem;
  box-shadow: 0 0.35rem 0.9rem rgba(15, 23, 42, 0.06);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 4.35rem;
  padding: 0.75rem 2.85rem 0.75rem 0.75rem;
  position: relative;
  text-align: left;
  width: 100%;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.chat-channel:hover {
  background: #f9fbff;
  border-color: #bfdbfe;
  box-shadow: 0 0.55rem 1.1rem rgba(15, 23, 42, 0.09);
  transform: translateY(-1px);
}

.chat-channel--active {
  background: linear-gradient(135deg, #ecfdf5 0%, #e0f2fe 100%);
  border-color: #22c55e;
  box-shadow: 0 0.65rem 1.35rem rgba(34, 197, 94, 0.16);
}

.chat-channel__avatar {
  align-items: center;
  background: #eef2ff;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  color: #1d4ed8;
  display: flex;
  flex: 0 0 2.65rem;
  font-size: 1.18rem;
  height: 2.65rem;
  justify-content: center;
  width: 2.65rem;
}

.chat-channel--active .chat-channel__avatar {
  background: #25d366;
  border-color: #22c55e;
  color: #fff;
}

.chat-channel__body {
  display: grid;
  gap: 0.05rem;
  min-width: 0;
}

.chat-channel__name {
  color: #111827;
  display: block;
  font-size: 1rem;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-channel__meta {
  color: #64748b;
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.chat-channel--active .chat-channel__name {
  color: #064e3b;
}

.chat-channel--active .chat-channel__meta {
  color: #047857;
}

.chat-channel__unread {
  align-items: center;
  background: #25d366;
  box-shadow: 0 0.25rem 0.6rem rgba(37, 211, 102, 0.28);
  border-radius: 999px;
  color: #fff;
  display: flex;
  font-size: 0.72rem;
  font-weight: 800;
  height: 1.45rem;
  justify-content: center;
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  min-width: 1.45rem;
}

.chat-panel {
  background: #efeae2;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.chat-panel__header {
  align-items: center;
  background: #f0f2f5;
  border-bottom: 1px solid #dde4ec;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: 1rem;
}

.chat-messages {
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.45) 0 1px, transparent 1px 18px),
    linear-gradient(180deg, #efeae2 0%, #e8ded2 100%);
  flex: 1 1 auto;
  min-height: 18rem;
  overflow: auto;
  padding: 1rem 1.25rem;
}

.chat-empty--inside {
  min-height: 100%;
}

.chat-msg {
  display: flex;
  margin-bottom: 0.45rem;
  padding-left: 0.65rem;
  padding-right: 3rem;
}

.chat-msg--mine {
  justify-content: flex-end;
  padding-left: 3rem;
  padding-right: 0.65rem;
}

.chat-msg__bubble {
  background: #fff;
  border: 0;
  border-radius: 0.25rem 1rem 1rem 1rem;
  box-shadow: 0 1px 1px rgba(11, 20, 26, 0.18);
  display: inline-block;
  max-width: min(32rem, 100%);
  min-width: 3.25rem;
  padding: 0.48rem 0.65rem 0.34rem;
  position: relative;
  width: fit-content;
}

.chat-msg__bubble::before {
  border-bottom: 0.62rem solid transparent;
  border-right: 0.72rem solid #fff;
  content: "";
  height: 0;
  left: -0.58rem;
  position: absolute;
  top: 0;
  width: 0;
}

.chat-msg--mine .chat-msg__bubble {
  background: #d9fdd3;
  border-radius: 1rem 0.25rem 1rem 1rem;
}

.chat-msg--mine .chat-msg__bubble::before {
  border-left: 0.72rem solid #d9fdd3;
  border-right: 0;
  left: auto;
  right: -0.58rem;
}

.chat-msg__author {
  border-bottom: 1px solid rgba(7, 94, 84, 0.16);
  color: #075e54;
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.15;
  margin-bottom: 0.22rem;
  padding-bottom: 0.15rem;
}

.chat-msg--mine .chat-msg__author {
  display: none;
}

.chat-msg__text {
  color: #111b21;
  font-size: 0.93rem;
  line-height: 1.32;
  white-space: normal;
  word-break: break-word;
}

.chat-msg__image-link {
  display: block;
  margin-bottom: 0.35rem;
}

.chat-msg__image {
  border-radius: 0.45rem;
  display: block;
  height: auto;
  max-height: 11rem;
  max-width: min(12rem, 100%);
  object-fit: contain;
}

.chat-msg__time {
  color: #667781;
  font-size: 0.56rem;
  line-height: 1;
  margin-left: 0.65rem;
  margin-top: 0.2rem;
  text-align: right;
}

.chat-msg__delete {
  background: transparent;
  border: 0;
  color: #991b1b;
  display: block;
  font-size: 0.62rem;
  font-weight: 800;
  margin-left: auto;
  margin-top: 0.22rem;
  padding: 0;
}

.chat-msg__delete:hover {
  text-decoration: underline;
}

.chat-compose {
  align-items: flex-end;
  background: #f0f2f5;
  border-top: 1px solid #dde4ec;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.7rem;
}

.chat-photo-preview {
  align-items: center;
  align-self: stretch;
  background: #fff;
  border: 1px solid #dfe7ef;
  border-radius: 0.95rem;
  display: flex;
  gap: 0.55rem;
  padding: 0.35rem 0.45rem;
}

.chat-photo-preview img {
  border-radius: 0.7rem;
  flex: 0 0 3rem;
  height: 3rem;
  max-height: 3rem;
  max-width: 3rem;
  object-fit: cover;
  width: 3rem;
}

.chat-photo-preview__name {
  color: #334155;
  flex: 1 1 auto;
  font-size: 0.82rem;
  font-weight: 700;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-photo-preview__remove {
  align-items: center;
  background: #fee2e2;
  border: 0;
  border-radius: 999px;
  color: #991b1b;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 1.25rem;
  font-weight: 800;
  height: 2rem;
  justify-content: center;
  line-height: 1;
  width: 2rem;
}

.chat-compose__box {
  align-items: flex-end;
  background: #fff;
  border: 1px solid #dfe7ef;
  border-radius: 1.35rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  display: flex;
  gap: 0.45rem;
  padding: 0.28rem 0.35rem 0.28rem 0.85rem;
  width: 100%;
}

.chat-compose textarea {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  flex: 1 1 auto;
  max-height: 9rem;
  min-height: 2.4rem;
  padding: 0.55rem 0.25rem 0.45rem 0;
  resize: none;
}

.chat-compose textarea:focus {
  box-shadow: none;
}

.chat-compose__actions {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  gap: 0.3rem;
  padding-bottom: 0.05rem;
}

.chat-compose__icon {
  align-items: center;
  background: #eef2f7;
  border: 0;
  border-radius: 999px;
  color: #475569;
  display: inline-flex;
  height: 2.15rem;
  justify-content: center;
  padding: 0;
  width: 2.15rem;
}

.chat-compose__icon:hover,
.chat-compose__icon.btn-secondary {
  background: #dbeafe;
  color: #0d6efd;
}

.chat-compose__send {
  border-radius: 999px;
  font-weight: 700;
  min-height: 2.15rem;
  padding: 0.35rem 0.85rem;
}

.chat-compose--disabled {
  opacity: 0.72;
}

.chat-photo-btn {
  flex: 0 0 auto;
}

.chat-empty {
  align-items: center;
  color: #64748b;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 0.5rem;
  justify-content: center;
  padding: 2rem;
  text-align: center;
}

@media (max-width: 767.98px) {
  .chat-shell {
    height: calc(100dvh - 8.25rem);
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    min-height: 30rem;
    overflow: hidden;
  }

  .chat-sidebar {
    border-bottom: 1px solid #e5edf7;
    border-right: 0;
    max-height: 10.5rem;
    padding: 0.75rem;
  }

  .chat-channel-list {
    flex-direction: row;
    overflow-x: auto;
    padding: 0.15rem 0.1rem 0.35rem;
  }

  .chat-channel {
    flex: 0 0 13.75rem;
    min-height: 4.1rem;
  }

  .chat-messages {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 0.75rem;
  }

  .chat-compose {
    flex: 0 0 auto;
    position: relative;
    z-index: 2;
  }
}

@media (min-width: 576px) {
  .dashboard-menu-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
  }
}

@media (min-width: 992px) {
  .dashboard-menu-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.dashboard-page .menu-card {
  height: 100%;
  margin: 0;
}

.dashboard-fichaje-kpi {
  border-radius: 1rem;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-left-width: 6px;
  transition: box-shadow 0.15s ease;
}

.dashboard-page a:hover .dashboard-fichaje-kpi,
.dashboard-page a:hover .dashboard-servicios-kpi {
  box-shadow: 0 0.35rem 1rem rgba(15, 23, 42, 0.1);
}

.dashboard-fichaje-kpi--active {
  border-left-color: #198754;
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
}

.dashboard-fichaje-kpi--pause {
  border-left-color: #fd7e14;
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
}

.dashboard-fichaje-kpi--off {
  border-left-color: #dc3545;
  background: linear-gradient(135deg, #fff5f5 0%, #fef2f2 100%);
}

.dashboard-fichaje-kpi--unknown {
  border-left-color: #6c757d;
  background: #f8f9fa;
}

.dashboard-fichaje-kpi__dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 0.35rem;
}

.dashboard-fichaje-kpi--active .dashboard-fichaje-kpi__dot {
  background: #198754;
  box-shadow: 0 0 0 3px rgba(25, 135, 84, 0.25);
}

.dashboard-fichaje-kpi--pause .dashboard-fichaje-kpi__dot {
  background: #fd7e14;
  box-shadow: 0 0 0 3px rgba(253, 126, 20, 0.25);
}

.dashboard-fichaje-kpi--off .dashboard-fichaje-kpi__dot {
  background: #dc3545;
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.2);
}

.dashboard-fichaje-kpi--unknown .dashboard-fichaje-kpi__dot {
  background: #6c757d;
}

.dashboard-servicios-kpi {
  border-radius: 1rem;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-left-width: 6px;
  border-left-color: #0d6efd;
  background: linear-gradient(135deg, #f0f7ff 0%, #e8f1ff 100%);
  transition: box-shadow 0.15s ease;
}

.dashboard-servicios-kpi__item + .dashboard-servicios-kpi__item {
  border-top: 1px dashed rgba(13, 110, 253, 0.2);
}

.dashboard-com-pend {
  border-radius: 1rem;
  border: 2px solid #dc3545;
  background: linear-gradient(135deg, #fff5f5 0%, #ffe8e8 45%, #fff0f0 100%);
  animation: dashboard-com-pend-glow 1.8s ease-in-out infinite;
}

@keyframes dashboard-com-pend-glow {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.55), 0 0.35rem 1rem rgba(220, 53, 69, 0.12);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(220, 53, 69, 0), 0 0.5rem 1.35rem rgba(220, 53, 69, 0.22);
  }
}

.dashboard-com-pend__beacon {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #dc3545;
  flex-shrink: 0;
  margin-top: 0.35rem;
  animation: dashboard-com-pend-blink 1s step-end infinite;
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.35);
}

@keyframes dashboard-com-pend-blink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.25; transform: scale(0.92); }
}

.dashboard-com-pend__item + .dashboard-com-pend__item {
  border-top: 1px dashed rgba(220, 53, 69, 0.22);
}

/* Dashboard — personal en servicio (admin asociación) */
.dashboard-staff-on-duty {
  border-radius: 1rem;
  border: 1px solid rgba(25, 135, 84, 0.25);
  background: linear-gradient(135deg, #f8fffb 0%, #fff 55%);
  overflow: hidden;
}

.dashboard-staff-on-duty__pulse {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 0.35rem;
  background: #198754;
  box-shadow: 0 0 0 4px rgba(25, 135, 84, 0.28);
  animation: dashboard-staff-pulse 1.6s ease-in-out infinite;
}

@keyframes dashboard-staff-pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.65;
    transform: scale(0.92);
  }
}

.dashboard-staff-on-duty__pulse--tick {
  animation: dashboard-staff-pulse-tick 0.6s ease-out;
}

@keyframes dashboard-staff-pulse-tick {
  0% {
    box-shadow: 0 0 0 4px rgba(25, 135, 84, 0.28);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(25, 135, 84, 0.45);
    transform: scale(1.15);
  }
  100% {
    box-shadow: 0 0 0 4px rgba(25, 135, 84, 0.28);
    transform: scale(1);
  }
}

.dashboard-staff-on-duty__list {
  max-height: min(50vh, 420px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.dashboard-staff-on-duty__item + .dashboard-staff-on-duty__item {
  border-top: 1px solid #eef2f7;
}

.dashboard-staff-on-duty__item-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dashboard-staff-on-duty__item-dot--active {
  background: #198754;
}

.dashboard-staff-on-duty__item-dot--pause {
  background: #fd7e14;
}

@media (prefers-reduced-motion: reduce) {
  .dashboard-staff-on-duty__pulse {
    animation: none;
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dashboard-com-pend {
    animation: none;
    box-shadow: 0 0.35rem 1rem rgba(220, 53, 69, 0.15);
  }
  .dashboard-com-pend__beacon {
    animation: none;
    opacity: 1;
  }
}

/* Global app layout */
.app-page {
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}

.app-flash-wrap {
  padding-top: 0.5rem;
  padding-bottom: 0.35rem;
}

.trial-banner {
  background: linear-gradient(135deg, #fff8e6 0%, #fff3cd 100%);
  border-color: #ffecb5 !important;
}

.leaflet-container {
  border-radius: 1rem;
  font-family: inherit;
}

.auth-page .card {
  box-shadow: var(--shadow-soft);
}

@media (min-width: 768px) {
  .auth-page {
    padding-top: 1.5rem;
    padding-bottom: 2rem;
  }
}
/* App shell (templates/header.php) */
html {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  height: 100%;
  min-height: 100%;
  min-height: -webkit-fill-available;
  overflow: hidden;
  overscroll-behavior: none;
  position: fixed;
  width: 100%;
}

.topbar {
  background: #fff;
  border-bottom: 1px solid #e8edf3;
  position: sticky;
  top: 0;
  z-index: 1030;
  padding-top: env(safe-area-inset-top, 0px);
}

.lang-switch {
  flex-shrink: 0;
  gap: 0.5rem !important;
}

.lang-switch .lang-flag-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.2rem;
  border: none;
  background: transparent;
  box-shadow: none;
  line-height: 0;
  text-decoration: none;
  border-radius: 0.25rem;
  opacity: 0.55;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.lang-switch .lang-flag-link:hover {
  opacity: 0.9;
}

.lang-switch .lang-flag-link:focus-visible {
  outline: 2px solid var(--bs-primary, #0d6efd);
  outline-offset: 2px;
}

.lang-switch .lang-flag-link--active {
  opacity: 1;
}

.lang-switch .lang-flag-link--active:hover {
  opacity: 1;
}

.lang-switch .lang-flag-img {
  width: 2.75rem;
  height: 2.75rem;
  object-fit: contain;
  display: block;
  border: none;
  box-shadow: none;
  border-radius: 0;
}

@media (min-width: 576px) {
  .lang-switch .lang-flag-img {
    width: 3.1rem;
    height: 3.1rem;
  }
}

.app-main {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-top: 0.5rem;
  -webkit-overflow-scrolling: touch;
}

.app-main--guest-safe-bottom {
  padding-bottom: max(0.75rem, env(safe-area-inset-bottom, 0px));
}

.app-main--nav-bottom {
  padding-bottom: 4.1rem;
}

.app-bottom-nav {
  --app-bottom-nav-label: 0.6rem;
  --app-bottom-nav-height: 3.85rem;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1040;
  background: #fff;
  border-top: 1px solid #e8edf3;
  box-shadow: 0 -6px 20px rgba(15, 23, 42, 0.07);
  box-sizing: border-box;
  height: var(--app-bottom-nav-height);
  min-height: var(--app-bottom-nav-height);
  overflow: hidden;
  padding: 0.18rem 0 0.28rem;
  display: grid;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  align-items: stretch;
  max-width: 100%;
}

.app-bottom-nav__link {
  box-sizing: border-box;
  height: var(--app-bottom-nav-height);
  min-width: 0;
  min-height: 0;
  text-align: center;
  text-decoration: none;
  color: #6c757d;
  font-size: var(--app-bottom-nav-label);
  font-weight: 600;
  padding: 0.3rem 0.12rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.12rem;
  line-height: 1.12;
  border-radius: 0.5rem;
  transition: color 0.15s ease, background 0.15s ease;
}

.app-bottom-nav__link:hover {
  color: #0d6efd;
  background: rgba(13, 110, 253, 0.06);
}

.app-bottom-nav__link--active {
  color: #0d6efd;
}

button.app-bottom-nav__link {
  border: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  font-size: var(--app-bottom-nav-label);
  font-weight: 600;
  line-height: 1.12;
}

button.app-bottom-nav__link:focus-visible {
  outline: 2px solid var(--bs-primary, #0d6efd);
  outline-offset: 2px;
}

.app-bottom-nav__ico {
  flex: 0 0 auto;
  font-size: 1.22rem;
  line-height: 1;
}

.app-bottom-nav__text {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: inherit;
  font-weight: inherit;
  line-height: 1;
}

.topbar-inner {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.app-brand-logo {
  height: 72px;
  width: auto;
  max-width: 340px;
  object-fit: contain;
  display: block;
}

@media (min-width: 576px) {
  .app-brand-logo {
    height: 82px;
    max-width: 400px;
  }
}

/* Logo en cabecera de login / páginas de invitado: mismo peso visual que el topbar autenticado */
.app-brand-logo--login {
  height: 52px;
  width: auto;
  max-height: 52px;
  max-width: min(100%, 200px);
  object-fit: contain;
  object-position: center;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 576px) {
  .app-brand-logo--login {
    height: 64px;
    max-height: 64px;
    max-width: min(100%, 240px);
  }
}

.brand-header-meta {
  font-size: 0.8125rem;
  color: #6c757d;
  line-height: 1.25;
  max-width: min(100%, 260px);
}

.comunicado-tenant-logo {
  height: auto;
  max-height: 72px;
  width: auto;
  max-width: min(100%, 280px);
  object-fit: contain;
  vertical-align: middle;
}

.comunicado-tenant-logo--compact {
  max-height: 44px;
  max-width: 200px;
}

/* Layout variants */
.app-page--fluid {
  max-width: none;
}

.app-page--narrow {
  max-width: 800px;
}

.app-page--medium {
  max-width: 920px;
}

.app-module-header__intro {
  max-width: 42rem;
}

.app-card {
  border: 0;
  box-shadow: var(--shadow-soft);
  border-radius: 1rem;
}

.app-card > .card-header {
  background: #fff;
  border-bottom: 1px solid #e8edf3;
}

.app-table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.app-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: flex-end;
}

/* Graduaciones */
.grad-list-thumb-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
}

.grad-list-thumb {
  display: block;
  max-width: 200px;
  max-height: 100px;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
  border-radius: 0.65rem;
}

.grad-modal-preview {
  display: block;
  max-width: 100%;
  max-height: min(50vh, 440px);
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
  border-radius: 0.65rem;
  margin-left: auto;
  margin-right: auto;
}

/* Voluntarios list */
.vol-list-section-title {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6c757d;
  margin: 1.25rem 0 0.5rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid #e9ecef;
}

.vol-list-section-title:first-child {
  margin-top: 0;
}

.vol-list-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid #f1f3f5;
}

.vol-list-row:last-child {
  border-bottom: none;
}

.vol-list-avatar {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  background: #f8f9fa;
}

.vol-list-avatar--ph {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 800;
  color: #6c757d;
  border: 1px solid #e9ecef;
}

.vol-list-body {
  min-width: 0;
  flex: 1;
}

.vol-list-ind {
  font-weight: 800;
  font-size: 0.95rem;
  color: #0d6efd;
  letter-spacing: 0.02em;
}

.vol-list-name {
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.25;
  color: #212529;
}

.vol-list-meta {
  font-size: 0.75rem;
  color: #868e96;
  margin-top: 0.15rem;
}

.vol-list-actions {
  flex-shrink: 0;
}

/* Fichaje estadísticas */
.estad-mes-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 2px;
}

.estad-dia {
  min-height: 2.5rem;
  font-size: 0.7rem;
  line-height: 1.1;
}

.estad-dia-h {
  font-size: 0.65rem;
  color: var(--bs-primary);
}

.estad-dia-festivo {
  background: #fff8e6;
  border-color: #f0d060 !important;
}

.estad-dia-fin {
  background: #f3f6fb;
}

@media (min-width: 992px) {
  .estad-year-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
  }
}

@media (max-width: 991.98px) {
  .estad-year-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
  }
}

/* Org tree — equipos/jerarquia */
.org-tree-wrap {
  --org-branch: #94a3b8;
  --org-branch-soft: #cbd5e1;
  --org-card-bg: #f8fafc;
}

.org-tree-graph {
  position: relative;
  padding: 0.5rem 0;
}

.org-tree-list {
  position: relative;
}

.org-tree-list.org-tree-depth-0 > .org-tree-item::before {
  display: none;
}

.org-tree-item {
  position: relative;
  padding-left: 0;
  margin-bottom: 0.75rem;
}

.org-tree-children {
  margin-top: 0.65rem;
  margin-left: 1.25rem;
  padding-left: 1.25rem;
  border-left: 3px solid var(--org-branch-soft);
  position: relative;
}

.org-tree-children::before {
  content: "";
  position: absolute;
  left: -3px;
  top: 0;
  width: 3px;
  height: 12px;
  background: linear-gradient(180deg, var(--org-branch), transparent);
  opacity: 0.5;
}

.org-tree-node-card {
  background: var(--org-card-bg);
  border: 1px solid #e2e8f0 !important;
  transition: box-shadow 0.2s ease, transform 0.15s ease;
}

.org-tree-node-card:hover {
  box-shadow: 0 0.35rem 1.2rem rgba(15, 23, 42, 0.08) !important;
}

.org-tree-node-bar {
  height: 5px;
  width: 100%;
}

.org-tree-node-icon {
  width: 2.5rem;
  height: 2.5rem;
}

.org-tree-icon-emoji {
  font-size: 1.15rem;
  line-height: 1;
}

.org-tree-count-pill {
  background: #e2e8f0;
  color: #475569;
  font-weight: 700;
  font-size: 0.7rem;
}

.org-tree-node-body {
  background: rgba(255, 255, 255, 0.5);
}

.org-tree-node-body > * + * {
  border-top: 1px dashed #e2e8f0;
}

.org-tree-responsible {
  background: rgba(255, 255, 255, 0.65);
}

.org-tree-members {
  padding-top: 0.75rem;
  background: rgba(255, 255, 255, 0.65);
}

.org-tree-toggle {
  width: 2.25rem;
  height: 2.25rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.org-tree-toggle:focus-visible {
  outline: 2px solid #0d6efd;
  outline-offset: 2px;
}

.org-tree-chevron {
  display: inline-block;
  font-size: 0.65rem;
  line-height: 1;
  transition: transform 0.2s ease;
  color: #475569;
}

.org-tree-toggle.collapsed .org-tree-chevron {
  transform: rotate(-90deg);
}

.org-tree-avatar {
  width: 44px;
  height: 44px;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
}

.org-tree-avatar--ph {
  background: linear-gradient(145deg, #e2e8f0, #f1f5f9);
  color: #64748b;
  font-size: 0.75rem;
}

.org-tree-avatar--lg {
  width: 52px;
  height: 52px;
  object-fit: cover;
  font-size: 0.85rem;
}

.org-tree-member--resp .org-tree-avatar,
.org-tree-member--resp .org-tree-avatar--ph {
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.35);
}

.org-tree-member {
  max-width: 6.75rem;
}

.org-tree-member-cap {
  max-width: 100%;
}

.org-tree-member-ind {
  font-size: 0.65rem;
  font-weight: 700;
  color: #334155;
  letter-spacing: 0.02em;
}

.org-tree-member-name {
  font-size: 0.6rem;
  font-weight: 500;
  color: #64748b;
  line-height: 1.2;
  margin-top: 0.1rem;
}

/* Mi disponibilidad */
.mi-dispo-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.5rem;
}

.mi-dispo-toolbar .form-select,
.mi-dispo-toolbar .btn {
  font-size: 0.875rem;
}

.mi-dispo-legend {
  font-size: 0.78rem;
  color: #6c757d;
  flex-wrap: wrap;
}

.mi-dispo-cal-scroller {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  max-width: min(100%, 520px);
  margin: 0 auto;
  padding-bottom: 0.35rem;
}

.mi-dispo-cal-scroller--extended {
  max-width: min(100%, 1200px);
}

.mi-dispo-scroll-hint {
  font-size: 0.75rem;
  color: #6c757d;
  text-align: center;
  margin-bottom: 0.5rem;
  max-width: min(100%, 520px);
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 768px) {
  .mi-dispo-scroll-hint {
    display: none;
  }
}

.mi-dispo-cal-wrap {
  width: 100%;
  margin: 0;
}

.mi-dispo-cal-wrap--extended {
  min-width: 36rem;
}

.mi-dispo-cal {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.mi-dispo-cal--extended {
  grid-template-columns: repeat(7, minmax(3.25rem, 1fr));
  gap: 5px;
}

.mi-dispo-dow {
  font-size: 0.62rem;
  font-weight: 700;
  text-align: center;
  color: #6c757d;
  text-transform: uppercase;
  padding: 3px 0;
}

.mi-dispo-pad {
  min-height: 0;
  visibility: hidden;
  pointer-events: none;
}

.mi-dispo-day {
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  background: #fff;
  min-height: 3.1rem;
  padding: 4px 2px 5px;
  cursor: pointer;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 2px;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.mi-dispo-day:hover {
  border-color: #0d6efd;
}

.mi-dispo-day--extended {
  min-height: 6.5rem;
  max-height: 17rem;
  align-items: stretch;
  text-align: left;
  padding: 3px 4px 4px;
}

.mi-dispo-day--extended .mi-dispo-day-num {
  text-align: center;
  width: 100%;
}

.mi-dispo-ext-rows {
  flex: 1;
  min-height: 0;
  width: 100%;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mi-dispo-ext-slot {
  font-size: 0.58rem;
  line-height: 1.2;
  border-top: 1px solid #eef2f7;
  padding-top: 3px;
  margin-top: 2px;
}

.mi-dispo-ext-slot:first-child {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

.mi-dispo-ext-slot-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  min-width: 0;
}

.mi-dispo-ext-slot-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  flex-shrink: 0;
  min-width: 0;
}

.mi-dispo-ext-slot-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
  color: #495057;
  font-family: ui-monospace, monospace;
  font-size: 0.56rem;
  font-variant-numeric: tabular-nums;
}

.mi-dispo-ext-empty {
  font-size: 0.58rem;
  color: #adb5bd;
  text-align: center;
  padding: 2px 0;
}

.mi-dispo-day.is-today {
  border-color: #0d6efd;
  box-shadow: inset 0 0 0 1px rgba(13, 110, 253, 0.3);
}

.mi-dispo-day.is-selected {
  border-color: #0d6efd;
  background: #eef5ff;
}

.mi-dispo-day-num {
  font-size: 0.85rem;
  font-weight: 800;
  line-height: 1;
}

.mi-dispo-day-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  justify-content: center;
  min-height: 6px;
}

.mi-dispo-day-dots .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.mi-dispo-day-count {
  font-size: 0.58rem;
  font-weight: 700;
  color: #6c757d;
  line-height: 1;
}

.mi-dispo-actions {
  max-width: min(100%, 520px);
  margin: 0 auto;
}

@media (max-width: 767.98px) {
  .mi-dispo-cal-scroller {
    max-width: 100%;
    margin-left: calc(-1 * var(--bs-gutter-x, 0.75rem) * 0.5);
    margin-right: calc(-1 * var(--bs-gutter-x, 0.75rem) * 0.5);
    padding-left: calc(var(--bs-gutter-x, 0.75rem) * 0.5);
    padding-right: calc(var(--bs-gutter-x, 0.75rem) * 0.5);
  }

  .mi-dispo-cal-scroller--extended {
    max-width: none;
  }

  .mi-dispo-scroll-hint {
    max-width: 100%;
  }

  .mi-dispo-cal-wrap--extended {
    min-width: 34rem;
  }

  .mi-dispo-cal--extended {
    grid-template-columns: repeat(7, minmax(2.9rem, 1fr));
    gap: 3px;
  }

  .mi-dispo-dow {
    font-size: 0.55rem;
    letter-spacing: -0.03em;
    padding: 2px 0;
  }

  .mi-dispo-day {
    min-height: 2.75rem;
    padding: 3px 2px 4px;
    border-radius: 0.4rem;
  }

  .mi-dispo-day-num {
    font-size: 0.78rem;
  }

  .mi-dispo-day-dots .dot {
    width: 5px;
    height: 5px;
  }

  .mi-dispo-day-count {
    font-size: 0.52rem;
  }

  .mi-dispo-day--extended {
    min-height: 5.25rem;
    max-height: 10.5rem;
    padding: 2px 3px 3px;
  }

  .mi-dispo-ext-slot-name {
    font-size: 0.52rem;
  }

  .mi-dispo-ext-slot .badge {
    font-size: 0.5rem !important;
    padding: 0.15em 0.35em;
  }

  .mi-dispo-toolbar {
    align-items: stretch;
  }

  .mi-dispo-toolbar > .ms-auto {
    margin-left: 0 !important;
    width: 100%;
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .mi-dispo-toolbar .btn-group {
    flex: 1 1 auto;
  }

  .mi-dispo-toolbar .btn-group .btn {
    flex: 1 1 0;
    padding-left: 0.35rem;
    padding-right: 0.35rem;
    font-size: 0.8rem;
  }

  .mi-dispo-actions {
    max-width: 100%;
  }
}

#mi-dispo-modal .interval-row {
  border: 1px solid #e8edf3;
  border-radius: 0.5rem;
  padding: 0.65rem;
  margin-bottom: 0.5rem;
  background: #fafbfd;
}

#mi-dispo-modal .interval-row .btn-remove {
  flex-shrink: 0;
}

/* Fichaje — modules/fichaje */
.fichaje-page .fichaje-map {
  height: min(42vh, 320px);
  min-height: 220px;
  z-index: 1;
}

.fichaje-detail-map {
  height: min(50vh, 340px);
  min-height: 240px;
  z-index: 1;
}

.fichaje-history-row {
  cursor: pointer;
}

.fichaje-history-row:hover {
  background-color: #f8fafc;
}

.fichaje-resumen-open-detail {
  cursor: pointer;
}

.fichaje-resumen-open-detail:hover {
  background-color: #f8fafc;
}

.fichaje-resumen-card.fichaje-resumen-open-detail:focus-visible {
  outline: 2px solid #0d6efd;
  outline-offset: 2px;
}

.fichaje-subnav {
  display: flex;
  gap: 0.35rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.35rem;
  margin-bottom: 1rem;
  scrollbar-width: thin;
}

.fichaje-subnav__link {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  color: #6c757d;
  background: #fff;
  border: 1px solid #e8edf3;
  white-space: nowrap;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.fichaje-subnav__link:hover {
  color: #0d6efd;
  border-color: rgba(13, 110, 253, 0.35);
}

.fichaje-subnav__link--active {
  color: #0d6efd;
  background: #eef5ff;
  border-color: rgba(13, 110, 253, 0.45);
}

.fichaje-subnav__ico {
  font-size: 1rem;
  line-height: 1;
}

.fichaje-status-card {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1rem 1.1rem;
  border-radius: 1rem;
  border: 1px solid #e8edf3;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.fichaje-status-card__dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 0.35rem;
}

.fichaje-status--active .fichaje-status-card__dot {
  background: #198754;
  box-shadow: 0 0 0 4px rgba(25, 135, 84, 0.25);
}

.fichaje-status--active .fichaje-status-card__label {
  color: #146c43;
}

.fichaje-status--pause .fichaje-status-card__dot {
  background: #fd7e14;
  box-shadow: 0 0 0 4px rgba(253, 126, 20, 0.25);
}

.fichaje-status--pause .fichaje-status-card__label {
  color: #c35a00;
}

.fichaje-status--off .fichaje-status-card__dot {
  background: #6c757d;
  box-shadow: 0 0 0 4px rgba(108, 117, 125, 0.2);
}

.fichaje-status-card__label {
  font-weight: 800;
  font-size: 1.05rem;
  line-height: 1.2;
}

.fichaje-status-card__meta {
  font-size: 0.85rem;
  color: #495057;
  margin-top: 0.25rem;
}

.fichaje-status-card__chip {
  flex-shrink: 0;
  max-width: 9rem;
  margin-left: auto;
}

.fichaje-tipo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

@media (min-width: 576px) {
  .fichaje-tipo-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.fichaje-tipo-btn {
  width: 100%;
  min-height: 2.75rem;
  font-weight: 600;
}

.fichaje-tipo-btn--repeat {
  opacity: 0.55;
  text-decoration: line-through;
}

.btn-check:checked + .fichaje-tipo-btn--suggested {
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.35);
}

.fichaje-submit-btn {
  font-weight: 700;
}

.fichaje-resumen-card {
  border-radius: 1rem;
}

.fichaje-preset-bar .btn.active {
  background: #eef5ff;
  border-color: #0d6efd;
  color: #0d6efd;
}

.estad-dia-clickable { cursor: pointer; }
.estad-dia-clickable:hover { box-shadow: 0 0 0 2px rgba(13,110,253,.35); }
