/* ============================================
   GCTU PORTAL - MAIN STYLESHEET
   ============================================ */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f4f6fb;
    min-height: 100vh;
}

/* ----- NAVBAR ----- */
.navbar {
    background: #1a1a2e;
    color: white;
    padding: 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
}

.navbar-brand {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.navbar-brand::before {
    content: '🎓';
    font-size: 22px;
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: 8px;
}

.navbar-link {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    padding: 10px 18px;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

.navbar-link:hover {
    color: white;
    background: rgba(255,255,255,0.1);
}

.navbar-link.active {
    color: white;
    background: rgba(255,255,255,0.15);
}

.nav-link-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.unread-badge {
    display: none;
    position: absolute;
    top: -8px;
    right: -8px;
    background: #e74c3c;
    color: white;
    font-size: 10px;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: 0 2px 4px rgba(231, 76, 60, 0.5);
    z-index: 10;
    animation: badgePopIn 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border: 2px solid #1a1a2e;
    pointer-events: none;
    line-height: 20px;
    font-family: Arial, sans-serif;
}

@keyframes badgePopIn {
    0% { transform: scale(0); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.logout-nav-btn {
    background: rgba(255,255,255,0.1);
    color: white;
    border: 1px solid rgba(255,255,255,0.2);
    padding: 8px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.logout-nav-btn:hover {
    background: #e74c3c;
    border-color: #e74c3c;
}

/* ----- DASHBOARD LAYOUT ----- */
.dashboard-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 24px;
}

.welcome-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 48px;
    color: white;
    margin-bottom: 40px;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
}

.welcome-content {
    text-align: center;
}

.welcome-avatar {
    font-size: 64px;
    margin-bottom: 16px;
}

.welcome-content h1 {
    font-size: 32px;
    margin-bottom: 8px;
    font-weight: 700;
}

.welcome-content p {
    opacity: 0.9;
    font-size: 16px;
    margin-bottom: 4px;
}

/* ----- QUICK ACCESS ----- */
.quick-access-section h2 {
    color: #1a1a2e;
    font-size: 24px;
    margin-bottom: 24px;
    font-weight: 700;
}

.quick-access-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.quick-access-card {
    background: white;
    border-radius: 16px;
    padding: 32px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    display: block;
    border: 1px solid #eef1f5;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.quick-access-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    border-color: transparent;
}

.card-icon {
    font-size: 40px;
    margin-bottom: 16px;
}

.quick-access-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 8px;
}

.quick-access-card p {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

/* ----- TOAST ----- */
#toastContainer {
    position: fixed;
    top: 80px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    padding: 14px 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
    animation: slideInRight 0.3s ease;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    min-width: 280px;
    max-width: 420px;
}

.toast.error {
    background: #ffe0e0;
    color: #c0392b;
    border: 1px solid #ffcccc;
}

.toast.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.toast-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.toast-message {
    flex: 1;
}

.toast-close {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    opacity: 0.5;
    padding: 4px;
    transition: opacity 0.2s;
    color: inherit;
}

.toast-close:hover {
    opacity: 1;
}

.removing {
    animation: slideOutRight 0.3s ease;
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOutRight {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

/* ----- RESPONSIVE ----- */
@media (max-width: 768px) {
    .navbar-container {
        padding: 0 16px;
        height: 56px;
    }
    
    .navbar-menu {
        gap: 4px;
    }
    
    .navbar-link {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .unread-badge {
        top: 0px;
        right: 0px;
        min-width: 16px;
        height: 16px;
        font-size: 9px;
        border-width: 1.5px;
    }
    
    .welcome-section {
        padding: 32px 20px;
    }
    
    .welcome-content h1 {
        font-size: 24px;
    }
    
    .dashboard-container {
        padding: 0 16px;
        margin: 24px auto;
    }
    
    .quick-access-grid {
        grid-template-columns: 1fr;
    }
    
    #toastContainer {
        top: 64px;
        right: 16px;
        left: 16px;
    }
    
    .toast {
        min-width: auto;
        max-width: none;
    }
}