:root{
  --primary: #3bac46;
  --primary-700: #25702c;
  --bg: #f6f7f6;
  --muted: #6b6b6b;
  --card: #ffffff;
  --font: "Urbanist", system-ui, Arial, sans-serif;
}
*{box-sizing:border-box}
body{font-family:var(--font);background:var(--bg);margin:0;color:#222;position:relative;min-height:100vh;}
.centered{display:flex;align-items:center;justify-content:center;height:100vh}
.card{background:#fff;padding:40px;border-radius:8px;box-shadow:0 4px 20px rgba(0,0,0,0.1);width:100%;max-width:400px;text-align:center;}
.logo-lg{height:60px;margin-bottom:20px;}
/**.btn{background:#3bac46;color:#fff;padding:10px 14px;border-radius:6px;border:none;cursor:pointer}
.btn.secondary{background:#ddd;color:#222;margin-left:8px}**/
.error{color:#d04545}

.dashboard{display:flex;min-height:100vh}
.sidebar{width:260px;background:var(--primary);color:#fff;padding:24px;display:flex;flex-direction:column;align-items:flex-start;height:100vh;position:fixed;top:0;left:0;z-index:1000;overflow-y:hidden;transform: translateZ(0);will-change: transform;}
.sidebar .logo{height:48px;margin-bottom:18px;background:#fff0;border-radius:6px;flex-shrink:0;}
.sidebar nav{width:100%;flex:1;overflow-y:auto;max-height:calc(100vh - 120px);scrollbar-width:thin;scrollbar-color:rgba(255,255,255,0.3) var(--primary-700);overscroll-behavior: contain;}
.sidebar nav a{color:#fff;text-decoration:none;margin:12px 0;display:block;font-weight:600;padding:8px 16px;border-radius:6px;transition:background 0.2s ease-in-out}
.sidebar nav a:hover{background:rgba(255,255,255,0.1)}
.sidebar nav a.active{background:rgba(255,255,255,0.2)}

/* Webkit scrollbar for sidebar */
.sidebar::-webkit-scrollbar{width:6px}
.sidebar::-webkit-scrollbar-track{background:var(--primary-700)}
.sidebar::-webkit-scrollbar-thumb{background:rgba(255,255,255,0.3);border-radius:3px}
.sidebar::-webkit-scrollbar-thumb:hover{background:rgba(255,255,255,0.5)}

/* Ensure sidebar nav has proper scrolling */
.sidebar nav::-webkit-scrollbar{width:6px}
.sidebar nav::-webkit-scrollbar-track{background:var(--primary-700)}
.sidebar nav::-webkit-scrollbar-thumb{background:rgba(255,255,255,0.3);border-radius:3px}
.sidebar nav::-webkit-scrollbar-thumb:hover{background:rgba(255,255,255,0.5)}

.leftnav{width:260px;background:var(--primary);color:#fff;padding:24px;display:flex;flex-direction:column;align-items:flex-start;height:100vh;position:fixed;top:0;left:0;z-index:1001;overflow-y:hidden;transform: translateZ(0);will-change: transform;}
.leftnav .logo{height:48px;margin-bottom:18px;background:#fff0;border-radius:6px;flex-shrink:0}
.leftnav nav{width:100%;flex:1;overflow-y:auto;max-height:calc(100vh - 120px);scrollbar-width:thin;scrollbar-color:rgba(255,255,255,0.15) rgba(255,255,255,0.05);overscroll-behavior: contain;}
.leftnav nav a{color:#fff;text-decoration:none;margin:12px 0;display:block;font-weight:600;padding:8px 16px;border-radius:6px;transition:background 0.2s ease-in-out}
.leftnav nav a:hover{background:rgba(255,255,255,0.1)}
.leftnav nav a.active{background:rgba(255,255,255,0.2)}

/* Navigation section styling */
.leftnav nav .nav-section {
    color: rgba(255,255,255,0.9);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 20px 0 8px 0;
    padding: 4px 16px;
    border-left: 3px solid rgba(255,255,255,0.4);
    background: rgba(255,255,255,0.05);
    border-radius: 4px;
}

.leftnav nav .nav-section:first-child {
    margin-top: 8px;
}
/* Enhanced navbar scrollbar styling */
.leftnav::-webkit-scrollbar{width:6px}
.leftnav::-webkit-scrollbar-track{background:rgba(255,255,255,0.05);border-radius:3px}
.leftnav::-webkit-scrollbar-thumb{background:rgba(255,255,255,0.15);border-radius:3px;border:1px solid rgba(255,255,255,0.05)}
.leftnav::-webkit-scrollbar-thumb:hover{background:rgba(255,255,255,0.25)}

/* Nav element scrollbar styling */
.leftnav nav::-webkit-scrollbar{width:6px}
.leftnav nav::-webkit-scrollbar-track{background:rgba(255,255,255,0.05);border-radius:3px}
.leftnav nav::-webkit-scrollbar-thumb{background:rgba(255,255,255,0.15);border-radius:3px;border:1px solid rgba(255,255,255,0.05)}
.leftnav nav::-webkit-scrollbar-thumb:hover{background:rgba(255,255,255,0.25)}

.main{flex:1;display:flex;flex-direction:column;padding: 24px;margin-left:260px;min-height:100vh;position:relative;z-index:1;}
.dashboard-layout{display:flex}

/* Ensure the dashboard wrapper doesn't interfere with fixed sidebar */
.dashboard {
    display: flex;
    min-height: 100vh;
    position: relative;
}

/* Force sidebar to stay fixed with higher specificity */
.dashboard .sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    z-index: 1001 !important;
    height: 100vh !important;
    overflow-y: hidden !important;
    transform: translateZ(0) !important;
}

/* Force leftnav to stay fixed with higher specificity */
.dashboard .leftnav {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    z-index: 1001 !important;
    height: 100vh !important;
    overflow-y: hidden !important;
    transform: translateZ(0) !important;
    width: 260px !important;
    padding: 24px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    background: var(--primary) !important;
    color: #fff !important;
}

/* Ensure main content doesn't overlap sidebar */
.dashboard > .main {
    margin-left: 260px !important;
    position: relative;
    z-index: 1;
    padding-top: 0;
    min-height: 100vh;
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 24px;
}

/* Additional fixes for any content that might overflow */
html {
    overflow-x: hidden;
}

body {
    overflow-x: hidden;
    padding: 0;
    margin: 0;
}

/* Global rule to ensure leftnav stays fixed regardless of parent */
aside.leftnav {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    z-index: 1001 !important;
    height: 100vh !important;
    width: 260px !important;
}

/* Ensure main content has proper spacing when leftnav is present */
aside.leftnav ~ .main,
aside.leftnav ~ * .main {
    margin-left: 260px !important;
}

/* Responsive design for mobile and tablet devices */
@media (max-width: 768px) {
    .sidebar, .leftnav {
        width: 260px;
        padding: 16px;
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
        z-index: 999;
    }

    .sidebar.open, .leftnav.open {
        transform: translateX(0);
    }

    .main {
        margin-left: 0;
        padding: 16px;
        padding-top: 80px;
    }

    /* Mobile menu toggle button */
    .mobile-menu-toggle {
        display: block;
        position: fixed;
        top: 15px;
        left: 15px;
        z-index: 1001;
        background: var(--primary);
        color: white;
        border: none;
        padding: 10px;
        border-radius: 6px;
        cursor: pointer;
        font-size: 18px;
    }

    .mobile-menu-toggle:hover {
        background: var(--primary-700);
    }
}

@media (min-width: 769px) {
    .mobile-menu-toggle {
        display: none;
    }
}
.grid{display:flex;gap:20px}
.table{width:100%;border-collapse:collapse}
.table td,.table th{border:1px solid #eee;padding:20px}
.exam-wrap{max-width:900px;margin:20px auto}
.exam-header{display:flex;justify-content:space-between;align-items:center;background:#fff;padding:12px;border-radius:6px}
.timer{font-weight:700;font-size:1.2rem}
.timeline{display:flex;gap:6px;margin-top:12px;margin-bottom:12px}
.timeline-btn{width:36px;height:36px;border-radius:50%;border:none;background:#eee;cursor:pointer}
.timeline-btn.answered{background-color:var(--primary); color: white;}
.thumb{width:56px;height:56px;overflow:hidden;border:1px solid #eee}

/* form */
h2{margin:0 0 20px 0;}
label{display:block;margin-top:12px;font-weight:600;font-size:0.95rem}
input[type="text"],input[type="number"],input[type="password"],input[type="email"],input[type="date"],input[type="tel"],select,textarea{width:100%;padding:12px;border:1px solid #ccc;border-radius:6px;margin:10px 0;box-sizing:border-box;font-size:0.95rem}
textarea{min-height:80px}
.small{font-size:0.9rem;color:var(--muted);margin-top:6px}
.inline{display:flex;gap:12px}
.inline > *{flex:1}

.buttons{display:flex;justify-content:space-between;margin-top:18px}
.button-center-container {
    display: flex;
    justify-content: center;
    width: 100%; /* Ensure it takes full width to center its content */
    margin-top: 10px; /* Add some space above the button */
}
.btn{background:var(--primary);color:#fff;padding:12px;border-radius:6px;border:none;cursor:pointer;font-weight:600;width:100%;margin: 0 5px;}
.btn.secondary{background:#eee;color:#333}
.btn.danger{background:#d9534f;color:#fff;}
.btn:hover{background:var(--primary-700);}
.error{color:#d04545;font-size:0.9rem;margin-top:6px}

.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: var(--primary); /* Use primary color for dropdown background */
  min-width: 160px;
  box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
  z-index: 1;
  border-radius: 6px;
  padding: 8px 0; /* Add some padding */
}

.dropdown-content a {
  color: white !important; /* Ensure text is white */
  padding: 8px 16px;
  text-decoration: none;
  display: block;
  text-align: left; /* Align text to the left */
}

.dropdown-content a:hover {
  background-color: var(--primary-700); /* Darker shade on hover */
}

.dropdown:hover .dropdown-content {
  display: block;
}