:root {
    --nav-bg: #1e293b;
    --nav-bg-dark: #0f172a;
    --blue: #2563eb;
    --muted: #cbd5e1;
    
}

.navbar {
    background: var(--nav-bg);
    color: #fff;
    padding: 4px 20px; /* <--- Atas bawah 8px sahaja */
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1000;
}

* { box-sizing: border-box; }

body {
    margin: 0; 
    padding: 0; 
    background-color: #f8f9fa; 
    color: #333;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Navigation */
.navbar {
    background: var(--nav-bg);
    color: #fff;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1000;
}
.logo-group { display: flex; align-items: center; gap: 20px; }
.logo {
    color: #fff; text-decoration: none;
    font-weight: 700; font-size: 1.2rem; white-space: nowrap;
}
.nav-links { display: flex; gap: 15px; align-items: center; }
.nav-links a {
    color: var(--muted); text-decoration: none;
    font-size: .95rem; font-weight: 500;
    transition: color .2s;
}
.nav-links a:hover { color: #fff; }
.nav-links a.nav-admin {
    color: #f59e0b; font-weight: 700;
}
.nav-links a.nav-admin:hover { color: #fbbf24; }

/* User Nav */
.user-nav { display: flex; align-items: center; gap: 10px; }
.avatar-sm {
    width: 34px; height: 34px; border-radius: 50%;
    object-fit: cover; border: 2px solid var(--blue);
    cursor: pointer; display: inline-block;
}
.avatar-fallback {
    width: 34px; height: 34px; border-radius: 50%;
    background: var(--blue); color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.85rem;
    border: 2px solid #fff;
    text-decoration: none;
}
.btn-primary {
    background: var(--blue); color: #fff;
    padding: 5px 12px; text-decoration: none;
    border-radius: 6px; font-weight: 700; font-size: .85rem;
    transition: background .15s;
}
.btn-primary:hover { background: #1e40af; }
.btn-logout {
    color: #ef4444; font-size: .85rem; font-weight: 700;
    text-decoration: none; margin-left: 5px;
}
.btn-logout:hover { color: #dc2626; }

/* Hamburger */
.hamburger {
    display: none;
    background: none; border: none; color: #fff;
    font-size: 1.6rem; cursor: pointer; padding: 0 5px;
    line-height: 1;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .hamburger { display: block; }
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%; left: 0; width: 100%;
        background: var(--nav-bg-dark);
        padding: 15px 0;
        box-shadow: 0 4px 10px rgba(0,0,0,.3);
        border-top: 1px solid #334155;
    }
    .nav-links.active { display: flex; }
    .nav-links a {
        padding: 12px 20px; width: 100%;
        font-size: 1rem;
    }
    .nav-links a:hover { background: #1e293b; }
}



/* Warning banner */
.warning-banner {
    background: #fef3c7;
    border-bottom: 2px solid #f59e0b;
    color: #b45309;
    padding: 12px 20px;
    text-align: center;
    font-size: .95rem;
    font-weight: 500;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.warning-banner a.dismiss {
    background: #b45309; color: #fff;
    padding: 3px 10px; border-radius: 4px;
    font-size: .75rem; text-decoration: none;
    font-weight: 600;
}
.warning-banner a.dismiss:hover { background: #92400e; }