/* =========================================================================
   Aislamiento y Control de Ancho (Cero Scroll Lateral)
   ========================================================================= */
html, body.museum-body {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden !important;
    background: #121316 !important;
    box-sizing: border-box !important;
    display: block !important;
}

*, *::before, *::after {
    box-sizing: border-box;
}

/* =========================================================================
   Header Principal del Museo (Dimensiones idénticas a la Galería)
   ========================================================================= */
.museum-header {
    background: #18191c;
    border-bottom: 1px solid #2d2f34;
    padding: 24px 20px 0 20px;
    margin: 0;
    width: 100%;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto 20px auto;
    width: 100%;
}

.header-titles h1 {
    font-size: 1.8rem;
    line-height: 1.2;
    font-weight: 700;
    color: #f1f2f5;
    margin: 0;
    letter-spacing: -0.02em;
}

.subtitle {
    color: #8e929b;
    font-size: 0.9rem;
    line-height: 1.3;
    margin: 4px 0 0 0;
}

.nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    padding: 0 18px;
    gap: 8px;
    color: #ffffff;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    border-radius: 6px;
    background: #2563eb;
    box-sizing: border-box;
    transition: background 0.2s ease;
}

.nav-btn:hover {
    background: #1d4ed8;
}

/* =========================================================================
   Pestañas Principales (Nivel 1)
   ========================================================================= */
.main-tabs {
    display: flex;
    gap: 8px;
    max-width: 1200px;
    margin: 0 auto;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    width: 100%;
}

.main-tabs::-webkit-scrollbar {
    display: none;
}

.tab-btn {
    background: none;
    border: none;
    color: #8e929b;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.tab-btn:hover {
    color: #d1d5db;
}

.tab-btn.active {
    color: #3b82f6;
    border-bottom-color: #3b82f6;
}

/* =========================================================================
   Contenedor y Filtros
   ========================================================================= */
.museum-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 20px;
    width: 100%;
}

.controls-bar {
    display: flex;
    gap: 14px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    width: 100%;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 200px;
}

.search-box input {
    width: 100%;
    background: #1c1d22;
    border: 1px solid #2d2f34;
    border-radius: 8px;
    padding: 10px 14px 10px 38px;
    color: #e4e6ea;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-box input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.25);
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    stroke: #6b7280;
    pointer-events: none;
}

.select-box {
    flex-shrink: 0;
}

.control-select {
    background: #1c1d22;
    border: 1px solid #2d2f34;
    border-radius: 8px;
    color: #d1d5db;
    padding: 10px 16px;
    font-size: 0.9rem;
    cursor: pointer;
    height: 42px;
}

.control-select:focus {
    outline: none;
    border-color: #3b82f6;
}

/* =========================================================================
   Barra de Progreso
   ========================================================================= */
.progress-section {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-bottom: 20px;
}

.progress-card {
    background: #1c1d22;
    border: 1px solid #2d2f34;
    border-radius: 8px;
    padding: 10px 18px;
    width: 100%;
}

.progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.progress-title {
    color: #9ca3af;
}

.progress-metrics {
    color: #3b82f6;
}

.progress-track {
    width: 100%;
    height: 6px;
    background: #2b2e35;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: #3b82f6;
    transition: width 0.3s ease;
}

/* =========================================================================
   Subpestañas (Nivel 2)
   ========================================================================= */
.sub-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #25272c;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    width: 100%;
}

.sub-tabs::-webkit-scrollbar {
    display: none;
}

.sub-btn {
    background: #1c1d22;
    border: 1px solid #2d2f34;
    color: #9ca3af;
    font-size: 0.82rem;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.sub-btn:hover {
    background: #26282e;
    color: #e5e7eb;
}

.sub-btn.active {
    background: #1e293b;
    border-color: #3b82f6;
    color: #93c5fd;
}

/* =========================================================================
   Cuadrícula de Tarjetas Centradas
   ========================================================================= */
.museum-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 14px;
    width: 100%;
}

.museum-card {
    position: relative;
    background: #1c1d22;
    border: 1px solid #282a2f;
    border-radius: 10px;
    padding: 10px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 140px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.museum-card:hover {
    border-color: #3b3e46;
    transform: translateY(-2px);
}

.card-img-wrap {
    position: relative;
    width: 68px;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.card-img-wrap img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.card-title {
    font-size: 0.78rem;
    font-weight: 600;
    color: #d1d5db;
    text-align: center;
    width: 100%;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.museum-card.uncollected .card-img-wrap img {
    opacity: 0.32;
    filter: grayscale(85%);
    transition: opacity 0.2s ease, filter 0.2s ease;
}

.museum-card.uncollected .card-title {
    color: #6b7280;
}

.museum-card.collected {
    border-color: #1e3a8a;
    background: #131b2e;
}

.museum-card.collected .card-img-wrap img {
    opacity: 1;
    filter: none;
}

.museum-card.collected .card-title {
    color: #ffffff;
}

.card-checkbox {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 1px solid #4b5563;
    background: #111215;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    touch-action: none;
}

.card-checkbox:hover {
    border-color: #3b82f6;
}

.card-checkbox svg {
    width: 11px;
    height: 11px;
    stroke: #ffffff;
    stroke-width: 3;
    display: none;
}

.museum-card.collected .card-checkbox {
    background: #2563eb;
    border-color: #2563eb;
}

.museum-card.collected .card-checkbox svg {
    display: block;
}

/* =========================================================================
   Paginación
   ========================================================================= */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 28px;
}

.load-more-btn {
    background: #2563eb;
    border: none;
    color: #ffffff;
    padding: 10px 28px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.load-more-btn:hover {
    background: #1d4ed8;
}

/* =========================================================================
   Modal Proporcional que se expande sin forzar scroll interno
   ========================================================================= */
.museum-modal {
    border: 1px solid var(--border-subtle, #2d2f34);
    border-radius: 12px;
    background: #16171a;
    color: #e4e6ea;
    padding: 0;
    max-width: 440px;
    width: 90%;
    margin: auto;
    max-height: 88vh; /* Permite scroll general del modal solo si la pantalla no alcanza */
    overflow-y: auto;
}

.museum-modal::backdrop {
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(3px);
}

.modal-card {
    position: relative;
    padding: 20px;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 1.4rem;
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover {
    color: #fff;
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.modal-header-group {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
}

.modal-asset-img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    flex-shrink: 0;
}

.modal-header-text {
    flex: 1;
}

.modal-header-text h2 {
    font-size: 1.2rem;
    margin: 0 0 6px 0;
    color: #f1f2f5;
}

.modal-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.badge {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.72em;
    font-weight: 600;
    text-transform: capitalize;
}

.badge-category { background-color: #2b2e35; color: #d1d5db; border: 1px solid #2d2f34; }
.badge-mythical { background-color: #8a2be2; color: #fff; }
.badge-treasure { background-color: #e5a100; color: #000; }
.badge-common { background-color: #4b5563; color: #eee; }
.badge-rare { background-color: #2563eb; color: #fff; }
.badge-immunity { background-color: #dc2626; color: #fff; }
.badge-enemy { background-color: #7f1d1d; color: #fca5a5; border: 1px solid #b91c1c; }

.modal-details {
    width: 100%;
}

.modal-info-row {
    font-size: 0.85rem;
    color: #9ca3af;
    margin-bottom: 10px;
    background: #111215;
    border: 1px solid #2d2f34;
    padding: 8px 12px;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
}

.modal-info-row strong {
    color: #e5e7eb;
}

/* Acordeón expandible idéntico al de styles.css (sin altura fija) */
.modal-accordion {
    background-color: #111215;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #2d2f34;
    margin-top: 6px;
}

.modal-accordion summary {
    padding: 10px 14px;
    font-weight: 600;
    font-size: 0.9em;
    cursor: pointer;
    color: #93c5fd;
    user-select: none;
    transition: background-color 0.2s, color 0.2s;
    outline: none;
}

.modal-accordion summary:hover {
    background-color: #1c1d22;
    color: #bfdbfe;
}

.modal-accordion[open] summary {
    border-bottom: 1px solid #2d2f34;
    background-color: #18191c;
}

/* Se expande libremente sin recortarse con un scroll interno diminuto */
.accordion-content {
    padding: 10px 14px;
    font-size: 0.85em;
    line-height: 1.55;
    color: #ddd;
    white-space: pre-line;
    max-height: none;
    overflow-y: visible;
}

.action-highlight {
    color: #60a5fa;
    font-weight: 600;
}

.modal-actions {
    margin-top: 14px;
}

.collect-action-btn {
    width: 100%;
    padding: 10px;
    border-radius: 6px;
    border: none;
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.collect-action-btn.btn-mark {
    background: #2563eb;
    color: #ffffff;
}

.collect-action-btn.btn-mark:hover {
    background: #1d4ed8;
}

.collect-action-btn.btn-unmark {
    background: #2b2e35;
    color: #f87171;
    border: 1px solid #3e424c;
}

.collect-action-btn.btn-unmark:hover {
    background: #373b44;
}

.museum-footer {
    text-align: center;
    padding: 24px;
    color: #6b7280;
    font-size: 0.82rem;
    border-top: 1px solid #22242a;
    margin-top: 30px;
}

/* =========================================================================
   Ajustes Responsivos para Tablets y Móviles
   ========================================================================= */
@media (max-width: 1024px) {
    .museum-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
    }
}

@media (max-width: 768px) {
    .museum-header {
        padding: 16px 12px 0 12px;
    }

    .header-content {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        margin-bottom: 12px;
    }

    .header-titles h1 {
        font-size: 1.35rem;
    }

    .subtitle {
        font-size: 0.8rem;
    }

    .nav-btn {
        width: 100%;
        justify-content: center;
        padding: 8px 12px;
    }

    .tab-btn {
        padding: 10px 12px;
        font-size: 0.85rem;
    }

    .museum-container {
        padding: 14px 10px;
    }

    .controls-bar {
        flex-direction: column;
        gap: 8px;
        align-items: stretch;
    }

    .search-box {
        min-width: 100%;
        width: 100%;
    }

    .select-box,
    .control-select {
        width: 100%;
    }

    .progress-section {
        margin-bottom: 12px;
    }

    .progress-card {
        padding: 8px 12px;
    }

    .sub-tabs {
        gap: 6px;
        margin-bottom: 12px;
        padding-bottom: 6px;
    }

    .sub-btn {
        padding: 5px 10px;
        font-size: 0.74rem;
    }

    .museum-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 8px;
    }

    .museum-card {
        height: 116px;
        padding: 6px 4px;
        justify-content: center;
        gap: 6px;
        border-radius: 8px;
    }

    .card-img-wrap {
        width: 50px;
        height: 50px;
        margin: 0;
    }

    .card-title {
        font-size: 0.68rem;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }

    .card-checkbox {
        width: 16px;
        height: 16px;
        top: 4px;
        right: 4px;
    }

    .card-checkbox svg {
        width: 9px;
        height: 9px;
    }

    .museum-modal {
        max-width: 320px;
        width: 88%;
    }

    .modal-card {
        padding: 16px;
    }

    .modal-asset-img {
        width: 50px;
        height: 50px;
    }

    .modal-details h2 {
        font-size: 1.05rem;
    }

    .bless-overlay-icon {
        width: 32px;
        height: 32px;
        bottom: -4px;
        right: -3px;
    }
}



@media (max-width: 340px) {
    .museum-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 6px;
    }
}

/* =========================================================================
   Bless Overlay y Badges de Nivel Enhanced
   ========================================================================= */
.bless-overlay-icon {
    position: absolute;
    bottom: -6px;
    right: -4px;
    width: 44px;
    height: 44px;
    object-fit: contain;
    pointer-events: none;
    z-index: 2;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.9));
}

.card-tier-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    background: #1e293b;
    border: 1px solid #3b82f6;
    color: #93c5fd;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 4px;
    pointer-events: none;
    line-height: 1.2;
}

.museum-card.collected .card-tier-badge {
    background: #1d4ed8;
    border-color: #60a5fa;
    color: #ffffff;
}

.badge-event-special,
.badge-event {
    background-color: #b45309;
    color: #fef3c7;
    border: 1px solid #d97706;
}

/* =========================================================================
   Contenedor de Subpestañas y Botones Check/Uncheck All
   ========================================================================= */
.sub-tabs-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #25272c;
    width: 100%;
}

.sub-tabs-wrapper .sub-tabs {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
    flex: 1;
}

.sub-tabs-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.bulk-action-btn {
    font-size: 0.78rem;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

#subcat-check-all-btn {
    background: rgba(37, 99, 235, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.4);
    color: #93c5fd;
    outline: none;
}

#subcat-check-all-btn:hover {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

#subcat-check-all-btn:active {
    background: #1d4ed8;
    color: #ffffff;
    transform: scale(0.98);
}

#subcat-uncheck-all-btn {
    background: rgba(220, 38, 38, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #fca5a5;
    outline: none;
}

#subcat-uncheck-all-btn:hover {
    background: #dc2626;
    border-color: #dc2626;
    color: #ffffff;
}

#subcat-uncheck-all-btn:active {
    background: #b91c1c;
    color: #ffffff;
    transform: scale(0.98);
}

.badge-bugged {
    background-color: #581c87;
    color: #f3e8ff;
    border: 1px solid #7e22ce;
}

@media (max-width: 768px) {
    .sub-tabs-wrapper {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        margin-bottom: 12px;
        padding-bottom: 8px;
    }

    .sub-tabs-actions {
        justify-content: flex-end;
    }

    .bulk-action-btn {
        flex: 1;
        text-align: center;
        padding: 6px 8px;
    }
}

/* =========================================================================
   Botón Sync en Header y Estilos de Modal de Sincronización
   ========================================================================= */
.header-nav {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sync-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    padding: 0 14px;
    gap: 8px;
    color: #93c5fd;
    font-size: 0.88rem;
    font-weight: 600;
    border-radius: 6px;
    background: #1e293b;
    border: 1px solid #3b82f6;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sync-nav-btn svg {
    width: 16px;
    height: 16px;
}

.sync-nav-btn:hover {
    background: #2563eb;
    color: #ffffff;
}

.sync-dialog {
    max-width: 520px;
}

.sync-modal-content {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.sync-title {
    font-size: 1.25rem;
    color: #f1f2f5;
    margin: 0;
}

.sync-desc {
    font-size: 0.84rem;
    color: #9ca3af;
    margin: 0;
    line-height: 1.4;
}

.sync-sections {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 6px;
}

.sync-box {
    background: #111215;
    border: 1px solid #2d2f34;
    border-radius: 8px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
}

.sync-box h3 {
    font-size: 0.95rem;
    color: #e5e7eb;
    margin: 0;
}

.sync-subtext {
    font-size: 0.8rem;
    color: #8e929b;
    margin: 0;
}

.sync-qr-wrapper {
    background: #ffffff;
    padding: 14px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    box-sizing: content-box;
    width: auto;
    height: auto;
}

.sync-qr-wrapper canvas {
    display: none !important;
}

.sync-qr-wrapper img {
    display: block !important;
    width: 180px !important;
    height: 180px !important;
    image-rendering: pixelated;
    box-sizing: border-box;
}

.sync-actions-row {
    display: flex;
    gap: 8px;
    width: 100%;
}

.sync-btn-action,
.sync-btn-primary {
    flex: 1;
    padding: 8px 12px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sync-btn-action {
    background: #2b2e35;
    border: 1px solid #3e424c;
    color: #d1d5db;
}

.sync-btn-action:hover {
    background: #373b44;
    color: #ffffff;
}

.sync-btn-primary {
    background: #2563eb;
    border: 1px solid #2563eb;
    color: #ffffff;
}

.sync-btn-primary:hover {
    background: #1d4ed8;
}

.sync-status-toast {
    background: #064e3b;
    border: 1px solid #059669;
    color: #a7f3d0;
    font-size: 0.8rem;
    padding: 8px 12px;
    border-radius: 6px;
    text-align: center;
}

.sync-confirm-dialog {
    max-width: 400px;
}

.sync-confirm-title {
    font-size: 1.15rem;
    margin: 0 0 8px 0;
    color: #f1f2f5;
}

.sync-confirm-desc {
    font-size: 0.85rem;
    color: #9ca3af;
    line-height: 1.4;
    margin: 0 0 16px 0;
}

.sync-confirm-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sync-confirm-btn {
    display: flex;
    flex-direction: column;
    padding: 10px 14px;
    border-radius: 8px;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
}

.sync-confirm-btn strong {
    font-size: 0.88rem;
}

.sync-confirm-btn span {
    font-size: 0.74rem;
    margin-top: 2px;
}

.sync-confirm-btn.merge-btn {
    background: rgba(37, 99, 235, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.4);
    color: #93c5fd;
}

.sync-confirm-btn.merge-btn:hover {
    background: #2563eb;
    color: #ffffff;
}

.sync-confirm-btn.overwrite-btn {
    background: rgba(220, 38, 38, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #fca5a5;
}

.sync-confirm-btn.overwrite-btn:hover {
    background: #dc2626;
    color: #ffffff;
}

.sync-confirm-btn.cancel-btn {
    background: transparent;
    border: 1px solid #2d2f34;
    color: #9ca3af;
    align-items: center;
}

.sync-confirm-btn.cancel-btn:hover {
    background: #1c1d22;
    color: #ffffff;
}

@media (max-width: 768px) {
    .header-nav {
        display: flex;
        width: 100%;
        gap: 8px;
    }

    .sync-nav-btn {
        width: 44px;
        height: 38px;
        padding: 0;
        flex-shrink: 0;
    }

    .sync-nav-btn span {
        display: none;
    }

    .nav-btn {
        flex: 1;
    }
}

.sync-subgroup {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: left;
}

.sync-field-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #9ca3af;
}

.sync-inline-row {
    display: flex;
    gap: 8px;
    width: 100%;
}

.sync-input-readonly,
.sync-input-text {
    flex: 1;
    background: #1c1d22;
    border: 1px solid #2d2f34;
    border-radius: 6px;
    color: #d1d5db;
    padding: 8px 10px;
    font-family: monospace;
    font-size: 0.78rem;
    outline: none;
    min-width: 0;
}

.sync-input-readonly {
    color: #93c5fd;
    background: #14161b;
    cursor: default;
}

.sync-input-text:focus {
    border-color: #3b82f6;
}

.sync-subgroup .sync-btn-action,
.sync-subgroup .sync-btn-primary {
    flex: 0 0 auto;
    padding: 8px 16px;
}

/* =========================================================================
   Modal de Confirmación para Check All / Uncheck All
   ========================================================================= */
.bulk-confirm-dialog {
    max-width: 360px;
}

.bulk-confirm-title {
    font-size: 1.1rem;
    margin: 0 0 8px 0;
    color: #f1f2f5;
}

.bulk-confirm-desc {
    font-size: 0.84rem;
    color: #9ca3af;
    line-height: 1.45;
    margin: 0 0 16px 0;
}

.bulk-confirm-options {
    display: flex;
    gap: 10px;
    width: 100%;
}

.bulk-confirm-btn {
    flex: 1;
    padding: 9px 14px;
    border-radius: 6px;
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.bulk-confirm-btn.proceed-btn {
    background: #2563eb;
    border: 1px solid #2563eb;
    color: #ffffff;
}

.bulk-confirm-btn.proceed-btn:hover {
    background: #1d4ed8;
}

.bulk-confirm-btn.proceed-btn.danger-action {
    background: #dc2626;
    border-color: #dc2626;
}

.bulk-confirm-btn.proceed-btn.danger-action:hover {
    background: #b91c1c;
}

.bulk-confirm-btn.cancel-btn {
    background: transparent;
    border: 1px solid #2d2f34;
    color: #9ca3af;
}

.bulk-confirm-btn.cancel-btn:hover {
    background: #1c1d22;
    color: #ffffff;
}

.sub-tabs {
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
}

.sub-tabs.is-dragging {
    cursor: grabbing;
}

/* =========================================================================
   Banner de Migración a Cloudflare Pages
   ========================================================================= */
.migration-banner {
    background: linear-gradient(90deg, #1e1b4b 0%, #1e293b 100%);
    border-bottom: 1px solid #4338ca;
    color: #e2e8f0;
    padding: 10px 16px;
    font-size: 0.85rem;
    position: relative;
    z-index: 999;
    width: 100%;
}

.migration-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.migration-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.migration-text strong {
    color: #a5b4fc;
}

.migration-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.banner-btn {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.banner-btn-primary {
    background: #4f46e5;
    border: 1px solid #6366f1;
    color: #ffffff;
}

.banner-btn-primary:hover {
    background: #4338ca;
}

.banner-btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #e2e8f0;
}

.banner-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.banner-close {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    padding: 4px;
}

.banner-close:hover {
    color: #ffffff;
}

@media (max-width: 768px) {
    .migration-content {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .migration-actions {
        justify-content: flex-end;
    }
}