/* ==========================================
   AIDEEA PROFESSIONAL THEME v2.0
   Moderno, limpio, con modo oscuro
   ========================================== */

/* ========== MODO CLARO (DEFAULT) ========== */
:root {
    /* Colores AIDEEA */
    --primary: #0066cc;
    --primary-hover: #0052a3;
    --accent: #00a8ff;
    
    /* Fondos */
    --bg-base: #f8fafc;
    --bg-elevated: #ffffff;
    --bg-hover: #f1f5f9;
    
    /* Textos */
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    
    /* Bordes */
    --border-color: #e2e8f0;
    
    /* Sombras */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* ========== MODO OSCURO ========== */
@media (prefers-color-scheme: dark) {
    :root {
        /* Fondos oscuros */
        --bg-base: #0f172a;
        --bg-elevated: #1e293b;
        --bg-hover: #334155;
        
        /* Textos oscuros */
        --text-primary: #f1f5f9;
        --text-secondary: #94a3b8;
        
        /* Bordes oscuros */
        --border-color: #334155;
        
        /* Sombras oscuras */
        --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
        --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
    }
}

/* ========== TIPOGRAFÍA PROFESIONAL ========== */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========== HEADER MODERNO ========== */
.q-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%) !important;
    box-shadow: var(--shadow-md);
}

.q-toolbar {
    min-height: 60px;
}

.q-toolbar__title::before {
    content: "AIDEEA ";
    font-weight: 700;
    letter-spacing: 0.02em;
    padding-right: 6px;
    opacity: 1;
}

.q-toolbar__title::after {
    content: "RMM";
    font-weight: 400;
    opacity: 0.9;
}

/* Botones del header */
.q-header .q-btn {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 8px;
}

.q-header .q-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* ========== SIDEBAR LIMPIA ========== */
.q-drawer {
    background: var(--bg-elevated);
    border-right: 1px solid var(--border-color);
}

.q-drawer .q-item {
    border-radius: 10px;
    margin: 4px 12px;
    transition: all 0.2s ease;
}

.q-drawer .q-item:hover {
    background: var(--bg-hover);
    transform: translateX(2px);
}

.q-drawer .q-item--active {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: var(--primary);
    font-weight: 600;
    border-left: 3px solid var(--primary);
}

@media (prefers-color-scheme: dark) {
    .q-drawer .q-item--active {
        background: linear-gradient(135deg, rgba(0, 102, 204, 0.2) 0%, rgba(0, 102, 204, 0.3) 100%);
        color: var(--accent);
        border-left: 3px solid var(--accent);
    }
}

/* ========== CONTENIDO PRINCIPAL ========== */
.q-page-container {
    background: var(--bg-base);
}

.q-page {
    background: var(--bg-base);
}

/* ========== TABLAS PROFESIONALES ========== */
.q-table {
    background: var(--bg-elevated);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.q-table__top {
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 20px;
}

.q-table__title {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 16px;
}

.q-table thead th {
    background: var(--bg-base);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border-color);
}

.q-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background 0.15s ease;
}

.q-table tbody tr:hover {
    background: var(--bg-hover);
}

.q-table tbody td {
    color: var(--text-primary);
}

/* ========== BOTONES MODERNOS ========== */
.q-btn {
    border-radius: 8px;
    font-weight: 500;
    text-transform: none;
    transition: all 0.2s ease;
}

.q-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.q-btn--primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%) !important;
}

.q-btn--secondary {
    background: var(--bg-hover);
    color: var(--text-primary);
}

/* ========== CARDS LIMPIAS ========== */
.q-card {
    background: var(--bg-elevated);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.q-card__section {
    color: var(--text-primary);
}

/* ========== INPUTS Y CAMPOS ========== */
.q-field__control {
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.q-field__control:hover {
    border-color: var(--primary);
}

.q-field--focused .q-field__control {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.q-field__label,
.q-field__native {
    color: var(--text-primary);
}

/* ========== TABS ========== */
.q-tabs {
    background: var(--bg-elevated);
}

.q-tab {
    color: var(--text-secondary);
    text-transform: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.q-tab:hover {
    color: var(--text-primary);
}

.q-tab--active {
    color: var(--primary);
    font-weight: 600;
}

.q-tab__indicator {
    height: 3px;
    background: var(--primary);
}

/* ========== BADGES Y CHIPS ========== */
.q-chip {
    border-radius: 8px;
    font-weight: 500;
}

.q-badge {
    border-radius: 6px;
    font-weight: 600;
}

/* ========== DIÁLOGOS ========== */
.q-dialog__backdrop {
    backdrop-filter: blur(4px);
}

/* ========== TOOLTIPS ========== */
.q-tooltip {
    background: rgba(15, 23, 42, 0.95);
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(10px);
}

@media (prefers-color-scheme: dark) {
    .q-tooltip {
        background: rgba(30, 41, 59, 0.95);
    }
}

/* ========== NOTIFICACIONES ========== */
.q-notification {
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(10px);
}

/* ========== SCROLLBAR MODERNA ========== */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-base);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* ========== BÚSQUEDA ========== */
input[type="search"] {
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-primary);
    padding: 8px 16px;
    transition: all 0.2s ease;
}

input[type="search"]:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
    outline: none;
}

/* ========== MENÚS CONTEXTUALES ========== */
.q-menu {
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    border-radius: 10px;
}

.q-item {
    color: var(--text-primary);
}

/* ========== LISTAS ========== */
.q-list {
    background: var(--bg-elevated);
}

/* ========== SEPARADORES ========== */
.q-separator {
    background: var(--border-color);
}

/* ========== ICONOS ========== */
.q-icon {
    transition: color 0.2s ease;
}

/* ========== MEJORAS DE TEXTO ========== */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
}

p, span, div {
    color: var(--text-primary);
}

/* ========== ESTADOS DE COLOR ========== */
.text-positive {
    color: #10b981 !important;
}

.text-negative {
    color: #ef4444 !important;
}

.text-warning {
    color: #f59e0b !important;
}

.bg-positive {
    background: rgba(16, 185, 129, 0.15) !important;
}

.bg-negative {
    background: rgba(239, 68, 68, 0.15) !important;
}

.bg-warning {
    background: rgba(245, 158, 11, 0.15) !important;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .q-table {
        font-size: 13px;
    }
    
    .q-toolbar__title::before,
    .q-toolbar__title::after {
        font-size: 14px;
    }
}

/* ========== ANIMACIONES SUAVES ========== */
* {
    transition-duration: 0.2s;
    transition-timing-function: ease;
}

/* Excepciones para evitar animaciones innecesarias */
.q-table tbody tr,
.q-item {
    transition: background 0.15s ease, transform 0.15s ease, color 0.15s ease;
}
