/* ESTILOS PRINCIPALES DE TECNOMOBILE */

* {
    box-sizing: border-box;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    margin: 0;
    padding: 0;
    background: #eef2f7;
    color: #263445;
}

.contenedor {
    width: 94%;
    max-width: 1400px;
    margin: 25px auto;
    background: #ffffff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.08);
}

/* ENCABEZADO */

.encabezado-sistema {
    padding: 20px;
    background: #14283f;
    color: white;
    border-radius: 10px;
    margin-bottom: 20px;
}

.encabezado-sistema h1 {
    margin: 0 0 8px 0;
    color: white;
    font-size: 30px;
}

.encabezado-sistema small {
    color: #cbd5e1;
    font-size: 14px;
}

/* USUARIO */

.barra-usuario {
    background: #e8eef5;
    padding: 13px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.barra-usuario a {
    color: #dc3545;
    font-weight: bold;
    text-decoration: none;
}

/* MENU */

.menu-navegacion {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    background: #1e3a56;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 25px;
}

.menu-navegacion a {
    color: white;
    text-decoration: none;
    padding: 11px 15px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
}

.menu-navegacion a:hover {
    background: #3274b8;
}

/* TITULOS */

h2 {
    color: #14283f;
    margin-bottom: 10px;
}

h3 {
    color: #1e3a56;
}

/* TARJETAS */

.panel-tarjetas {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 25px 0;
}

.tarjeta-resumen {
    flex: 1;
    min-width: 220px;
    background: #ffffff;
    border: 1px solid #e0e6ed;
    border-left: 5px solid #3274b8;
    padding: 22px;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.04);
}

.tarjeta-resumen h3 {
    margin-top: 0;
    color: #526273;
    font-size: 16px;
}

.tarjeta-resumen p.numero {
    font-size: 34px;
    font-weight: bold;
    color: #1e3a56;
    margin: 15px 0;
}

.tarjeta-resumen p {
    color: #718096;
}

/* TABLAS */

table.tabla-datos {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: white;
    font-size: 14px;
}

table.tabla-datos th {
    background: #1e3a56;
    color: white;
    padding: 13px;
    text-align: left;
}

table.tabla-datos td {
    padding: 12px;
    border: 1px solid #e0e6ed;
}

table.tabla-datos tr:nth-child(even) {
    background: #f6f8fb;
}

table.tabla-datos tr:hover {
    background: #eaf2fa;
}

/* BOTONES */

.boton {
    display: inline-block;
    padding: 9px 15px;
    color: white;
    background: #3274b8;
    text-decoration: none;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-family: inherit;
}

.boton:hover {
    background: #245b91;
}

.boton-nuevo {
    background: #198754;
}

.boton-nuevo:hover {
    background: #146c43;
}

.boton-editar {
    background: #ffc107;
    color: #212529;
}

.boton-editar:hover {
    background: #e0a800;
}

.boton-eliminar {
    background: #dc3545;
}

.boton-eliminar:hover {
    background: #bd2130;
}

.boton-cancelar {
    background: #6c757d;
}

/* FORMULARIOS */

.formulario-caja {
    max-width: 650px;
    margin: 20px auto;
    background: #f8fafc;
    border: 1px solid #e0e6ed;
    padding: 25px;
    border-radius: 10px;
}

.grupo-campo {
    margin-bottom: 18px;
}

.grupo-campo label {
    display: block;
    font-weight: bold;
    margin-bottom: 7px;
    font-size: 14px;
}

.grupo-campo input[type="text"],
.grupo-campo input[type="email"],
.grupo-campo input[type="password"],
.grupo-campo input[type="number"],
.grupo-campo input[type="file"],
.grupo-campo select,
.grupo-campo textarea {
    width: 100%;
    padding: 11px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
}

/* ALERTAS */

.alerta {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    font-size: 14px;
}

.alerta-exito {
    background: #d1e7dd;
    color: #155724;
}

.alerta-error {
    background: #f8d7da;
    color: #721c24;
}

.alerta-advertencia {
    background: #fff3cd;
    color: #856404;
}

/* STOCK */

.stock-bajo {
    color: #dc3545;
    font-weight: bold;
}

.stock-normal {
    color: #198754;
    font-weight: bold;
}

/* ENLACES */

a {
    color: #3274b8;
}

/* PIE */

.pie-pagina {
    text-align: center;
    font-size: 13px;
    color: #718096;
    margin-top: 35px;
    border-top: 1px solid #e0e6ed;
    padding-top: 20px;
}

/* PANTALLAS PEQUEÑAS */

@media screen and (max-width: 768px) {

    .contenedor {
        width: 96%;
        padding: 15px;
    }

    .menu-navegacion {
        flex-direction: column;
    }

    .menu-navegacion a {
        display: block;
    }

    .panel-tarjetas {
        flex-direction: column;
    }

    table.tabla-datos {
        font-size: 12px;
    }

    table.tabla-datos th,
    table.tabla-datos td {
        padding: 8px;
    }
}

/* IMPRESION */


@media print {

    @page {
        size: 80mm auto;
        margin: 4mm;
    }

    html, body {
        width: 100%;
        margin: 0 !important;
        padding: 0 !important;
        background: white !important;
        font-family: Arial, sans-serif;
        color: #111 !important;
    }

    .contenedor-comprobante {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .mensaje-exito,
    .botones {
        display: none !important;
    }

    .recibo {
        display: block !important;
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 5px !important;
        background: white !important;
        color: #111 !important;
        box-shadow: none !important;
        border: none !important;
    }

    .recibo-encabezado,
    .datos-recibo,
    .tabla-recibo,
    .totales,
    .pie-recibo {
        display: block;
        visibility: visible;
    }

    .recibo-encabezado h1 {
        font-size: 25px !important;
    }

    .tabla-recibo {
        width: 100% !important;
        border-collapse: collapse !important;
    }

    .tabla-recibo th,
    .tabla-recibo td {
        padding: 6px 2px !important;
        color: #111 !important;
    }

    .linea-total {
        display: flex !important;
        justify-content: space-between !important;
    }

    .total-final {
        font-size: 17px !important;
        font-weight: bold !important;
    }

    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

}

/* PERFIL DE USUARIO */
.barra-usuario {
    display:flex; align-items:center; justify-content:space-between;
    gap:15px; background:#f3f6fa; border:1px solid #dce5ef;
    padding:14px 18px; border-radius:12px; margin-bottom:20px;
}
.perfil-usuario { display:flex; align-items:center; gap:12px; }
.avatar-usuario {
    width:48px; height:48px; display:flex; align-items:center;
    justify-content:center; border-radius:50%; background:#3274b8;
    color:white; font-weight:bold; font-size:17px;
}
.datos-perfil { display:flex; flex-direction:column; gap:4px; }
.datos-perfil strong { color:#14283f; font-size:15px; }
.datos-perfil span { color:#3274b8; font-size:12px; font-weight:bold; }
.boton-cerrar-sesion {
    display:inline-block; background:#dc3545; color:white !important;
    padding:10px 15px; border-radius:7px; text-decoration:none;
    font-size:13px; font-weight:bold;
}
.boton-cerrar-sesion:hover { background:#b02a37; }

/* LOGIN */
.login-contenedor { max-width:480px; margin:45px auto; }
.login-marca {
    text-align:center; background:linear-gradient(135deg,#14283f,#245b91);
    color:white; padding:28px 20px; border-radius:14px 14px 0 0;
}
.login-marca h1 { color:white; margin:0 0 8px; }
.login-marca p { color:#dbeafe; margin:0; }
.login-caja {
    background:white; padding:25px; border:1px solid #e0e6ed;
    border-top:0; border-radius:0 0 14px 14px;
    box-shadow:0 8px 25px rgba(0,0,0,.07);
}
.login-caja .formulario-caja { border:0; padding:0; margin:0; background:white; }
.login-caja input[type="text"], .login-caja input[type="email"],
.login-caja input[type="password"] {
    width:100%; padding:12px; border:1px solid #cbd5e1;
    border-radius:7px; font-size:14px;
}
.login-boton { width:100%; padding:12px; font-size:15px; margin-top:8px; }
.usuarios-prueba {
    margin-top:20px; padding:15px; background:#f6f8fb;
    border:1px dashed #b8c6d6; border-radius:9px;
    font-size:13px; line-height:1.8;
}
.usuarios-prueba strong { color:#14283f; }
.login-enlace-cliente {
    display:block; text-align:center; margin-top:16px; font-weight:bold;
}
@media (max-width:600px) {
    .barra-usuario { align-items:flex-start; flex-direction:column; }
    .boton-cerrar-sesion { width:100%; text-align:center; }
}
