/* ============================================
   ESTILO VOSTRA ADAPTADO A TUS CLASES ACTUALES
   (NO CAMBIA NADA EN TU HTML)
============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700;900&display=swap');

body {
    font-family: 'Inter', sans-serif;
    background: #F7F9FC;
    margin: 0;
    padding: 20px;
    color: #333;
}

/* ============================
   HEADER
============================ */
.form-header {
    background: #FFFFFF;
    text-align: center;
    padding: 25px 10px;
    border-radius: 16px;
    margin-bottom: 25px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    border: 1px solid #E5EAF1;
}

.form-title {
    font-size: 26px;
    font-weight: 900;
    color: #2D6CDF;
    letter-spacing: 1px;
    margin-top: 10px;
    
}

/* Logo */
.form-logo {
    width: 180px;
    height: auto;
}


/* ============================
   TARJETA DEL FORMULARIO
============================ */
.form-dark-card {
    background: #FFFFFF;
    padding: 25px;
    border-radius: 18px;
    border: 1px solid #E5EAF1;
    box-shadow: 0 8px 28px rgba(0,0,0,0.08);
}

/* SECTION TITLES */
.form-section h4 {
    font-size: 20px;
    font-weight: 900;
    color: #363636;
    margin-bottom: 15px;
}

/* Labels & Inputs */
label {
    font-weight: 700;
    margin-bottom: 5px;
    color: #444;
}

input.form-control,
select.form-select {
    border-radius: 12px !important;
    padding: 12px !important;
    border: 2px solid #D4DCE5 !important;
    background: #FFFFFF !important;
    font-size: 15px;
}

input:focus, select:focus {
    border-color: #2D6CDF !important;
    box-shadow: 0 0 0 4px rgba(45,108,223,0.15) !important;
    outline: none;
}


/* ============================
   BOTONES
============================ */

.btn-primary-custom {
    background: #2D6CDF !important;
    border: none !important;
    color: white !important;
    padding: 12px 24px !important;
    font-weight: 700 !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 12px rgba(45,108,223,0.25);
}

.btn-primary-custom:hover {
    background: #1F4FAA !important;
}

/* Verde – éxito */
.btn-success {
    background: #27B276 !important;
    border: none !important;
    padding: 12px 24px !important;
    border-radius: 12px !important;
    font-weight: 700 !important;
}
.btn-success:hover {
    background: #1E8C5D !important;
}

/* Amarillo – advertencia */
.btn-warning {
    background: #F2C94C !important;
    color: #6A5300 !important;
    font-weight: 800 !important;
    border-radius: 12px !important;
    padding: 12px 24px !important;
}
.btn-warning:hover {
    background: #E8B72B !important;
}

/* Rojo – eliminar */
.btn-danger {
    background: #EB5757 !important;
    color: white !important;
    font-weight: 700 !important;
    border-radius: 12px !important;
    padding: 12px 24px !important;
}
.btn-danger:hover {
    background: #C63F3F !important;
}


/* ============================
   FACTURA / VISTA DE RESULTADOS
============================ */
/* ===================================================
   FACTURA PROFESIONAL – NEUTRO
=================================================== */

#factura {
    background: #ffffff;
    padding: 5px;            /* Menos padding = menos altura */
    border-radius: 12px;
    max-width: 900px;
    margin: 5px auto 10px;   /* Subimos factura hacia arriba */
    box-shadow: 0 5px 30px rgba(0,0,0,0.12);
    border: 1px solid #E3E5E8;
    font-family: 'Inter', sans-serif;
}



/* Header de factura */
.factura-header {
    width: 100%;
    border-bottom: 2px solid #111;
    padding-bottom: 15px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.factura-header img {
    width: 140px;
}

/* Títulos */
#factura h4 {
    margin-top: 25px;
    font-weight: 900;
    color: #111;
}

/* Tabla */
.tabla-factura {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 15px;
}

.tabla-factura th {
    background: #F2F3F5;
    padding: 12px;
    border-bottom: 3px solid #D7D9DD;
    text-align: left;
    font-weight: 900;
    color: #111;
}

.tabla-factura td {
    padding: 10px;
    border-bottom: 1px solid #E3E5E8;
}

/* Totales */
.totales-box {
    background: #F8F9FB;
    padding: 18px;
    border-radius: 12px;
    border: 1px solid #DDD;
    width: 320px;
    float: right;
    margin-top: 20px;
}

.totales-box p {
    display: flex;
    justify-content: space-between;
    margin: 6px 0;
    font-weight: 700;
}

.total-final {
    color: #000;
    font-size: 20px;
    border-top: 2px solid #CCC;
    padding-top: 8px;
    font-weight: 900;
}

/* Firmas */
.signature-section {
    margin-top: 80px;
    display: flex;
    justify-content: space-between;
}

.signature-block {
    text-align: center;
    width: 40%;
}

.signature-line {
    border-top: 2px solid #000;
    width: 90%;
    margin: 0 auto 8px;
}

/* IMPRESIÓN – Solo imprime la factura */
@media print {
    body * { visibility: hidden !important; }
    #factura, #factura * { visibility: visible !important; }
    #factura { position: absolute; top: 0; left: 0; width: 100%; }
    .top-header { display: none !important; } /* Ocultar header normal */
}

/* ======================================
   HEADER TIPO DASHBOARD PROFESIONAL
====================================== */
/* ======================================
   HEADER PRINCIPAL
====================================== */
.top-header {
    width: 100%;
    background: #363636;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 10px;
    margin-bottom: 25px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.35);
}

/* Botón menú (hamburger) */
.menu-btn {
    width: 35px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 10000;
}

.menu-btn div {
    height: 4px;
    background: white;
    border-radius: 3px;
    transition: 0.3s;
}

/* animación al abrir */
.menu-btn.open div:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.menu-btn.open div:nth-child(2) {
    opacity: 0;
}

.menu-btn.open div:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Título */
.header-title {
    flex-grow: 1;
    text-align: center;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 1px;
    color: white;
    text-transform: uppercase;
}

/* Logo */
.header-logo {
    width: 250px;
    filter: brightness(1.2);
}

.factura-logo {
    width: 200px !important;
    height: auto;
    object-fit: contain;
}


/* ======================================
   SIDEBAR PROFESIONAL
====================================== */
.sidebar {
    position: fixed;
    top: 0;
    left: -260px;
    width: 260px;
    height: 100%;
    background: #363636;
    padding: 25px;
    transition: 0.35s;
    z-index: 9990;
    box-shadow: 4px 0 12px rgba(0,0,0,0.4);
    border-right: 3px solid #2D6CDF;
}

.sidebar.open {
    left: 0;
}

.sidebar h3 {
    color: white;
    font-weight: 900;
    margin-bottom: 20px;
    text-align: center;
    font-size: 22px;
    border-bottom: 2px solid #1A1A1A;
    padding-bottom: 10px;
}

/* botones del menú */
.sidebar-btn {
    display: block;
    width: 100%;
    padding: 14px;
    margin-bottom: 12px;
    font-size: 16px;
    font-weight: 700;
    text-align: left;
    background: #1A1A1A;
    border-radius: 8px;
    color: #E0E0E0;
    border: none;
    cursor: pointer;
    transition: 0.25s;
}

.sidebar-btn:hover {
    background: #2D6CDF;
    color: white;
    transform: translateX(4px);
}
/* Footer flotante estilo web - esquina */
.factura-mini-footer {
    position: fixed;
    bottom: 8px;
    right: 12px;
    font-size: 13px;
    color: #555;
    opacity: 0.75;
    font-family: 'Inter', sans-serif;
}

/* En impresión, ubicar abajo sin flotar */
@media print {
    .factura-mini-footer {
        position: absolute;
        bottom: 10px !important;
        right: 20px !important;
        opacity: 1;
    }
}
