/* app.css: Estilos personalizados para CRM Giros - Mobile First */

body.theme-light {
  background: #f8fafc;
  color: #222;
}
body.theme-dark {
  background: #181c23;
  color: #e0e0e0;
}

.card-summary {
  border-radius: 1rem;
  transition: box-shadow 0.2s;
}
.card-summary:hover {
  box-shadow: 0 0 0.5rem #0d6efd33;
}

.table thead th {
  vertical-align: middle;
}

.badge.bg-pendiente { background: #ffc107; color: #222; }
.badge.bg-revision { background: #0dcaf0; color: #222; }
.badge.bg-aprobado { background: #198754; }
.badge.bg-pagado { background: #0d6efd; }
.badge.bg-bloqueado { background: #dc3545; }

.timeline {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}
.timeline-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 80px;
}
.timeline-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #0d6efd;
  margin-bottom: 0.3rem;
  border: 2px solid #fff;
  box-shadow: 0 0 0.2rem #0d6efd99;
}
.timeline-dot.done {
  background: #198754;
}
.timeline-label {
  font-size: 0.85rem;
  text-align: center;
}

.flyer-preview {
  min-height: 260px;
  background: linear-gradient(135deg, #e0e7ff 0%, #f8fafc 100%);
}

/* Responsive: tablas a cards en móvil */
@media (max-width: 767px) {
  .table-responsive table, .table-responsive thead, .table-responsive tbody, .table-responsive th, .table-responsive td, .table-responsive tr {
    display: block;
    width: 100%;
  }
  .table-responsive thead {
    display: none;
  }
  .table-responsive tr {
    margin-bottom: 1rem;
    border: 1px solid #eee;
    border-radius: 0.5rem;
    box-shadow: 0 0 0.2rem #0d6efd22;
    background: #fff;
    padding: 0.5rem;
  }
  .table-responsive td {
    padding: 0.5rem;
    border: none;
    position: relative;
  }
  .table-responsive td:before {
    content: attr(data-label);
    font-weight: bold;
    display: block;
    margin-bottom: 0.2rem;
    color: #0d6efd;
  }
}

/* Sidebar colapsable (simulado) */
.sidebar {
  width: 220px;
  background: #232837;
  color: #e0e0e0;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: transform 0.2s;
}
.sidebar.collapsed {
  transform: translateX(-220px);
}
@media (max-width: 991px) {
  .sidebar {
    position: static;
    width: 100%;
    height: auto;
    transform: none;
  }
}

/* Botones grandes táctiles */
.btn, .form-control, .form-select {
  font-size: 1.1rem;
  min-height: 48px;
  border-radius: 0.5rem;
  transition: all 0.2s;
}

/* Modo oscuro */
body.theme-dark .card,
body.theme-dark .navbar,
body.theme-dark .flyer-preview {
  background: #232837 !important;
  color: #e0e0e0;
}
body.theme-dark .table {
  color: #e0e0e0;
}
body.theme-dark .table-light {
  background: #232837;
  color: #e0e0e0;
}
body.theme-dark .form-control,
body.theme-dark .form-select {
  background: #232837;
  color: #e0e0e0;
  border-color: #444;
}
body.theme-dark .form-control:focus,
body.theme-dark .form-select:focus {
  border-color: #0dcaf0;
}
body.theme-dark .btn-outline-secondary {
  color: #e0e0e0;
  border-color: #444;
}
body.theme-dark .btn-outline-secondary:hover {
  background: #444;
}
