/* Dashboard specific layout */
.app-body {
    display: flex;
    height: 100vh;
    overflow: hidden;
    background: var(--bg-color);
}

.sidebar {
    width: 260px;
    height: 100vh;
    border-radius: 0;
    border-top: none;
    border-bottom: none;
    border-left: none;
    display: flex;
    flex-direction: column;
    padding: 24px;
    flex-shrink: 0;
    z-index: 100;
}

.sidebar-menu {
    margin-top: 40px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.menu-label {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 1px;
    margin-bottom: 10px;
    padding-left: 12px;
    font-weight: 600;
}

.mt-4 {
    margin-top: 24px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    color: #cbd5e1;
    transition: all 0.2s;
    font-size: 15px;
}

.menu-item i {
    width: 20px;
    text-align: center;
    font-size: 16px;
    opacity: 0.8;
}

.menu-item:hover,
.menu-item.active {
    background: rgba(99, 102, 241, 0.1);
    color: white;
}

.menu-item.active i {
    color: var(--primary);
    opacity: 1;
}

.badge-count {
    margin-left: auto;
    background: var(--primary);
    color: white;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 24px;
    border-top: 1px solid var(--glass-border);
}

.avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.user-name {
    font-weight: 600;
    font-size: 14px;
}

.user-plan {
    font-size: 12px;
    color: var(--primary);
}

/* Main Content */
.dashboard-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.topbar {
    height: 70px;
    padding: 0 40px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    background: rgba(5, 5, 10, 0.8);
    backdrop-filter: blur(10px);
    z-index: 50;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    width: 350px;
    border-radius: 8px;
}

.search-box i {
    color: var(--text-muted);
}

.search-box input {
    background: transparent;
    border: none;
    color: white;
    font-family: inherit;
    font-size: 14px;
    width: 100%;
    outline: none;
}

.topbar-actions {
    display: flex;
    gap: 16px;
    align-items: center;
}

.icon-btn {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: background 0.2s;
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.05);
}

.notification-dot {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 6px;
    height: 6px;
    background: var(--secondary);
    border-radius: 50%;
}

.content-wrapper {
    padding: 40px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.page-header h2 {
    font-size: 28px;
    font-weight: 600;
}

.date-filter {
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    cursor: pointer;
}

/* KPI Grid */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 30px;
}

.kpi-card {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.kpi-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.kpi-title {
    color: var(--text-muted);
    font-size: 14px;
}

.kpi-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.kpi-icon.style-1 {
    background: rgba(99, 102, 241, 0.15);
    color: #818CF8;
}

.kpi-icon.style-2 {
    background: rgba(236, 72, 153, 0.15);
    color: #F472B6;
}

.kpi-icon.style-3 {
    background: rgba(16, 185, 129, 0.15);
    color: #34D399;
}

.kpi-icon.style-4 {
    background: rgba(245, 158, 11, 0.15);
    color: #FBBF24;
}

.kpi-value {
    font-size: 32px;
    font-weight: 700;
    line-height: 1;
}

.kpi-trend {
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.kpi-trend.positive {
    color: #34D399;
}

.kpi-trend.negative {
    color: #F87171;
}

.kpi-trend.neutral {
    color: var(--text-muted);
}

/* Dashboard Grid Component Areas */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

/* Chart Mock */
.chart-section {
    padding: 24px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.section-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.chart-container {
    height: 280px;
    display: flex;
    flex-direction: column;
}

.bar-chart-mock {
    flex: 1;
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--glass-border);
}

.bar-group {
    display: flex;
    gap: 4px;
    height: 100%;
    align-items: flex-end;
    width: 40px;
}

.bar {
    width: 12px;
    border-radius: 4px 4px 0 0;
    transition: height 1s ease;
}

.bar.meta {
    background: #1877F2;
}

.bar.google {
    background: #EA4335;
}

.bar.tiktok {
    background: #00f2fe;
}

.chart-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.meta-dot {
    background: #1877F2;
}

.google-dot {
    background: #EA4335;
}

.tiktok-dot {
    background: #00f2fe;
}

/* Ad Cards */
.recent-ads-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}

.ad-cards {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ad-card {
    padding: 20px;
    transition: transform 0.2s;
    cursor: pointer;
}

.ad-card:hover {
    transform: translateY(-4px);
    border-color: rgba(99, 102, 241, 0.3);
}

.ad-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.brand-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    width: 36px;
    height: 36px;
    border-radius: 8px;
}

.brand-name {
    font-weight: 600;
    font-size: 14px;
}

.ad-date {
    font-size: 12px;
    color: var(--text-muted);
}

.platform-icon {
    font-size: 20px;
}

.platform-icon.ig {
    background: -webkit-linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.platform-icon.fb {
    color: #1877F2;
}

.ad-media {
    height: 140px;
    border-radius: 8px;
    margin-bottom: 16px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
}

.mockup-media-1 {
    background-image: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), url('https://images.unsplash.com/photo-1515886657613-9f3515b0c78f?w=400&q=80');
}

.mockup-media-2 {
    background-image: url('https://images.unsplash.com/photo-1551288049-bebda4e38f71?w=400&q=80');
}

.play-btn {
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.ad-copy {
    font-size: 13px;
    color: #e2e8f0;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ad-stats {
    display: flex;
    gap: 16px;
    border-top: 1px solid var(--glass-border);
    padding-top: 12px;
}

.stat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-muted);
}

@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        display: none;
    }

    .topbar {
        padding: 0 20px;
    }

    .content-wrapper {
        padding: 20px;
    }

    .kpi-grid {
        grid-template-columns: 1fr;
    }
}