/* ==========================================================================
   SKC Social Hub - Modern SaaS UI Stylesheet
   Modern, Sleek, Professional Design System
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    --skc-font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --skc-primary: #3b82f6;
    --skc-primary-hover: #2563eb;
    --skc-primary-subtle: #eff6ff;
    --skc-sidebar-bg: #0f172a;
    --skc-sidebar-hover: #1e293b;
    --skc-sidebar-active: #3b82f6;
    --skc-sidebar-text: #94a3b8;
    --skc-sidebar-text-active: #ffffff;
    --skc-sidebar-width: 270px;
    --skc-topbar-height: 70px;
    --skc-body-bg: #f8fafc;
    --skc-card-bg: #ffffff;
    --skc-card-border: #e2e8f0;
    --skc-text-main: #1e293b;
    --skc-text-muted: #64748b;
    --skc-border-radius: 14px;
    --skc-shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --skc-shadow-md: 0 4px 16px -2px rgba(15, 23, 42, 0.06);
    --skc-shadow-lg: 0 12px 32px -4px rgba(15, 23, 42, 0.1);
}

[data-bs-theme="dark"] {
    --skc-body-bg: #090d16;
    --skc-card-bg: #111827;
    --skc-card-border: #1f2937;
    --skc-text-main: #f3f4f6;
    --skc-text-muted: #9ca3af;
    --skc-primary-subtle: rgba(59, 130, 246, 0.15);
    --skc-shadow-md: 0 4px 20px -2px rgba(0, 0, 0, 0.4);
}

body {
    font-family: var(--skc-font-family);
    background-color: var(--skc-body-bg);
    color: var(--skc-text-main);
    overflow-x: hidden;
    min-height: 100vh;
    transition: background-color 0.25s ease, color 0.25s ease;
}

/* --------------------------------------------------------------------------
   App Layout: Sidebar & Content Wrapper
   -------------------------------------------------------------------------- */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

.app-sidebar {
    width: var(--skc-sidebar-width);
    background-color: var(--skc-sidebar-bg);
    color: var(--skc-sidebar-text);
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1040;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12);
}

.sidebar-header {
    height: var(--skc-topbar-height);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-badge {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    color: white;
    font-weight: 800;
    font-size: 1.1rem;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem 1rem;
}

.nav-section-title {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    color: #64748b;
    padding: 0.75rem 0.75rem 0.35rem 0.75rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 0.7rem 0.85rem;
    color: var(--skc-sidebar-text);
    text-decoration: none;
    border-radius: 10px;
    margin-bottom: 0.25rem;
    font-weight: 500;
    font-size: 0.92rem;
    transition: all 0.2s ease;
}

.sidebar-link i {
    font-size: 1.15rem;
    margin-right: 0.85rem;
    width: 22px;
    text-align: center;
}

.sidebar-link:hover {
    background-color: var(--skc-sidebar-hover);
    color: #ffffff;
}

.sidebar-link.active {
    background: linear-gradient(90deg, var(--skc-primary) 0%, #6366f1 100%);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.3);
}

.app-main {
    flex: 1;
    margin-left: var(--skc-sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --------------------------------------------------------------------------
   Top Navigation Bar
   -------------------------------------------------------------------------- */
.app-topbar {
    height: var(--skc-topbar-height);
    background-color: var(--skc-card-bg);
    border-bottom: 1px solid var(--skc-card-border);
    position: sticky;
    top: 0;
    z-index: 1020;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.75rem;
    backdrop-filter: blur(8px);
}

.workspace-pill {
    background-color: var(--skc-primary-subtle);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 999px;
    padding: 0.4rem 0.85rem;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--skc-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.workspace-pill:hover {
    background-color: rgba(59, 130, 246, 0.2);
}

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
}

/* --------------------------------------------------------------------------
   Cards, Badges & UI Widgets
   -------------------------------------------------------------------------- */
.content-body {
    padding: 1.75rem;
    flex: 1;
}

.card-custom {
    background-color: var(--skc-card-bg);
    border: 1px solid var(--skc-card-border);
    border-radius: var(--skc-border-radius);
    box-shadow: var(--skc-shadow-md);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-custom:hover {
    box-shadow: var(--skc-shadow-lg);
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-icon.primary { background-color: rgba(59, 130, 246, 0.12); color: #3b82f6; }
.stat-icon.success { background-color: rgba(16, 185, 129, 0.12); color: #10b981; }
.stat-icon.warning { background-color: rgba(245, 158, 11, 0.12); color: #f59e0b; }
.stat-icon.purple  { background-color: rgba(139, 92, 246, 0.12); color: #8b5cf6; }

/* Platform colors */
.platform-badge-fb { background-color: #1877F2; color: white; }
.platform-badge-ig { background: linear-gradient(45deg, #f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%); color: white; }
.platform-badge-yt { background-color: #FF0000; color: white; }
.platform-badge-tt { background-color: #000000; color: white; border: 1px solid rgba(255,255,255,0.2); }

/* Responsive adjustments */
@media (max-width: 991.98px) {
    .app-sidebar {
        transform: translateX(-100%);
    }
    .app-sidebar.show {
        transform: translateX(0);
    }
    .app-main {
        margin-left: 0;
    }
    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1035;
    }
    .sidebar-overlay.show {
        display: block;
    }
}
