:root {
    --admin-bg: #f5f5f7;
    --admin-surface: #ffffff;
    --admin-border: #e0e0e6;
    --admin-border-strong: #c4c4d0;
    --admin-primary: #1a73e8;
    --admin-primary-soft: #e8f0fe;
    --admin-primary-strong: #1557b0;
    --admin-danger: #d93025;
    --admin-danger-soft: #fce8e6;
    --admin-success: #188038;
    --admin-success-soft: #e6f4ea;
    --admin-text: #202124;
    --admin-text-soft: #5f6368;
    --admin-radius: 10px;
    --admin-shadow-soft: 0 2px 8px rgba(0, 0, 0, 0.06);
    --admin-font: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.admin-body {
    margin: 0;
    padding: 0;
    background: var(--admin-bg);
    font-family: var(--admin-font);
    color: var(--admin-text);
}
.admin-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 16px 40px;
}

.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    align-items: center;
    padding: 0;
    background: #ffffff;
    border-bottom: 1px solid var(--admin-border);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    z-index: 1000;
}
.admin-topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.admin-logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none !important;
    color: var(--admin-text);
    font-weight: 600;
    letter-spacing: 0.02em;
}
.admin-logo .material-symbols-outlined {
    font-variation-settings: "wght" 600;
    color: var(--admin-primary);
}
.admin-logo:hover,
.admin-logo:focus,
.admin-logo:active {
    color: var(--admin-primary-strong);
    text-decoration: none !important;
}

.admin-nav {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    justify-content: center;
}
.admin-nav-link {
    font-size: 0.95rem;
    color: var(--admin-text-soft);
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 999px;
    transition:
        background 0.15s,
        color 0.15s;
}
.admin-nav-link:hover {
    color: var(--admin-danger) !important;
    text-decoration: none !important;
}
.admin-nav-link--disabled {
    opacity: 0.4;
    cursor: default;
}
.admin-nav-link--logout {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--admin-danger);
}

.admin-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    border: 1px solid transparent;
    padding: 7px 14px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    background: var(--admin-primary);
    color: #fff;
    transition:
        background 0.15s,
        box-shadow 0.15s,
        transform 0.05s;
}
.admin-btn:hover {
    background: var(--admin-primary-strong);
    box-shadow: var(--admin-shadow-soft);
}
.admin-btn--ghost {
    background: transparent;
    color: var(--admin-text);
    border-color: var(--admin-border);
}
.admin-btn--ghost:hover {
    background: #f1f3f4;
}
.admin-btn--danger {
    background: var(--admin-danger);
}
.admin-btn--danger:hover {
    background: #b3261e;
}
.admin-btn--success {
    background: var(--admin-success);
}
.admin-btn--success:hover {
    background: #0f5f2a;
}
.admin-btn--secondary {
    background: #e4e6eb;
    color: #1f1f1f;
}
.admin-btn--secondary:hover {
    background: #d0d3da;
}
.admin-btn--sm {
    padding: 5px 10px;
    font-size: 0.8rem;
}

.admin-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
}
.admin-page-title {
    font-size: 1.4rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}
.admin-page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.admin-card {
    background: var(--admin-surface);
    border-radius: var(--admin-radius);
    border: 1px solid var(--admin-border);
    box-shadow: var(--admin-shadow-soft);
    padding: 16px 18px;
    margin-bottom: 18px;
}
.admin-card-title {
    font-size: 1.05rem;
    font-weight: 600;
}
.admin-card-subtitle {
    font-size: 0.9rem;
    color: var(--admin-text-soft);
}
.admin-card-header {
    margin-bottom: 10px;
}

.admin-alert {
    border-radius: var(--admin-radius);
    padding: 10px 12px;
    font-size: 0.9rem;
    margin-bottom: 14px;
}
.admin-alert--danger {
    background: var(--admin-danger-soft);
    border: 1px solid var(--admin-danger);
    color: var(--admin-danger);
}
.admin-alert--success {
    background: var(--admin-success-soft);
    border: 1px solid var(--admin-success);
    color: var(--admin-success);
}

.admin-form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 12px;
}
.admin-form-field {
    flex: 1 1 220px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.admin-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--admin-text-soft);
}
.admin-input,
.admin-select {
    border-radius: 8px;
    border: 1px solid var(--admin-border);
    padding: 7px 9px;
    font-size: 0.95rem;
    outline: none;
    background: #fff;
    transition:
        border-color 0.15s,
        box-shadow 0.15s;
}
.admin-input:focus,
.admin-select:focus {
    border-color: var(--admin-primary);
    box-shadow: 0 0 0 1px var(--admin-primary-soft);
}

.admin-table-wrapper {
    background: var(--admin-surface);
    border-radius: var(--admin-radius);
    border: 1px solid var(--admin-border);
    box-shadow: var(--admin-shadow-soft);
    overflow: hidden;
}
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.admin-table thead {
    background: #f1f3f4;
}
.admin-table th,
.admin-table td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--admin-border);
    text-align: left;
    vertical-align: middle;
}
.admin-table-row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: flex-end;
}
.admin-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 14px;
    font-size: 0.9rem;
}

.sticky-bar {
    position: sticky;
    top: 56px;
    z-index: 50;
    background: var(--admin-bg);
    padding: 10px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* --- LÓGICA DE ESTADOS UNIFICADA --- */

body[data-modo="paso2"] .pua-item,
body[data-modo="instrucciones"] .pua-item,
body[data-modo="acceso_ver"] .pua-item {
    border: 3px solid var(--admin-success) !important;
    background: var(--admin-success-soft) !important;
    cursor: pointer !important;
}

body[data-modo="paso2"] .pua-item.seleccionada {
    border-color: #ff4d4d !important;
    background: #ffeaea !important;
    transform: scale(1.03) !important;
}

body[data-modo="paso2"] .filtro-letra,
body[data-modo="paso3"] .filtro-letra {
    cursor: pointer !important;
}

body[data-modo="paso3"] .pua-item,
body[data-modo="instrucciones"] .pua-item.ocultada,
body[data-modo="acceso_ver"] .pua-item.ocultada {
    border: 3px solid #ff4d4d !important;
    background: #ffeaea !important;
    cursor: pointer !important;
}

body[data-modo="paso3"] .pua-item.seleccionada,
body[data-modo="instrucciones"] .pua-item.anadida,
body[data-modo="acceso_ver"] .pua-item.anadida {
    border-color: var(--admin-success) !important;
    background: var(--admin-success-soft) !important;
    transform: scale(1.03) !important;
}

/* GRID DE PÚAS */
.pua-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
    width: 100%;
    margin: 0 auto;
    padding: 10px 0;
}
.pua-item {
    text-align: center;
    padding: 5px;
    border-radius: 6px;
    cursor: pointer;
    border: 3px solid #ff4d4d;
    background: #ffeaea;
    transition: 0.2s;
}
.pua-item img {
    width: 100%;
    height: auto;
    border-radius: 6px;
    /*box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);*/
}
.pua-item.seleccionada {
    border-color: var(--admin-success);
    background: var(--admin-success-soft);
    transform: scale(1.03);
}
.pua-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
    height: 210px;
    overflow: hidden;
}
.pua-band {
    font-weight: bold;
    font-size: 0.85rem;
}
.pua-img {
    max-height: 180px;
    object-fit: contain;
    margin-bottom: 6px;
}
.pua-comment {
    font-size: 0.65rem;
    opacity: 0.8;
}
.pua-hard-wrapper {
    margin-top: 4px;
    display: flex;
    justify-content: center;
}

/* ESTRELLAS */
.dificultad-indicador {
    display: flex;
    gap: 4px;
    margin-top: 4px;
    transform: scale(0.9);
    transform-origin: center;
}
.dificultad-indicador .bar {
    width: auto;
    height: auto;
    background: none !important;
    border-radius: 0;
    font-size: 14px;
    color: #d0d0d0;
    line-height: 1;
    padding: 0;
    -webkit-text-stroke: 1px #333;
    text-stroke: 1px #333;
}
.dificultad-indicador .bar::before {
    content: "★";
}
.nivel-1 .bar-1 {
    color: #1e8449;
}
.nivel-2 .bar-1 {
    color: #1e8449;
}
.nivel-2 .bar-2 {
    color: #2ecc71;
}
.nivel-3 .bar-1 {
    color: #1e8449;
}
.nivel-3 .bar-2 {
    color: #2ecc71;
}
.nivel-3 .bar-3 {
    color: #ffee00;
}
.nivel-4 .bar-1 {
    color: #1e8449;
}
.nivel-4 .bar-2 {
    color: #2ecc71;
}
.nivel-4 .bar-3 {
    color: #ffee00;
}
.nivel-4 .bar-4 {
    color: #dda141;
}
.nivel-5 .bar-1 {
    color: #1e8449;
}
.nivel-5 .bar-2 {
    color: #2ecc71;
}
.nivel-5 .bar-3 {
    color: #ffee00;
}
.nivel-5 .bar-4 {
    color: #dda141;
}
.nivel-5 .bar-5 {
    color: #fe7700;
}
.nivel-6 .bar-1 {
    color: #1e8449;
}
.nivel-6 .bar-2 {
    color: #2ecc71;
}
.nivel-6 .bar-3 {
    color: #ffee00;
}
.nivel-6 .bar-4 {
    color: #dda141;
}
.nivel-6 .bar-5 {
    color: #fe7700;
}
.nivel-6 .bar-6 {
    color: #ff0000;
}

/* LOGIN */
.admin-login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 16px;
}
.admin-login-card {
    width: 100%;
    max-width: 380px;
    background: var(--admin-surface);
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius);
    padding: 28px;
    box-shadow: var(--admin-shadow-soft);
}
.admin-login-title {
    text-align: center;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 20px;
}
.admin-login-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.admin-login-btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 8px 22px;
    margin: 0 auto;
    font-size: 0.95rem;
    border-radius: 999px;
    cursor: pointer;
}
.admin-login-form .admin-input {
    width:100%;
    height: 44px;
    padding: 10px 14px;
    border: 1px solid var(--admin-border-strong);
    background: #fafafa;
    border-radius: 8px;
    font-size: 1rem;
    box-sizing: border-box;
}
.admin-password-wrapper {
    position: relative;
    width: 100%;
}
#admin-pass {
    padding-right: 46px;
}
.admin-password-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--admin-text-soft);
    font-size: 22px;
    user-select: none;
    transition: color 0.15s ease;
}
.admin-password-toggle:hover {
    color: var(--admin-primary);
}

/* TABLAS Y ORDENACIÓN */
.orden-icon {
    font-size: 18px;
    line-height: 1;
    vertical-align: middle;
    margin-left: 4px;
    position: relative;
    top: -1px;
}
.orden-neutral {
    color: var(--admin-text-soft);
    opacity: 0.6;
}
.orden-activa {
    color: var(--admin-primary);
    opacity: 1;
}
.admin-table th a {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    color: var(--admin-text);
}
.admin-detail-centered {
    width: 100%;
    max-width: none;
    margin: 0 0 18px 0;
    padding: 2% 30%;
    box-sizing: border-box;
}
.admin-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 26px;
    margin-top: 20px;
}
.admin-detail-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.admin-detail-item.full {
    grid-column: span 2;
}
.admin-detail-icon {
    font-size: 26px;
    color: var(--admin-primary);
    margin-top: 2px;
}
.admin-detail-label,
.admin-detail-value {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--admin-text-soft);
}

/* FIXES */
.admin-topbar {
    display: block !important;
    padding: 0 !important;
}
.admin-topbar-inner {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 16px !important;
    height: 100px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
}
.admin-nav {
    flex: unset !important;
    justify-content: flex-end !important;
    display: flex !important;
    gap: 20px !important;
}
@media (max-width: 768px) {
    .admin-nav {
        display: none !important;
        flex-direction: column !important;
        justify-content: flex-start !important;
    }
    .admin-nav.active {
        display: flex !important;
    }
    .admin-main {
        padding: 16px 10px 30px;
    }
    .admin-page-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .admin-table thead {
        display: none;
    }
    .admin-table tr {
        display: block;
        padding: 8px 10px;
        border-bottom: 1px solid var(--admin-border);
    }
    .admin-table td {
        display: flex;
        justify-content: space-between;
        padding: 6px 0;
        border-bottom: none;
    }
    .admin-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--admin-text-soft);
        margin-right: 10px;
    }
    .admin-topbar {
        display: flex !important;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 12px 16px !important;
        background: #fff;
        border-bottom: 1px solid var(--admin-border);
    }
    .admin-hamburger {
        display: block !important;
    }
    .admin-nav-link {
        width: 100%;
        padding: 14px 20px;
        border-bottom: 1px solid #eee;
    }
    .admin-detail-centered {
        padding-left: 16px;
        padding-right: 16px;
    }
    .admin-detail-grid {
        grid-template-columns: 1fr;
    }
    .admin-detail-item.full {
        grid-column: span 1;
    }
}
.admin-hamburger {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
}
.admin-hamburger .material-symbols-outlined {
    font-size: 28px;
    color: var(--admin-text);
}
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@media (max-width: 992px) {
    .pua-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 600px) {
    .pua-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================
   MENÚ MÓVIL (FUNCIONANDO)
============================ */

@media (max-width: 768px) {

    .admin-topbar {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 12px 16px;
        background: #fff;
        border-bottom: 1px solid var(--admin-border);
        position: sticky;
        top: 0;
        z-index: 1000;
    }

    .admin-topbar-left {
        flex: 1;
        display: flex;
        align-items: center;
    }

    .admin-hamburger {
        display: block;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 6px;
        border-radius: 8px;
    }

    .admin-hamburger .material-symbols-outlined {
        font-size: 32px;
        color: var(--admin-text);
    }

    .admin-nav {
        display: none;
        flex-direction: column;
        background: #fff;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        z-index: 999;
        padding: 12px 0;
        border-bottom: 1px solid var(--admin-border);
        box-shadow: 0 4px 12px rgba(0,0,0,0.08);
        animation: slideDown 0.2s ease-out;
    }

    .admin-nav.active {
        display: flex;
    }

    .admin-nav-link {
        width: 100%;
        padding: 14px 20px;
        background: transparent;
        border-radius: 0;
        font-size: 1rem;
        color: var(--admin-text);
        text-align: left;
        border-bottom: 1px solid #eee;
    }

    .admin-nav-link:last-child {
        border-bottom: none;
    }

    .admin-nav-link:hover {
        background: #f5f5f5;
        color: var(--admin-text);
        text-decoration: none !important;
    }

    .admin-nav-link--logout {
        color: var(--admin-danger);
        font-weight: 600;
    }

    .admin-nav-link--logout:hover {
        background: #fdecec;
        color: var(--admin-danger);
    }
    .admin-topbar-inner {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }

}
/* ICONO EXCEPTO */
.pua-item {
    position: relative;
}

.pua-excepto-toggle {
    position: absolute;
    top: 4px;
    right: 4px;
    z-index: 100;
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
    padding: 4px 5px 0px 5px;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
    transition: background 0.15s ease, box-shadow 0.15s ease;
}

.pua-excepto-toggle span {
    font-size: 20px;
    color: #888; /* gris */
    transition: transform 0.15s ease;
}

.pua-excepto-toggle.excepto-1 span {
    color: #d93025; /* rojo */
}


.pua-excepto-toggle:hover {
    background: rgba(255,255,255,1);
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

.pua-excepto-toggle:hover span {
    transform: scale(1.15);
}

/* ============================================================
   ESTILOS EXCLUSIVOS PARA PUAS_ADMIN
============================================================ */

body[data-modo="puas_admin"] .pua-item {
    position: relative;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 14px 4px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 386px;
    /*box-shadow: 0 2px 4px rgba(0,0,0,0.08); */
    cursor: default !important;
}

body[data-modo="puas_admin"] .pua-label {
    font-size: 10px;
    font-weight: 600;
    color: #444;
    margin-top: 4px;
}

body[data-modo="puas_admin"] .pua-img {
    width: 100%;
    height: 200px;
    object-fit: contain;
    background: #8a8a8a;
    border-radius: 8px;
    padding: 0px;
    margin: 0px;
}

body[data-modo="puas_admin"] .pua-controls {
    display: flex;
    justify-content: space-between;
    margin-top: 0px;
}

body[data-modo="puas_admin"] .pua-control {
    display: flex;
    align-items: center;
    gap: 6px;
}

body[data-modo="puas_admin"] .pua-control-label {
    font-size: 12px;
    font-weight: 600;
}

body[data-modo="puas_admin"] .pua-delete-btn {
    margin-top: auto;
}

/* ICONO EXCEPTO SOLO EN ADMIN */
body[data-modo="puas_admin"] .pua-excepto-toggle {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(255,255,255,0.95);
    border-radius: 50%;
    padding: 4px 5px 0 5px;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
    transition: background 0.15s ease, box-shadow 0.15s ease;
}

body[data-modo="puas_admin"] .pua-excepto-toggle span {
    font-size: 20px;
    color: #888;
}

/* FIX: asegurar que el icono EXCEPTO se pinta correctamente */
body[data-modo="puas_admin"] .pua-excepto-toggle.excepto-1 {
    background: rgba(255, 230, 230, 0.95);
    border: 1px solid #d93025;
}

body[data-modo="puas_admin"] .pua-excepto-toggle.excepto-1 span {
    color: #d93025 !important;
}

body[data-modo="puas_admin"] .pua-excepto-toggle:hover {
    background: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

body[data-modo="puas_admin"] .pua-item.seleccionada {
    transform: none !important;
}

/* ============================================================
   GRID DE 5 COLUMNAS SOLO EN PUAS_ADMIN
============================================================ */

body[data-modo="puas_admin"] .pua-grid {
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 12px;
}

/* ============================================================
   RESPONSIVE SOLO PARA PUAS_ADMIN
============================================================ */

/* Pantallas medianas (entre 1200px y 900px) → 4 columnas */
@media (max-width: 1200px) {
    body[data-modo="puas_admin"] .pua-grid {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

/* Tablets horizontales (900px a 700px) → 3 columnas */
@media (max-width: 900px) {
    body[data-modo="puas_admin"] .pua-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

/* Tablets verticales / móviles grandes (700px a 500px) → 2 columnas */
@media (max-width: 700px) {
    body[data-modo="puas_admin"] .pua-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Móviles pequeños (<500px) → 1 columna */
@media (max-width: 500px) {
    body[data-modo="puas_admin"] .pua-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}


/* ============================================================
   Inputs y selects más pequeños SOLO en PUAS_ADMIN
============================================================ */

body[data-modo="puas_admin"] .admin-input,
body[data-modo="puas_admin"] .admin-select {
    font-size: 12px !important;
    padding: 5px 7px !important;
    height: auto !important;
}

/* ============================================================
   HARD + QTY VERTICALES SOLO EN PUAS_ADMIN
============================================================ */

body[data-modo="puas_admin"] .pua-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 0px;
}

body[data-modo="puas_admin"] .pua-qty-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

body[data-modo="puas_admin"] .pua-hard-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

body[data-modo="puas_admin"] .pua-hard-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    margin-top: 4px;
    align-items: center;
}

body[data-modo="puas_admin"] .pua-hard-buttons {
    display: flex;
    justify-content: center;
    gap: 6px;
}

body[data-modo="puas_admin"] .pua-hard-btn {
    min-width: 23px !important;
    height: 25px !important;
    border-radius: 999px;
    border: 1px solid #ccc;
    background: #f5f5f5;
    font-size: 0.75rem;
    cursor: pointer;
    padding: 0 8px;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}


body[data-modo="puas_admin"] .pua-hard-btn.activo {
    background: var(--admin-primary);
    border-color: var(--admin-primary);
    color: #fff;
}


body[data-modo="puas_admin"] .pua-qty-group {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
}

/* ============================================================
   FILA QTY + BORRAR SOLO EN PUAS_ADMIN
============================================================ */

body[data-modo="puas_admin"] .pua-qty-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 6px;
}

/* Botones redondos estilo HARD */
body[data-modo="puas_admin"] .pua-round-btn {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: 1px solid #ccc;
    background: #f5f5f5;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, border-color 0.15s ease;
}

body[data-modo="puas_admin"] .pua-round-btn:hover {
    background: #e8e8e8;
}

/* Número de cantidad */
body[data-modo="puas_admin"] .pua-qty-value {
    min-width: 20px;
    text-align: center;
    font-size: 0.9rem;
}

/* Botón borrar como icono */
body[data-modo="puas_admin"] .pua-delete-icon, body[data-modo="papelera"] .admin-btn-cris-delete  {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: 1px solid #fff;
    background: var(--admin-danger);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, color 0.15s ease;
}

body[data-modo="puas_admin"] .pua-delete-icon:hover, body[data-modo="papelera"] .admin-btn-cris-delete:hover {
    background: #fff;
    color: #ff0000;
}
/* ============================================================
   PAPELERA — Tarjetas estilo admin (compactas, 6 columnas)
============================================================ */

/* GRID: 6 columnas en desktop, responsive en móvil */
body[data-modo="papelera"] .pua-trash-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 6px;
    width: 100%;
}

/* TARJETA BASE (más compacta) */
body[data-modo="papelera"] .pua-item {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;                  /* antes 6px → menos espacio entre elementos */
    min-height: 230px !important;         /* mantenemos tu altura mínima */
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

/* IMAGEN (más ajustada) */
body[data-modo="papelera"] .pua-img {
    width: 100%;
    height: 100%;             /* antes 200px → tarjeta más baja */
    object-fit: contain;
    background: #fafafa;
    border-radius: 8px;
}

/* TÍTULO (menos margen) */
body[data-modo="papelera"] .pua-trash-title {
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    margin-top: 2px;           /* antes 4px */
    margin-bottom: 2px !important;
}

/* COMENTARIO (más compacto) */
body[data-modo="papelera"] .pua-trash-comment {
    font-size: 12px;
    color: #666;
    text-align: center;
    padding: 0 2px;            /* antes 0 4px */
    margin:5px !important;
}

/* FECHA (sin margen extra) */
body[data-modo="papelera"] .pua-trash-date {
    font-size: 11px;
    color: #999;
    text-align: center;
    margin-top: 0;             /* antes tenía margen implícito */
}


/* ACCIONES (botones centrados y visibles) */
body[data-modo="papelera"] .pua-trash-actions {
    margin-top: auto;
    display: flex;
    justify-content: center;
    gap: 10px;
}

/* HEADER: título a la izquierda, botón a la derecha */
body[data-modo="papelera"] .pua-trash-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding: 0 4px;
}

body[data-modo="papelera"] .admin-btn-cris-restore  {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: 1px solid #fff;
    background: var(--admin-success);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, color 0.15s ease;
}

body[data-modo="papelera"] .admin-btn-cris-restore:hover {
    background: #e7f4ea !important;
    color: var(--admin-success);
}

.pua-trash-empty {
    text-align: center;
    font-size: 1.4rem;
    color: #777;
    margin: 40px 0;
}

.ac-item {
    padding: 6px 10px;
    cursor: pointer;
}

.ac-item:hover {
    background: #eee;
}

.pua-input-wrapper {
    position: relative;
    width: 100%;
}

.autocomplete-box {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ccc;
    max-height: 150px;
    overflow-y: auto;
    z-index: 9999;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.ac-item {
    padding: 6px 10px;
    cursor: pointer;
}

.ac-item:hover {
    background: #eee;
}
.autocomplete-box .ac-item {
    font-size: 12px;   /* usa el mismo tamaño que el input */
}

.autocomplete-box:empty {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}
#dropB {
    transition: 0.2s;
}

#dropB.bloqueado {
    pointer-events: none;
    opacity: 0.3;
    filter: grayscale(1);
}
.editor-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
}

@media (max-width: 768px) {
    .editor-grid {
        grid-template-columns: 1fr;
    }
}

.editor-box {
    background: var(--admin-surface);
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius);
    padding: 16px;
    text-align: center;
    box-shadow: var(--admin-shadow-soft);
}
#previewMontaje {
    display: block;
    margin: 20px auto !important;
}

div#dropA,div#dropB {
    background: #e4e4e4 !important;
}

#crear-pua-container .pua-item {
    max-width: 330px !important;
    margin: 0 auto;
}

.huorfano-title {
    display: block;
    width: 100%;
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 8px;
    padding: 0 4px;
}

.ac-item.ac-active {
    background: #e0e0e0;
    color: #000;
}

body[data-modo="descargas"] .pua-item.seleccionada {
    border-color: #0f9d58 !important;
    box-shadow: 0 0 0 3px rgba(15,157,88,0.5);
    background: var(--admin-success-soft) !important;
}

/* Parche de compatibilidad para secciones de Media/Logos */
.admin-content-wrapper {
    width: 100%;
    animation: fadeIn 0.4s ease-in-out;
}

/* Forzamos que las filas de artistas sean como tus admin-cards */
.artist-row {
    background: var(--admin-surface) !important;
    color: var(--admin-text) !important;
    border: 1px solid var(--admin-border) !important;
    box-shadow: var(--admin-shadow-soft) !important;
    margin-bottom: 20px;
    padding: 20px;
    border-radius: var(--admin-radius);
}

/* Ajuste para los inputs dentro de estas filas */
.artist-row .admin-input {
    background: #fff !important;
    color: #000 !important;
}

/* Feedback de subida "Apple Style" */
.upload-progress-container {
    width: 100%;
    background-color: #e4e6eb;
    border-radius: 10px;
    height: 6px;
    margin-top: 8px;
    overflow: hidden;
    display: none; /* Se activa por JS */
}

.upload-progress-bar {
    height: 100%;
    background-color: var(--admin-primary); /* El azul #1a73e8 de tu raíz */
    width: 0%;
    transition: width 0.3s ease;
}

.upload-status-text {
    font-size: 11px;
    color: var(--admin-text-soft);
    margin-top: 4px;
    font-weight: 500;
}

/* Animación de pulsación para el feedback de "Guardado" */
@keyframes successPulse {
    0% { box-shadow: 0 0 0 0px rgba(24, 128, 56, 0.4); }
    100% { box-shadow: 0 0 0 10px rgba(24, 128, 56, 0); }
}

.upload-success-flash {
    animation: successPulse 0.6s ease-out;
    border-color: var(--admin-success) !important;
}

/* MODAL REAL PARA ZIP */
#accesosZipProgressModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.55);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

#accesosZipProgressModal .admin-modal-content {
    background: #fff;
    padding: 25px;
    border-radius: 10px;
    width: 350px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}

.accesos-progress-bar {
    width: 100%;
    height: 12px;
    background: #ddd;
    border-radius: 6px;
    overflow: hidden;
    margin-top: 10px;
}

.accesos-progress-fill {
    width: 0%;
    height: 100%;
    background: #188038;
    transition: width 0.2s;
}
[data-modo="descargas"] .pua-item {
    text-align: center;
    padding: 5px;
    border-radius: 6px;
    cursor: pointer;
    border: 3px solid #ddd;
    background: #fff;
    transition: 0.2s;
}
/* ============================
   CAMBIOS — Selector de cantidades
============================ */

body[data-modo="cambios"] .cambios-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
}

body[data-modo="cambios"] .cambios-btn {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: 1px solid #ccc;
    background: #f5f5f5;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, border-color 0.15s ease;
}

body[data-modo="cambios"] .cambios-btn:hover {
    background: #e8e8e8;
}

body[data-modo="cambios"] .cambios-cantidad {
    min-width: 20px;
    text-align: center;
    font-size: 0.9rem;
    font-weight: bold;
}

/* Tarjeta base en CAMBIOS */
[data-modo="cambios"] .pua-item {
    text-align: center;
    padding: 5px;
    border-radius: 6px;
    cursor: pointer;
    border: 3px solid #ddd;
    background: #fff;
    transition: 0.2s;
    height: 277px !important;
}

[data-modo="cambios"] .pua-img {
    margin-top: 10px;
}

/* ============================
   ESTADOS DE LA TARJETA
============================ */

/* Estado base: necesario para que el bounce funcione SIEMPRE */
body[data-modo="cambios"] .cambios-item {
    transform: scale(1);
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

/* Estado verde (zoom-in permanente) */
body[data-modo="cambios"] .cambios-item.activa {
    border-color: var(--admin-success) !important;
    background: var(--admin-success-soft) !important;
    transform: scale(1.03);
}

/* Texto Qty */
body[data-modo="cambios"] .cambios-stock {
    font-size: 0.75rem;
    color: var(--admin-text-soft);
    margin-right: 10px;
}

/* Fila horizontal Qty + botones */
body[data-modo="cambios"] .cambios-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 6px;
    padding: 0 4px;
}

/* Icono Block no clicable y sin zoom */
body[data-modo="cambios"] .pua-excepto-toggle {
    cursor: default !important;
    pointer-events: none !important;
    opacity: 0.6;
    transform: none !important;
    will-change: auto !important;
}

/* ============================
   FLASH VERDE SUAVE
============================ */
@keyframes cambiosFlash {
    0%   { background-color: var(--admin-success-soft); }
    100% { background-color: inherit; }
}

body[data-modo="cambios"] .cambios-item.flash {
    animation: cambiosFlash 0.15s ease-out forwards !important;
}

/* ============================
   BOUNCE AL SUMAR
============================ */
/* ⭐ Final en 1.031 para que SIEMPRE se reinicie la animación */
@keyframes cambiosBounce {
    0%   { transform: scale(1.03); }
    50%  { transform: scale(1.10); }
    100% { transform: scale(1.031); }
}

body[data-modo="cambios"] .cambios-item.bounce {
    animation: cambiosBounce 0.18s ease-out !important;
}
.cambios-estado-btn.cambios-estado-activo {
    background: var(--admin-primary) !important;
    color: #fff !important;
    border-color: var(--admin-primary) !important;
}
#autocompleteUsuarios {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    max-height: 240px;
    overflow-y: auto;
    width: 100%;
}

#autocompleteUsuarios .cambios-usuario-item {
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}

#autocompleteUsuarios .cambios-usuario-item:last-child {
    border-bottom: none;
}

#autocompleteUsuarios .cambios-usuario-item:hover {
    background: #f5f5f5;
}

#autocompleteUsuarios strong {
    font-size: 14px;
    color: #333;
}

#autocompleteUsuarios small {
    font-size: 12px;
    color: #777;
}

.site-footer .admin-nav-link {
    color: var(--admin-text-soft);
    padding: 1px;
}
.site-footer .admin-nav-link:hover {
    opacity: 0.7;
}

/* ============================================================
   MENÚ GUITARPICKS (AISLADO CON PREFIJO gpnav-)
============================================================ */

/* CONTENEDOR PRINCIPAL */
.gpnav {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* LISTA PRINCIPAL */
.gpnav-list {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
}

/* ENLACES */
.gpnav-link {
    text-decoration: none;
    color: #444;
    font-size: 0.95rem;
    padding: 6px 10px;
    border-radius: 6px;
    transition: 0.2s;
}

.gpnav-link:hover {
    color: #d93025;
}

/* SUBMENÚ */
.gpnav-item-dropdown {
    position: relative;
}

.gpnav-dropdown-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}

.gpnav-arrow {
    font-size: 0.75rem;
}
/* ============================================================
   MENÚ GUITARPICKS (AISLADO CON PREFIJO gpnav-)
============================================================ */

/* CONTENEDOR PRINCIPAL */
.gpnav {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* LISTA PRINCIPAL */
.gpnav-list {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
}

/* ENLACES */
.gpnav-link {
    text-decoration: none;
    color: #444;
    font-size: 0.95rem;
    padding: 6px 10px;
    border-radius: 6px;
    transition: 0.2s;
}

.gpnav-link:hover {
    color: #d93025;
}

/* ============================================================
   SUBMENÚ
============================================================ */

.gpnav-item-dropdown {
    position: relative;
    margin-top: -5px !important;
}

.gpnav-dropdown-toggle {
    display: flex;
    align-items: center;   /* ✔ alinea verticalmente */
    gap: 4px;
    cursor: pointer;
}

.gpnav-arrow {
    font-size: 0.75rem;
    line-height: 1;        /* ✔ evita que empuje hacia abajo */
    position: relative;
    top: 1px;             /* ✔ ajuste fino */
}

/* MENÚ DESPLEGABLE */
.gpnav-dropdown-menu {
    display: none;
    position: absolute;
    top: 120%;
    left: 0;
    background: #fff;
    border: 1px solid #ddd;
    list-style: none;
    padding: 8px 0;
    min-width: 180px;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    z-index: 999;
}

.gpnav-dropdown-menu li a {
    display: block;
    padding: 10px 14px;
    color: #444;
    text-decoration: none;
}

.gpnav-dropdown-menu li a:hover {
    background: #f2f2f2;
}

/* MOSTRAR SUBMENÚ */
.gpnav-item-dropdown.open .gpnav-dropdown-menu {
    display: block;
}

/* ============================================================
   HAMBURGUESA
============================================================ */

.gpnav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.gpnav-bar {
    width: 26px;
    height: 3px;
    background: #333;
    transition: 0.3s;
}

/* ============================================================
   MÓVIL
============================================================ */

@media (max-width: 768px) {

    .gpnav-toggle {
        display: flex;
    }

    .gpnav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        flex-direction: column;
        background: #fff;
        border-bottom: 1px solid #ddd;
        padding: 12px 0;
        display: none;
    }

    .gpnav.active {
        display: flex;
    }

    .gpnav-list {
        flex-direction: column;
        width: 100%;
        gap: 0;
    }

    .gpnav-list li {
        width: 100%;
    }

    .gpnav-link {
        display: block;
        padding: 14px 20px;
        border-bottom: 1px solid #eee;
        width: 100%;
    }

    .gpnav-dropdown-menu {
        position: relative;
        top: 0;
        border: none;
        box-shadow: none;
        padding-left: 20px;
    }
}

.fuerte{
    font-weight: bold !important;
}
.site-footer a,
.footer-coleccion a.footer-link, .click-to-flip {
    color: var(--picks-text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.25s ease;
}

.site-footer a:hover,
.footer-coleccion a.footer-link:hover {
    color: var(--picks-red);
}

/* ============================================================
   ESTILOS PARA EL LOGO DEL PANEL DE ADMINISTRACIÓN
============================================================ */

/* Contenedor del enlace del logo */
.admin-logo {
    display: flex;
    align-items: center;
    height: 100%;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.admin-logo:hover {
    opacity: 0.85; /* Sutil efecto visual al pasar el cursor */
}

/* Imagen del logo */
.admin-logo-img {
    height: 90px;             /* Altura fija ideal para que quede alineado en la barra */
    width: auto;              /* Calcula el ancho automáticamente manteniendo la proporción */
    max-width: 100%;          /* Evita desbordamientos en pantallas pequeñas */
    object-fit: contain;      /* Asegura que la imagen se escale sin deformarse ni estirarse */
    display: block;           /* Elimina espacios en blanco residuales por debajo */
}

/* Asegura la alineación vertical en las barras superiores */
.admin-topbar-inner, 
.brand {
    display: flex;
    align-items: center;
}

img.admin-logo-img {
    width: 175px;
}