/* ========================================
   SIDEBAR PROFESIONAL - Diseño Moderno
   ======================================== */

/* Estructura Principal */
.app-body {
    display: flex;
    height: 100vh;
    overflow: hidden;
    background-color: #f8fafc;
}

/* Sidebar Moderna con Sombra Sutil */
.sidebar {
    width: 280px;
    flex-shrink: 0;
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    color: #f1f5f9;
    display: flex;
    flex-direction: column;
    padding: 24px 0;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    position: relative;
}

/* Header con Logo/Título */
.sidebar-header {
    padding: 0 24px 24px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 24px;
}

.sidebar-header h2 {
    color: #ffffff;
    font-size: 1.35rem;
    margin: 0 0 8px 0;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Contenido Scrollable */
.sidebar-content {
    flex-grow: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0 12px;
}

/* Scrollbar Personalizado */
.sidebar-content::-webkit-scrollbar {
    width: 6px;
}

.sidebar-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.sidebar-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.sidebar-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Selector de Modo */
.mode-selector-container {
    padding: 0 24px 24px 24px;
}

.mode-selector-container label {
    color: #94a3b8;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    display: block;
    margin-bottom: 8px;
}

.mode-selector-container select {
    width: 100%;
    padding: 10px 12px;
    background-color: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23fff' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.mode-selector-container select:hover {
    background-color: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
}

.mode-selector-container select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.mode-selector-container select option {
    background-color: #1e293b;
    color: white;
    padding: 10px;
}

/* Tabs - Botones Modernos */
.tab-buttons {
    display: flex;
    flex-direction: column;
    gap: 6px;
    border-bottom: none !important;
}

.tab-button {
    text-align: left;
    padding: 12px 16px;
    margin: 0;
    width: 100%;
    background-color: transparent;
    color: #cbd5e1;
    border: none;
    border-radius: 8px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 3px solid transparent;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

/* Efecto Hover con Degradado */
.tab-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.1) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.tab-button:hover:not(.active)::before {
    opacity: 1;
}

.tab-button:hover:not(.active) {
    background-color: rgba(255, 255, 255, 0.06);
    color: #f8fafc;
    padding-left: 20px;
    border-left-color: rgba(59, 130, 246, 0.3);
}

/* Tab Activa - Destacada */
.tab-button.active {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.15) 0%, rgba(59, 130, 246, 0.05) 100%);
    color: #60a5fa;
    border-left: 3px solid #3b82f6;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

/* Iconos en Tabs (Opcional) */
.tab-button i,
.tab-button .emoji {
    margin-right: 8px;
    opacity: 0.8;
}

.tab-button.active i,
.tab-button.active .emoji {
    opacity: 1;
}

/* Área de Contenido Principal */
.content-area {
    flex-grow: 1;
    overflow-y: auto;
    padding: 24px 32px;
    position: relative;
    background: #f8fafc;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f8fafc;
}

.content-area::-webkit-scrollbar {
    width: 8px;
}

.content-area::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.content-area::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.content-area::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Container dentro de content-area */
.content-area .container {
    max-width: 100% !important;
    margin: 0;
    box-shadow: none;
    background: transparent;
    padding: 0;
}

/* Tab Content con Animación */
.tab-content {
    background: white;
    padding: 32px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
    margin-bottom: 24px;
    animation: fadeIn 0.25s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive - Colapsar sidebar en móvil (opcional) */
@media (max-width: 768px) {
    .sidebar {
        width: 240px;
    }

    .sidebar-header h2 {
        font-size: 1.2rem;
    }
}