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

:root {
    --primary: #16a34a; /* Green 600 */
    --primary-hover: #15803d; /* Green 700 */
    --secondary: #10b981; /* Emerald 500 */
    --accent: #059669; /* Emerald 600 */
    
    --bg-light: #f8fafc;
    --text-dark: #1e293b;
    --text-muted: #64748b;
    
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.4);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    
    --navbar-height: 65px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background: var(--bg-light);
    color: var(--text-dark);
    min-height: 100vh;
    /* Soft green gradient background */
    background: linear-gradient(135deg, #d1fae5 0%, #ecfdf5 100%);
    background-attachment: fixed;
    padding-bottom: var(--navbar-height); /* Space for bottom navbar */
}

/* Glassmorphism Utilities */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: var(--glass-shadow);
}

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

/* Typography */
h1, h2, h3 { color: var(--text-dark); font-weight: 600; }
p { color: var(--text-muted); line-height: 1.6; }

/* Dashboard Layout */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    margin-bottom: 20px;
}

.profile-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
}

/* Grid Layout for Modules */
.grid-menu {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 25px 15px;
    text-decoration: none;
    color: var(--text-dark);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.menu-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px -10px rgba(0,0,0,0.15);
    background: rgba(255, 255, 255, 0.9);
}

.menu-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
    background: -webkit-linear-gradient(45deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.menu-title {
    font-weight: 500;
    font-size: 0.95rem;
    text-align: center;
}

/* BOTTOM NAVBAR (Mobile focused) */
.bottom-navbar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: var(--navbar-height);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    border-radius: 20px 20px 0 0;
    border-bottom: none;
    padding: 0 10px;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.75rem;
    transition: 0.3s;
    width: 60px;
}

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

.nav-icon {
    font-size: 1.5rem;
    margin-bottom: 2px;
    transition: transform 0.3s;
}

.nav-item:hover .nav-icon, .nav-item.active .nav-icon {
    transform: translateY(-3px);
}

/* Login Form */
.login-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.login-card {
    width: 100%;
    max-width: 400px;
    padding: 40px 30px;
}

.login-card h2 {
    text-align: center;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.5);
    background: rgba(255,255,255,0.6);
    font-size: 1rem;
    transition: 0.3s;
}

.form-control:focus {
    outline: none;
    background: rgba(255,255,255,0.9);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
}

.btn {
    display: inline-block;
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.3s, transform 0.1s;
    text-align: center;
    text-decoration: none;
}

.btn:hover {
    opacity: 0.9;
}
.btn:active {
    transform: scale(0.98);
}

.alert {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}
.alert-error {
    background: rgba(254, 226, 226, 0.8);
    color: #991b1b;
    border: 1px solid #f87171;
}

/* Hidden on desktop, visible on mobile by default but for this web app, 
we keep bottom navbar visible for app-like feel or hide it on very large screens */
@media (min-width: 769px) {
    /* If we want to hide bottom navbar on desktop, uncomment below */
    /* .bottom-navbar { display: none; } */
    /* body { padding-bottom: 0; } */
    
    /* However, many web apps now prefer keeping it as a dock or sidebar. 
       We'll keep it as a dock at the bottom even on desktop for consistency, 
       just make it look nice. */
    .bottom-navbar {
        max-width: 600px;
        left: 50%;
        transform: translateX(-50%);
        border-radius: 20px 20px 0 0;
        bottom: 0;
    }
}
