/* Estilos Generales y Sistema de Diseño de PsicoMetría */

:root {
    --primary-color: #1e3a5f;
    --primary-light: #e0f2fe;
    --secondary-color: #2d6bcf;
    --dark-color: #1a1d23;
    --dark-hover: #262a33;
    --light-color: #f8fafc;
    --border-color: #e2e8f0;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    
    --success-color: #10b981;
    --success-light: #d1fae5;
    --warning-color: #f59e0b;
    --warning-light: #fef3c7;
    --danger-color: #ef4444;
    --danger-light: #fee2e2;
    --info-color: #3b82f6;
    --info-light: #dbeafe;
    
    --transition-speed: 0.25s;
    --sidebar-width: 260px;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--light-color);
    color: var(--text-primary);
    overflow-x: hidden;
}

/* Wrapper general de Layout */
.wrapper {
    display: flex;
    width: 100%;
    align-items: stretch;
}

/* Sidebar Estilizada */
.sidebar {
    min-width: var(--sidebar-width);
    max-width: var(--sidebar-width);
    background: var(--dark-color);
    color: #94a3b8;
    transition: all var(--transition-speed) ease;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    z-index: 1000;
}

.sidebar.active {
    margin-left: calc(-1 * var(--sidebar-width));
}

.sidebar-header {
    padding: 24px;
    background: rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo-icon {
    font-size: 1.6rem;
    color: var(--secondary-color);
    margin-right: 12px;
}

.brand-logo {
    display: inline-block;
    object-fit: contain;
    flex-shrink: 0;
}

.brand-logo-sidebar {
    width: 36px;
    height: 36px;
    margin-right: 12px;
    border-radius: 6px;
}

.brand-logo-login {
    max-width: 180px;
    max-height: 82px;
}

.logo-text {
    font-weight: 700;
    font-size: 1.15rem;
    color: #fff;
    letter-spacing: 0.5px;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.sidebar-label {
    padding: 20px 24px 8px 24px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #475569;
}

.sidebar ul.components {
    padding: 10px 0;
    flex-grow: 1;
}

.sidebar ul li a {
    padding: 11px 24px;
    font-size: 0.9rem;
    display: block;
    color: #94a3b8;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.15s ease;
    border-left: 3px solid transparent;
}

.sidebar ul li a:hover {
    color: #fff;
    background: var(--dark-hover);
    border-left-color: var(--secondary-color);
}

.sidebar ul li.active > a {
    color: #fff;
    background: var(--dark-hover);
    border-left-color: var(--secondary-color);
    font-weight: 600;
}

.sidebar-footer {
    padding: 20px 24px;
    background: rgba(0, 0, 0, 0.15);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-footer .user-info {
    max-width: 170px;
}

.sidebar-footer .user-info .name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-footer .logout-btn {
    color: #94a3b8;
    font-size: 1.2rem;
    transition: color 0.15s ease;
}

.sidebar-footer .logout-btn:hover {
    color: var(--danger-color);
}

/* Área de Contenido */
.content {
    width: 100%;
    min-height: 100vh;
    transition: all var(--transition-speed);
}

.header-navbar {
    border-bottom: 1px solid var(--border-color);
    padding: 12px 24px;
}

.sidebar-toggle-btn {
    padding: 0;
    margin-right: 15px;
}

/* Tarjetas y Componentes Premium */
.card {
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-stat {
    position: relative;
    overflow: hidden;
}

.card-stat:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
}

.icon-shape {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 48px;
    height: 48px;
}

.bg-primary-light { background-color: var(--primary-light) !important; }
.bg-warning-light { background-color: var(--warning-light) !important; }
.bg-success-light { background-color: var(--success-light) !important; }
.bg-danger-light { background-color: var(--danger-light) !important; }
.bg-info-light { background-color: var(--info-light) !important; }

.bg-purple-light { background-color: #f3e8ff !important; }
.text-purple { color: #a855f7 !important; }

/* Tipografía de Tabla */
.table th {
    font-weight: 600;
    letter-spacing: 0.5px;
}

.table td {
    padding-top: 14px;
    padding-bottom: 14px;
}

/* Formularios */
.form-control, .form-select {
    padding: 10px 14px;
    border-color: var(--border-color);
    border-radius: 6px;
    font-size: 0.95rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(45, 107, 207, 0.15);
}

.form-label {
    font-size: 0.9rem;
    color: var(--text-primary);
}

.settings-logo-preview {
    width: 56px;
    height: 56px;
    object-fit: contain;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: #fff;
    padding: 6px;
}

/* Clases de texto extra chicas */
.fs-xs { font-size: 0.78rem !important; }
.fs-sm { font-size: 0.88rem !important; }
.fs-md { font-size: 1.05rem !important; }

/* Responsivo */
@media (max-width: 768px) {
    #sidebar {
        margin-left: calc(-1 * var(--sidebar-width));
    }
    #sidebar.active {
        margin-left: 0;
    }
    .content {
        width: 100%;
    }
}
