/* ==========================================================================
   HOJA DE ESTILOS PERSONALIZADA PARA PANEL ADMINISTRATIVO (admin.css)
   ========================================================================== */

.contenedor-admin {
    width: 95%;
    max-width: 1200px;
    margin: 30px auto;
    padding: 20px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 12px;
}

.header-admin {
    text-align: center;
    margin-bottom: 25px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 15px;
}

/* Sistema de Control Nav de Pestañas */
.pestanas-contenedor {
    display: flex;
    gap: 5px;
    margin-bottom: 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 5px;
    overflow-x: auto;
}

.tab-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--texto-color, #ffffff);
    padding: 12px 20px;
    cursor: pointer;
    font-weight: bold;
    border-radius: 6px 6px 0 0;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.12);
}

.tab-btn.activo {
    background: #4a9ff5;
    color: #ffffff;
    border-color: #4a9ff5;
}

/* Modificadores de Visibilidad */
.tab-contenido {
    display: none;
}

.tab-contenido.activo {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Estructura Modular Grid */
.grid-admin {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 25px;
}

.grid-admin.vertical {
    grid-template-columns: 1fr;
}

.panel-formulario, .panel-listado {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 20px;
}

.ancho-completo {
    grid-column: span 2;
}

/* Elementos de Entrada y Formulario */
.campo-grupo {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 15px;
}

.fila-campos {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.campo-grupo label {
    font-size: 0.9rem;
    font-weight: 600;
    opacity: 0.9;
}

.campo-grupo input, 
.campo-grupo select, 
.campo-grupo textarea {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    padding: 10px 12px;
    border-radius: 5px;
    font-size: 0.95rem;
    font-family: inherit;
}

.campo-grupo input:focus, 
.campo-grupo select:focus, 
.campo-grupo textarea:focus {
    outline: none;
    border-color: #4a9ff5;
    box-shadow: 0 0 5px rgba(74, 159, 245, 0.4);
}

/* Gestión de Listados y Tablas Internas */
.tabla-scroll {
    max-height: 480px;
    overflow-y: auto;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.2);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.9rem;
}

th {
    background: rgba(255, 255, 255, 0.03);
    color: #4a9ff5;
    position: sticky;
    top: 0;
    z-index: 10;
}

tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* Botonera y Tags Relacionales */
.tag-relacional {
    background: rgba(74, 159, 245, 0.15);
    color: #4a9ff5;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    display: inline-block;
}

.btn-guardar { background: #4af5a9; color: #022b18; font-weight: bold; padding: 10px 20px; border: none; border-radius: 5px; cursor: pointer; }
.btn-cancelar { background: transparent; color: #ff6b6b; padding: 10px 15px; border: 1px solid rgba(255, 107, 107, 0.3); border-radius: 5px; cursor: pointer; }
.btn-editar { background: rgba(255, 255, 255, 0.1); color: #fff; padding: 5px 10px; border: none; border-radius: 4px; cursor: pointer; font-size: 0.8rem; }
.btn-guardar:hover, .btn-cancelar:hover, .btn-editar:hover { opacity: 0.85; }

.alert { padding: 12px; border-radius: 6px; margin-bottom: 20px; font-weight: bold; text-align: center; }
.alert-success { background: rgba(74, 245, 169, 0.15); color: #4af5a9; border: 1px solid #4af5a9; }
.alert-danger { background: rgba(245, 74, 74, 0.15); color: #ff6b6b; border: 1px solid #ff6b6b; }
.admin-footer { margin-top: 30px; text-align: center; border-top: 1px solid rgba(255, 255, 255, 0.05); padding-top: 20px; }
.text-right { text-justify: right; display: flex; justify-content: flex-end; gap: 10px; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}