:root {
    --bg-dark: #0a0a0c;
    --panel-bg: rgba(18, 20, 24, 0.7);
    --panel-border: rgba(212, 175, 55, 0.2);
    --gold: #d4af37;
    --gold-light: #f3e5ab;
    --green-bright: #00ff66;
    --green-dark: #008f39;
    --text-main: #ffffff;
    --text-muted: #8892b0;
    --font-main: 'Inter', sans-serif;
    --font-heading: 'Cinzel', serif;
}

html {
    font-size: 14px; /* Slightly smaller base font */
}

@media (max-width: 1600px) { html { font-size: 12px; } }
@media (max-width: 1366px) { html { font-size: 10px; } }
@media (max-width: 1024px) { html { font-size: 8px; } }

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: rgba(212, 175, 55, 0.4) transparent;
}

/* Custom Webkit Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.3);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(212, 175, 55, 0.6);
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-main);
    overflow-x: hidden;
    overflow-y: auto; /* Allow scroll if needed */
    background-image: 
        radial-gradient(circle at 50% 50%, rgba(0, 255, 102, 0.05) 0%, transparent 60%),
        linear-gradient(to bottom, #000000, #0a0a0c);
    min-height: 100vh;
}

.dashboard-container {
    padding: 1rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.text-gold { color: var(--gold); }
.text-green { color: var(--green-bright); }
.mb-2 { margin-bottom: 0.5rem; }
.ml-2 { margin-left: 0.5rem; }

/* Panel Styling */
.panel-glass {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* TOP BAR */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
}

.top-left, .top-right {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.time-widget, .online-agents, .live-status, .total-sales {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
}

.time-widget i, .online-agents i {
    font-size: 1.5rem;
    color: var(--gold);
}

.time-widget .date { font-size: 0.8rem; color: var(--text-muted); }
.time-widget .time { font-size: 1.2rem; font-weight: bold; }

.online-agents .number { font-size: 1.5rem; font-weight: bold; color: var(--green-bright); }
.online-agents .label { font-size: 0.7rem; color: var(--text-muted); letter-spacing: 1px; }

.logo-container {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo-icon img {
    width: 60px;
    height: 60px;
    margin-bottom: -10px;
}

.logo-text h1 {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.1;
    color: var(--gold-light);
    letter-spacing: 2px;
}

.logo-text h1 .highlight {
    color: var(--gold);
    font-size: 2.5rem;
}

.logo-text .subtitle {
    font-size: 0.7rem;
    letter-spacing: 4px;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.live-status { flex-direction: column; align-items: center; gap: 0.2rem; }
.live-status .status-label { font-size: 0.7rem; color: var(--text-muted); }
.live-status .status-indicator { font-size: 1rem; font-weight: bold; color: var(--green-bright); display: flex; align-items: center; gap: 0.5rem;}
.pulse {
    width: 10px;
    height: 10px;
    background-color: var(--green-bright);
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 10px var(--green-bright);
    animation: pulse-animation 2s infinite;
}

@keyframes pulse-animation {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 255, 102, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(0, 255, 102, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 255, 102, 0); }
}

.total-sales {
    flex-direction: column;
    align-items: flex-end;
    gap: 0.2rem;
}
.total-sales .label { font-size: 0.7rem; color: var(--text-muted); }
.total-sales .amount { font-size: 2rem; font-weight: bold; }
.total-sales .highlight-green { color: var(--green-bright); }
.total-sales .growth { font-size: 0.8rem; color: var(--green-bright); }

/* MAIN CONTENT LAYOUT */
.main-content {
    display: grid;
    grid-template-columns: 280px 1fr 320px;
    gap: 1.5rem;
    flex: 1;
}

/* LEFT PANEL - SELLERS */
.left-panel {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.left-panel h2, .right-panel h2 {
    font-size: 1rem;
    color: var(--gold);
    margin-bottom: 1rem;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
    padding-bottom: 0.5rem;
}

.seller-list {
    list-style: none;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.seller-list li {
    display: flex;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.seller-list .rank {
    width: 20px;
    font-weight: bold;
    color: var(--text-muted);
}
.seller-list .rank.gold { color: #FFD700; text-shadow: 0 0 5px #FFD700; }
.seller-list .rank.silver { color: #C0C0C0; text-shadow: 0 0 5px #C0C0C0; }
.seller-list .rank.bronze { color: #CD7F32; text-shadow: 0 0 5px #CD7F32; }

.seller-list .avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin: 0 0.8rem;
    border: 1px solid var(--gold);
}

.seller-list .name {
    flex: 1;
    font-size: 0.85rem;
    font-weight: 600;
}

.seller-list .sales {
    font-size: 0.85rem;
    font-weight: bold;
    color: var(--green-bright);
}

.view-more {
    text-align: center;
    color: var(--gold);
    font-size: 0.8rem;
    margin-top: 1rem;
    cursor: pointer;
    font-weight: 600;
}

/* CENTER PANEL */
.center-panel {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.main-kpi-display {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 2rem;
    background: url('assets/img/portada.jpg') center/cover no-repeat;
    border-radius: 12px;
    overflow: hidden;
}

.main-kpi-display::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(0,0,0,0.1) 0%, rgba(10,10,12,0.85) 100%);
    z-index: 0;
}

.center-title {
    position: absolute;
    top: 1.5rem;
    color: var(--gold);
    font-size: 1.2rem;
    letter-spacing: 2px;
    z-index: 1;
}

.kpi-visualization {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-top: 2rem;
    z-index: 1;
}

.kpi-visualization .meta, .kpi-visualization .acumuladas {
    text-align: center;
}

.kpi-visualization .label {
    font-size: 0.85rem;
    color: var(--text-muted);
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.kpi-visualization .value {
    font-size: 2.5rem;
    font-weight: bold;
    line-height: 1.2;
}

.gauge-container {
    position: relative;
    width: 25rem;
    height: 15rem;
    display: flex;
    justify-content: center;
    align-items: flex-end;
}

.glowing-orb {
    position: absolute;
    width: 20rem;
    height: 10rem;
    background: radial-gradient(circle, rgba(0,255,102,0.15) 0%, rgba(0,0,0,0) 70%);
    bottom: 0;
    z-index: 0;
}

.gauge {
    position: relative;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.gauge-svg {
    width: 100%;
    height: 100%;
    transform: rotate(0deg);
}

.gauge-value {
    position: absolute;
    bottom: 10%;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
}

.gauge-value .percent {
    display: block;
    font-size: 4rem;
    font-weight: bold;
    color: var(--green-bright);
    line-height: 1;
    text-shadow: 0 0 20px rgba(0, 255, 102, 0.5);
}

.gauge-value .small { font-size: 2rem; }
.gauge-value .label { font-size: 0.9rem; color: var(--gold); letter-spacing: 2px; }

/* HORIZONTAL STATS */
.horizontal-stats {
    display: flex;
    gap: 1rem;
}

.stat-card {
    flex: 1;
    padding: 1rem;
    text-align: center;
}

.stat-card i { font-size: 1.5rem; }
.stat-card .stat-label { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.stat-card .stat-value { font-size: 1.8rem; font-weight: bold; margin-bottom: 0.25rem; }
.stat-card .stat-trend { font-size: 0.75rem; }

/* RIGHT PANEL */
.right-panel {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.projects-panel, .city-panel {
    padding: 1.5rem;
    flex: 1;
}

.project-item {
    margin-bottom: 1rem;
    display: flex;
    gap: 1rem;
    align-items: center;
}

.project-item img {
    width: 60px;
    height: 45px;
    border-radius: 4px;
    object-fit: cover;
    border: 1px solid var(--panel-border);
}

.project-info { flex: 1; }
.project-info .name { font-size: 0.85rem; font-weight: bold; margin-bottom: 0.2rem; }
.sales-row { display: flex; justify-content: space-between; font-size: 0.8rem; margin-bottom: 0.3rem; }
.sales-row .amount { color: var(--text-main); }
.sales-row .percent { color: var(--green-bright); }

.progress-bar-container {
    height: 4px;
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--green-bright);
    box-shadow: 0 0 10px var(--green-bright);
}

.city-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.map-placeholder {
    height: 280px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #000;
    border-radius: 8px;
    border: 1px solid rgba(0,255,102,0.1);
    margin-bottom: 1rem;
}

.city-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.city-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px dashed rgba(255,255,255,0.1);
}

.city-row span:nth-child(2) { color: var(--text-muted); font-family: monospace; }
.city-row span:nth-child(3) { color: var(--gold); }

/* BOTTOM TICKER */
.bottom-ticker {
    display: flex;
    align-items: center;
    padding: 1rem 2rem;
    gap: 2rem;
}

.ticker-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.ticker-item i { font-size: 1.5rem; }

.ticker-item .content {
    display: flex;
    flex-direction: column;
}

.ticker-item .label { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; }
.ticker-item .name { font-weight: bold; font-size: 0.9rem; }
.ticker-item .amount, .ticker-item .time { font-size: 0.9rem; font-weight: bold; }
.ticker-item .project { font-size: 0.8rem; color: var(--gold); }

.ticker-divider {
    width: 1px;
    height: 30px;
    background: var(--panel-border);
}

.quote {
    margin-left: auto;
    text-align: right;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
