/* ==========================================================================
   SKIN: AZUL
   El estilo AltiroPOS: sidebar azul marino, acentos azul vivo, fondo frío
   y suave. Es el skin por defecto.
   --------------------------------------------------------------------------
   Los azules de la referencia:
     marino   #1E4378   cabecera y menú lateral
     vivo     #2563EB   botones y enlaces
     texto    #1E3A5F   títulos
     suave    #5B7BA6   texto secundario
   ========================================================================== */

:root {
    /* ---- Fondos ---- */
    --bg:          #EEF2F8;
    --fondo:       #EEF2F8;
    --fondo-2:     #E4EAF3;
    --bg-alt:      #E4EAF3;
    --superficie:  #FFFFFF;
    --blanco:      #FFFFFF;
    --tarjeta:     #FFFFFF;

    /* ---- Bordes ---- */
    --ln:          #DCE4EF;
    --linea:       #DCE4EF;
    --borde:       #DCE4EF;
    --ln-soft:     #EDF1F7;

    /* ---- Texto ---- */
    --tx:          #1E3A5F;
    --tinta:       #1E3A5F;
    --gr:          #4A6485;
    --gris:        #4A6485;
    --gris-claro:  #7C93B0;
    --muted:       #7C93B0;

    /* ---- Acento ---- */
    --acento:      #2563EB;
    --acento-2:    #3B82F6;
    --acento-soft: #E8EFFC;
    --acento-borde:#C7D9F5;

    /* ---- Marino: para sidebar y cabeceras ---- */
    --marino:      #1E4378;
    --marino-2:    #1A3A68;
    --marino-texto:#A9C2E0;

    /* ---- Estados ---- */
    --ok:          #0E9F6E;
    --ok-soft:     #E6F7F1;
    --warn:        #D97706;
    --warn-soft:   #FEF6E7;
    --err:         #DC2626;
    --err-soft:    #FEEFEF;

    /* ---- Formas ---- */
    --r:           16px;
    --radio:       16px;
    --r-sm:        11px;
    --r-lg:        22px;
    --r-xl:        28px;

    /* ---- Sombras ---- */
    --sh-xs:       0 1px 2px rgba(30, 58, 95, .05);
    --sh:          0 2px 10px rgba(30, 58, 95, .07);
    --sh-md:       0 8px 24px rgba(30, 58, 95, .10);
    --sh-lg:       0 16px 44px rgba(30, 58, 95, .14);

    /* ---- Textura ---- */
    --mancha-1:    rgba(37, 99, 235, .08);
    --mancha-2:    rgba(30, 67, 120, .06);
}

/* ==========================================================================
   FONDO
   El de la referencia: gris azulado arriba, crema muy tenue abajo.
   ========================================================================== */

html { background: #EEF2F8; }

body {
    background: #EEF2F8 !important;
    color: #1E3A5F;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        linear-gradient(180deg, #DCE6F2 0%, #EEF2F8 45%, #F6F2EC 100%),
        radial-gradient(600px 600px at 92% -6%, rgba(37, 99, 235, .07), transparent 70%);
}

/* ==========================================================================
   SIDEBAR AZUL MARINO
   El rasgo que define este skin.
   ========================================================================== */

.sidebar {
    background: linear-gradient(180deg, #1E4378 0%, #1A3A68 100%) !important;
    border-right: none !important;
    box-shadow: 2px 0 16px rgba(30, 67, 120, .18) !important;
}

/* Cabecera del sidebar */
.sb-cabeza {
    border-bottom: 1px solid rgba(255, 255, 255, .10) !important;
}

.sb-cabeza .texto strong {
    color: #FFFFFF !important;
}

.sb-cabeza .texto span {
    color: #8FAECF !important;
}

/* Selector de empresa */
.sb-empresa {
    background: rgba(255, 255, 255, .08) !important;
    border: 1px solid rgba(255, 255, 255, .13) !important;
}

.sb-empresa:hover {
    background: rgba(255, 255, 255, .14) !important;
    border-color: rgba(255, 255, 255, .28) !important;
}

.sb-empresa .avatar {
    background: rgba(255, 255, 255, .18) !important;
    color: #FFFFFF !important;
}

.sb-empresa .nom { color: #FFFFFF !important; }
.sb-empresa .rut { color: #8FAECF !important; }
.sb-empresa .cambiar { color: #93C5FD !important; }

/* Enlace Inicio */
.sb-inicio {
    background: rgba(255, 255, 255, .12) !important;
    border: 1px solid rgba(255, 255, 255, .18) !important;
    color: #FFFFFF !important;
}

.sb-inicio:hover {
    background: rgba(255, 255, 255, .2) !important;
    border-color: rgba(255, 255, 255, .35) !important;
}

/* Separadores de sección */
.sb-seccion {
    color: #7E9DBE !important;
}

.sb-seccion::after {
    background: linear-gradient(90deg, rgba(255, 255, 255, .14), transparent) !important;
}

/* Títulos de grupo */
.sb-grupo-titulo {
    color: #C5D6EA !important;
}

.sb-grupo-titulo:hover {
    background: rgba(255, 255, 255, .08) !important;
    color: #FFFFFF !important;
}

.sb-grupo-titulo .flecha {
    color: #6E8DB0 !important;
}

/* Ítems del menú */
.sb-item {
    color: #A9C2E0 !important;
}

.sb-item::before {
    background: #5B7BA6 !important;
    opacity: .85 !important;
}

.sb-item:hover {
    background: rgba(255, 255, 255, .10) !important;
    color: #FFFFFF !important;
}

.sb-item:hover::before {
    background: #93C5FD !important;
}

/* Activo: fondo más claro + barra blanca a la izquierda */
.sb-item.activo {
    background: rgba(255, 255, 255, .16) !important;
    color: #FFFFFF !important;
    font-weight: 700 !important;
    box-shadow: inset 3px 0 0 #FFFFFF !important;
}

.sb-item.activo::before {
    background: #FFFFFF !important;
}

/* Pie del sidebar */
.sb-pie {
    background: rgba(0, 0, 0, .14) !important;
    border-top: 1px solid rgba(255, 255, 255, .10) !important;
}

.sb-user {
    background: rgba(255, 255, 255, .2) !important;
    color: #FFFFFF !important;
}

.sb-user-nombre { color: #FFFFFF !important; }
.sb-user-cargo  { color: #8FAECF !important; }

.sb-salir {
    color: #8FAECF !important;
}

.sb-salir:hover {
    background: rgba(255, 255, 255, .14) !important;
    color: #FFFFFF !important;
}

/* El selector de skin dentro del sidebar marino */
.sb-pie .sk-pie {
    border-bottom-color: rgba(255, 255, 255, .12) !important;
}

.sb-pie .sk-nombre-pie {
    color: #C5D6EA !important;
}

/* El borde de los puntos sobre azul marino */
.sb-pie .sk-punto {
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .2),
                0 0 0 1px rgba(255, 255, 255, .3) !important;
}

.sb-pie .sk-punto.activo {
    border-color: #FFFFFF !important;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .2),
                0 0 0 3px rgba(255, 255, 255, .35) !important;
}

/* ==========================================================================
   TOPBAR
   ========================================================================== */

.topbar {
    background: #FFFFFF !important;
    border-bottom: 1px solid #DCE4EF !important;
    box-shadow: 0 1px 3px rgba(30, 58, 95, .04);
}

.top-titulo h1 {
    color: #1E3A5F !important;
}

/* ==========================================================================
   TARJETAS Y CONTENIDO
   ========================================================================== */

.ui-card,
.card,
.tarjeta,
.panel,
.bloque,
.caja,
.widget,
.ui-tabla-caja,
.seccion-card,
.grupo {
    background: #FFFFFF !important;
    border-color: #DCE4EF !important;
}

/* El banner de bienvenida: azul marino como la cabecera del POS */
.hero {
    background: linear-gradient(135deg, #1E4378 0%, #2A5590 100%) !important;
    border: 1px solid #1E4378 !important;
    box-shadow: 0 4px 16px rgba(30, 67, 120, .2) !important;
}

.hero-texto h2 {
    color: #FFFFFF !important;
}

.hero-texto p {
    color: #C5D6EA !important;
}

.hero-texto strong {
    background: rgba(255, 255, 255, .18) !important;
    color: #FFFFFF !important;
}

.hero-metricas .metrica {
    background: rgba(255, 255, 255, .13) !important;
    border: 1px solid rgba(255, 255, 255, .18) !important;
}

.hero-metricas .metrica .n {
    color: #FFFFFF !important;
}

.hero-metricas .metrica .l {
    color: #A9C2E0 !important;
}

/* Títulos del contenido */
.contenido h1,
.contenido > h1 {
    color: #1E3A5F !important;
}

.contenido h2 {
    color: #7C93B0 !important;
}

/* ==========================================================================
   TABLAS
   ========================================================================== */

.ui-tabla thead th,
table thead th {
    background: #1E4378 !important;
    color: #FFFFFF !important;
    border-color: #1E4378 !important;
}

.ui-tabla tbody td {
    border-bottom-color: #EDF1F7 !important;
}

.ui-tabla tbody tr:hover td {
    background: #F5F8FC !important;
}

/* ==========================================================================
   BOTONES
   ========================================================================== */

.ui-btn,
.btn,
button.btn {
    background: #2563EB !important;
    color: #FFFFFF !important;
    border-color: #2563EB !important;
    box-shadow: 0 2px 8px rgba(37, 99, 235, .25) !important;
}

.ui-btn:hover,
.btn:hover,
button.btn:hover {
    background: #1D4ED8 !important;
    border-color: #1D4ED8 !important;
    box-shadow: 0 4px 14px rgba(37, 99, 235, .32) !important;
}

.ui-btn.sec,
.btn.sec {
    background: #FFFFFF !important;
    color: #1E3A5F !important;
    border-color: #DCE4EF !important;
    box-shadow: 0 1px 3px rgba(30, 58, 95, .05) !important;
}

.ui-btn.sec:hover,
.btn.sec:hover {
    background: #EEF2F8 !important;
    border-color: #C7D9F5 !important;
}

/* ==========================================================================
   FORMULARIOS
   ========================================================================== */

.ui-input,
.ui-select,
input[type=text],
input[type=email],
input[type=number],
input[type=date],
input[type=password],
select,
textarea {
    background: #FFFFFF !important;
    border-color: #DCE4EF !important;
    color: #1E3A5F !important;
}

.ui-input:focus,
.ui-select:focus,
input:focus,
select:focus,
textarea:focus {
    border-color: #2563EB !important;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .13) !important;
}

input::placeholder,
textarea::placeholder {
    color: #A9BACE !important;
}

.ui-label,
label {
    color: #4A6485 !important;
}

/* ==========================================================================
   PÍLDORAS
   ========================================================================== */

.ui-pill {
    background: #E8EFFC !important;
    color: #1E4378 !important;
}

.ui-pill.ok   { background: #E6F7F1 !important; color: #0A7D56 !important; }
.ui-pill.err  { background: #FEEFEF !important; color: #B91C1C !important; }
.ui-pill.info { background: #E8EFFC !important; color: #1D4ED8 !important; }

/* ==========================================================================
   FRANJAS DE LOS MÓDULOS
   ========================================================================== */

.seccion-card .franja {
    opacity: .7 !important;
}

.seccion-card .seccion-cabeza h3 {
    color: #1E3A5F !important;
}

.seccion-card .seccion-cabeza p {
    color: #7C93B0 !important;
}

.seccion-enlaces a {
    color: #4A6485 !important;
}

.seccion-enlaces a:hover {
    color: #2563EB !important;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 767px) {
    .hero {
        border-radius: 18px !important;
    }
}
