* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: #f0f2f5;
    height: 100vh;
    overflow: hidden;
}

.app-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.toolbar {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: white;
    padding: 10px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    z-index: 100;
    flex-shrink: 0;
}

.logo h1 {
    font-size: 22px;
    font-weight: 700;
    color: #38bdf8;
}

.version {
    font-size: 11px;
    color: #94a3b8;
    margin-left: 10px;
    background: #334155;
    padding: 2px 10px;
    border-radius: 12px;
}

.toolbar-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.btn-icon {
    background: rgba(255,255,255,0.1);
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.3s;
}

.btn-icon:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

.status-badge {
    background: #334155;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    color: #94a3b8;
}

.status-badge.loaded {
    background: #065f46;
    color: #34d399;
}

.main-layout {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.nav-sidebar {
    width: 220px;
    background: #1e293b;
    color: #e2e8f0;
    padding: 15px 0;
    overflow-y: auto;
    flex-shrink: 0;
}

.nav-section {
    margin-bottom: 15px;
}

.nav-section h3 {
    font-size: 10px;
    text-transform: uppercase;
    color: #64748b;
    padding: 0 20px;
    margin-bottom: 5px;
    letter-spacing: 1px;
}

.nav-section ul {
    list-style: none;
}

.nav-section ul li {
    padding: 8px 20px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 13px;
    border-left: 3px solid transparent;
}

.nav-section ul li:hover {
    background: rgba(255,255,255,0.05);
    border-left-color: #38bdf8;
}

.nav-section ul li.active {
    background: rgba(56, 189, 248, 0.1);
    border-left-color: #38bdf8;
    color: #38bdf8;
}

.work-area {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f8fafc;
}

.panel {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.panel h2 {
    font-size: 20px;
    color: #0f172a;
    margin-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 12px;
}

.analysis-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    align-items: center;
}

.analysis-controls select,
.analysis-controls input {
    padding: 10px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    font-size: 14px;
    min-width: 180px;
}

.analysis-controls select:focus,
.analysis-controls input:focus {
    border-color: #38bdf8;
    outline: none;
}

.btn-primary {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: white;
    padding: 10px 25px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.4);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.data-table th {
    background: #f1f5f9;
    padding: 10px;
    text-align: left;
    position: sticky;
    top: 0;
    z-index: 10;
    font-weight: 600;
}

.data-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #e2e8f0;
}

.data-table tr:hover {
    background: #f8fafc;
}

.variable-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
    margin: 15px 0;
}

.variable-card {
    background: #f8fafc;
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s;
}

.variable-card:hover {
    border-color: #38bdf8;
    box-shadow: 0 2px 8px rgba(56, 189, 248, 0.2);
}

.variable-card .name {
    font-weight: 600;
    color: #0f172a;
}

.variable-card .type {
    font-size: 11px;
    margin-top: 3px;
}

.variable-card .type.cuantitativa {
    color: #1e40af;
}

.variable-card .type.cualitativa {
    color: #9d174d;
}

.variable-card .badge-tipo {
    display: inline-block;
    font-size: 10px;
    padding: 2px 10px;
    border-radius: 12px;
    margin-top: 4px;
}

.badge-tipo.cuantitativa {
    background: #dbeafe;
    color: #1e40af;
}

.badge-tipo.cualitativa {
    background: #fce7f3;
    color: #9d174d;
}

.result-container {
    margin-top: 15px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 8px;
}

.result-container h4 {
    color: #0f172a;
    margin-bottom: 12px;
}

.result-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 14px;
}

.result-table th {
    background: #e2e8f0;
    padding: 10px;
    text-align: left;
}

.result-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #e2e8f0;
}

.result-table tr:hover {
    background: #f1f5f9;
}

.chart-controls {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.btn-chart {
    background: #e2e8f0;
    color: #334155;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.3s;
}

.btn-chart:hover {
    background: #cbd5e1;
    transform: translateY(-2px);
}

.btn-chart.active {
    background: #0284c7;
    color: white;
}

.chart-container {
    height: 400px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.stats-summary {
    background: #f1f5f9;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
}

.stats-summary .stat-item {
    display: inline-block;
    margin-right: 30px;
    padding: 8px 0;
}

.stats-summary .stat-label {
    font-size: 12px;
    color: #64748b;
}

.stats-summary .stat-value {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 0;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    padding: 5px 10px;
    background: #f8fafc;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    cursor: pointer;
}

.checkbox-group label:hover {
    background: #f1f5f9;
}

.guia-contenido {
    max-width: 900px;
    margin: 0 auto;
}

.guia-paso {
    background: #f8fafc;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    border-left: 4px solid #38bdf8;
}

.guia-paso h3 {
    color: #0f172a;
    margin-bottom: 10px;
}

.guia-paso p, .guia-paso li {
    color: #334155;
    line-height: 1.6;
}

.guia-tipos {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin: 15px 0;
}

.tipo-cualitativa {
    background: #fce7f3;
    padding: 15px;
    border-radius: 8px;
    border: 2px solid #f9a8d4;
}

.tipo-cualitativa h4 {
    color: #9d174d;
}

.tipo-cuantitativa {
    background: #dbeafe;
    padding: 15px;
    border-radius: 8px;
    border: 2px solid #93c5fd;
}

.tipo-cuantitativa h4 {
    color: #1e40af;
}

.guia-resumen {
    background: linear-gradient(135deg, #dbeafe 0%, #ede9fe 100%);
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
}

.guia-resumen h3 {
    color: #0f172a;
    margin-bottom: 15px;
}

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

.resumen-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
}

.resumen-item h4 {
    color: #0f172a;
    margin-bottom: 5px;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

@media (max-width: 768px) {
    .guia-tipos {
        grid-template-columns: 1fr;
    }
    .resumen-grid {
        grid-template-columns: 1fr;
    }
    .nav-sidebar {
        width: 60px;
    }
    .nav-section h3 {
        display: none;
    }
    .nav-section ul li {
        padding: 10px;
        font-size: 20px;
        text-align: center;
    }
    .toolbar-actions .btn-icon {
        padding: 6px 10px;
        font-size: 11px;
    }
}