﻿/* ================================
   PALETA DE COLORES CORPORATIVOS
   ================================ */
:root {
    --verde: #2E7D32;
    --verde-oscuro: #1B5E20;
    --verde-claro: #A5D6A7;
    --gris-claro: #f4f4f4;
    --gris-medio: #d9d9d9;
    --texto: #222;
    --blanco: #ffffff;
}

/* ================================
   PALETA DE COLORES CORPORATIVOS
   ================================ */
:root {
    --verde: #2E7D32;
    --verde-oscuro: #1B5E20;
    --verde-claro: #A5D6A7;
    --gris-claro: #f4f4f4;
    --gris-medio: #d9d9d9;
    --texto: #222;
    --blanco: #ffffff;
}

/* ================================
   ESTILO GENERAL (MOBILE FIRST)
   ================================ */
body {
    font-family: 'Poppins', 'Segoe UI', sans-serif;
    background-color: var(--gris-claro);
    margin: 0;
    padding: 15px;
    padding-left: 2%;   /* borde lateral izquierdo */
    padding-right: 2%;  /* borde lateral derecho */
    width: 100%;
    max-width: 100%;
    color: var(--texto);
    font-size: 26px;
}

h1, h2, h3 {
    color: var(--verde-oscuro);
    font-weight: 700;
    margin-bottom: 20px;
    font-size: 46px;
    text-align: center;
}

/* ================================
   CONTENEDOR PRINCIPAL
   ================================ */
.contenedor {
    width: 96%;
    background: var(--blanco);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    margin-left: auto;   /* centrar */
    margin-right: auto;  /* centrar */
}


/* ================================
   CAMPOS E INPUTS
   ================================ */
.label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--verde-oscuro);
    font-size: 26px;
}

input[type="text"],
input[type="number"],
input[type="date"],
input[type="password"],
select {
    width: 90%;
    padding: 18px;
    border: 2px solid var(--gris-medio);
    border-radius: 10px;
    font-size: 28px;
    margin-bottom: 20px;
    background: var(--blanco);
    transition: border-color .2s;
}

input:focus,
select:focus {
    border-color: var(--verde);
    outline: none;
}

input[type="time"] {
    font-size: 28px !important;
    padding: 8px 12px !important;
    width: 180px !important;
}

/* ================================
   BOTONES GRANDES
   ================================ */
.btn,
button,
input[type="submit"] {
    width: 80%;
    background-color: var(--verde);
    color: var(--blanco);
    padding: 20px;
    border: none;
    border-radius: 12px;
    font-size: 28px;
    cursor: pointer;
    font-weight: 700;
    transition: background-color .2s;
    text-align: center;
    text-decoration: none;
    display: block; /* asegura separación vertical */
    margin: 25px auto; /* separación real entre botones */
}

.btn:hover,
button:hover,
input[type="submit"]:hover {
    background-color: var(--verde-oscuro);
}


/* BOTONES DE ARCHIVO GRANDES PARA MÓVIL */
input[type="file"] {
     width: 900%;
    background-color: var(--verde);
    color: var(--blanco);
    padding: 20px;
    border: none;
    border-radius: 12px;
    font-size: 28px;
    cursor: pointer;
    font-weight: 700;
    transition: background-color .2s;
    text-align: center;
    display: block; /* asegura separación vertical */
    margin: 25px 0; /* separación real entre botones */
}

/* Texto del botón (Android/iOS) */
input[type="file"]::-webkit-file-upload-button {
    padding: 18px 22px;
    font-size: 22px;
    background: #ffffff;
    color: #0a7d32;
    border: none;
    border-radius: 12px;
    font-weight: bold;
    cursor: pointer;
}

/* Ajuste especial para pantallas pequeñas */
@media (max-width: 480px) {

    /* Botón de archivo grande */
    input[type="file"] {
        padding: 20px;
        font-size: 24px;
    }

    input[type="file"]::-webkit-file-upload-button {
        padding: 20px;
        font-size: 24px;
    }

    /* Botones centrados y a ancho completo en móvil */
    .btn,
    button,
    input[type="submit"] {
        width: 100%;
        margin: 20px auto;
        font-size: 26px;
        padding: 18px;
    }

    /* Inputs grandes y dentro de pantalla */
    input[type="text"],
    input[type="number"],
    input[type="date"],
    input[type="password"],
    input[type="time"],
    select {
        width: 100%;
        font-size: 26px;
        padding: 16px;
    }

    /* Tablas adaptadas */
    .tabla-produccion {
        font-size: 22px;
    }

    .tabla-produccion th,
    .tabla-produccion td {
        padding: 12px;
    }
}


/* ================================
   BOTÓN CANCELAR
   ================================ */
input[type="submit"].btnCancelar {
    background-color: #f8d7da !important;
    border: 1px solid #f5c2c7 !important;
    color: #842029 !important;
    padding: 20px !important;
    border-radius: 6px !important;
    font-size: 28px !important;
    font-weight: bold !important;
    cursor: pointer;
    width: 90% !important;
    display: block !important;
    margin: 25px 0 !important;
}

input[type="submit"].btnCancelar:hover {
    background-color: #f1bfc4 !important;
    border-color: #e4a5ac !important;
    color: #6a1a1f !important;
}

/* ================================
   BOTÓN CANCELAR EDICIÓN (WARNING)
   ================================ */
.btnCancelarEdicion {
    background-color: #ff9800 !important; /* naranja advertencia */
    color: #ffffff !important;
    border: none !important;
}

.btnCancelarEdicion:hover {
    background-color: #e68900 !important; /* tono más fuerte */
}




/* ================================
   LOGO FINAL
   ================================ */
.logo-final {
    width: 50%;
    max-width: 260px;
    display: block;
    margin: 30px auto 20px;
    opacity: 0.95;
    border-radius: 12px;
    transition: transform .2s ease, opacity .2s ease;
}

.logo-final:hover {
    transform: scale(1.05);
    opacity: 1;
}

/* ================================
   TABLA PRODUCCIÓN
   ================================ */
.tabla-produccion {
    width: 100%;
    border-collapse: collapse;
    background: var(--blanco);
    border-radius: 12px;
    overflow: hidden;
    font-size: 26px;
}

.tabla-produccion th {
    background: var(--verde);
    color: var(--blanco);
    padding: 16px;
    text-align: center;
    font-weight: 700;
    border-bottom: 4px solid var(--verde-oscuro);
}

.tabla-produccion td {
    padding: 16px;
    text-align: left;
    border-bottom: 2px solid var(--gris-medio);
    background: var(--blanco);
    font-weight: 700;
}

.tabla-produccion tr:nth-child(even) {
    background: var(--gris-claro);
}

.tabla-produccion tr:hover {
    background: var(--verde-claro);
    transition: background .2s;
}

/* ================================
   MENSAJES
   ================================ */

.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #2e7d32;
    color: white;
    padding: 18px 28px;
    border-radius: 12px;
    font-size: 26px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    z-index: 9999;
    opacity: 0;
    animation: toastFade 4s ease forwards;
}

.toast-error {
    background: #c62828;
}

.toast-warning {
    background: #f9a825;
}

@keyframes toastFade {
    0%   { opacity: 0; transform: translate(-50%, -20px); }
    10%  { opacity: 1; transform: translate(-50%, 0); }
    90%  { opacity: 1; transform: translate(-50%, 0); }
    100% { opacity: 0; transform: translate(-50%, -20px); }
}