/* =====================================================================
   Estilos propios de Expreso Andes sobre la plantilla Flexy Admin Lite.
   1) Piezas del sistema (asientos, consola, estados...)
   2) Tema oscuro: se activa con la clase "dark" en <html> (js/tema.js)
   ===================================================================== */

/* ---------- 1. Piezas del sistema ---------- */

.swal-mini { font-size: 0.8rem !important; }
.fs-7 { font-size: 0.8rem; }
.fs-8 { font-size: 0.7rem; }
.font-mono { font-family: SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; }
.min-w-0 { min-width: 0; }
.cursor-pointer { cursor: pointer; }

/* Logo del topbar */
.logo-andes { font-weight: 700; font-size: 1.15rem; color: #11142d; letter-spacing: 0.5px; }
.logo-andes .logo-icono { background: #1a9bfc; color: #fff; border-radius: 10px; width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.2rem; }
#main-wrapper[data-sidebartype=mini-sidebar] .logo-andes .logo-texto { display: none; }

/* Boton redondo del topbar (tema) */
.btn-topbar { width: 40px; height: 40px; border-radius: 50%; border: 1px solid #ecf0f2; background: transparent; color: #67757c; font-size: 1.2rem; display: inline-flex; align-items: center; justify-content: center; }
.btn-topbar:hover { background: #f6f8fb; color: #1a9bfc; }

/* Panel del usuario en el sidebar */
.user-panel { padding: 0 12px; }
.user-panel img { width: 50px; height: 50px; }
.user-panel .nombre-usuario { color: #11142d; font-weight: 600; line-height: 1.2; }

/* Tarjetas de numeros (KPI) */
.kpi-icono { width: 48px; height: 48px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.4rem; }
.kpi-numero { font-size: 1.5rem; font-weight: 700; color: #11142d; line-height: 1.1; }

/* Fondos suaves de color (como los de la plantilla) */
.bg-light-info { background: rgba(26, 155, 252, 0.12) !important; color: #1a9bfc !important; }
.bg-light-success { background: rgba(57, 203, 127, 0.14) !important; color: #2a9d61 !important; }
.bg-light-warning { background: rgba(253, 201, 15, 0.2) !important; color: #b58b00 !important; }
.bg-light-danger { background: rgba(252, 75, 108, 0.14) !important; color: #e8385a !important; }
.bg-light-primary { background: rgba(30, 77, 183, 0.12) !important; color: #1e4db7 !important; }
.bg-light-purple { background: rgba(116, 96, 238, 0.14) !important; color: #7460ee !important; }

/* Mapa de asientos */
.mapa-asientos { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; max-width: 340px; margin: 0 auto; }
.asiento { border: 1px solid #d8dee4; border-radius: 10px; background: #fff; color: #11142d; padding: 6px 0; font-size: 0.75rem; font-family: SFMono-Regular, Menlo, Consolas, monospace; display: flex; flex-direction: column; align-items: center; transition: transform 0.15s, border-color 0.15s; }
.asiento:hover:not(:disabled) { transform: translateY(-2px); border-color: #1a9bfc; }
.asiento small { font-size: 0.6rem; line-height: 1; margin-top: 2px; }
.asiento.mio { background: #1a9bfc; border-color: #1a9bfc; color: #fff; font-weight: 700; }
.asiento.otro { background: rgba(116, 96, 238, 0.14); border-color: #7460ee; color: #5b47d6; }
.asiento.vendido { background: rgba(252, 75, 108, 0.12); border-color: rgba(252, 75, 108, 0.5); color: #e8385a; opacity: 0.75; cursor: not-allowed; }
.pasillo { display: flex; align-items: center; justify-content: center; color: #cfd6dc; }
.leyenda { width: 12px; height: 12px; border-radius: 3px; display: inline-block; border: 1px solid #d8dee4; }

/* Consola HTTP/JSON: siempre oscura, como una terminal */
.consola { background: #0b1020; border-radius: 16px; color: #cbd5e1; font-family: SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.7rem; }
.consola .entrada { background: #111a2e; border: 1px solid #1e293b; border-radius: 8px; padding: 6px 8px; margin-bottom: 6px; word-break: break-all; }
.consola-logs { overflow-y: auto; height: 260px; }

/* Pasos de estado (salida y seguimiento) */
.paso-estado { border: 1px solid #ecf0f2; border-radius: 10px; padding: 4px; text-align: center; font-size: 0.7rem; color: #a1aab2; }
.paso-estado.hecho { border-color: transparent; }

/* Linea de tiempo grande del seguimiento */
.linea-tiempo { position: relative; }
.linea-tiempo .barra { position: absolute; top: 30px; left: 12.5%; right: 12.5%; height: 6px; border-radius: 6px; background: #ecf0f2; }
.linea-tiempo .barra div { height: 100%; border-radius: 6px; background: #39cb7f; transition: width 0.7s; }
.circulo-paso { width: 60px; height: 60px; border-radius: 50%; border: 4px solid #dfe5ea; background: #fff; color: #a1aab2; display: inline-flex; align-items: center; justify-content: center; font-size: 1.4rem; position: relative; }
.circulo-paso.hecho { background: #39cb7f; border-color: #39cb7f; color: #fff; }
.circulo-paso.actual { background: #1a9bfc; border-color: #9fd3fd; color: #fff; box-shadow: 0 0 0 8px rgba(26, 155, 252, 0.18); }
.paso-vertical { position: relative; display: flex; gap: 14px; padding-bottom: 24px; }
.paso-vertical .raya { position: absolute; left: 22px; top: 48px; bottom: 0; width: 4px; border-radius: 4px; background: #ecf0f2; }
.paso-vertical .raya.hecha { background: #39cb7f; }
.paso-vertical .circulo-paso { width: 48px; height: 48px; font-size: 1.1rem; flex-shrink: 0; }

/* Filtros tipo Excel del historial */
.menu-columna { position: absolute; z-index: 1060; width: 260px; max-height: 360px; display: flex; flex-direction: column; background: #fff; border: 1px solid #ecf0f2; border-radius: 12px; box-shadow: 0 10px 30px rgba(17, 20, 45, 0.18); }
.menu-columna .lista-valores { overflow-y: auto; max-height: 200px; }
.th-filtro { white-space: nowrap; }
.th-filtro .btn-filtro { border: 0; background: transparent; color: #a1aab2; padding: 0 4px; }
.th-filtro .btn-filtro.activo { color: #1a9bfc; }

/* Tablas compactas del sistema */
.table-sm-text td, .table-sm-text th { font-size: 0.8rem; vertical-align: middle; }
.texto-2-lineas { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Imagenes de tarjetas */
.foto-tarjeta { width: 100%; height: 150px; object-fit: cover; border-radius: 20px 20px 0 0; }
.foto-vacia { height: 150px; border-radius: 20px 20px 0 0; display: flex; align-items: center; justify-content: center; font-size: 3rem; }

/* Pagina de venta: en pantallas grandes cada columna tiene su propio scroll */
@media (min-width: 1200px) {
  .col-venta { max-height: calc(100vh - 200px); overflow-y: auto; }
}

/* ---------- 2. Tema oscuro (combina con la plantilla) ---------- */

html.dark body,
html.dark .page-wrapper,
html.dark .preloader { background: #141925 !important; color: #b8c0cc; }
html.dark .topbar,
html.dark .topbar[data-navbarbg=skin6],
html.dark #main-wrapper[data-layout=vertical] .topbar .navbar-collapse[data-navbarbg=skin6],
html.dark #main-wrapper[data-layout=vertical] .topbar[data-navbarbg=skin6],
html.dark #main-wrapper[data-layout=vertical] .topbar .top-navbar .navbar-header[data-logobg=skin6] { background: #1b2130 !important; border-bottom: 1px solid #262e40; }
html.dark #main-wrapper[data-layout=vertical] .left-sidebar[data-sidebarbg=skin6],
html.dark #main-wrapper[data-layout=vertical] .left-sidebar[data-sidebarbg=skin6] .sidebar-nav ul,
html.dark .left-sidebar { background: #1b2130 !important; border-right: 1px solid #262e40; }
html.dark .sidebar-nav ul .sidebar-item .sidebar-link { color: #9aa4b5 !important; }
html.dark .sidebar-nav ul .sidebar-item .sidebar-link i { color: #9aa4b5; }
html.dark .sidebar-nav ul .sidebar-item.selected > .sidebar-link,
html.dark .sidebar-nav ul .sidebar-item.selected > .sidebar-link i { color: #fff !important; }
html.dark .logo-andes,
html.dark .user-panel .nombre-usuario,
html.dark .kpi-numero,
html.dark h1, html.dark h2, html.dark h3, html.dark h4, html.dark h5, html.dark h6,
html.dark .card-title,
html.dark .breadcrumb-item.active,
html.dark .page-title { color: #e6e9ef !important; }
html.dark .card,
html.dark .modal-content,
html.dark .dropdown-menu,
html.dark .list-group-item,
html.dark .menu-columna { background-color: #1b2130 !important; border-color: #2c3446 !important; color: #b8c0cc; }
html.dark .card-header, html.dark .card-footer { background-color: #20283a; border-color: #2c3446; }
html.dark .dropdown-item { color: #b8c0cc; }
html.dark .dropdown-item:hover { background: #262e40; color: #fff; }
html.dark .table { color: #b8c0cc; border-color: #2c3446; }
html.dark .table > :not(caption) > * > * { border-color: #2c3446; background-color: transparent; color: inherit; }
html.dark .table-light, html.dark .table-light > * > * { background-color: #20283a !important; color: #e6e9ef !important; }
html.dark .table-hover > tbody > tr:hover > * { background-color: #20283a; color: #fff; }
html.dark .form-control,
html.dark .form-select,
html.dark .input-group-text { background-color: #141925 !important; border-color: #2c3446 !important; color: #e6e9ef !important; }
html.dark .form-control::placeholder { color: #6b7587; }
html.dark .form-control:disabled, html.dark .form-select:disabled { background-color: #1f2636 !important; }
html.dark input[type="date"] { color-scheme: dark; }
html.dark .bg-light, html.dark .bg-white { background-color: #20283a !important; }
html.dark .text-dark { color: #e6e9ef !important; }
html.dark .text-muted { color: #8b95a7 !important; }
html.dark .border, html.dark .border-top, html.dark .border-bottom, html.dark .border-start, html.dark .border-end { border-color: #2c3446 !important; }
html.dark .btn-light, html.dark .btn-outline-secondary { background-color: #262e40; border-color: #343d52; color: #e6e9ef; }
html.dark .btn-light:hover, html.dark .btn-outline-secondary:hover { background-color: #2f384d; color: #fff; }
html.dark .btn-close { filter: invert(1); }
html.dark .footer { color: #8b95a7; }
html.dark .breadcrumb-item a, html.dark .breadcrumb-item + .breadcrumb-item::before { color: #8b95a7; }
html.dark .btn-topbar { border-color: #2c3446; color: #e6e9ef; }
html.dark .btn-topbar:hover { background: #262e40; }
html.dark .nav-tabs { border-color: #2c3446; }
html.dark .nav-tabs .nav-link { color: #9aa4b5; }
html.dark .nav-tabs .nav-link.active { background: #1b2130; border-color: #2c3446 #2c3446 #1b2130; color: #fff; }
html.dark .alert-light { background: #20283a; border-color: #2c3446; color: #b8c0cc; }
html.dark .asiento { background: #20283a; border-color: #343d52; color: #e6e9ef; }
html.dark .asiento.mio { background: #1a9bfc; color: #fff; }
html.dark .asiento.otro { background: rgba(116, 96, 238, 0.25); color: #c7beff; }
html.dark .asiento.vendido { background: rgba(252, 75, 108, 0.18); color: #ff9db0; }
html.dark .pasillo { color: #3a4358; }
html.dark .leyenda { border-color: #343d52; }
html.dark .paso-estado { border-color: #2c3446; color: #5f6a7e; }
html.dark .circulo-paso { background: #1b2130; border-color: #343d52; color: #5f6a7e; }
html.dark .circulo-paso.hecho { background: #39cb7f; border-color: #39cb7f; color: #fff; }
html.dark .circulo-paso.actual { background: #1a9bfc; border-color: #1a9bfc; color: #fff; }
html.dark .linea-tiempo .barra, html.dark .paso-vertical .raya { background: #2c3446; }
html.dark .paso-vertical .raya.hecha { background: #39cb7f; }
html.dark .bg-light-success { color: #6ee7a8 !important; }
html.dark .bg-light-warning { color: #fde68a !important; }
html.dark .bg-light-danger { color: #ff9db0 !important; }
html.dark .bg-light-primary { color: #9bb4f2 !important; }
html.dark .bg-light-purple { color: #c7beff !important; }
