/* ==============================================
   Estilos para el Admin Panel v2.9.5
   ============================================== */
:root {
    --color-bg-dark: #0D1117;
    --color-bg-medium: #161B22;
    --color-border: #21262D;
    --color-border-light: #2a3038;
    --color-text-primary: #e2e8f0;
    --color-text-secondary: #9ca3af;
    --color-text-dim: #6b7280;
    --color-cyan-accent: #06b6d4;
    --color-cyan-glow: rgba(6, 182, 212, 0.25);
    --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'ui-monospace', 'SFMono-Regular', 'Menlo', 'Monaco', 'Consolas', monospace;
    --header-height: 60px;
    --navbar-height: 45px;
}

body {
    background-color: var(--color-bg-dark);
    color: var(--color-text-secondary);
    font-family: var(--font-sans);
    line-height: 1.5;
    padding-top: calc(var(--header-height) + var(--navbar-height));
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--color-bg-medium); border-radius: 3px; }
::-webkit-scrollbar-thumb { background: var(--color-cyan-accent); border-radius: 3px; }

/* ==============================================
   1. Encabezado y Barra de Menús Fijos
   ============================================== */
.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    height: var(--header-height);
    background-color: var(--color-bg-dark);
    border-bottom: 1px solid var(--color-border);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 101;
    box-sizing: border-box;
}
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}
.header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.app-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text-primary);
}
.app-version {
    font-size: 0.75rem;
    padding: 0 0.3rem;
    font-family: var(--font-mono);
    color: var(--color-cyan-accent);
    background-color: var(--color-bg-medium);
    border-radius: 4px;
    border: 1px solid var(--color-border);
}
.header-link {
    font-size: 0.85rem;
    color: var(--color-cyan-accent);
    text-decoration: none;
    border: 1px solid var(--color-cyan-accent);
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}
.header-link:hover {
    background-color: var(--color-cyan-glow);
    color: #fff;
}

/* Barra de Menús */
.admin-navbar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0 1.5rem;
    height: var(--navbar-height);
    background-color: var(--color-bg-medium);
    border-bottom: 1px solid var(--color-border);
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    z-index: 100;
    box-sizing: border-box;
}
.menu-group {
    position: relative;
}
.menu-title {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    background: none;
    border: none;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 4px;
}
.menu-title:hover, .menu-title.active {
    background-color: var(--color-border);
    color: var(--color-text-primary);
}
.menu-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    background-color: var(--color-bg-medium);
    border: 1px solid var(--color-border-light);
    border-radius: 0.5rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    padding: 0.5rem;
    z-index: 101;
    min-width: 200px;
}
.menu-dropdown.active {
    display: block;
    animation: fadeIn 0.2s ease-out;
}
.menu-item {
    display: block;
    width: 100%;
    background-color: var(--color-bg-dark);
    border: 1px solid var(--color-border);
    color: var(--color-text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 4px;
    padding: 0.6rem 0.8rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.15s ease;
}
.menu-item:hover {
    background-color: var(--color-border);
    color: var(--color-cyan-accent);
}
.menu-item.active {
    background-color: var(--color-cyan-glow);
    color: var(--color-cyan-accent);
    border-color: var(--color-cyan-accent);
}
.menu-item + .menu-item {
    margin-top: 0.25rem;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==============================================
   2. Área de Contenido y Paneles
   ============================================== */
.admin-content-area {
    padding: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
}
.content-panel {
    display: none;
}
.content-panel.active {
    display: block;
}

/* ==============================================
   3. Layout de 2 Columnas (para paneles)
   ============================================== */
.panel-layout-2col {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
@media (min-width: 1024px) {
    .panel-layout-2col {
        flex-direction: row;
    }
    .sidebar-column {
        width: 33.333333%;
        flex-shrink: 0;
    }
    .main-column {
        width: 66.666667%;
    }
}
.sticky-panel { 
    position: sticky; 
    top: calc(var(--header-height) + var(--navbar-height) + 1.5rem); 
}
.w-full { width: 100%; }
.text-gray-400 { color: var(--color-text-secondary); }

/* ==============================================
   4. Tarjetas y Paneles
   ============================================== */
.futuristic-card {
    background-color: var(--color-bg-medium);
    border: 1px solid var(--color-border);
    border-left: 3px solid var(--color-cyan-accent);
    border-radius: 0.5rem;
    padding: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
.search-panel {
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - var(--header-height) - var(--navbar-height) - 3rem);
}
.futuristic-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 0.75rem;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 0.4rem;
    flex-shrink: 0;
}
.spec-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text-primary);
}

/* ==============================================
   5. Inputs y Botones
   ============================================== */
.futuristic-input,
.futuristic-select,
.futuristic-textarea {
    background-color: var(--color-bg-dark);
    border: 1px solid var(--color-border);
    color: var(--color-text-primary);
    border-radius: 4px;
    padding: 0.6rem 0.8rem;
    font-size: 0.85rem;
    transition: all 0.2s ease-in-out;
    box-sizing: border-box;
    font-family: var(--font-mono);
}
.futuristic-input:focus,
.futuristic-select:focus,
.futuristic-textarea:focus {
    outline: none;
    border-color: var(--color-cyan-accent);
    box-shadow: 0 0 0 3px var(--color-cyan-glow);
}
.futuristic-textarea {
    width: 100%;
    min-height: 40px;
    resize: vertical;
}
.futuristic-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    margin-bottom: 0.25rem;
    display: block;
}
.futuristic-button {
    background-color: var(--color-cyan-accent);
    color: #ffffff;
    font-weight: 600;
    font-size: 0.8rem;
    border-radius: 4px;
    padding: 0.6rem 1.2rem;
    letter-spacing: 0.05em;
    border: 1px solid var(--color-cyan-accent);
    transition: all 0.2s ease-in-out;
    cursor: pointer;
    height: 38px; /* Altura fija para alinear */
    box-sizing: border-box;
}
.futuristic-button:hover {
    background-color: #0891b2;
    box-shadow: 0 0 15px var(--color-cyan-glow);
}
.futuristic-button:disabled {
    background-color: var(--color-border);
    border-color: var(--color-border-light);
    color: var(--color-text-dim);
    cursor: not-allowed;
}

/* ==============================================
   6. Lista de Búsqueda (Sidebar)
   ============================================== */
.futuristic-list {
    background-color: var(--color-bg-dark);
    border: 1px solid var(--color-border-light);
    border-radius: 4px;
}
.full-list-visible {
    margin-top: 0.75rem;
    flex-grow: 1;
    overflow-y: auto;
    border-radius: 4px;
    background-color: var(--color-bg-dark);
    transition: all 0.3s ease;
}
.futuristic-list .list-item {
    padding: 0.45rem 0.75rem;
    border-bottom: 1px dashed var(--color-border);
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    font-size: 0.85rem;
    font-family: var(--font-mono);
}
.futuristic-list .list-item:last-child {
    border-bottom: none;
}
.futuristic-list .list-item:hover {
    background-color: var(--color-border);
    color: var(--color-cyan-accent);
}
.futuristic-list .list-item.active {
    background-color: var(--color-cyan-glow);
    color: var(--color-cyan-accent);
    font-weight: 600;
}
.futuristic-list.list-collapsed {
    flex-grow: 0;
    max-height: 0;
    overflow: hidden;
    margin-top: 0;
    border: none;
}

/* ==============================================
   7. Panel Editor
   ============================================== */
.editor-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1rem 0;
    padding: 1rem;
    background-color: var(--color-bg-dark);
    border: 1px solid var(--color-border);
    border-radius: 4px;
}
@media (min-width: 768px) {
    .editor-controls {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-end;
    }
}
.control-group {
    flex-grow: 1;
}
.editor-form-fields {
    max-height: calc(100vh - var(--header-height) - var(--navbar-height) - 270px);
    overflow-y: auto;
    padding-right: 0.5rem;
}
.form-group {
    margin-bottom: 0.75rem;
}
.form-group-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text-primary);
    font-family: var(--font-mono);
    padding: 0.5rem 0;
    background: var(--color-border);
    margin: 1rem 0 0.75rem 0;
    padding-left: 0.75rem;
    border-radius: 4px;
}
.form-row {
    margin-bottom: 0.75rem;
}
.form-row .futuristic-label {
    font-size: 0.75rem;
    font-family: var(--font-mono);
    color: var(--color-text-secondary);
}

/* ==============================================
   8. Panel Exportar Gama (ACTUALIZADO)
   ============================================== */
.gama-export-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end; /* Alinear select y botón */
    margin-bottom: 1rem;
}
.gama-export-controls .control-group {
    flex-grow: 1;
    min-width: 200px;
}

.gama-export-list {
    max-height: calc(100vh - var(--header-height) - var(--navbar-height) - 220px);
    overflow-y: auto;
    padding-right: 0.5rem;
    background: var(--color-bg-dark);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    padding: 0.5rem;
}
.gama-export-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0.75rem;
    border-bottom: 1px dashed var(--color-border-light);
    font-family: var(--font-mono);
    font-size: 0.85rem;
}
.gama-export-item:last-child {
    border-bottom: none;
}
.gama-export-item span {
    color: var(--color-text-primary);
    font-weight: 600;
}
.export-item-button {
    background-color: var(--color-bg-medium);
    border: 1px solid var(--color-border-light);
    color: var(--color-text-secondary);
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    padding: 0.3rem 0.6rem;
    transition: all 0.15s ease;
}
.export-item-button:hover {
    background-color: var(--color-border-light);
    color: var(--color-cyan-accent);
    border-color: var(--color-cyan-accent);
}