/* AI Dashboard Shared Layout Styles */
:root {
    --sidebar-width: 260px;
    --header-height: 70px;
    --bg-dark: #0f172a;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: rgba(255, 255, 255, 0.1);
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
}

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

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: rgba(15, 23, 42, 0.95);
    border-right: 1px solid var(--border-color);
    padding: 24px;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    transition: transform 0.3s ease;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
    padding: 0 12px;
    text-decoration: none;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #06b6d4, #3b82f6);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
}

.logo-text {
    font-size: 18px;
    font-weight: 700;
    color: white;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

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

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.nav-item.active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.nav-item i {
    width: 20px;
    text-align: center;
}

.active-badge {
    margin-left: auto;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}

/* Tool Specific Active States */
.nav-item.active.code-active { background: linear-gradient(90deg, rgba(34, 197, 94, 0.15), transparent); color: #22c55e; border-left: 3px solid #22c55e; }
.nav-item.active.writer-active { background: linear-gradient(90deg, rgba(245, 158, 11, 0.15), transparent); color: #f59e0b; border-left: 3px solid #f59e0b; }
.nav-item.active.image-active { background: linear-gradient(90deg, rgba(168, 85, 247, 0.15), transparent); color: #a855f7; border-left: 3px solid #a855f7; }
.nav-item.active.video-active { background: linear-gradient(90deg, rgba(239, 68, 68, 0.15), transparent); color: #ef4444; border-left: 3px solid #ef4444; }

.code-badge { background: rgba(34, 197, 94, 0.2); color: #22c55e; }
.writer-badge { background: rgba(245, 158, 11, 0.2); color: #f59e0b; }
.image-badge { background: rgba(168, 85, 247, 0.2); color: #a855f7; }
.video-badge { background: rgba(239, 68, 68, 0.2); color: #ef4444; }

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    background: var(--bg-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    width: calc(100% - var(--sidebar-width));
}

/* Header */
.top-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 90;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-badge {
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    color: var(--text-muted);
}

.header-nav {
    display: flex;
    gap: 30px;
}

.header-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
    position: relative;
}

.header-link:hover {
    color: white;
}

.header-link.active {
    color: white;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 30px;
    border: 1px solid var(--border-color);
    cursor: pointer;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.user-name {
    font-size: 13px;
    color: white;
    font-weight: 500;
}

/* Page Content */
.page-content {
    padding: 30px 40px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.page-header {
    margin-bottom: 20px;
}

.breadcrumb {
    color: #64748b;
    font-size: 13px;
    margin-bottom: 10px;
}

.page-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-title {
    font-size: 28px;
    font-weight: 700;
    color: white;
    margin: 0;
}

.page-desc {
    color: var(--text-muted);
    margin-top: 8px;
    font-size: 14px;
}

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

.badge {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    color: var(--text-muted);
}

.badge.primary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* Mobile Responsive Styles */
.sidebar-toggle {
    display: none;
    font-size: 20px;
    color: white;
    background: none;
    border: none;
    cursor: pointer;
    margin-right: 15px;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 90;
}

.sidebar-overlay.active {
    display: block;
}

.mobile-close-btn {
    display: none;
}

@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        width: 100%;
    }

    .top-header {
        padding: 0 20px;
    }

    .sidebar-toggle {
        display: block;
    }

    .page-content {
        padding: 20px;
    }

    .header-nav {
        display: none;
    }

    .page-title {
        font-size: 22px;
    }

    .header-actions {
        display: none;
    }
    
    .mobile-close-btn {
        display: block;
    }
}
