/* ============================================================
   Grúas T&M — Custom Styles
   Bootstrap 5.3 base + variables propias del sistema
   ============================================================ */

:root {
  /* Colores de estados de turnos */
  --turno-libre: #ffffff;
  --turno-ocupado: #dc3545;
  --turno-feriado: #6c757d;
  --turno-pasado: #e9ecef;
  --turno-reservado: #ffc107;
  --turno-parcial: #fff3cd;

  /* Colores bootstrap*/
  --bs-primary: #139231;
  --bs-primary-rgb: 19, 146, 49;
  --bs-primary-dark: #0e780c;
  --bs-primary-light: #69db0d;


  /* Sidebar admin */
  --sidebar-width: 240px;
  --sidebar-bg: #212529;
}

/* ── Navbar ──────────────────────────────────────────────── */
.navbar-brand {
  font-weight: 700;
  letter-spacing: -0.5px;
}

/* ── Admin sidebar ───────────────────────────────────────── */
.admin-wrapper {
  display: flex;
  min-height: 100vh;
}

.admin-sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  background: var(--sidebar-bg);
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.admin-sidebar .nav-link {
  color: rgba(255, 255, 255, 0.75);
  padding: 0.6rem 1.25rem;
  border-radius: 0.375rem;
  margin: 0.1rem 0.5rem;
  font-size: 0.9rem;
  transition: background 0.15s, color 0.15s;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.admin-sidebar .nav-link .bi {
  width: 20px;
  text-align: center;
}

.admin-main {
  flex: 1;
  min-width: 0;
  padding: 1.5rem;
}

/* ── Calendario ──────────────────────────────────────────── */
.calendario-tabla {
  width: 100%;
  border-collapse: separate;
  border-spacing: 3px;
  table-layout: fixed;
}

.calendario-tabla th {
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.4rem;
  color: #495057;
}

.calendario-tabla th.col-finsemana {
  color: #adb5bd;
}

.calendario-celda {
  height: 80px;
  vertical-align: top;
  border-radius: 6px;
  padding: 0.3rem;
  font-size: 0.85rem;
  cursor: default;
  border: 1px solid transparent;
  transition: transform 0.1s, box-shadow 0.1s;
}

/* Estados de celdas */
.dia-disponible {
  background: #f0fff4;
  border-color: #b7ebc7;
  cursor: pointer;
}

.dia-disponible:hover {
  transform: scale(1.04);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  background: #d4f5e0;
}

.dia-parcial {
  background: var(--turno-parcial);
  border-color: #ffc107;
  cursor: pointer;
}

.dia-parcial:hover {
  transform: scale(1.04);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.dia-completo {
  background: #fde8ea;
  border-color: #f5c2c7;
  cursor: pointer;
}

.dia-feriado {
  background: #dee2e6;
  border-color: #adb5bd;
}

.dia-finsemana {
  background: var(--turno-pasado);
}

.dia-pasado {
  background: var(--turno-pasado);
  opacity: 0.6;
}

.dia-vacio {
  background: transparent;
  border: none;
}

.dia-numero {
  font-weight: 600;
  font-size: 1rem;
  line-height: 1;
  margin-bottom: 4px;
  display: block;
}

.dia-indicador {
  font-size: 0.7rem;
  line-height: 1.2;
}

/* ── Turnos del día ──────────────────────────────────────── */
.turno-card {
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
  border: 2px solid transparent;
}

.turno-libre {
  background: var(--turno-libre);
  border-color: #198754;
}

.turno-ocupado {
  background: #fde8ea;
  border-color: var(--turno-ocupado);
}

.turno-reservado {
  background: #fff8e1;
  border-color: var(--turno-reservado);
}

.turno-pasado {
  background: var(--turno-pasado);
  border-color: #ced4da;
  opacity: 0.7;
}

.turno-feriado {
  background: #f8f9fa;
  border-color: var(--turno-feriado);
}

/* ── Cards de camiones ───────────────────────────────────── */
.camion-card {
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid #dee2e6;
  border-radius: 0.5rem;
  overflow: hidden;
}

.camion-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.camion-card .card-img-top {
  height: 200px;
  object-fit: cover;
}

.camion-card .foto-placeholder {
  height: 200px;
  background: #e9ecef;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #adb5bd;
  font-size: 3rem;
}

/* ── Timeline de reservas ────────────────────────────────── */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0.65rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #dee2e6;
}

.timeline-item {
  position: relative;
  margin-bottom: 1.5rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -1.6rem;
  top: 0.25rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #0d6efd;
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px #0d6efd;
}

.timeline-item.completado::before {
  background: #198754;
  box-shadow: 0 0 0 2px #198754;
}

.timeline-item.cancelado::before {
  background: #dc3545;
  box-shadow: 0 0 0 2px #dc3545;
}

/* ── Contador de caracteres ──────────────────────────────── */
.char-feedback {
  font-size: 0.8rem;
  margin-top: 0.25rem;
}

/* ── Foto gallery admin ──────────────────────────────────── */
.foto-item {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  border-radius: 6px;
}

.foto-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.foto-item .foto-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
}

.foto-item:hover .foto-overlay {
  opacity: 1;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .admin-sidebar {
    display: none;
  }

  .calendario-celda {
    height: 50px;
    font-size: 0.75rem;
  }

  .dia-numero {
    font-size: 0.85rem;
  }

  .dia-indicador {
    display: none;
  }
}

/* ── Footer ──────────────────────────────────────────────── */
footer {
  border-top: 1px solid #dee2e6;
  margin-top: auto;
}