/* ── Overrides de layout para las páginas QRs GUI ── */
.qrs-page #wrapper {
    max-width: 100% !important;
    padding-left: 0;
    padding-right: 0;
}
.qrs-page body {
    align-items: flex-start !important;
}

/* ── Cabecera de página ── */
.qrs-hero {
    padding: 32px 40px 24px;
    border-bottom: 1px solid rgba(255,255,255,.2);
    margin-bottom: 0;
}
.qrs-hero h2 {
    color: #fff;
    font-weight: 700;
    font-size: 1.7rem;
    text-shadow: 0 1px 4px rgba(0,0,0,.2);
    margin-bottom: 4px;
}
.qrs-hero p {
    color: rgba(255,255,255,.85);
    font-size: .92rem;
    margin: 0;
}

/* ── Contenedor principal ── */
.qrs-body {
    padding: 28px 40px 48px;
}

/* ── Tarjeta ── */
.qrs-card {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 6px 32px rgba(231,53,137,.12);
    border-top: 3px solid #E73589;
    padding: 32px 28px;
    color: #333;
    height: 100%;
}
.qrs-card-sm {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 6px 32px rgba(231,53,137,.12);
    border-top: 3px solid #E73589;
    padding: 20px 24px;
    color: #333;
}

/* ── Título de sección dentro de card ── */
.qrs-section-title {
    color: #E73589;
    font-weight: 700;
    font-size: .95rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    border-bottom: 2px solid #FFDBEC;
    padding-bottom: 8px;
    margin-bottom: 20px;
    margin-top: 24px;
}
.qrs-section-title:first-child {
    margin-top: 0;
}

/* ── Drop zone ── */
.drop-zone {
    border: 2px dashed #E73589;
    border-radius: 14px;
    padding: 36px 20px;
    text-align: center;
    cursor: pointer;
    transition: background .2s, border-color .2s;
    background: #fff8fb;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 180px;
}
.drop-zone:hover,
.drop-zone.drag-over {
    background: #FFDBEC;
    border-color: #c01e70;
}
.drop-zone.loaded {
    border-style: solid;
    border-color: #4ebe69;
    background: #f3fbf6;
}
.drop-zone.loaded:hover { background: #e6f7ec; border-color: #3aa85a; }
.drop-zone svg { color: #E73589; margin-bottom: 10px; }
.drop-zone p  { color: #6F7070; font-size: .88rem; margin: 0; line-height: 1.5; }
.drop-zone img.preview {
    max-width: 260px;
    max-height: 220px;
    border-radius: 10px;
    object-fit: contain;
}

/* ── Inputs y labels ── */
.qrs-label {
    color: #E73589;
    font-weight: 600;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .03em;
    margin-bottom: 5px;
    display: block;
}
.qrs-input {
    border: 1.5px solid #f0c0d8;
    border-radius: 10px;
    padding: 10px 14px;
    width: 100%;
    font-size: .9rem;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
    background: #fff;
    color: #333;
}
.qrs-input:focus {
    border-color: #E73589;
    box-shadow: 0 0 0 3px rgba(231,53,137,.1);
}

/* ── Orientación / Radio ── */
.orient-group { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.orient-group input[type=radio] { accent-color: #E73589; width: 17px; height: 17px; }
.orient-group label { color: #444; cursor: pointer; margin-bottom: 0; font-size: .9rem; }

/* ── Escala ── */
.scale-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.scale-grid input[type=radio] { display: none; }
.scale-grid label {
    border: 1.5px solid #E73589;
    border-radius: 8px;
    padding: 5px 12px;
    cursor: pointer;
    font-size: .8rem;
    color: #E73589;
    transition: all .15s;
    white-space: nowrap;
    font-weight: 600;
}
.scale-grid input[type=radio]:checked + label {
    background: #E73589;
    color: #fff;
}

/* ── Botones ── */
.btn-qrs-primary {
    background: #E73589;
    color: #fff !important;
    border: none;
    border-radius: 12px;
    padding: 13px 32px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s, transform .15s, box-shadow .2s;
    width: 100%;
    letter-spacing: .03em;
    box-shadow: 0 4px 14px rgba(231,53,137,.30);
}
.btn-qrs-primary:hover  { background: #c01e70; color: #fff; transform: translateY(-2px); box-shadow: 0 8px 22px rgba(231,53,137,.42); }
.btn-qrs-primary:active { transform: scale(.98); box-shadow: none; }
.btn-qrs-primary:disabled { background: #f8c3dc; cursor: not-allowed; box-shadow: none; transform: none; }

.btn-qrs-secondary {
    background: #6F7070;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 9px 24px;
    font-size: .88rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
    text-decoration: none;
    display: inline-block;
}
.btn-qrs-secondary:hover { background: #444; color: #fff; }

.btn-qrs-outline {
    background: transparent;
    color: #E73589;
    border: 2px solid #E73589;
    border-radius: 10px;
    padding: 9px 24px;
    font-size: .88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
    width: 100%;
}
.btn-qrs-outline:hover { background: #E73589; color: #fff; }

/* ── Panel de resultado ── */
.result-panel { display: none; text-align: center; }
.result-panel.show { display: block; }
.result-panel img {
    max-width: 100%;
    border: 2px solid #FFDBEC;
    border-radius: 12px;
    margin-bottom: 16px;
}
.result-empty { text-align: center; padding: 40px 0; }
.result-empty img { opacity: .28; max-width: 140px; }
.result-empty p { color: #bbb; margin-top: 12px; font-size: .88rem; }

/* ── Tabs ── */
.qrs-tabs { border-bottom: 2px solid #FFDBEC; margin-bottom: 0; }
.qrs-tabs .nav-item { margin-bottom: -2px; }
.qrs-tabs .nav-link {
    color: #E73589;
    border: 2px solid transparent;
    border-bottom: none;
    border-radius: 12px 12px 0 0;
    padding: 10px 24px;
    font-weight: 700;
    font-size: .9rem;
    transition: all .15s;
    background: transparent;
}
.qrs-tabs .nav-link:hover { background: #fff8fb; }
.qrs-tabs .nav-link.active {
    background: #fff;
    color: #E73589;
    border-color: #FFDBEC;
    border-bottom-color: #fff;
}

/* ── Tabla de datos resultado ── */
.datos-tabla { width: 100%; border-collapse: collapse; font-size: .88rem; margin-top: 8px; }
.datos-tabla td { padding: 7px 10px; border-bottom: 1px solid #fef0f6; vertical-align: top; }
.datos-tabla td:first-child { color: #E73589; font-weight: 700; width: 40%; font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; }
.datos-tabla td:last-child { color: #333; }

/* ── Loader ── */
.qrs-loader { display: none; text-align: center; padding: 32px 0; }
.qrs-loader.show { display: block; }
.qrs-spinner {
    width: 52px; height: 52px;
    border: 5px solid #FFDBEC;
    border-top-color: #E73589;
    border-radius: 50%;
    animation: qrs-spin .75s linear infinite;
    margin: 0 auto 14px;
}
@keyframes qrs-spin { to { transform: rotate(360deg); } }

/* ── SDK wrapper ── */
.sdk-wrapper {
    border-radius: 14px;
    overflow: hidden;
    border: 2px solid #FFDBEC;
    background: #fff8fb;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sdk-placeholder { text-align: center; color: #ccc; padding: 40px 20px; width: 100%; }
.sdk-placeholder i { font-size: 3.5rem; color: #FFDBEC; display: block; margin-bottom: 12px; }
.sdk-placeholder p { color: #aaa; font-size: .9rem; }

/* ── Token banner ── */
.token-banner {
    background: rgba(255,255,255,.18);
    border: 1px solid rgba(255,255,255,.35);
    border-radius: 14px;
    padding: 16px 24px;
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}
.token-banner label { color: #fff; font-weight: 700; font-size: .88rem; white-space: nowrap; margin: 0; }
.token-banner input {
    border: 1.5px solid rgba(255,255,255,.5);
    border-radius: 10px;
    padding: 9px 14px;
    font-size: .9rem;
    background: rgba(255,255,255,.9);
    flex: 1;
    min-width: 200px;
    outline: none;
    transition: border-color .15s;
}
.token-banner input:focus { border-color: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,.2); }

/* ── Snackbar ── */
.qrs-snack {
    position: fixed; bottom: 30px; left: 50%;
    transform: translateX(-50%) translateY(12px);
    background: #1c1c1e; color: #fff;
    padding: 14px 22px;
    border-radius: 12px;
    z-index: 9999; font-size: 15px;
    opacity: 0; transition: opacity .3s, transform .3s;
    pointer-events: none;
    display: flex; align-items: center; gap: 12px;
    max-width: 90vw;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .45);
}
.qrs-snack.show { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }
.qrs-snack-retry {
    background: #E73589;
    border: none;
    color: #fff;
    border-radius: 8px;
    padding: 5px 14px;
    font-size: .78rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s;
}
.qrs-snack-retry:hover { background: #c01e70; }

/* ── Fullscreen camera overlay ── */
.sdk-fullscreen {
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: #000;
    display: none;
    flex-direction: column;
}
.sdk-fullscreen.show { display: flex; }
.sdk-fullscreen-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 8px 16px;
    background: #111;
    flex-shrink: 0;
}
.btn-sdk-close {
    display: inline-flex;
    align-items: center;
    background: transparent;
    border: 1.5px solid rgba(255,255,255,.35);
    color: #fff;
    border-radius: 8px;
    padding: 6px 16px;
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, border-color .15s;
}
.btn-sdk-close:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.6); }

/* ── Botón CTA escáner ── */
.btn-sdk-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(145deg, #E73589 0%, #c01e70 100%);
    color: #fff;
    border: none;
    border-radius: 24px;
    padding: 40px 32px;
    cursor: pointer;
    transition: transform .2s, box-shadow .2s;
    box-shadow: 0 10px 32px rgba(231,53,137,.38);
    width: 100%;
    max-width: 260px;
    text-decoration: none;
}
.btn-sdk-cta:hover  { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(231,53,137,.50); }
.btn-sdk-cta:active { transform: scale(.97); }
.btn-sdk-cta-icon  { font-size: 3.2rem; line-height: 1; }
.btn-sdk-cta-label { font-size: 1.1rem; font-weight: 800; letter-spacing: .04em; }
.btn-sdk-cta-hint  { font-size: .76rem; opacity: .78; font-weight: 500; }

/* ── Switch color ── */
.qrs-switch { cursor: pointer; }
.qrs-switch:checked { background-color: #E73589 !important; border-color: #E73589 !important; }
.qrs-switch:focus   { box-shadow: 0 0 0 3px rgba(231,53,137,.2) !important; }

/* ── Banner autocompletar ── */
.autofill-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #fff8fb;
    border: 1.5px solid #FFDBEC;
    border-radius: 14px;
    padding: 14px 20px;
}
.autofill-banner-title { font-weight: 700; color: #E73589; font-size: .9rem; display: block; }
.autofill-banner-sub   { margin: 2px 0 0; font-size: .76rem; color: #aaa; }
.btn-regenerar {
    background: transparent;
    border: 1.5px solid #E73589;
    color: #E73589;
    border-radius: 8px;
    padding: 5px 14px;
    font-size: .78rem;
    font-weight: 700;
    cursor: pointer;
    transition: all .15s;
    white-space: nowrap;
}
.btn-regenerar:hover { background: #E73589; color: #fff; }

/* ── Badge "Móvil" en tab cámara ── */
.tab-mobile-badge {
    display: inline-block;
    background: #E73589;
    color: #fff;
    border-radius: 20px;
    padding: 1px 8px;
    font-size: .62rem;
    font-weight: 700;
    margin-left: 6px;
    vertical-align: middle;
    letter-spacing: .02em;
    line-height: 1.7;
}

/* ── Aviso cámara solo en móvil (visible en desktop) ── */
.cam-mobile-info {
    align-items: center;
    gap: 10px;
    background: #fff8fb;
    border: 1.5px solid #FFDBEC;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: .82rem;
    color: #555 !important;
    line-height: 1.5;
}
.cam-mobile-info span { color: #555 !important; }
.cam-mobile-info i {
    color: #E73589 !important;
    font-size: 1.15rem;
    flex-shrink: 0;
}

/* ── Hover en filas de la tabla de datos ── */
.datos-tabla-hover tr { transition: background .12s; }
.datos-tabla-hover tr:hover td { background: #fff8fb; }

/* ── Marco para QR generado ── */
.qr-result-frame {
    display: inline-block;
    background: #fff;
    border: 2px solid #FFDBEC;
    border-radius: 16px;
    padding: 18px;
    box-shadow: 0 6px 28px rgba(231,53,137,.13);
    margin-bottom: 20px;
}
.qr-result-frame img {
    display: block;
    max-width: 100%;
    border-radius: 8px;
    margin: 0;
    border: none;
}

/* ── Autocomplete pueblo indígena ── */
.pueblo-ac { position: relative; }
.pueblo-ac-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0; right: 0;
    background: #fff;
    border: 1px solid #f0c0d8;
    border-radius: 10px;
    box-shadow: 0 6px 24px rgba(231,53,137,.15);
    max-height: 220px;
    overflow-y: auto;
    z-index: 200;
}
.pueblo-ac-dropdown.open { display: block; }
.pueblo-ac-item {
    padding: 9px 14px;
    cursor: pointer;
    border-bottom: 1px solid #fff5fa;
    line-height: 1.3;
}
.pueblo-ac-item:last-child { border-bottom: none; }
.pueblo-ac-item:hover, .pueblo-ac-item.highlighted { background: #fff0f7; }
.pueblo-ac-nombre { color: #333; font-size: .88rem; font-weight: 700; }
.pueblo-ac-lengua { color: #E73589; font-size: .78rem; }
.pueblo-ac-comunidades { color: #aaa; font-size: .74rem; margin-top: 1px; }

/* ── Responsive ── */
@media (max-width: 992px) {
    .qrs-hero { padding: 24px 20px 18px; }
    .qrs-body  { padding: 20px 16px 40px; }
    .qrs-card  { padding: 24px 18px; }
}
@media (max-width: 576px) {
    .qrs-hero h2 { font-size: 1.3rem; }
    .token-banner { flex-direction: column; align-items: stretch; }
}
