:root {
    --bg-dark: #07090c;
    --bg-card: rgba(13, 17, 23, 0.7);
    --sidebar-bg: #0b0f14;
    --accent-blue: #00d2ff;
    --accent-purple: #9d50bb;
    --text-main: #ffffff;
    --text-muted: #8b949e;
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-glow: rgba(0, 210, 255, 0.15);
}

.hidden {
    display: none !important;
}

.view-section {
    animation: fadeIn 0.3s ease-in-out;
}

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

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Outfit', 'Inter', sans-serif;
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Sidebar Styling */
.sidebar {
    width: 260px;
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    padding: 30px 20px;
    z-index: 10;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 50px;
    font-weight: 700;
    font-size: 1.4rem;
    letter-spacing: -0.5px;
}

.logo-icon {
    width: 35px;
    height: 35px;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-menu {
    list-style: none;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 14px 18px;
    border-radius: 12px;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.3s ease;
    margin-bottom: 8px;
}

.nav-item i {
    font-size: 1.2rem;
}

.nav-item:hover, .nav-item.active {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

.nav-item.active {
    background: linear-gradient(90deg, rgba(0, 210, 255, 0.1), transparent);
    border-left: 3px solid var(--accent-blue);
}

/* Main Content area */
.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 30px 40px;
    background: radial-gradient(circle at 50% -20%, rgba(157, 80, 187, 0.1), transparent);
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.page-title h1 {
    font-size: 1.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.header-tools {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-info-badge {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: #10b981;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.header-info-badge i {
    font-size: 0.7rem;
}

.search-box {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 8px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
}

.search-box input {
    background: transparent;
    border: none;
    color: white;
    outline: none;
    width: 200px;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-bottom: 30px;
}

.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 30px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
}

.kpi-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.kpi-header h3 {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.kpi-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 10px;
}

.kpi-main {
    text-align: center;
}

.kpi-value {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 5px;
}

.kpi-unit {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.kpi-icon-glow {
    width: 120px;
    height: 120px;
    margin: 20px 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.kpi-icon-glow i {
    font-size: 3rem;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.glow-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid rgba(0, 210, 255, 0.1);
    box-shadow: 0 0 20px rgba(0, 210, 255, 0.1);
}

.trend-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.trend-up {
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

/* Charts */
.chart-container {
    height: 180px;
    width: 100%;
    margin-top: 20px;
}

/* Gauge Chart (Tailwind-like logic in CSS) */
.gauge-container {
    position: relative;
    width: 160px;
    height: 160px;
    margin: 0 auto;
}

.gauge-circle {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: conic-gradient(var(--accent-blue) 88.5%, transparent 0);
    mask: radial-gradient(transparent 58%, black 60%);
    -webkit-mask: radial-gradient(transparent 58%, black 60%);
}

.gauge-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.8rem;
    font-weight: 700;
}

/* Activities */
.full-width-section {
    grid-column: span 3;
}

.activity-list {
    margin-top: 20px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-blue);
}

.activity-details {
    flex: 1;
}

.activity-msg {
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.activity-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.activity-time {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Tables and Product List */
.table-container {
    margin-top: 20px;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9rem;
}

th {
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    padding: 15px 10px;
    border-bottom: 1px solid var(--glass-border);
}

td {
    padding: 15px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.status-badges {
    display: flex;
    gap: 8px;
}

.status-badge {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    transition: all 0.2s;
}

.status-badge.active-woo { background: rgba(0, 210, 255, 0.1); color: var(--accent-blue); border: 1px solid rgba(0, 210, 255, 0.2); }
.status-badge.active-ia { background: rgba(157, 80, 187, 0.1); color: var(--accent-purple); border: 1px solid rgba(157, 80, 187, 0.2); }
.status-badge.active-img { background: rgba(16, 185, 129, 0.1); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.2); }

/* Analytics Summary */
.stat-box {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
}

.stat-box h4 {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 10px;
}

.stat-box .val {
    font-size: 1.5rem;
    font-weight: 700;
}
/* ROI & Velocity Specific Styling */
.accent-card {
    border-top: 4px solid var(--accent-blue);
}

.turbo-card {
    border-top: 4px solid #f59e0b; /* Amber */
    background: linear-gradient(135deg, rgba(13, 17, 23, 0.8), rgba(245, 158, 11, 0.05));
}

.turbo-text {
    background: linear-gradient(to bottom, #f59e0b, #d97706);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
}

.velocity-bar-container {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    margin-top: 20px;
    position: relative;
    overflow: hidden;
}

.velocity-fill {
    height: 100%;
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
    transition: width 1.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pulse-icon {
    width: 12px;
    height: 12px;
    background: #f59e0b;
    border-radius: 50%;
    position: relative;
}

.pulse-icon::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: inherit;
    border-radius: inherit;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.8; }
    70% { transform: scale(3); opacity: 0; }
    100% { transform: scale(3); opacity: 0; }
}

.kpi-icon-glow.blue i {
    background: linear-gradient(135deg, var(--accent-blue), #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Redondeado para Actividades */
.activity-list {
    max-height: 250px;
    overflow-y: auto;
    padding-right: 10px;
}
