/* ----------------------- */
/* CSS REDEEM BASE */
/* ---------------------- */
:root{
    --green: #2ea043;
    --green-dark: #1f7a34;
    --green-light: #e9f7ed;
    --ink: #14171a;
    --gray: #5b6470;
    --gray-light: #8b93a0;
    --border: #e6e9ec;
    --bg: #f7f8fa;
    --footer-bg: #2b3138;
}
*{box-sizing:border-box;}
body{
    margin:0;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--ink);
}
a{text-decoration:none;color:inherit;}
.wrap{max-width:1100px;margin:0 auto;padding:0 24px;}

/* HEADER */
header{
    display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;
    padding:28px 24px;max-width:1100px;margin:0 auto;
}

.logo {
    height: 40px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.logo a {
    display: flex;
    align-items: center;
    height: 100%;
    text-decoration: none;
}

.logo-img {
    height: 32px;
    width: auto;
    object-fit: contain;
    display: block;
}

.footer-logo-img{
    height: 26px;
    width: auto;
    display: block;
    filter: brightness(0) invert(1);
}

/* LANG SWITCHER */
.lang-switcher{position:relative;}
.lang-toggle{
    display:flex;align-items:center;gap:8px;
    background:#fff;border:1px solid var(--border);color:inherit;
    font-family:inherit;padding:8px 14px;border-radius:30px;font-size:0.9rem;font-weight:600;
    box-shadow:0 1px 3px rgba(0,0,0,0.04);cursor:pointer;
}
.lang-menu{
    display:none;position:absolute;top:calc(100% + 8px);right:0;
    background:#fff;border:1px solid var(--border);border-radius:14px;
    box-shadow:0 18px 40px rgba(15,23,42,.12);padding:8px;min-width:150px;z-index:1000;
}
.lang-menu.open{display:block;}
.lang-menu form{margin:0;}
.lang-menu a{display:block;padding:9px 12px;border-radius:8px;color:var(--ink);font-size:14px;transition:background .2s ease;}
.lang-menu a:hover{background:var(--bg);}

/* BANNER DE ACCIÓN */
.code-banner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px 40px;
    background: linear-gradient(135deg, #3fb655, #2a9540);
    border-radius: 20px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 36px;
    box-shadow: 0 20px 40px -18px rgba(30, 120, 50, 0.55);
}

/* Columna izquierda (Ícono + Texto) */
.banner-left {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1 1 380px;
}

.code-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.code-icon svg {
    width: 30px;
    height: 30px;
}

.code-copy h2 {
    margin: 0 0 6px;
    font-size: 1.5rem;
    font-weight: 800;
    color: #ffffff;
}

.code-copy p {
    margin: 0;
    opacity: 0.95;
    font-size: 0.95rem;
    line-height: 1.45;
    color: #ffffff;
}

/* Columna derecha: Formulario apilado */
.code-form-stacked {
    flex: 1 1 420px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 480px;
    width: 100%;
}

.code-form-stacked .form-group {
    width: 100%;
}

.code-form-stacked input {
    width: 100%;
    border: none;
    outline: none;
    padding: 13px 18px;
    font-size: 0.95rem;
    border-radius: 12px;
    color: var(--ink);
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    box-sizing: border-box;
}

.code-form-stacked input::placeholder {
    color: #8b93a0;
}

.code-form-stacked input:focus {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.4);
}

.code-form-stacked button {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--green-dark, #1f7a34);
    color: #ffffff;
    border: none;
    padding: 14px 22px;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    font-size: 1rem;
    transition: background .2s, transform .1s;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.code-form-stacked button:hover {
    background: #175c27;
}

.code-form-stacked button:active {
    transform: scale(0.98);
}

/* Texto e ícono de ayuda */
.pasos-info {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    background: rgba(255, 255, 255, 0.15);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.88rem;
}

.pasos-btn {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.info-icon {
    width: 20px;
    height: 20px;
    fill: #ffffff;
    transition: transform 0.2s;
}

.pasos-btn:hover .info-icon {
    transform: scale(1.15);
}

/* MODAL PASOS */
.pasos-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}

.pasos-modal.active {
    display: flex;
}

.pasos-modal-content {
    position: relative;
    max-width: 720px;
    width: 100%;
    max-height: 90vh;
    background: #ffffff;
    border-radius: 16px;
    padding: 20px 24px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: fadeInModal 0.25s ease-out;
}

.pasos-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border, #e6e9ec);
    margin-bottom: 16px;
}

.pasos-modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--ink, #14171a);
}

.pasos-modal-close {
    background: var(--bg, #f7f8fa);
    color: var(--gray, #5b6470);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    user-select: none;
}

.pasos-modal-close:hover {
    background: #e2e8f0;
    color: #000000;
}

.pasos-modal-body {
    overflow-y: auto;
    display: flex;
    justify-content: center;
}

.pasos-modal-body img {
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 68vh;
    object-fit: contain;
    border-radius: 8px;
    display: block;
}

@keyframes fadeInModal {
    from { opacity: 0; transform: translateY(-10px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* SECTION HEADER */
.section-title{
    text-align:center;margin:60px 0 34px;
    display:flex;align-items:center;justify-content:center;gap:16px;
    color:var(--gray-light);font-weight:700;letter-spacing:2px;font-size:0.85rem;
    text-transform:uppercase;
}
.section-title::before, .section-title::after{
    content:"";height:1px;width:60px;background:var(--border);
}

/* PRODUCTS CAROUSEL */
.products-wrapper{
    position:relative;
    max-width:1100px;
    margin:0 auto 70px;
    padding:0 40px;
}
.products{
    display:flex;
    gap:20px;
    overflow-x:auto;
    scroll-snap-type:x mandatory;
    scroll-behavior:smooth;
    padding:10px 4px 20px;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:none;
}
.products::-webkit-scrollbar{display:none;}

/* Estilos para las acciones dentro de la tarjeta de producto */
.product-card{
    flex:0 0 calc(25% - 15px);
    min-width:220px;
    scroll-snap-align:start;
    background:#fff;border:1px solid var(--border);border-radius:16px;
    padding:26px 20px;text-align:center;cursor:pointer;
    transition:transform .2s, box-shadow .2s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.product-card:hover{transform:translateY(-4px);box-shadow:0 14px 28px -16px rgba(0,0,0,0.18);}
.product-illustration{
    height:70px;display:flex;align-items:center;justify-content:center;margin-bottom:16px;
}
.illustration-img{max-width:100%;max-height:100%;width:auto;height:auto;display:block;object-fit:contain;}
.product-card h3{margin:0 0 8px;font-size:1.15rem;}
.product-card p{margin:0 0 14px;color:var(--gray);font-size:0.88rem;line-height:1.4;min-height:40px;}
.product-card .link{
    color:var(--green-dark);font-weight:700;font-size:0.88rem;
    display:inline-flex;align-items:center;gap:6px;
}
.product-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: auto;
    padding-top: 10px;
}
.product-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--green-dark);
    background: var(--green-light);
    transition: background 0.2s, color 0.2s, transform 0.1s;
    text-decoration: none;
}
.product-btn:hover {
    background: #d8f3e1;
    color: var(--green-dark);
    transform: translateY(-1px);
}
.product-btn .btn-icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
    flex-shrink: 0;
}
.carousel-btn{
    position:absolute;
    top:50%;
    transform:translateY(-50%);
    width:40px;
    height:40px;
    background:#fff;
    border:1px solid var(--border);
    border-radius:50%;
    box-shadow:0 4px 12px rgba(0,0,0,0.12);
    cursor:pointer;
    display:flex;
    align-items:center;
    justify-content:center;
    z-index:10;
    font-size:1.1rem;
    color:var(--ink);
    transition:background .2s, transform .2s;
}
.carousel-btn:hover{
    background:var(--bg);
    transform:translateY(-50%) scale(1.08);
}
.carousel-btn.prev{left:0;}
.carousel-btn.next{right:0;}

/* FOOTER */
footer{background:var(--footer-bg);color:#c7ccd1;padding:56px 0 24px;}
.footer-grid{
    max-width:1100px;margin:0 auto;padding:0 24px;
    display:grid;grid-template-columns:2fr 2.5fr 2fr;gap:24px; 
}
.footer-grid .logo{color:#fff;margin-bottom:14px;}
.footer-grid p{font-size:0.85rem;line-height:1.5;color:#9aa1a8;max-width:220px;}
.socials{display:flex;gap:10px;margin-top:16px;}
.socials a{
    width:34px;height:34px;border-radius:50%;background:rgba(255,255,255,0.08);
    display:flex;align-items:center;justify-content:center;
}
.socials svg{width:15px;height:15px;fill:#fff;}
footer h5{color:#fff;font-size:0.8rem;letter-spacing:1px;margin:0 0 16px;}
footer ul{list-style:none;margin:0;padding:0;}
footer li{margin-bottom:10px;font-size:0.88rem;}
footer a:hover{color:#fff;}

.footer-products-list{
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.footer-contact{text-align: right;}
.footer-bottom{
    text-align:center;margin-top:40px;padding-top:20px;
    border-top:1px solid rgba(255,255,255,0.08);
    font-size:0.8rem;color:#8b929a;
}

/* Enlace de Condiciones Legales en Footer */
.footer-legal {
    margin-top: 16px;
}

.legal-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.82rem;
    color: #9aa1a8;
    transition: color 0.2s;
    text-decoration: none;
}

.legal-link:hover {
    color: #ffffff;
    text-decoration: underline;
}

.legal-icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
    flex-shrink: 0;
}

/* RESPONSIVO MULTIDISPOSITIVO */
@media (max-width: 850px) {
    .code-banner {
    flex-direction: column;
    align-items: stretch;
    padding: 28px 24px;
    gap: 24px;
    }
    .banner-left { flex: 1 1 auto; }
    .code-form-stacked { flex: 1 1 auto; max-width: 100%; }
    .footer-grid{ grid-template-columns: 1fr 1fr; }
    .footer-products-list{ grid-template-columns: repeat(2, 1fr); }
    .footer-contact{ text-align: left; }
}

@media (max-width: 520px) {
    .banner-left {
    flex-direction: column;
    text-align: center;
    align-items: center;
    }
    .pasos-modal-content { padding: 16px; border-radius: 12px; }
    .pasos-modal-header h3 { font-size: 1.05rem; }
    .products-wrapper { padding: 0 10px; }
    .carousel-btn { display: none; } /* Oculta botones en móvil para usar gestos táctiles */
    .footer-grid { grid-template-columns: 1fr; }
    .footer-products-list { grid-template-columns: 1fr; }
}



/* ----------------------- */
/* CSS REDEEM HOME */
/* ---------------------- */
/* HERO */
.hero{
    max-width:1100px;margin:0 auto;padding:20px 24px 0px;
    display:flex;align-items:center;gap:32px;flex-wrap:wrap;
}
.hero-text{flex:1 1 480px;}
.hero-text h1{
    font-size:2.9rem;line-height:1.15;font-weight:800;margin:0 0 20px;
}
.hero-text h1 .g{color:var(--green);}
.hero-text p{
    font-size:1.05rem;color:var(--gray);max-width:460px;line-height:1.5;
}
.hero-visual{flex:1 1 320px;display:flex;justify-content:center;position:relative;min-height:260px;}
.hero-img{width:100%;max-width:340px;height:auto;display:block;}

/* WHY */
.why-grid{
    max-width:1100px;margin:0 auto 90px;padding:0 24px;
    display:grid;grid-template-columns:repeat(4,1fr);gap:20px;
}
.why-card{
    background:#fff;border:1px solid var(--border);border-radius:16px;
    padding:32px 20px;text-align:center;
}
.why-icon{
    width:56px;height:56px;border-radius:50%;
    display:flex;align-items:center;justify-content:center;margin:0 auto 16px;
    font-size:22px;
}
.why-card h4{margin:0 0 6px;font-size:1.05rem;}
.why-card p{margin:0;color:var(--gray);font-size:0.88rem;}



/* ----------------------- */
/* CSS REDEEM NOTIFICATION */
/* ---------------------- */
/* SEGMENTO CONFIRMACIÓN (QR + PASOS) */
.confirmation-section{
    max-width:1100px;
    margin:10px auto 30px;
    padding:0 24px;
}
.confirmation-box {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 36px 40px;
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.05);
}
.split-container {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 36px;
    align-items: center;
}
.qr-side {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px 20px;
    background: var(--bg);
    border-radius: 16px;
    border: 1px dashed rgba(46, 160, 67, 0.4);
}
.qr-wrapper {
    background: #ffffff;
    padding: 12px;
    border-radius: 14px;
    border: 1px solid var(--border);
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
    margin-bottom: 16px;
}

/* FORZAR QUE EL CANVAS DEL QR SEA CUADRADO Y NO HEREDE BORDES CIRCULARES */
#qrOutput {
    display: flex;
    align-items: center;
    justify-content: center;
}
  #qrOutput canvas {
    border-radius: 0 !important;
    display: block;
    max-width: 100%;
    height: auto;
}

.qr-side p {
    font-size: 0.88rem;
    color: var(--gray);
    margin: 0 0 12px;
    line-height: 1.4;
    font-weight: 500;
}
.license-url-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--green-dark);
    font-weight: 700;
    font-size: 0.78rem; /* Reducción ligera de la letra (antes 0.88rem) */
    text-decoration: none;
    background: var(--green-light);
    padding: 8px 14px;
    border-radius: 8px;
    transition: background .2s, color .2s;
    
    /* Garantiza que la URL se adapte */
    white-space: nowrap; /* Intenta mantenerse siempre en 1 sola línea */
    overflow: hidden;
    text-overflow: ellipsis; /* Si la pantalla es muy pequeña, muestra "..." sin romper el diseño */
    max-width: 100%;
}
.license-url-btn:hover {
    background: #d8f3e1;
    color: var(--green-dark);
}
.instructions-side {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.instructions-side h2 {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--ink);
    line-height: 1.25;
    margin: 0;
}
.steps-subtitle {
    color: var(--gray);
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0;
}
.steps-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0;
    padding: 0;
}
.steps-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 0.95rem;
    color: var(--ink);
    line-height: 1.45;
}
.step-number {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    background: var(--green);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
}
.extra-info-card {
    margin-top: 6px;
    padding: 14px 16px;
    background: var(--bg);
    border-left: 4px solid var(--green);
    border-radius: 0 10px 10px 0;
    font-size: 0.88rem;
    color: var(--gray);
    line-height: 1.45;
}

@media (max-width: 850px){
    .split-container {
      grid-template-columns: 1fr;
      gap: 24px;
    }
    .confirmation-box {
      padding: 24px 20px;
    }
}

/* Contenedor flexible para alinear el enlace y el botón de copiar */
.url-copy-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    max-width: 480px; /* Aumenta el ancho máximo para permitir URLs largas en una sola línea */
    margin: 0 auto;
}

/* Estilo del botón de copiar */
.btn-copy-url {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px; /* Espacio mínimo entre el ícono y el texto */
    background-color: var(--green);
    color: #ffffff;
    border: none;
    padding: 4px 8px; /* Padding reducido para un botón compacto */
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.72rem; /* Tipografía más discreta */
    font-weight: 600;
    height: 31px; /* Altura alineada con el link de la URL */
    white-space: nowrap;
    transition: background .2s, transform .1s;
}

.btn-copy-url:hover {
    background-color: var(--green-dark);
}

.btn-copy-url:active {
    transform: scale(0.95);
}

.copy-icon {
    width: 14px;
    height: 14px;
    fill: #ffffff;
    flex-shrink: 0;
}

/* En pantallas pequeñas (móviles) permite romper la URL si no cabe */
@media (max-width: 480px) {
    .license-url-btn {
      font-size: 0.72rem; /* Tamaño aún más compacto para smartphones */
      white-space: normal; /* Permite salto de línea si el móvil es muy estrecho */
      word-break: break-all;
  }
}

/* SECCIÓN INFO PRODUCTO EN CONFIRMACIÓN */
.product-info-section {
    max-width: 1100px;
    margin: 20px auto 40px;
    padding: 0 24px;
}

.product-info-box {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 28px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.05);
}

/* Logo */
.product-info-logo {
    flex: 0 0 140px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-logo-img {
    max-width: 100%;
    max-height: 55px;
    object-fit: contain;
    display: block;
}

/* Descripción */
.product-info-desc {
    flex: 1 1 auto;
}

.product-info-desc h3 {
    margin: 0 0 6px;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--ink);
}

.product-info-desc p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--gray);
    line-height: 1.45;
}

/* Botones a la derecha */
.product-info-actions {
    flex: 0 0 220px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.product-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 14px;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--green-dark);
    background: var(--green-light);
    text-decoration: none;
    transition: background 0.2s, transform 0.1s;
    white-space: nowrap;
}

.product-btn:hover {
    background: #d8f3e1;
    color: var(--green-dark);
    transform: translateY(-1px);
}

.product-btn .btn-icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
    flex-shrink: 0;
}

/* RESPONSIVO */
@media (max-width: 850px) {
    .product-info-box {
      flex-direction: column;
      text-align: center;
      align-items: center;
      padding: 24px 20px;
    }

    .product-info-logo {
      flex: 0 0 auto;
    }

    .product-info-actions {
      flex: 1 1 100%;
      width: 100%;
      max-width: 320px;
    }
}


/* ESTILOS PARA EL MODAL */
/* Fondo oscuro oscurecido (Backdrop) */
.modal-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}

/* Estado activo para mostrar el modal */
.modal-backdrop.active {
    display: flex;
}

/* Tarjeta del Modal */
.modal-card {
    background: #ffffff;
    width: 100%;
    max-width: 440px;
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    animation: modalScale 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScale {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

/* Efecto visual al hacer clic fuera (Efecto Backdrop Estático) */
.modal-card.shake {
    animation: modalShake 0.35s ease-in-out;
}

@keyframes modalShake {
    0%, 100% { transform: scale(1); }
    20%, 60% { transform: scale(1.02); }
    40%, 80% { transform: scale(0.98); }
}

/* Encabezado */
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #f1f5f9;
}

.modal-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
}

.modal-close-btn {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: #64748b;
    cursor: pointer;
    line-height: 1;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
}

.modal-close-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
}

/* Cuerpo */
.modal-body {
    padding: 24px;
}

.modal-instruction {
    margin: 0 0 20px;
    font-size: 0.9rem;
    color: #475569;
    line-height: 1.5;
}

/* Pie y Botones */
.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
}

.btn-secondary {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #334155;
    padding: 10px 18px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-secondary:hover {
    background: #f1f5f9;
}

.btn-primary {
    background: var(--green, #2ea043);
    border: none;
    color: #ffffff;
    padding: 10px 22px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
}

.btn-primary:hover {
    opacity: 0.9;
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn {
    border: none;
    color: #198754;;
    padding: 10px 22px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
}

.btn-warning {
    background: var(--yellow, #f59e0b);
    border: none;
    color: #ffffff;
    padding: 10px 22px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
}

.btn-warning:hover {
    opacity: 0.9;
}

.btn-warning:active {
    transform: scale(0.98);
}


/* ESTILOS PARA EL OTP */
.otp-input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.otp-label {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--ink, #14171a);
    text-align: center;
}

.otp-input-styled {
    width: 100%;
    max-width: 280px;
    padding: 14px 16px;
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'Segoe UI', monospace;
    letter-spacing: 0.3em;
    text-align: center;
    color: var(--ink, #14171a);
    background: var(--bg, #f7f8fa);
    border: 2px solid var(--border, #e6e9ec);
    border-radius: 14px;
    outline: none;
    transition: all 0.2s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

.otp-input-styled::placeholder {
    color: var(--gray-light, #8b93a0);
    letter-spacing: 0.2em;
    font-weight: 400;
}

.otp-input-styled:focus {
    background: #ffffff;
    border-color: var(--green, #2ea043);
    box-shadow: 0 0 0 4px rgba(46, 160, 67, 0.15);
}


/* CONTENEDOR DE LA TABLA (RESPONSIVO) */
.table-container {
    width: 100%;
    max-width: 1100px;
    margin: 20px auto;
    background: #ffffff;
    border: 1px solid var(--border, #e6e9ec);
    border-radius: 16px;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.05);
    overflow-x: auto; /* Permite scroll horizontal en móviles sin romper la pantalla */
}

/* TABLA BASE */
.custom-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9rem;
    color: var(--ink, #14171a);
}

/* ENCABEZADO */
.custom-table thead {
    background: var(--bg, #f7f8fa);
    border-bottom: 1px solid var(--border, #e6e9ec);
}

.custom-table th {
    padding: 16px 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--gray, #5b6470);
}

/* FILAS Y CELDAS */
.custom-table td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border, #e6e9ec);
    vertical-align: middle;
}

.custom-table tbody tr:last-child td {
    border-bottom: none; /* Quita el borde de la última fila */
}

.custom-table tbody tr:hover {
    background: rgba(233, 247, 237, 0.3); /* Cambia suavemente de fondo al pasar el cursor */
}

/* COMPONENTES INTERNOS DE LA TABLA */
.table-product {
    display: flex;
    flex-direction: column;
}

.table-product strong {
    font-size: 0.95rem;
    color: var(--ink, #14171a);
}

.table-product small {
        font-size: 0.8rem;
        color: var(--gray, #5b6470);
        margin-top: 2px;
}

/* Badge para códigos */
.code-badge {
    background: #f1f5f9;
    color: #334155;
    padding: 4px 8px;
    border-radius: 6px;
    font-family: monospace;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid #e2e8f0;
}

/* Badges de Estado */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
}

.status-active {
    background: var(--green-light, #e9f7ed);
    color: var(--green-dark, #1f7a34);
}

.status-pending {
    background: #fef3c7;
    color: #92400e;
}

/* Botón dentro de tabla */
.table-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--green-dark, #1f7a34);
    font-weight: 700;
    font-size: 0.85rem;
    text-decoration: none;
    transition: color 0.2s;
}

.table-btn:hover {
    color: var(--green, #2ea043);
    text-decoration: underline;
}

.text-center {
    text-align: center;
}

#btnResendOtp:disabled {
    pointer-events: none;
    cursor: default;
}
