@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    /* Facebook-style Light Palette */
    --bg-main: #F0F2F5;
    --bg-surface: #FFFFFF;
    --bg-sidebar: #FFFFFF;

    --primary: #1877F2;
    --primary-light: #E7F3FF;
    --secondary: #65676B;
    --accent: #42B72A;
    /* FB Success Green */

    --success: #42B72A;
    --warning: #F59E0B;
    --danger: #F02849;
    --info: #1877F2;

    /* Semantic Surfaces */
    --surface-pro: #FFFFFF;
    --border-pro: #CED4DA;
    --shadow-fb: 0 1px 2px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.1);

    /* Text Hierarchy */
    --text-main: #050505;
    --text-muted: #65676B;
    --text-dim: #8A8D91;

    /* Radii */
    --radius-md: 8px;
    --radius-lg: 12px;
    --sidebar-width: 280px;
}

body {
    background: var(--bg-main);
    color: var(--text-main);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    line-height: normal;
}

h1,
h2,
h3,
h4,
h5,
.font-heading {
    font-family: 'Outfit', sans-serif;
    letter-spacing: -0.02em;
}

/* Base UI Components (Supporting Legacy Names briefly for transition) */
.glass-panel,
.surface-pro {
    background: var(--bg-surface);
    border: none;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-fb);
}

.glass-card,
.card-pro {
    background: var(--bg-surface);
    border: none;
    border-radius: var(--radius-md);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    transition: background-color 0.2s;
}

.glass-card:hover,
.card-pro:hover {
    background: #F2F2F2;
    transform: none;
}

/* Sidebar Styling - Social Platform Style */
#sidebar-wrapper {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: none;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.02);
    transition: all 0.3s ease;
    z-index: 1000;
    padding-top: 1rem;
    display: flex;
    flex-direction: column;
}

#sidebar-wrapper .sidebar-heading {
    padding: 1rem 1.5rem;
    background: transparent;
    flex-shrink: 0;
}

#page-content-wrapper {
    width: 100%;
    overflow-x: hidden;
}

.nav-link-custom {
    color: var(--text-main);
    padding: 0.6rem 0.8rem;
    margin: 0.2rem 0.5rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    transition: background-color 0.2s;
    font-weight: 600;
    font-size: 0.95rem;
}

.nav-link-custom:hover {
    background-color: #F2F2F2;
    color: var(--text-main);
}

.nav-link-custom.active {
    background-color: var(--primary-light);
    color: var(--primary);
}

.nav-link-custom i {
    font-size: 1.25rem;
    width: 24px;
    text-align: center;
}

/* Social Theme Icons Color Mapping */
.nav-link-custom i.fa-grid-horizontal {
    color: #1877F2;
}

.nav-link-custom i.fa-paper-plane {
    color: #F02849;
}

.nav-link-custom i.fa-layer-group {
    color: #45BD62;
}

.nav-link-custom i.fa-address-book {
    color: #F7B928;
}

.nav-link-custom i.fa-calendar-clock {
    color: #2ABBA7;
}

/* Navbar / Top Bar - FB Header style */
.navbar-top {
    background: var(--bg-surface);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    height: 60px;
    z-index: 1050;
    position: sticky;
    top: 0;
    padding: 0 1.5rem;
}

/* Buttons - Facebook Actions */
.btn-glow {
    background: var(--primary);
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    transition: filter 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
}

.btn-glow:hover {
    filter: brightness(1.1);
    color: white;
}

.btn-glass {
    background: #E4E6EB;
    border: none;
    color: #050505;
    border-radius: 6px;
    padding: 0.5rem 1rem;
    transition: background-color 0.2s;
    font-size: 0.9rem;
    font-weight: 600;
}

.btn-glass:hover {
    background: #D8DADF;
    color: #050505;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #F0F2F5;
}

::-webkit-scrollbar-thumb {
    background: #BCC0C4;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #8A8D91;
}

/* RTL Support Utilities */
[dir="auto"],
.text-rtl-auto {
    text-align: start;
}

.arabic-text {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    direction: rtl;
    text-align: right;
}

/* Status Badges */
.badge-status {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-connected {
    background: rgba(16, 185, 129, 0.1);
    color: #10B981;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-disconnected {
    background: rgba(239, 68, 68, 0.1);
    color: #EF4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Inputs */
.form-control-cyber {
    background: rgba(15, 23, 42, 0.5) !important;
    border: 1px solid var(--glass-border) !important;
    color: var(--text-primary) !important;
    border-radius: 10px !important;
    padding: 0.7rem 1rem !important;
}

.form-control-cyber:focus {
    border-color: #4FACFE !important;
    box-shadow: 0 0 0 2px rgba(79, 172, 254, 0.2) !important;
}

/* Animation Utilities */
[data-aos] {
    transition-duration: 800ms !important;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    #sidebar-wrapper {
        margin-left: calc(-1 * var(--sidebar-width));
    }

    #wrapper.toggled #sidebar-wrapper {
        margin-left: 0;
    }
}