/* RJEduPilot Global Stylesheet */

/* --- Core Resets & Variables --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --blue: #003d82;
    --blue-light: #00509e;
    --blue-dark: #002a5c;
    --orange: #ff8c00;
    --orange-glow: rgba(255, 140, 0, 0.25);
    --ink: #172033;
    --muted: #5f6b7a;
    --line: #dfe7f1;
    --paper: #ffffff;
    --soft: #f6f8fb;
    --success: #22c55e;
    --danger: #ef4444;
}

body {
    font-family: 'Outfit', "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.5;
    color: var(--ink);
    background: var(--soft);
}

/* --- Global Navigation Bar --- */
.navbar {
    background: linear-gradient(135deg, var(--blue) 0%, var(--blue-light) 100%);
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 64px;
}

.logo-section {
    display: flex;
    align-items: center;
    height: 100%;
    gap: 15px;
}

.navbar-logo {
    height: 64px;
    width: auto;
    display: block;
}

.navbar-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-link {
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 4px;
    transition: 0.3s;
    font-size: 0.95rem;
}

.nav-link:hover {
    background: rgba(255, 140, 0, 0.22);
}

.nav-link.active {
    background: var(--orange);
}

/* --- Mobile Navigation Hamburger --- */
.hamburger {
    display: none;
    cursor: pointer;
    background: none;
    border: none;
    padding: 10px;
    z-index: 1001;
}

.hamburger .bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    transition: 0.3s;
    background-color: #ffffff;
    border-radius: 2px;
}

@media (max-width: 767px) {
    .navbar {
        padding: 0 20px;
    }
    .hamburger {
        display: block;
    }
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    .navbar-links {
        position: fixed;
        right: -100%;
        top: 64px;
        flex-direction: column;
        background: var(--blue);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        padding: 20px 0;
    }
    .navbar-links.active {
        right: 0;
    }
    .nav-link {
        display: block;
        width: 100%;
        margin: 10px 0;
    }
}

/* --- Status Badges (Header) --- */
.student-status-badge, .teacher-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.15) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 0 16px !important;
    min-height: 44px !important;
    border-radius: 30px !important;
    color: #ffffff !important;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    font-size: 0.85rem !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12) !important;
    transition: all 0.25s ease-in-out !important;
    z-index: 1002;
    box-sizing: border-box;
    margin-left: 15px;
    text-shadow: none !important;
}
.student-status-badge:hover, .teacher-status-badge:hover {
    background: rgba(255, 255, 255, 0.25) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18) !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
}
.student-status-badge a, .teacher-status-badge a {
    color: #ffffff !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    font-weight: 600 !important;
    min-height: 44px !important;
    box-sizing: border-box !important;
}
.student-status-badge .status-name, .teacher-status-badge .status-name {
    color: #facc15 !important;
    font-weight: 700 !important;
}
.student-status-badge a:hover .status-name, .teacher-status-badge a:hover .status-name {
    text-decoration: underline !important;
}
.student-status-badge .status-avatar-img, .teacher-status-badge .status-avatar-img {
    width: 28px !important;
    height: 28px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    border: 1.5px solid #facc15 !important;
}
.student-status-badge .status-avatar-fallback, .teacher-status-badge .status-avatar-fallback {
    width: 28px !important;
    height: 28px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.2) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #ffffff !important;
    border: 1.5px solid rgba(255, 255, 255, 0.3) !important;
}
.student-status-badge .status-avatar-fallback svg, .teacher-status-badge .status-avatar-fallback svg {
    width: 14px !important;
    height: 14px !important;
    fill: currentColor !important;
}
.student-status-badge .status-logout-btn, .teacher-status-badge .status-logout-btn {
    border-left: 1px solid rgba(255, 255, 255, 0.3) !important;
    padding-left: 14px !important;
    padding-right: 14px !important;
    margin-left: 2px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: rgba(255, 255, 255, 0.8) !important;
    transition: color 0.2s !important;
    min-height: 44px !important;
    box-sizing: border-box !important;
}
.student-status-badge .status-logout-btn:hover, .teacher-status-badge .status-logout-btn:hover {
    color: #fca5a5 !important;
}
.student-status-badge .status-logout-btn svg, .teacher-status-badge .status-logout-btn svg {
    width: 16px !important;
    height: 16px !important;
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 2.5 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
}
.student-status-badge.floating, .teacher-status-badge.floating {
    position: fixed !important;
    top: 15px !important;
    right: 15px !important;
    background: linear-gradient(135deg, #003d82 0%, #00509e 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25) !important;
}

@media (max-width: 767px) {
    .student-status-badge .status-label, .teacher-status-badge .status-label {
        display: none !important;
    }
    .student-status-badge, .teacher-status-badge {
        padding: 0 10px !important;
        min-height: 44px !important;
        font-size: 0.8rem !important;
        gap: 8px !important;
        margin-left: 5px !important;
    }
}

/* --- Login Button (Header) --- */
.nav-link.login-btn {
    border: 1.5px solid rgba(255, 255, 255, 0.7) !important;
    padding: 4px 14px !important;
    border-radius: 6px !important;
    margin-left: 10px !important;
    transition: all 0.2s ease-in-out !important;
    display: inline-flex !important;
    align-items: center !important;
    background: transparent !important;
    color: #ffffff !important;
    font-weight: 600 !important;
}
.nav-link.login-btn:hover {
    background: #ffffff !important;
    color: #003d82 !important;
    border-color: #ffffff !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15) !important;
}

/* --- Tablet Optimization (Header) --- */
@media (min-width: 768px) and (max-width: 1024px) {
    .navbar-links {
        gap: 10px !important;
    }
    .nav-link {
        padding: 6px 8px !important;
        font-size: 0.85rem !important;
    }
    .student-status-badge, .teacher-status-badge {
        margin-left: 5px !important;
        padding: 0 10px !important;
        font-size: 0.8rem !important;
    }
    .student-status-badge .status-label, .teacher-status-badge .status-label {
        display: none !important;
    }
}

/* --- Dropdown Navigation --- */
.nav-dropdown {
    position: relative;
    display: inline-block;
}
.nav-dropdown-toggle {
    display: inline-flex !important;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}
.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #ffffff;
    min-width: 170px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    padding: 8px 0;
    z-index: 1005;
    border: 1px solid rgba(0, 0, 0, 0.1);
    margin-top: 0;
    animation: dropdownFadeIn 0.2s ease-in-out;
}
@keyframes dropdownFadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu {
    display: block;
}
.nav-dropdown-item {
    display: block !important;
    padding: 10px 16px !important;
    color: #172033 !important;
    text-decoration: none !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    text-align: left;
    transition: background 0.2s, color 0.2s;
    margin: 0 !important;
    border-radius: 0 !important;
}
.nav-dropdown-item:hover {
    background: #f1f5f9 !important;
    color: #003d82 !important;
}
.nav-dropdown-item.active {
    background: #ff8c00 !important;
    color: #ffffff !important;
}
.dropdown-chevron {
    display: inline-block;
    transition: transform 0.2s ease;
}
.nav-dropdown.open .dropdown-chevron {
    transform: rotate(180deg);
}

@media (max-width: 767px) {
    .nav-dropdown {
        display: block;
        width: 100%;
        text-align: center;
    }
    .nav-dropdown-toggle {
        display: block !important;
        text-align: center;
        margin: 10px 0;
        justify-content: center;
    }
    .nav-dropdown-menu {
        position: static;
        display: block;
        background: rgba(255, 255, 255, 0.08);
        box-shadow: none;
        border: none;
        padding: 5px 0;
        margin-top: 0;
        width: 100%;
    }
    .nav-dropdown-item {
        color: #ffffff !important;
        padding: 8px 16px !important;
        text-align: center !important;
    }
    .nav-dropdown-item:hover {
        background: rgba(255, 255, 255, 0.15) !important;
        color: #ffffff !important;
    }
    .nav-dropdown-item.active {
        background: rgba(255, 140, 0, 0.4) !important;
        color: #ffffff !important;
    }
    .nav-link.login-btn {
        justify-content: center !important;
        margin-left: 0 !important;
        margin-top: 15px !important;
    }
}

/* --- Footer --- */
.footer {
    background: #172033;
    color: #ffffff;
    padding: 30px 20px 15px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
.footer-inner {
    max-width: 1180px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}
@media (max-width: 768px) {
    .footer-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer-logo {
        margin: 0 auto;
    }
}
.footer-logo {
    height: 40px;
    width: auto;
    display: block;
    margin-bottom: 10px;
}
.footer-desc {
    color: #94a3b8;
    line-height: 1.6;
}
.footer-heading {
    color: white;
    font-size: 1.1rem;
    margin-bottom: 15px;
    font-weight: 600;
}
.footer-links-col {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.footer-links-col li {
    margin-bottom: 0;
}
.footer-links-col a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.3s;
}
.footer-links-col a:hover {
    color: var(--orange, #ff8c00);
}
.footer-bottom {
    max-width: 1180px;
    margin: 0 auto;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: #64748b;
    font-size: 0.9rem;
}
