:root {
    --bg-dark: #06070a;
    --card-bg: rgba(13, 17, 26, 0.7);
    --border: rgba(255, 255, 255, 0.06);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-blue: #0ea5e9;
    --accent-purple: #8b5cf6;
    --accent-cyan: #06b6d4;
    --sidebar-w: 220px;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: 'Space Grotesk', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
}

.dashboard-wrap {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-w);
    background: #090b11;
    border-right: 1px solid var(--border);
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    z-index: 10;
}

.side-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    margin-bottom: 40px;
    padding-left: 8px;
}

.logo-img {
    width: 28px;
    height: 28px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid rgba(14, 165, 233, 0.3);
}

.side-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 12px 14px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

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

.nav-item.active {
    border-left: 3px solid var(--accent-blue);
    background: rgba(14, 165, 233, 0.08);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    overflow: hidden;
    border: 1.5px solid rgba(14, 165, 233, 0.3);
}

.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-meta {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 13px;
    font-weight: 700;
}

.user-role {
    font-size: 11px;
    color: var(--text-secondary);
}

/* Main Content */
.main-content {
    flex-grow: 1;
    padding: 32px;
    max-width: calc(100vw - var(--sidebar-w));
    background: radial-gradient(circle at 80% 10%, rgba(139, 92, 246, 0.05) 0%, transparent 60%);
}

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

.dash-header h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 28px;
    font-weight: 700;
}

.dash-header p {
    color: var(--text-secondary);
    font-size: 13.5px;
}

.header-actions {
    display: flex;
    gap: 12px;
}

.btn-icon {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.15);
}

.notification-dot {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 8px;
    height: 8px;
    background: #0ea5e9;
    border-radius: 50%;
    border: 1.5px solid #090b11;
}

.btn-create {
    background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-purple) 100%);
    border: none;
    color: white;
    padding: 0 20px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.2);
}

.btn-create:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.35);
}

/* Stats Grid */
.grid-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 24px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-secondary);
    font-size: 13.5px;
    margin-bottom: 12px;
}

.val {
    font-family: 'Outfit', sans-serif;
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 8px;
}

.trend {
    font-size: 12px;
    font-weight: 600;
}

.trend.positive { color: #10b981; }
.trend.negative { color: #ef4444; }

.text-blue { color: var(--accent-blue); }
.text-purple { color: var(--accent-purple); }
.text-cyan { color: var(--accent-cyan); }

/* Visuals Grid */
.grid-visuals {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

.visual-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 24px;
    backdrop-filter: blur(10px);
}

.visual-card h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 24px;
}

/* Simulated Bar Chart */
.chart-container {
    height: 160px;
    display: flex;
    align-items: flex-end;
}

.bar-chart {
    display: flex;
    justify-content: space-between;
    width: 100%;
    height: 100%;
    align-items: flex-end;
}

.bar-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 12%;
}

.bar-fill {
    width: 100%;
    background: linear-gradient(to top, var(--accent-blue), var(--accent-purple));
    border-radius: 6px 6px 0 0;
    transition: height 0.6s ease;
    animation: barGrow 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    height: 0;
}

@keyframes barGrow {
    to { height: var(--height); }
}

.bar-col span {
    font-size: 11px;
    color: var(--text-secondary);
}

/* Circle / Radial Chart */
.circle-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.circle-radial {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: conic-gradient(var(--accent-blue) 0% 78%, rgba(255, 255, 255, 0.05) 78% 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 20px rgba(14, 165, 233, 0.15);
}

.circle-inner {
    width: 82px;
    height: 82px;
    border-radius: 50%;
    background: #0d111a;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 18px;
    font-weight: 700;
}

.circle-legend {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.circle-legend p {
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.dot-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.dot-indicator.blue { background: var(--accent-blue); }
.dot-indicator.purple { background: var(--accent-purple); }

@media (max-width: 768px) {
    .dashboard-wrap { flex-direction: column; }
    .sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--border); }
    .main-content { max-width: 100%; }
    .grid-visuals { grid-template-columns: 1fr; }
}

/* Floating Return Button */
.back-to-portfolio {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(9, 11, 17, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 100px;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
}

.back-to-portfolio:hover {
    transform: translateY(-2px);
    border-color: rgba(14, 165, 233, 0.4);
    box-shadow: 0 10px 30px rgba(14, 165, 233, 0.2);
}
