:root {
    --bg-body: #000000;        
    --bg-sidebar: #050505;
    --bg-main: #000000;
    --bg-card: #0a0a0a;        
    --bg-input: #000000;
    --bg-hover: #1a1a1a;
    --bg-active: #1e1e24;
    
    --text-main: #ffffff;      
    --text-muted: #888888;     
    --text-suffix: #aaaaaa;    
    
    --border-color: #222222;   
    --border-light: #333333;
    
    --accent-green: #10b981;   
    --accent-green-bg: rgba(16, 185, 129, 0.1);
    --accent-blue: #3b82f6;
    --accent-blue-bg: #0a1b2e;
    --accent-blue-border: #14345c;
    --accent-blue-icon: #3b82f6;

    --icon-folder: #94a3b8;
    --icon-php: #818cf8;
    --icon-css: #3b82f6;
    --icon-js: #eab308;
    --icon-file: #64748b;

    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: var(--font-family);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow: hidden; /* Prevents body scroll, wrapper handles it */
}

a {
    text-decoration: none;
    color: inherit;
}

/* Main Dashboard Wrapper */
.dashboard-wrapper {
    display: flex;
    width: 100%;
    max-width: 1400px;
    height: 95vh;
    min-height: 700px;
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
    position: relative;
}

/* ---------------- Sidebar ---------------- */
.sidebar {
    width: 260px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: transform 0.3s ease;
    z-index: 100;
}

.sidebar-logo {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: -0.5px;
    border-bottom: 1px solid var(--border-color);
    height: 72px;
}

.sidebar-logo svg {
    width: 26px;
    height: 26px;
    fill: currentColor;
}

.sidebar-nav {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-radius: 8px;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s;
    cursor: pointer;
}

.nav-item:hover, .nav-item.active {
    background-color: var(--bg-active);
    color: var(--text-main);
}

.nav-item svg {
    width: 18px;
    height: 18px;
}

.nav-spacer {
    flex: 1;
}

/* ---------------- Main Content ---------------- */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    background-color: var(--bg-main);
    position: relative;
    min-width: 0;
}

/* Topbar */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 40px;
    border-bottom: 1px solid var(--border-color);
    height: 72px;
    flex-shrink: 0;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    cursor: pointer;
}

.search-box {
    position: relative;
    width: 350px;
}

.search-box svg {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--text-muted);
}

.search-box input {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 10px 16px 10px 44px;
    border-radius: 8px;
    color: var(--text-main);
    font-size: 0.95rem;
    outline: none;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    font-weight: 500;
}

.avatar {
    width: 32px;
    height: 32px;
    background: #222;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #444;
}

.avatar svg {
    width: 18px;
    height: 18px;
    color: #888;
}

/* Content Area */
.content-area {
    padding: 32px 40px;
    flex: 1;
}

.page-header-area {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 24px;
}

/* Updated code */
.page-title h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-main) !important;
}

/* Also, force all h1, h2, h3 inside content areas to be white */
.content-area h1,
.content-area h2,
.content-area h3 {
    color: var(--text-main) !important;
}

.page-title p {
    color: var(--text-muted);
    font-size: 1rem;
}

.btn-primary {
    background: var(--text-main);
    color: var(--bg-body);
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.btn-primary:hover {
    background: #ccc;
}

/* ---------------- Responsive Mobile ---------------- */
@media (max-width: 1024px) {
    .dashboard-wrapper {
        flex-direction: column;
        height: 100vh;
        border-radius: 0;
        border: none;
        padding: 0;
    }

    body {
        padding: 0;
    }

    .sidebar {
        position: absolute;
        top: 72px;
        bottom: 0;
        left: 0;
        transform: translateX(-100%);
        width: 280px;
    }

    /* JS toggles this class */
    .dashboard-wrapper.sidebar-open .sidebar {
        transform: translateX(0);
        box-shadow: 10px 0 30px rgba(0,0,0,0.8);
    }

    .mobile-menu-btn {
        display: block;
    }

    .topbar {
        padding: 16px 20px;
    }

    .search-box {
        width: 100%;
        max-width: 250px;
    }

    .content-area {
        padding: 20px;
    }

    .page-header-area {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
}

/* Force headings to be white */
.page-title h1,
h1,
h2,
h3 {
    color: var(--text-main);
}