/* Diseño de nuestra micro app */

body {
    font-family: Arial, sans-serif;
    background: #101827;
    color: white;
    padding: 30px;
}

/* Contenedor principal */
main {
    max-width: 450px;
    margin: auto;
}

/* Campos de entrada y botones */
input, select, button {
    box-sizing: border-box;
    width: 100%;
    padding: 12px;
    margin: 8px 0;
    border-radius: 6px;
    border: none;
}

/* Diseño del botón */
/* Diseño general de los botones */
button {
    background: #1677ff;
    color: white;
    cursor: pointer;
    transition: transform 0.2s ease,
                background-color 0.2s ease;
}

/* Efecto al pasar el mouse */
button:hover {
    transform: translateY(-3px);
}

/* Botón limpiar formulario */
.btn-limpiar {
    background: #596579;
}

/* Color del botón limpiar al pasar el mouse */
.btn-limpiar:hover {
    background: #738096;
}

/* Resultado de la cotización */
/* Tarjeta del resultado */
/* Tarjeta de cotización */
#resultado {
    margin-top: 20px;
    padding: 20px;
    background: #1e293b;
    border: 1px solid #475569;
    border-radius: 12px;
}

/* Ocultar cuando no hay resultados */
#resultado:empty {
    display: none;
}

/* Título de la cotización */
.cotizacion-titulo {
    color: #60a5fa;
    font-size: 18px;
    margin-top: 0;
}

/* Información del cliente y producto */
.cotizacion-dato {
    color: white;
    font-size: 15px;
    margin: 10px 0;
}

/* Línea divisoria */
.cotizacion-linea {
    border: none;
    border-top: 1px solid #475569;
    margin: 18px 0;
}

/* Etiqueta del total */
.cotizacion-etiqueta {
    color: #cbd5e1;
    font-size: 13px;
}

/* Total destacado */
.cotizacion-total {
    color: #4ade80;
    font-size: 28px;
    font-weight: bold;
    margin: 8px 0;
}

/* Ocultar la tarjeta cuando está vacía */
#resultado:empty {
    display: none;
}
/* Botón para imprimir cotizaciones */
.btn-imprimir {
    background: #16a34a;
    color: white;
}

/* Efecto del botón */
.btn-imprimir:hover {
    background: #15803d;
}

/* Ocultar botón si no hay cotización */
#resultado:empty + .btn-imprimir {
    display: none;
}
/* Diseño exclusivo para imprimir o guardar PDF */

@media print {

    @page {
        size: A4;
        margin: 18mm;
    }

    body {
        background: white;
        color: black;
        padding: 0;
        margin: 0;
    }

    main {
        max-width: none;
        margin: 0;
    }

    /* Ocultar formulario, títulos y botones */
    main > :not(#resultado) {
        display: none !important;
    }

    /* Mostrar solamente la cotización */
    #resultado {
        display: block;
        width: 100%;
        box-sizing: border-box;
        margin: 0;
        background: white;
        color: black;
        border: 1px solid #999;
    }

    /* Texto de la cotización */
    .cotizacion-dato,
    .cotizacion-etiqueta {
        color: black;
    }

    /* Título azul */
    .cotizacion-titulo {
        color: #1d4ed8;
    }

    /* Total verde */
    .cotizacion-total {
        color: #16803d;
    }
}
/* Encabezado del logo */
.cotizacion-encabezado {
    text-align: center;
    margin-bottom: 15px;
}

/* Logo de la cotización */
.cotizacion-logo {
    max-width: 260px;
    width: 100%;
    height: auto;
}
/* Botón Nueva cotización */
.btn-nueva {
    background: #0f766e;
    color: white;
}

/* Efecto al pasar el mouse */
.btn-nueva:hover {
    background: #115e59;
}
/* Botón Agregar producto */
.btn-agregar {
    background: #2563eb;
    color: white;
}

/* Efecto al pasar el mouse */
.btn-agregar:hover {
    background: #1d4ed8;
}
/* Tabla profesional de cotizaciones */

.tabla-cotizacion {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    font-size: 13px;
}

/* Encabezados de la tabla */
.tabla-cotizacion th {
    background: #2563eb;
    color: white;
    padding: 10px 6px;
    text-align: left;
}

/* Celdas de productos */
.tabla-cotizacion td {
    padding: 10px 6px;
    border-bottom: 1px solid #475569;
    overflow-wrap: anywhere;
}

/* Filas alternas */
.tabla-cotizacion tbody tr:nth-child(even) {
    background: #334155;
}

/* Colores para impresión */
@media print {
    .tabla-cotizacion th {
        background: #e2e8f0 !important;
        color: #000 !important;
    }

    .tabla-cotizacion td {
        color: #000 !important;
        border-bottom: 1px solid #ccc;
    }

    .tabla-cotizacion tbody tr:nth-child(even) {
        background: #f8fafc !important;
    }
}
/* Botón para eliminar productos */
.btn-eliminar {
    background: #dc2626;
    color: white;
    width: auto;
    padding: 8px 14px;
    margin-left: 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.btn-eliminar:hover {
    background: #991b1b;
}
/* Botón para guardar cotizaciones */
.btn-guardar {
    background: #7c3aed;
    color: white;
    border: none;
    cursor: pointer;
}

/* Efecto al pasar el mouse */
.btn-guardar:hover {
    background: #6d28d9;
}

/* Ocultar el botón al imprimir */
@media print {
    .btn-guardar {
        display: none !important;
    }
}
/* Botón para consultar cotizaciones */
.btn-ver {
    background: #2563eb;
    color: white;
    width: auto;
    padding: 8px 14px;
    margin-left: 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.btn-ver:hover {
    background: #1d4ed8;
}

/* No mostrar este botón en el PDF */
@media print {
    .btn-ver {
        display: none !important;
    }
}
/* Botón para recuperar cotizaciones */
.btn-recuperar {
    background: #059669;
    color: white;
    width: auto;
    padding: 8px 14px;
    margin-left: 10px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.btn-recuperar:hover {
    background: #047857;
}

@media print {
    .btn-recuperar {
        display: none !important;
    }
}
/* Buscador del historial de cotizaciones */
#buscarCotizacion {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #64748b;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 15px;
}
/* Botón Exportar respaldo */
.btn-exportar {
    background: #0891b2;
    color: white;
    cursor: pointer;
}

/* Efecto al pasar el mouse */
.btn-exportar:hover {
    background: #0e7490;
}

/* Ocultar el botón al imprimir */
@media print {
    .btn-exportar {
        display: none !important;
    }
}
/* Botón Importar respaldo */
.btn-importar {
    background: #0f766e;
    color: white;
    cursor: pointer;
}

/* Efecto al pasar el mouse */
.btn-importar:hover {
    background: #115e59;
}

/* Ocultar el botón al imprimir */
@media print {
    .btn-importar {
        display: none !important;
    }
}