/* Alquiler — Programar (Gantt) + Análisis */
.rental-schedule {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.rental-schedule__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.rental-schedule__nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.rental-schedule__nav strong {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-700, #374151);
}

.rental-schedule__month-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-800, #1f2937);
  text-transform: capitalize;
}

.rental-schedule__grid {
  --rental-label-w: 180px;
  border: 1px solid var(--gray-200, #e5e7eb);
  border-radius: 10px;
  background: #fff;
  overflow: auto;
  max-height: min(70vh, 720px);
}

.rental-schedule__head,
.rental-schedule__row {
  display: grid;
  grid-template-columns: var(--rental-label-w) minmax(480px, 1fr);
  min-width: calc(var(--rental-label-w) + 480px);
}

.rental-schedule__head {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--gray-50, #f9fafb);
  border-bottom: 1px solid var(--gray-200, #e5e7eb);
}

.rental-schedule__corner,
.rental-schedule__label {
  position: sticky;
  left: 0;
  z-index: 1;
  box-sizing: border-box;
  width: var(--rental-label-w);
  padding: 10px 12px;
  border-right: 1px solid var(--gray-200, #e5e7eb);
  background: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-700, #374151);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rental-schedule__corner {
  background: var(--gray-50, #f9fafb);
  z-index: 3;
}

.rental-schedule__row {
  border-bottom: 1px solid var(--gray-100, #f3f4f6);
  background: #fff;
  min-height: 40px;
}

.rental-schedule__row:hover {
  background: rgba(37, 99, 235, 0.03);
}

.rental-schedule__row:hover .rental-schedule__label {
  background: #fff;
}

.rental-schedule__label {
  display: flex;
  align-items: center;
  font-weight: 500;
  background: #fff;
}

.rental-schedule__days,
.rental-schedule__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  position: relative;
  min-height: 36px;
}

.rental-schedule__days {
  align-items: stretch;
}

.rental-schedule__day,
.rental-schedule__cell {
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid var(--gray-100, #f3f4f6);
  box-sizing: border-box;
  min-width: 0;
}

.rental-schedule__day {
  padding: 8px 0;
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-600, #4b5563);
}

.rental-schedule__day.is-today,
.rental-schedule__cell.is-today {
  background: rgba(37, 99, 235, 0.08);
}

.rental-schedule__day.is-today {
  color: var(--sfe-primary, #2563eb);
}

.rental-schedule__track {
  min-height: 40px;
}

.rental-schedule__bar {
  position: absolute;
  top: 8px;
  bottom: 8px;
  z-index: 1;
  display: flex;
  align-items: center;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
  transition: filter 0.12s ease, transform 0.12s ease;
}

.rental-schedule__bar:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
  z-index: 2;
}

.rental-schedule__bar.is-draft { background: #94a3b8; }
.rental-schedule__bar.is-confirmed { background: #2563eb; }
.rental-schedule__bar.is-picked_up { background: #0d9488; }
.rental-schedule__bar.is-returned { background: #64748b; }
.rental-schedule__bar.is-cancelled { background: #ef4444; opacity: 0.7; }

.rental-schedule__empty {
  padding: 24px;
  grid-column: 1 / -1;
}

/* Análisis */
.rental-analysis {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.rental-analysis__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.rental-analysis__toolbar h2 {
  margin: 0;
  font-size: 1.15rem;
}

.rental-analysis__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.rental-analysis__chart {
  border: 1px solid var(--gray-200, #e5e7eb);
  border-radius: 10px;
  background: #fff;
  padding: 12px;
  min-height: 180px;
}

.rental-analysis__svg {
  width: 100%;
  height: 160px;
  display: block;
}

.btn.is-static {
  pointer-events: none;
  opacity: 0.85;
}

@media (max-width: 720px) {
  .rental-schedule__grid {
    --rental-label-w: 120px;
  }
}
