/* ==================== Navigation ==================== */
.top-nav {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    background: rgba(23, 26, 33, 0.9);
}

.nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4) 0;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-family: var(--font-head);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text);
    text-decoration: none;
}

.nav-logo img {
    height: 50px;
    width: auto;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-round);
    background: linear-gradient(135deg, var(--color-brand), var(--color-brand-2));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: transform 150ms ease;
}

.user-avatar:hover {
    transform: scale(1.05);
}

/* ==================== Sidebar Navigation ==================== */
.app-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 300px;
    background: var(--color-surface);
    border-right: 1px solid var(--color-border);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    flex-shrink: 0;
    z-index: 10;
}

/* Sidebar User Profile */
.sidebar-profile {
    padding: var(--space-5) var(--space-3) var(--space-2);
    border-bottom: 1px solid var(--color-border);
    text-align: center;
}

.sidebar-profile-avatar {
    width: 110px;
    height: 110px;
    margin: 0 auto 6px;
    border-radius: var(--radius-round);
    background: linear-gradient(135deg, var(--color-brand), var(--color-brand-2));
    padding: 2px;
    position: relative;
}

.sidebar-profile-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: var(--radius-round);
    object-fit: cover;
    background: var(--color-surface);
    padding: 0;
}

.sidebar-plan-badge {
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    border: 2px solid var(--color-surface);
    white-space: nowrap;
}

.sidebar-plan-badge.free {
    background: linear-gradient(135deg, #3BC88F, #2EAA7A);
    color: white;
}

.sidebar-plan-badge.premium {
    background: linear-gradient(135deg, #9D5CFF, #7B3FD9);
    color: white;
}

.sidebar-profile-name {
    font-family: var(--font-head);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 4px;
    margin-top: 10px;
}

.sidebar-profile-badge {
    display: inline-block;
    background: linear-gradient(135deg, #FF1744, #FF4081);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px var(--space-2);
    border-radius: var(--radius-round);
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.sidebar-profile-info {
    font-size: 0.75rem;
    color: var(--color-mute);
    margin-bottom: 8px;
    font-weight: 500;
}

.sidebar-profile-stats {
    display: flex;
    justify-content: center;
    margin-top: 8px;
}

.sidebar-stat-compact {
    background: var(--color-elev);
    border-radius: var(--radius-md);
    padding: 6px 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--color-border);
}

.sidebar-stat-label-inline {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--color-mute);
}

.sidebar-stat-value-inline {
    font-family: var(--font-head);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-brand);
}

.sidebar-menu {
    padding: var(--space-5) 0;
    list-style: none;
}

.sidebar-menu li {
    margin: var(--space-1) 0;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-4) var(--space-5);
    color: var(--color-mute);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9375rem;
    transition: all 150ms ease;
    border-left: 3px solid transparent;
    position: relative;
}

.sidebar-link:hover {
    background: var(--color-elev);
    color: var(--color-text);
    border-left-color: var(--color-brand);
}

.sidebar-link.active {
    background: rgba(59, 200, 143, 0.1);
    color: var(--color-brand);
    border-left-color: var(--color-brand);
    font-weight: 600;
}

.sidebar-link-icon {
    font-size: 2rem;
    width: 48px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-link-icon img {
    width: 58px;
    height: 58px;
    object-fit: contain;
}

.main-content-wrapper {
    flex: 1;
    overflow-x: hidden;
    margin-left: 300px;
}

/* ==================== Hero Section ==================== */
.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: var(--space-7);
    align-items: flex-start;
    padding: var(--space-8) 0;
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

.hero-content .dashboard-panels {
    margin-top: 0;
    width: 100%;
}

@media (min-width: 1440px) {
    .hero-content .dashboard-panels .dashboard-action-buttons {
        flex-wrap: nowrap;
    }
}

.hero-content h1 {
    font-family: var(--font-head);
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 0;
    background: linear-gradient(135deg, var(--color-brand), var(--color-brand-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--color-mute);
    margin-bottom: 0;
}

.hero-visual {
    position: relative;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-avatar {
    width: 200px;
    height: 200px;
    border-radius: var(--radius-round);
    background: linear-gradient(135deg, var(--color-elev), var(--color-surface));
    border: 3px solid var(--color-brand);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    box-shadow: var(--shadow-2);
    overflow: hidden;
}

.hero-logo {
    width: 70%;
    height: auto;
    object-fit: contain;
}

.hero-bg-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.1;
    background: radial-gradient(circle at 30% 50%, var(--color-brand), transparent 60%),
                radial-gradient(circle at 70% 50%, var(--color-brand-2), transparent 60%);
}

/* ==================== KPI Cards ==================== */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-5);
    margin: var(--space-7) 0;
}

.kpi-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    padding: var(--space-5);
    position: relative;
    overflow: hidden;
}

.kpi-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: var(--space-4);
}

.kpi-icon {
    font-size: 2rem;
}

.kpi-title {
    font-size: 0.875rem;
    color: var(--color-mute);
    font-weight: 500;
}

.kpi-value {
    font-size: 2.5rem;
    font-weight: 700;
    font-family: var(--font-head);
    color: var(--color-text);
    margin-bottom: var(--space-2);
}

.kpi-label {
    font-size: 0.875rem;
    color: var(--color-mute);
}

.kpi-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--color-elev);
}

.kpi-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-brand), var(--color-brand-2));
    transition: width 800ms ease;
}

/* ==================== Page Sections ==================== */
.page-section {
    display: none;
}

.page-section.active {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
}

/* Center cards within page sections */
.page-section .card {
    width: 100%;
    max-width: 1250px;
    margin: 0 auto;
}
