:root {
    --bg-main: #0a0a0a;
    --bg-secondary: #161616;
    --bg-tertiary: #1f1f1f;
    --text-primary: #e0e0e0;
    --text-secondary: #888888;
    --accent: #6c5ce7;
    --accent-hover: #8073eb;
    --alert: #ff4757;
    --success: #2ed573;
    --border: #2d2d2d;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

#app {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background-color: var(--bg-secondary);
    border-right: 1px solid var(--border);
    padding: 2rem 0;
    display: flex;
    flex-direction: column;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    padding: 0 2rem;
    margin-bottom: 3rem;
    letter-spacing: 1px;
}

.logo span {
    color: var(--accent);
}

.nav-links {
    list-style: none;
}

.nav-links li a {
    display: block;
    padding: 1rem 2rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.nav-links li a:hover, .nav-links li.active a {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border-left: 3px solid var(--accent);
}

.content {
    flex: 1;
    padding: 2rem 4rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

h1, h2, h3 {
    font-weight: 600;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
}

#auth-status {
    font-size: 0.9rem;
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
}

.avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--accent), #ff6b81);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 0.9rem;
    box-shadow: 0 4px 10px rgba(108, 92, 231, 0.3);
}

.metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: var(--transition);
    cursor: default;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    border-color: #3d3d3d;
}

.card h3 {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card .value {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.card .value.alert {
    color: var(--alert);
}

.trend {
    font-size: 0.9rem;
    font-weight: 600;
}
.trend.positive { color: var(--success); }
.trend.negative { color: var(--alert); }

.dashboard {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    flex: 1;
}

.panel {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
}

.panel h2 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

.chart-placeholder {
    height: 250px;
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    padding-top: 2rem;
}

.bar {
    flex: 1;
    background: var(--accent);
    border-radius: 6px 6px 0 0;
    transition: height 1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0.8;
}

.bar:hover {
    opacity: 1;
}

.bar.alert {
    background: var(--alert);
}

.activity-feed {
    list-style: none;
}

.activity-feed li {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    position: relative;
}

.activity-feed li:last-child {
    margin-bottom: 0;
}

.activity-feed li::before {
    content: '';
    position: absolute;
    left: 5px;
    top: 15px;
    bottom: -15px;
    width: 2px;
    background-color: var(--border);
}

.activity-feed li:last-child::before {
    display: none;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--accent);
    margin-top: 5px;
    position: relative;
    z-index: 1;
}

.dot.alert {
    background-color: var(--alert);
    box-shadow: 0 0 10px rgba(255, 71, 87, 0.5);
}

.feed-content {
    font-size: 0.95rem;
}

.feed-content strong {
    color: #fff;
}

.feed-content .time {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.2rem;
}

/* Micro-animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.6s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

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