:root {
    --primary: #2563eb; /* Modern Tech Blue */
    --dark: #0f172a;    /* Deep Navy Background */
    --light: #f8fafc;
    --text: #334155;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', system-ui, sans-serif;
}

body {
    background-color: var(--light);
    color: var(--text);
    overflow-x: hidden; /* Prevents scrollbar issues with animations */
}

/* --- Premium Website Header (3-Column Layout) --- */
.site-header {
    background-color: white;
    height: 80px; /* Decent header size */
    border-bottom: 1px solid #f1f5f9;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02); /* Subtle shadow */
    display: flex;
    align-items: center;
    position: relative; /* For the BG watermark */
    overflow: hidden;
}

/* Australia Watermark Effect */
.site-header::before {
    content: "";
    position: absolute;
    left: -20px;
    top: 50%;
    transform: translateY(-50%);
    width: 300px;
    height: 100%;
    background-image: url('https://upload.wikimedia.org/wikipedia/commons/thumb/0/03/Flag_map_of_Australia.svg/1200px-Flag_map_of_Australia.svg.png'); /* Placeholder Map */
    background-size: contain;
    background-repeat: no-repeat;
    background-position: left center;
    opacity: 0.15; /* Starts faint (User asked for fade effect, handled by gradient below) */
    z-index: 0;
    mask-image: linear-gradient(to right, black 0%, transparent 100%); /* Fades out before middle */
    -webkit-mask-image: linear-gradient(to right, black 0%, transparent 80%);
}

.header-container {
    display: grid;
    grid-template-columns: 1fr auto 1fr; /* Left, Center (Auto), Right */
    align-items: center;
    width: 100%;
    max-width: 1400px; /* Wider container for better spacing */
    margin: 0 auto;
    padding: 0 30px;
    position: relative;
    z-index: 1; /* Puts text above the watermark */
}

/* Left: Text */
.header-left {
    font-size: 0.9rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Center: Logo */
.header-center {
    display: flex;
    justify-content: center;
}

.site-logo {
    height: 55px; /* Controlled height */
    width: auto;
    display: block;
}

/* Right: Nav */
.header-right {
    display: flex;
    justify-content: flex-end;
}

.site-nav a {
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    margin-left: 30px;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.site-nav a:hover {
    color: var(--primary);
}

/* Mobile Fix for 3-Column */
@media (max-width: 768px) {
    .header-container {
        display: flex;
        justify-content: space-between;
    }
    .header-left { display: none; } /* Hide text on mobile */
    .site-header::before { display: none; } /* Hide map on mobile */
}

/* --- Parallax Hero Section --- */
.hero {
    height: 90vh; /* Takes up 90% of screen height */
    background-attachment: fixed; /* THE PARALLAX MAGIC */
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    background-image: linear-gradient(rgba(15, 23, 42, 0.8), rgba(15, 23, 42, 0.8)), url('https://images.unsplash.com/photo-1562654501-a0ccc0fc3fb1?auto=format&fit=crop&w=1920&q=80'); 
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 20px;
    letter-spacing: -2px;
}

/* --- Layout Utilities --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 50px 20px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-10px); /* Lifts up on hover */
}

/* --- Mobile Fixes --- */
@media (max-width: 768px) {
    .hero h1 { font-size: 2.5rem; }
    .hero { background-attachment: scroll; } 
}

/* --- Brand Carousel --- */
.brand-slider {
    background: white;
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.125);
    height: 120px;
    margin: 0;
    overflow: hidden;
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    padding: 20px 0;
}

/* Pause animation on hover */
.brand-slider:hover .brand-track {
    animation-play-state: paused;
}

.brand-slider::before,
.brand-slider::after {
    background: linear-gradient(to right, white 0%, rgba(255, 255, 255, 0) 100%);
    content: "";
    height: 120px;
    position: absolute;
    width: 150px;
    z-index: 2;
}

.brand-slider::after {
    right: 0;
    top: 0;
    transform: rotateZ(180deg);
}

.brand-slider::before {
    left: 0;
    top: 0;
}

.brand-track {
    display: flex;
    width: calc(200px * 26); 
    animation: scroll 40s linear infinite;
}

.brand-slide {
    height: 80px;
    width: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 30px; 
}

/* Brand Image Styling */
.brand-slide img {
    max-width: 80%;       
    max-height: 60px;     
    width: auto;          
    object-fit: contain;  
    filter: grayscale(100%); 
    opacity: 0.6;
    transition: all 0.3s;
    cursor: pointer;
}

.brand-slide img:hover {
    filter: grayscale(0%); 
    opacity: 1;
    transform: scale(1.1); 
}

/* The Scrolling Animation */
@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-200px * 13)); } 
}


/* =========================================
   PREMIUM ADMIN PANEL STYLES (White Theme)
   ========================================= */

/* 1. The Wrapper */
.admin-wrapper {
    display: flex !important;
    width: 100%;
    min-height: 100vh;
    background-color: #f8fafc; /* Very light gray for main content */
}

/* 2. The Sidebar Container (White + Shadow) */
.sidebar {
    width: 280px;
    min-width: 280px;
    background: white;       /* White Background */
    color: #475569;          /* Dark Grey Text */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    
    /* Shadow Separation instead of Border */
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.05); 
    border-right: none;
    
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 10;
}

/* 3. Brand / Logo Area */
.sidebar .brand {
    padding: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    /* No border bottom, just clean white */
}

.sidebar-logo {
    max-width: 70%; 
    height: auto;
    display: block;
}

/* 4. Navigation Menu */
.sidebar-menu {
    list-style: none;
    padding: 10px 0;
    margin: 0;
    flex-grow: 1;
}

.sidebar-menu li {
    margin-bottom: 2px;
}

.sidebar-menu a {
    /* Layout Structure Restored */
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    text-decoration: none;
    
    /* White Theme Colors */
    color: #64748b; 
    font-weight: 600;
    margin: 5px 15px; 
    border-radius: 8px;
    transition: all 0.2s ease;
}

.sidebar-menu a i {
    font-size: 1.3rem; /* Restored Icon Size */
}

/* Hover State */
.sidebar-menu a:hover {
    background: #f1f5f9;
    color: #0f172a;
    transform: translateX(3px); /* Subtle premium slide */
}

/* Active State */
.sidebar-menu a.active {
    background: #eff6ff; 
    color: #2563eb;     
    box-shadow: none;   
}

/* 5. User Profile Card (Bottom) */
.user-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    margin: 20px;
    
    /* Layout Structure Restored */
    padding: 15px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Restored Avatar Circle */
.user-card .avatar {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    border-radius: 50%;
    color: white;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.user-card .info {
    flex-grow: 1;
    overflow: hidden;
}

.user-card .name { 
    display: block;
    color: #0f172a; 
    font-weight: 700;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-card .role { 
    display: block;
    color: #64748b; 
    font-size: 0.75rem;
}

/* Restored Logout Icon */
.user-card .logout {
    color: #ef4444;
    cursor: pointer;
    transition: 0.2s;
    font-size: 1.2rem;
    padding: 5px;
    display: flex;
    border-radius: 6px;
}

.user-card .logout:hover {
    color: #b91c1c;
    background: #fee2e2;
}

/* 6. Main Content Area */
.main-content {
    flex-grow: 1;
    padding: 40px;
    width: calc(100% - 280px); /* Prevents content from going under sidebar */
    overflow-y: auto;
}

/* Full screen overlay */
.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Semi-transparent black */
    z-index: 9999; /* On top of everything */
    display: flex;
    justify-content: center;
    align-items: center;
}

/* The spinning animation */
.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3; /* Light grey */
    border-top: 5px solid #3498db; /* Blue */
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}