body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #F3F4F6;
    color: #111827;
}

.page {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 20px 14px;
    box-sizing: border-box;
}

.card {
    width: 100%;
    max-width: 420px;
    background: white;
    border-radius: 18px;
    padding: 22px 18px 24px 18px;
    box-sizing: border-box;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.brand-box {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

.logo {
    width: 100%;
    max-width: 360px;
    height: auto;
    display: block;
    margin: 0 auto 10px auto;
}

h1 {
    margin: 0 0 8px 0;
    text-align: center;
    color: #1E3A8A;
    font-size: 32px;
}

.subtitle {
    margin: 0 0 22px 0;
    text-align: center;
    font-size: 18px;
}

.form-box {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

label {
    font-weight: bold;
    font-size: 16px;
}

input {
    padding: 14px;
    border: 1px solid #D1D5DB;
    border-radius: 12px;
    font-size: 16px;
    box-sizing: border-box;
}

.notice {
    margin-top: 8px;
    background: #FFF7ED;
    color: #9A3412;
    border-radius: 12px;
    padding: 12px;
    font-size: 15px;
}

button {
    margin-top: 10px;
    border: none;
    border-radius: 14px;
    padding: 16px;
    font-size: 18px;
    font-weight: bold;
    background: #F97316;
    color: white;
    cursor: pointer;
}

.option-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin-top: 18px;
}

.option-btn {
    border: none;
    border-radius: 16px;
    padding: 22px 16px;
    font-size: 24px;
    font-weight: bold;
    background: #1E3A8A;
    color: white;
    cursor: pointer;
}

.option-btn-link {
    display: block;
    text-decoration: none;
    text-align: center;
    border: none;
    border-radius: 16px;
    padding: 22px 16px;
    font-size: 24px;
    font-weight: bold;
    background: #1E3A8A;
    color: white;
    cursor: pointer;
    transition: all 0.15s ease;
}

.option-btn-secondary {
    background: #E0F2FE;
    color: #0369A1;
    border: 2px solid #7DD3FC;
    font-weight: 700;
}

.option-btn-secondary:hover {
    background: #BAE6FD;
    transform: scale(1.02);
}

.option-btn-orange {
    background: #F97316;
}

.help-box-green {
    margin-top: 12px;
    background: #DCFCE7;
    color: #166534;
    border-radius: 12px;
    padding: 14px;
    font-size: 15px;
    line-height: 1.45;
}

.search-input {
    width: 100%;
    padding: 14px;
    border: 1px solid #D1D5DB;
    border-radius: 12px;
    font-size: 16px;
    box-sizing: border-box;
    margin-bottom: 14px;
}

.copias-control {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 20px 0;
}

.copias-control button {
    font-size: 32px;
    padding: 10px 18px;
    border-radius: 10px;
    border: none;
    background: #1E3A8A;
    color: white;
}

#cantidad {
    font-size: 40px;
    font-weight: bold;
}

textarea {
    padding: 14px;
    border: 1px solid #D1D5DB;
    border-radius: 12px;
    font-size: 16px;
    box-sizing: border-box;
    width: 100%;
    resize: vertical;
    min-height: 110px;
}

.ia-warning {
    margin-top: 18px;
    background: #4A2C0A;
    color: #FCD34D;
    padding: 14px;
    border-radius: 12px;
    font-size: 15px;
    line-height: 1.4;
}

.catalog-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 14px;
    margin-bottom: 16px;
}

.catalog-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 14px;
    padding: 14px;
    gap: 12px;
}

.catalog-info h3 {
    margin: 0 0 4px 0;
    font-size: 18px;
    color: #111827;
}

.catalog-info p {
    margin: 0;
    font-size: 14px;
    color: #6B7280;
}

.qty-box {
    display: flex;
    align-items: center;
    gap: 10px;
}

.qty-box button {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 10px;
    background: #1E3A8A;
    color: white;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
}

.qty-box .qty {
    min-width: 20px;
    text-align: center;
    font-size: 22px;
    font-weight: bold;
}

.resumen-box {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 16px;
    margin: 14px 0;
}

.resumen-box hr {
    border: none;
    border-top: 1px solid #E5E7EB;
    margin: 10px 0;
}

.pedido-box {
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: #FFFFFF;
    border-radius: 14px;
    border: 1px solid #E5E7EB;
    padding: 18px;
    margin: 16px 0;
}

.pedido-linea {
    font-size: 26px;
    font-weight: bold;
    text-align: center;
}

#qrcode {
    margin: 20px auto;
    display: flex;
    justify-content: center;
}

.semaforo-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin: 18px 0;
    padding: 18px;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 16px;
}

.semaforo-luz {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 4px solid #D1D5DB;
    background: #E5E7EB;
}

.luz-roja {
    background: #DC2626;
    border-color: #991B1B;
}

.luz-amarilla {
    background: #F59E0B;
    border-color: #B45309;
}

.luz-verde {
    background: #16A34A;
    border-color: #166534;
}

.luz-gris {
    background: #9CA3AF;
    border-color: #6B7280;
}

.semaforo-texto {
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    color: #111827;
}

.option-btn-primary {
    background: #16A34A;
    color: white;
    border: none;
    font-weight: 900;
    box-shadow: 0 6px 16px rgba(22, 163, 74, 0.35);
}

.option-btn-primary:hover {
    background: #15803D;
    transform: scale(1.03);
}

/* ===== ALERTA ROBOT PEDIDO LISTO ===== */

.robot-alert-overlay {
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, 0.82);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    z-index: 9999;
}

.robot-alert-card {
    width: 100%;
    max-width: 360px;
    background: #FFFFFF;
    border-radius: 22px;
    padding: 26px 20px 24px 20px;
    box-sizing: border-box;
    text-align: center;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
    border: 2px solid #DBEAFE;
}

.robot-alert-image {
    width: 170px;
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto 14px auto;
    animation: robotPulseShake 0.95s infinite ease-in-out;
    transform-origin: center center;
}

.robot-alert-title {
    font-size: 28px;
    font-weight: 900;
    color: #16A34A;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.robot-alert-folio {
    font-size: 22px;
    font-weight: 800;
    color: #1E3A8A;
    margin-bottom: 10px;
}

.robot-alert-subtitle {
    font-size: 16px;
    line-height: 1.4;
    color: #374151;
    margin-bottom: 18px;
}

.robot-alert-button {
    width: 100%;
    max-width: 220px;
    margin: 0 auto;
    display: inline-block;
    background: #F97316;
    color: #FFFFFF;
    border: none;
    border-radius: 14px;
    padding: 14px 16px;
    font-size: 18px;
    font-weight: 900;
    cursor: pointer;
}

@keyframes robotPulseShake {
    0% {
        transform: scale(1) rotate(0deg) translateX(0);
    }
    15% {
        transform: scale(1.03) rotate(-1deg) translateX(-1px);
    }
    30% {
        transform: scale(1.06) rotate(1deg) translateX(1px);
    }
    45% {
        transform: scale(1.04) rotate(-1deg) translateX(-1px);
    }
    60% {
        transform: scale(1.07) rotate(1deg) translateX(1px);
    }
    75% {
        transform: scale(1.04) rotate(-0.5deg) translateX(-1px);
    }
    100% {
        transform: scale(1) rotate(0deg) translateX(0);
    }
}
