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);
    }
}


/* === AUTOPRINT UX PATCH MAYO 2026 === */

:root{
  --ap-blue:#1266f1;
  --ap-blue-dark:#0b4fc4;
  --ap-orange:#ff8a00;
  --ap-bg:#f4f7fb;
  --ap-card:#ffffff;
  --ap-text:#111827;
  --ap-muted:#6b7280;
  --ap-border:#e5e7eb;
  --ap-shadow:0 14px 34px rgba(15,23,42,.12);
}

body{
  background:var(--ap-bg);
}

a, button{
  -webkit-tap-highlight-color: transparent;
}

.btn-back,
.back-btn,
.doc-back,
.option-btn-secondary,
.pc-btn-secondary,
#btnCancelar{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  min-height:46px !important;
  padding:0 18px !important;
  border-radius:999px !important;
  border:1px solid var(--ap-border) !important;
  background:#fff !important;
  color:var(--ap-text) !important;
  font-size:16px !important;
  font-weight:800 !important;
  text-decoration:none !important;
  box-shadow:0 8px 20px rgba(15,23,42,.08) !important;
}

.btn-back::before,
.back-btn::before,
.doc-back::before,
.option-btn-secondary::before,
.pc-btn-secondary::before{
  content:"← ";
}

.pulse,
.start-btn,
.btn-start,
#btnComenzar,
a[href="/tipo-cliente"],
a[href="/persona/modo"],
button[type="submit"]{
  animation:apPulse 1.65s infinite;
}

@keyframes apPulse{
  0%{transform:scale(1); box-shadow:0 10px 24px rgba(18,102,241,.20);}
  50%{transform:scale(1.025); box-shadow:0 16px 36px rgba(18,102,241,.34);}
  100%{transform:scale(1); box-shadow:0 10px 24px rgba(18,102,241,.20);}
}

.option-btn,
.option-btn-link,
.wizard-option,
.pc-btn,
button,
input[type="file"]::file-selector-button{
  border-radius:22px !important;
  font-weight:900 !important;
}

.option-btn-link,
.wizard-option,
.pc-btn-primary,
button[type="submit"]{
  box-shadow:var(--ap-shadow) !important;
}

.pc-files-title,
h1{
  letter-spacing:-.04em;
}

.pc-files-title{
  font-size:28px !important;
  text-align:center !important;
  margin:8px 0 12px !important;
}

.pc-upload-box,
.upload-box,
.files-upload-box{
  padding:14px !important;
  border-radius:24px !important;
  background:#fff !important;
  box-shadow:var(--ap-shadow) !important;
}

.pc-file-list,
#listaArchivos,
.preview-list,
.files-list{
  display:grid !important;
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  gap:10px !important;
}

.pc-file-card,
.file-card,
.preview-card,
.archivo-card{
  border-radius:18px !important;
  padding:10px !important;
  background:#fff !important;
  border:1px solid var(--ap-border) !important;
  box-shadow:0 8px 18px rgba(15,23,42,.08) !important;
  overflow:hidden !important;
}

.pc-file-card img,
.file-card img,
.preview-card img,
.archivo-card img{
  max-height:120px !important;
  object-fit:contain !important;
}

.alert,
.notice,
.warning,
.info-box,
.debug,
.dev-note{
  display:none !important;
}

.install-card,
.how-app-card,
.app-install-card,
a[href="#install"],
button[data-install]{
  border-radius:24px !important;
  border:1px solid var(--ap-border) !important;
  background:#fff !important;
  box-shadow:var(--ap-shadow) !important;
  padding:16px !important;
  font-weight:900 !important;
}

@media(max-width:520px){
  body{
    font-size:16px;
  }

  .container,
  .page,
  .wizard-container,
  .pc-container{
    padding:12px !important;
  }

  h1{
    font-size:30px !important;
    line-height:1.02 !important;
  }

  .option-btn-link,
  .wizard-option{
    min-height:92px !important;
    padding:18px !important;
    font-size:18px !important;
  }

  .pc-btn-primary{
    min-height:58px !important;
    font-size:18px !important;
  }
}
/* === FIN AUTOPRINT UX PATCH MAYO 2026 === */
