/* Apuesta Central - ajustes sobre AdminLTE */
.content-header h1 { font-size: 1.6rem; }
.table td, .table th { vertical-align: middle; }
.table-sm td, .table-sm th { padding: .35rem .5rem; }
.monto, td.monto, th.monto { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.negativo { color: #dc3545; }
.positivo { color: #28a745; }
.dt-buttons .btn { margin-right: 2px; }
.small-box .inner h3 { font-size: 1.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.filtros .form-group { margin-bottom: .5rem; }
.filtros label { font-size: .85rem; margin-bottom: .15rem; color: #6c757d; }
.serial-input { font-size: 1.6rem; letter-spacing: .4rem; text-align: center; font-family: Consolas, monospace; }
.numero-resultado { font-size: 1.1rem; font-weight: 700; font-family: Consolas, monospace; }
.input-numero { width: 70px !important; flex: 0 0 70px; }
.nowrap { white-space: nowrap; }
tfoot th { background: #f4f6f9; }
.btn-xs { padding: .1rem .4rem; font-size: .75rem; }

/* Login */
.login-page { background: linear-gradient(135deg, #3c1d6e 0%, #6f42c1 55%, #1e3a8a 100%); }
.login-box .card { border-radius: .6rem; }
.login-logo img { max-width: 220px; }

/* ================================================================
   Tema 2026: fondo claro, tarjetas blancas, menú oscuro y acento morado
   (va sobre AdminLTE; cambiar los colores aquí cambia todo el admin)
   ================================================================ */
:root {
    --ac: #6D4FE6;        /* acento */
    --ac-osc: #4B32B8;    /* acento para texto y enlaces (contraste AA) */
    --ac-suave: #F1EDFF;
    --tinta: #1B1730;
    --gris: #5E5873;
    --fondo: #F5F4F9;
    --linea: #E8E5F0;
    --linea-suave: #F0EEF5;
    --lateral: #17132A;
    --lateral-hover: #241E3D;
    --lateral-texto: #CFCAE3;
    --ok: #157F55; --ok-suave: #E6F4EC;
    --mal: #B42318; --mal-suave: #FDECEA;
    --aviso: #8A4B00; --aviso-suave: #FFF4E5;
    --info: #1E4FB0; --info-suave: #E9F0FF;
}
body, .content-wrapper { font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--tinta); }
.content-wrapper { background: var(--fondo); }
a { color: var(--ac-osc); }
a:hover { color: #36238A; }
.text-muted { color: var(--gris) !important; }
.negativo { color: var(--mal); }
.positivo { color: var(--ok); }
.monto, td.monto, th.monto, .table td, .kpi-valor { font-variant-numeric: tabular-nums; }

/* Barra superior */
.main-header.navbar { background: #fff; border-bottom: 1px solid var(--linea); box-shadow: none; }
.main-header .nav-link { color: var(--tinta); }
.nav-cuenta { display: flex; align-items: center; gap: .5rem; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: #E7E1FF; color: var(--ac-osc); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .72rem; }
.main-header .dropdown-menu { border-radius: 12px; border-color: var(--linea); box-shadow: 0 8px 24px rgba(23,19,42,.12); }

/* Menú lateral */
.main-sidebar, .main-sidebar::before, .sidebar-dark-purple { background: var(--lateral) !important; box-shadow: none !important; }
.main-sidebar .brand-link { border-bottom: 1px solid rgba(255,255,255,.06) !important; padding: .9rem .9rem; display: flex; align-items: center; }
.main-sidebar .brand-link .brand-image { float: none; margin: 0 .65rem 0 .2rem; max-height: 34px; border-radius: 9px; opacity: 1; }
.main-sidebar .brand-text { display: inline-flex; flex-direction: column; line-height: 1.15; color: #fff; }
.main-sidebar .brand-text b { font-weight: 600; font-size: .95rem; }
.main-sidebar .brand-text small { color: #A49DC0; font-size: .72rem; }
.buscar-menu { display: flex; align-items: center; gap: .5rem; margin: .9rem .35rem .4rem; padding: 0 .65rem; height: 38px; border-radius: 9px; background: var(--lateral-hover); color: #A49DC0; }
.buscar-menu input { flex: 1; min-width: 0; background: transparent; border: 0; outline: none; color: #fff; font-size: .85rem; }
.buscar-menu input::placeholder { color: #A49DC0; }
.buscar-menu kbd { background: transparent; border: 1px solid #3A3358; color: #A49DC0; font-size: .65rem; padding: .05rem .3rem; box-shadow: none; }
.sidebar-collapse .buscar-menu, .sidebar-collapse .nav-sidebar .nav-header { display: none; }
.sidebar-collapse .main-sidebar:hover .buscar-menu { display: flex; }
.nav-sidebar .nav-header { color: #8C84AD !important; font-size: .68rem !important; letter-spacing: .08em; text-transform: uppercase; padding: .9rem .9rem .3rem !important; }
.nav-sidebar .nav-item > .nav-link { color: var(--lateral-texto) !important; border-radius: 8px; margin-bottom: 1px; padding: .45rem .7rem; font-size: .9rem; }
.nav-sidebar .nav-item > .nav-link .nav-icon { font-size: .9rem; color: #8C84AD; }
.nav-sidebar .nav-item > .nav-link:hover { background: var(--lateral-hover) !important; color: #fff !important; }
.sidebar-dark-purple .nav-sidebar > .nav-item > .nav-link.active, .nav-sidebar .nav-item > .nav-link.active { background: var(--ac) !important; color: #fff !important; font-weight: 600; box-shadow: none !important; }
.nav-sidebar .nav-item > .nav-link.active .nav-icon { color: #fff; }

/* Encabezado de la página */
.content-header { padding: 1.25rem 1rem .75rem; }
.content-header h1 { font-size: 1.6rem; font-weight: 700; letter-spacing: -.01em; }
.content-header .ruta { font-size: .8rem; color: var(--gris); margin-bottom: .1rem; }
.main-footer { background: transparent; border-top: 1px solid var(--linea); color: var(--gris); }

/* Tarjetas */
.card { border-radius: 14px; border: 1px solid var(--linea); box-shadow: none; }
.card.card-outline { border-top: 1px solid var(--linea); }
.card > .card-header { background: transparent; border-bottom: 1px solid var(--linea-suave); padding: .85rem 1.1rem; }
.card-title { font-size: 1rem; font-weight: 600; }
.card-header .card-title i { color: var(--gris); }
.card-tabs .card-header, .card-outline-tabs .card-header { padding-bottom: 0; }
.card-body { padding: 1rem 1.1rem; }
.callout { border-radius: 10px; box-shadow: none; border: 1px solid var(--linea); border-left-width: 4px; }
.modal-content { border-radius: 14px; border: 0; }
.modal-header, .modal-footer { border-color: var(--linea-suave); }

/* Tablas */
.table thead th { border-top: 0; border-bottom: 1px solid var(--linea); background: #FAF9FD; color: var(--gris); font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.table td, .table th { border-top-color: var(--linea-suave); }
.table-striped tbody tr:nth-of-type(odd) { background: #FCFBFE; }
.table-hover tbody tr:hover { background: #F6F3FF; }
tfoot th, .table tfoot th { background: #FAF9FD; border-top: 2px solid var(--linea); font-weight: 700; }

/* Botones y campos */
.btn { border-radius: 8px; font-weight: 500; }
.btn-sm { border-radius: 7px; }
.btn-xs { border-radius: 6px; }
.bg-purple, .btn.bg-purple, .btn-primary { background-color: var(--ac) !important; border-color: var(--ac) !important; color: #fff !important; }
.btn.bg-purple:hover, .btn-primary:hover { background-color: var(--ac-osc) !important; border-color: var(--ac-osc) !important; }
.btn-default { background: #fff; border-color: #E2DFEC; color: var(--tinta); }
.btn-default:hover { background: #F6F4FB; border-color: #D5D0E3; color: var(--tinta); }
.text-purple { color: var(--ac-osc) !important; }
.form-control, .custom-select { border-radius: 8px; border-color: #E2DFEC; }
.form-control:focus, .custom-select:focus { border-color: #A994F5; box-shadow: 0 0 0 .2rem rgba(109,79,230,.18); }
.filtros label { font-weight: 600; font-size: .75rem; }
.nav-pills .nav-link.active { background: var(--ac); }
.nav-tabs .nav-link.active { color: var(--ac-osc); font-weight: 600; }
.badge { border-radius: 999px; font-weight: 600; padding: .3em .65em; }
.page-item.active .page-link { background: var(--ac); border-color: var(--ac); }
.custom-control-input:checked ~ .custom-control-label::before { background: var(--ac); border-color: var(--ac); }

/* Selector segmentado (Moneda, Agrupar por) */
.seg { display: inline-flex; flex-wrap: wrap; background: #ECEAF4; border-radius: 9px; padding: 3px; gap: 2px; }
.seg a, .seg button { border: 0; border-radius: 7px; padding: .3rem .8rem; font-size: .85rem; color: var(--gris); background: transparent; text-decoration: none; white-space: nowrap; }
.seg a:hover { color: var(--tinta); }
.seg .activo { background: #fff; color: var(--tinta); font-weight: 600; box-shadow: 0 1px 2px rgba(23,19,42,.12); }

/* Atajos de fecha */
.chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.chip { display: inline-flex; align-items: center; height: 30px; padding: 0 .75rem; border-radius: 999px; border: 1px solid #E2DFEC; background: #fff; font-size: .8rem; color: var(--tinta); text-decoration: none; }
.chip:hover { border-color: #C9BDFB; color: var(--ac-osc); text-decoration: none; }
.chip.activo { background: var(--ac-suave); border-color: #C9BDFB; color: var(--ac-osc); font-weight: 600; }

/* Avisos en forma de etiqueta */
.avisos { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.aviso { display: inline-flex; align-items: center; gap: .5rem; border-radius: 999px; padding: .4rem .9rem; font-size: .82rem; font-weight: 500; text-decoration: none; }
.aviso::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.aviso:hover { text-decoration: none; filter: brightness(.97); }
.aviso-naranja { background: var(--aviso-suave); color: var(--aviso); }
.aviso-azul { background: var(--info-suave); color: var(--info); }

/* Tarjetas de totales */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.kpis.kpis-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 991px) { .kpis, .kpis.kpis-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpi { background: #fff; border: 1px solid var(--linea); border-radius: 14px; padding: 1rem 1.1rem .85rem; display: flex; flex-direction: column; gap: .2rem; min-width: 0; color: var(--tinta); text-decoration: none; }
a.kpi:hover { border-color: #C9BDFB; color: var(--tinta); text-decoration: none; }
.kpi-titulo { font-size: .8rem; color: var(--gris); font-weight: 500; }
.kpi-valor { font-size: 1.55rem; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-pie { display: flex; justify-content: space-between; align-items: center; gap: .5rem; font-size: .75rem; color: var(--gris); }
.kpi-oscuro { background: var(--lateral); border-color: var(--lateral); color: #fff; }
.kpi-oscuro .kpi-titulo, .kpi-oscuro .kpi-pie { color: var(--lateral-texto); }
.delta { font-weight: 600; white-space: nowrap; }
.delta-bien { color: var(--ok); }
.delta-mal { color: var(--mal); }
.kpi-oscuro .delta-bien { color: #6EE7B7; }
.kpi-oscuro .delta-mal { color: #FCA5A5; }

/* Ventas por hora (barras hoy / ayer) */
.barras { display: flex; align-items: flex-end; gap: 6px; height: 190px; border-bottom: 1px solid var(--linea); padding: 0 2px; }
.barras .hora { flex: 1; display: flex; flex-direction: column; align-items: center; min-width: 0; height: 100%; justify-content: flex-end; }
.barras .par { display: flex; align-items: flex-end; justify-content: center; gap: 2px; width: 100%; height: 100%; }
.barras .b { width: 42%; max-width: 16px; border-radius: 4px 4px 0 0; min-height: 2px; }
.barras .b-hoy { background: var(--ac); }
.barras .b-ayer { background: #CFC6F7; }
.horas { display: flex; gap: 6px; padding: 4px 2px 0; }
.horas span { flex: 1; text-align: center; font-size: .68rem; color: var(--gris); min-width: 0; }
.leyenda { display: flex; gap: 1rem; font-size: .75rem; color: var(--gris); margin-top: .5rem; }
.leyenda i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: .35rem; vertical-align: -1px; }

/* Sorteos de hoy */
.sorteos { max-height: 420px; overflow-y: auto; }
.sorteo { display: flex; align-items: center; gap: .75rem; padding: .55rem 1.1rem; border-top: 1px solid var(--linea-suave); font-size: .88rem; }
.sorteo:first-child { border-top: 0; }
.sorteo .h { width: 64px; font-weight: 600; white-space: nowrap; }
.sorteo .j { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.estado { font-size: .72rem; font-weight: 600; padding: .2rem .6rem; border-radius: 999px; white-space: nowrap; }
.estado-ok { background: var(--ok-suave); color: var(--ok); }
.estado-falta { background: var(--aviso-suave); color: var(--aviso); }
.estado-cierra { background: var(--info-suave); color: var(--info); }
.estado-abierto, .estado-cerrado { background: var(--linea-suave); color: #4A4560; }

/* Pantallas pequeñas (teléfono y tableta): tablas con desplazamiento propio y tamaños más compactos */
.tabla-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
.dataTables_wrapper { max-width: 100%; }
.dt-buttons { display: inline-flex; flex-wrap: wrap; gap: 2px; }
@media (max-width: 767.98px) {
    .content-wrapper > .content { padding: 0 .5rem; }
    .content-header { padding: .9rem .5rem .5rem; }
    .content-header h1 { font-size: 1.3rem; }
    .content-header .col-sm-5 { text-align: left !important; }
    .card-body { padding: .75rem; }
    .card > .card-header { padding: .7rem .75rem; }
    .kpis, .kpis.kpis-5 { gap: .6rem; }
    .kpi { padding: .75rem .8rem; }
    .kpi-valor { font-size: 1.15rem; white-space: normal; overflow-wrap: anywhere; }
    .kpi-pie { flex-wrap: wrap; }
    .table { font-size: .82rem; }
    .dataTables_wrapper .dataTables_filter, .dataTables_wrapper .dataTables_length, .dataTables_wrapper .dt-buttons { text-align: left; justify-content: flex-start; margin-bottom: .4rem; }
    .dataTables_wrapper .dataTables_filter input { width: 100%; max-width: 220px; }
    .dataTables_wrapper .dataTables_info, .dataTables_wrapper .dataTables_paginate { text-align: left; white-space: normal; }
    .dataTables_wrapper .dataTables_paginate .pagination { justify-content: flex-start; flex-wrap: wrap; }
    .seg { max-width: 100%; }
    .seg a, .seg button { padding: .3rem .6rem; }
    .chips .chip { height: 28px; padding: 0 .6rem; }
    .sorteo { padding: .5rem .75rem; }
    .main-footer { font-size: .75rem; }
}
@media (max-width: 400px) {
    .kpis, .kpis.kpis-5 { grid-template-columns: minmax(0, 1fr); }
}

/* Premiación: resultado leído por el lector automático */
.propuesto { display: inline-block; background: var(--info-suave); border-radius: 8px; padding: .3rem .55rem; }
.propuesto-5 { background: var(--aviso-suave); }
.propuesto-4 { background: var(--mal-suave); }
