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

body {
    font-family: 'Segoe UI', sans-serif;
    background: #F5F5F5;
    color: #363636;
    min-height: 600px;
}

.page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Nav bar */

.app-nav {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 3px;
    padding: 0 16px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    height: 52px;
    gap: 8px;
}

.nav-brand {
    font-weight: 700;
    font-size: 16px;
    color: #55AB26;
    white-space: nowrap;
    margin-right: 12px;
}

.nav-logo {
    height: 38px;
    width: auto;
    margin-right: 12px;
}

.header-logo {
    height: 80px;
    width: auto;
    margin-bottom: 8px;
}

.nav-links {
    display: flex;
    gap: 2px;
    flex: 1;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 13px;
    border-radius: 3px;
    text-decoration: none;
    font-size: 14px;
    color: #555;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}

.nav-link:hover { background: #F5F5F5; color: #55AB26; }

.nav-link.active { background: #55AB26; color: white; }


.nav-logout {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 13px;
    border-radius: 3px;
    border: 2px solid #E0E0E0;
    background: white;
    font-size: 14px;
    color: #555;
    cursor: pointer;
    white-space: nowrap;
}

.nav-logout:hover { border-color: #e53935; color: #e53935; }

/* Nav user info & role badge */

.nav-user {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: 8px;
    white-space: nowrap;
}

.nav-user-name {
    font-size: 13px;
    color: #555;
}

.role-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.role-badge-admin {
    background: #fff3e0;
    color: #e65100;
    border: 1px solid #ffcc80;
}

.role-badge-student {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

/* Search bar (global) */

.search-bar {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #E0E0E0;
    border-radius: 3px;
    font-size: 16px;
    font-family: inherit;
    margin-bottom: 12px;
}

.search-bar:focus {
    outline: none;
    border-color: #55AB26;
}

/* Header page */

.top {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 20px 16px;
}

.top h1 {
    font-size: 28px;
    color: #363636;
}

.top p {
    font-size: 14px;
    color: #888;
    margin-top: 6px;
}

.back-btn {
    display: inline-block;
    color: #363636;
    text-decoration: none;
    font-size: 14px;
    padding: 8px 16px;
    border: 2px solid #E0E0E0;
    border-radius: 3px;
    background: white;
    margin-bottom: 20px;
}

.back-btn:hover {
    border-color: #55AB26;
    color: #55AB26;
}

.bot {
    text-align: center;
    color: #888;
    padding: 30px 20px;
    font-size: 14px;
}

@media (max-width: 600px) {
    .nav-user { display: none; }
    .nav-link  { font-size: 12px; padding: 6px 8px; }
    .nav-logout { font-size: 12px; padding: 6px 8px; }
    .app-nav { flex-wrap: wrap; height: auto; padding: 8px 12px; }
}

.bot a { color: #55AB26; text-decoration: none; }
.bot a:hover { text-decoration: underline; }
