:root {
    --bg-main: #1c1917; /* Warm dark gray */
    --bg-secondary: #292524;
    --bg-accent: #f97316; /* Warm orange */
    --bg-card: rgba(41, 37, 36, 0.75);
    --text-primary: #fafaf9;
    --text-secondary: #a8a29e;
    --accent-glow: rgba(249, 115, 22, 0.3);
    --border-color: rgba(255, 255, 255, 0.1);
    
    /* OMNES CORE Axes */
    --poder: #ef4444;       /* Rojo */
    --vinculo: #3b82f6;     /* Azul */
    --direccion: #10b981;   /* Verde */
    --energia: #f59e0b;     /* Amarillo/Naranja */
    --adaptacion: #8b5cf6;  /* Morado */

    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --sidebar-width: 280px;
    --transition-speed: 0.3s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body.dark-theme {
    background-color: var(--bg-main);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
}

h1, h2, h3, .logo-text {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

/* App Container */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 2rem 0;
    position: fixed;
    height: 100vh;
    z-index: 100;
    transition: transform var(--transition-speed);
}

.sidebar-header {
    padding: 0 1.5rem 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-primary);
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--bg-accent), #60a5fa);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.5rem;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

.logo-text-group {
    display: flex;
    flex-direction: column;
}

.logo-text {
    font-size: 1.25rem;
    letter-spacing: -0.5px;
}

.logo-tag {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--bg-accent);
    letter-spacing: 1px;
}

.sidebar-nav {
    flex: 1;
    padding: 0 0.75rem;
}

.nav-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    font-weight: 500;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.nav-btn.active {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.1), transparent);
    color: var(--bg-accent);
    position: relative;
}

.nav-btn.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 15%;
    height: 70%;
    width: 3px;
    background-color: var(--bg-accent);
    border-radius: 0 4px 4px 0;
}

.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.logout-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border-color: var(--danger);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 2rem;
    min-height: 100vh;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
}

.header-breadcrumb {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.header-breadcrumb span#breadcrumb-current {
    color: var(--text-primary);
    font-weight: 600;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.plan-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.plan-badge.starter { background: rgba(59, 130, 246, 0.2); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }
.plan-badge.pro { background: rgba(168, 85, 247, 0.2); color: #a855f7; border: 1px solid rgba(168, 85, 247, 0.3); }
.plan-badge.empresa { background: rgba(34, 197, 94, 0.2); color: #4ade80; border: 1px solid rgba(34, 197, 94, 0.3); }

.notification-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.5rem;
    border-radius: 10px;
    cursor: pointer;
    position: relative;
}

/* Glass Cards */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* Auth Overlay */
.auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(8px);
}

.auth-card {
    width: 100%;
    max-width: 450px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.auth-tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.25rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.auth-tab {
    flex: 1;
    padding: 0.75rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.auth-tab.active {
    background: var(--bg-accent);
    color: white;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(15, 23, 42, 1);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: white;
    font-size: 1rem;
    transition: all 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--bg-accent);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--bg-accent);
    color: white;
}

.btn-primary:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-block {
    width: 100%;
}

.hidden {
    display: none !important;
}

/* Grid Layouts */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.view-content > * {
    animation: fadeIn 0.4s ease-out forwards;
}

/* Loading Spinner */
.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 300px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(59, 130, 246, 0.1);
    border-top: 3px solid var(--bg-accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .main-content {
        margin-left: 0;
    }
}
/* Admin Specific Styles */
.admin-table-container {
    overflow-x: auto;
    margin-top: 1rem;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.admin-table th, .admin-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.admin-table th {
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

.status-tag {
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
}

.status-tag.active { background: rgba(34, 197, 94, 0.2); color: #4ade80; }
.status-tag.inactive { background: rgba(239, 68, 68, 0.2); color: #f87171; }
.status-tag.vencido { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }

.action-btn-sm {
    padding: 0.4rem;
    border-radius: 6px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.action-btn-sm:hover {
    background: var(--bg-accent);
    color: white;
}

.admin-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.admin-tab-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-weight: 600;
    position: relative;
}

.admin-tab-btn.active {
    color: var(--bg-accent);
}

.admin-tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -0.6rem;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--bg-accent);
}

.metric-card {
    text-align: center;
}

.metric-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--bg-accent);
    font-family: 'Outfit';
    margin-bottom: 0.5rem;
}

.metric-label {
    color: var(--text-secondary);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Responsive Admin */
@media (max-width: 768px) {
    .admin-tabs {
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* Journey Map Styles */
.journey-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem 0;
    position: relative;
}

.journey-node {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    position: relative;
    z-index: 2;
    background: var(--bg-main);
    padding: 1rem;
    border-radius: 16px;
    transition: transform 0.3s;
}

.journey-node:not(.locked):hover {
    transform: translateX(10px);
}

.node-icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    border: 2px solid var(--border-color);
    background: var(--bg-secondary);
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.journey-node.completed .node-icon-wrapper {
    background: rgba(34, 197, 94, 0.1);
    border-color: var(--success);
    color: var(--success);
}

.journey-node.unlocked .node-icon-wrapper {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--bg-accent);
    color: var(--bg-accent);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

.journey-node.locked {
    opacity: 0.5;
    filter: grayscale(1);
    cursor: not-allowed;
}

.node-content {
    flex: 1;
}

.node-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.node-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.node-action {
    padding: 0.5rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.journey-node.completed .node-action {
    background: transparent;
    border: 1px solid var(--success);
    color: var(--success);
}

.journey-node.unlocked .node-action {
    background: var(--bg-accent);
    color: white;
}
.journey-node.unlocked .node-action:hover {
    background: #2563eb;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.journey-node.locked .node-action {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    cursor: not-allowed;
}

.journey-line {
    position: absolute;
    left: 2rem;
    top: 40px;
    bottom: 40px;
    width: 2px;
    background: var(--border-color);
    z-index: 1;
}

.journey-line-fill {
    width: 100%;
    background: var(--bg-accent);
    transition: height 1s ease-in-out;
}

/* OMNIN Mascot & Options */
.omnin-mascot {
    display: inline-block;
    width: 60px;
    height: 60px;
    vertical-align: middle;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--bg-accent);
    margin-right: 1rem;
    transition: all 0.3s;
}

.omnin-container {
    display: flex;
    align-items: center;
    background: rgba(249, 115, 22, 0.1);
    border-left: 4px solid var(--bg-accent);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    color: var(--text-primary);
    animation: fadeIn 0.5s;
}
.omnin-container.poder { border-color: var(--poder); background: rgba(239, 68, 68, 0.1); }
.omnin-container.vinculo { border-color: var(--vinculo); background: rgba(59, 130, 246, 0.1); }
.omnin-container.direccion { border-color: var(--direccion); background: rgba(16, 185, 129, 0.1); }
.omnin-container.energia { border-color: var(--energia); background: rgba(245, 158, 11, 0.1); }
.omnin-container.adaptacion { border-color: var(--adaptacion); background: rgba(139, 92, 246, 0.1); }

.test-view {
    max-width: 800px;
    margin: 2rem auto;
}

.option-btn {
    display: block;
    width: 100%;
    padding: 1.2rem;
    margin-bottom: 1rem;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 12px;
    font-size: 1rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s;
}

.option-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--text-secondary);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.option-btn.poder:hover { border-color: var(--poder); box-shadow: 0 5px 15px rgba(239, 68, 68, 0.3); }
.option-btn.vinculo:hover { border-color: var(--vinculo); box-shadow: 0 5px 15px rgba(59, 130, 246, 0.3); }
.option-btn.direccion:hover { border-color: var(--direccion); box-shadow: 0 5px 15px rgba(16, 185, 129, 0.3); }
.option-btn.energia:hover { border-color: var(--energia); box-shadow: 0 5px 15px rgba(245, 158, 11, 0.3); }
.option-btn.adaptacion:hover { border-color: var(--adaptacion); box-shadow: 0 5px 15px rgba(139, 92, 246, 0.3); }

.test-finish {
    text-align: center;
    padding: 3rem;
    animation: scaleIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* OMNES CORE New UI Styles */
.core-dashboard-view {
    max-width: 900px;
    margin: 0 auto;
}

.btn-sm {
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
}

/* Dynamic Questions Styles */
.dynamic-question {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.question-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.question-category {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--bg-accent);
    background: rgba(249, 115, 22, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.required-indicator {
    color: var(--danger);
    font-size: 0.9rem;
}

.question-text {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.question-description {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.choice-option {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: var(--bg-main);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.choice-option:hover {
    border-color: var(--bg-accent);
    background: rgba(249, 115, 22, 0.05);
}

.choice-option.selected {
    border-color: var(--bg-accent);
    background: rgba(249, 115, 22, 0.1);
}

.choice-option input {
    margin-right: 1rem;
}

.option-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.option-content i {
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
}

.scale-container {
    padding: 1rem 0;
}

.scale-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.scale-options {
    display: flex;
    gap: 0.5rem;
}

.scale-option {
    flex: 1;
    padding: 0.75rem;
    background: var(--bg-main);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.scale-option:hover {
    border-color: var(--bg-accent);
}

.scale-option.selected {
    background: var(--bg-accent);
    border-color: var(--bg-accent);
    color: white;
}

.scale-current {
    text-align: center;
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.text-input {
    width: 100%;
    min-height: 120px;
    padding: 1rem;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 1rem;
    resize: vertical;
}

.text-input:focus {
    outline: none;
    border-color: var(--bg-accent);
}

.char-count {
    text-align: right;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.matrix-table {
    width: 100%;
    border-collapse: collapse;
}

.matrix-table th,
.matrix-table td {
    padding: 0.75rem;
    text-align: center;
    border: 1px solid var(--border-color);
}

.matrix-table th {
    background: var(--bg-secondary);
    font-weight: 600;
    font-size: 0.85rem;
}

.matrix-table td:first-child {
    text-align: left;
    font-weight: 500;
}

.ranking-container {
    padding: 1rem;
}

.ranking-instructions {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.ranking-list {
    list-style: none;
}

.ranking-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 0.5rem;
    cursor: grab;
}

.ranking-item:active {
    cursor: grabbing;
}

.rank-number {
    width: 28px;
    height: 28px;
    background: var(--bg-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
}

.rank-text {
    flex: 1;
}

/* Progress Ring */
.progress-ring {
    position: relative;
    width: 80px;
    height: 80px;
}

.progress-ring svg {
    transform: rotate(-90deg);
}

/* Map Legend */
.map-legend {
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    margin-top: 2rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.legend-dot.locked { background: var(--bg-accent); opacity: 0.4; }
.legend-dot.unlocked { background: var(--warning); }
.legend-dot.active { background: var(--bg-accent); }
.legend-dot.completed { background: var(--success); }

/* Core Results Styles */
.result-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.result-title {
    font-weight: 600;
}

.result-score {
    font-size: 1.5rem;
    font-weight: 700;
}

.score-bar {
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.score-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* Action Plan Styles */
.action-plan {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.1), transparent);
    border: 1px solid var(--bg-accent);
    border-radius: 12px;
    padding: 1.5rem;
}

.action-item {
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    margin-bottom: 0.75rem;
}

.action-priority {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.action-priority.high { background: rgba(239, 68, 68, 0.2); color: var(--danger); }
.action-priority.medium { background: rgba(245, 158, 11, 0.2); color: var(--warning); }
.action-priority.low { background: rgba(34, 197, 94, 0.2); color: var(--success); }

/* Responsive */
@media (max-width: 768px) {
    .mode-switcher {
        flex-direction: column;
    }
    
    .scale-options {
        flex-wrap: wrap;
    }
    
    .scale-option {
        min-width: calc(33% - 0.5rem);
    }
    
    .map-legend {
        flex-wrap: wrap;
        gap: 1rem;
    }
}


