@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #154818;
    --primary-light: #2a6e2e;
    --secondary: #2563eb;
    --bg-main: #f8fafc;
    --bg-sidebar: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --white: #ffffff;
    --card-bg: rgba(255, 255, 255, 0.8);
    --sidebar-width: 280px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Sidebar Styling */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-sidebar);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    border-right: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    padding: 2rem 1.5rem;
    z-index: 100;
}

.profile-section {
    text-align: center;
    margin-bottom: 2.5rem;
}

.profile-pic {
    width: 140px;
    height: 140px;
    border-radius: 28px;
    object-fit: cover;
    margin: 0 auto 1.5rem;
    display: block;
    border: 4px solid #f1f5f9;
    box-shadow: var(--shadow-lg);
}

.profile-name {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 1.25rem;
    color: var(--text-main);
    margin-bottom: 0.25rem;
}

.profile-id {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
}

.sidebar-nav {
    flex-grow: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 12px;
    margin-bottom: 0.5rem;
    transition: var(--transition);
    font-weight: 500;
}

.nav-item i {
    margin-right: 0.75rem;
    font-size: 1.25rem;
}

.nav-item:hover, .nav-item.active {
    background-color: #f1f5f9;
    color: var(--primary);
}

.nav-item.active {
    background-color: var(--primary);
    color: var(--white);
}

.notification-badge {
    background-color: #ef4444;
    color: white;
    font-size: 0.75rem;
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
    margin-left: auto;
}

/* Social Links */
.social-link {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.6rem 1rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-main);
    transition: var(--transition);
    font-size: 0.85rem;
    font-weight: 500;
}

.social-link:hover {
    background: #ffffff;
    border-color: var(--primary);
    transform: translateX(5px);
    box-shadow: var(--shadow);
    color: var(--primary);
}

.social-link i {
    transition: var(--transition);
}

.social-link:hover i {
    transform: scale(1.2);
}

/* Main Content Styling */
.main-content {
    margin-left: var(--sidebar-width);
    flex-grow: 1;
    padding: 2rem 3rem;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

.welcome-msg h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.875rem;
    color: var(--primary);
}

.top-actions {
    display: flex;
    gap: 1rem;
}

.action-btn {
    padding: 0.6rem 1.2rem;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: var(--white);
    color: var(--text-main);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
}

.action-btn:hover {
    background: #f8fafc;
    border-color: var(--primary);
    color: var(--primary);
}

.btn-primary {
    background: var(--primary) !important;
    color: var(--white) !important;
    border-color: var(--primary) !important;
}

.btn-primary:hover {
    background: var(--primary-light) !important;
    color: var(--white) !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.logout-btn {
    background: #fee2e2;
    color: #991b1b;
    border: none;
}

.logout-btn:hover {
    background: #fecaca;
    color: #7f1d1d;
}

/* Card Grid */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 2.5rem 2rem;
    border-radius: 24px;
    text-align: center;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, #1a5a1f 100%);
    opacity: 0;
    transition: var(--transition);
    z-index: -1;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    color: var(--white);
}

.card:hover::before {
    opacity: 1;
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: var(--primary);
    transition: var(--transition);
}

.card:hover .card-icon {
    color: var(--white);
    transform: scale(1.1);
}

.card-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.card-desc {
    font-size: 0.875rem;
    color: var(--text-muted);
    transition: var(--transition);
}

.card:hover .card-desc {
    color: rgba(255, 255, 255, 0.8);
}

/* Responsive */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 1.5rem;
    left: 1.5rem;
    z-index: 1001;
    background: var(--primary);
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 10px;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
}

@media (max-width: 1024px) {
    .sidebar {
        width: 80px;
        padding: 2rem 0.5rem;
    }
    .profile-section, .sidebar-announcements, .sidebar-social, .nav-item span {
        display: none;
    }
    .main-content {
        margin-left: 80px;
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .sidebar {
        width: 280px;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        padding: 5rem 1.5rem 2rem; /* Add top padding for toggle */
    }

    .sidebar.active {
        transform: translateX(0);
        box-shadow: 20px 0 50px rgba(0,0,0,0.1);
    }

    .profile-section, .sidebar-announcements, .sidebar-social {
        display: block; /* Show in slide-in menu */
    }

    .main-content {
        margin-left: 0;
        padding: 5rem 1.5rem 2rem;
    }

    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
        margin-bottom: 2rem;
    }

    .top-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .action-btn {
        flex: 1;
        justify-content: center;
        padding: 0.8rem;
    }

    .card-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.5rem;
    }
    
    .top-actions .action-btn span {
        display: none; /* Hide text on very small screens if needed, or keep for accessibility */
    }
    
    .top-actions .action-btn {
        padding: 0.8rem 0.5rem;
    }
}
/* Modal Styling */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: var(--white);
    padding: 2.5rem;
    border-radius: 20px;
    width: 90%;
    max-width: 450px;
    position: relative;
    box-shadow: var(--shadow-lg);
    animation: modalAppear 0.3s ease-out;
}

@keyframes modalAppear {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.close-btn {
    position: absolute;
    right: 1.5rem;
    top: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition);
}

.close-btn:hover {
    color: #ef4444;
}

.back-btn {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0;
}

.back-btn:hover {
    text-decoration: underline;
}

/* Password Visibility Toggle */
.password-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 1rem;
}

.password-wrapper {
    position: relative;
    width: 100%;
    margin-top: 0.5rem;
}

.password-wrapper input {
    width: 100%;
    padding: 0.95rem 2.8rem 0.95rem 1rem; /* space for eye icon */
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.25s ease;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.password-wrapper input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(21, 72, 24, 0.15);
}

.password-wrapper input::placeholder {
    color: #94a3b8;
}

/* Eye icon styling */
.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #94a3b8;
    font-size: 1rem;
    transition: all 0.2s ease;
    padding: 6px;
    border-radius: 6px;
}

.toggle-password:hover {
    color: var(--primary);
    background: rgba(21, 72, 24, 0.08);
}

