:root {
    --primary: #2c3e50;
    --secondary: #34495e;
    --accent: #3498db;
    --light: #ecf0f1;
    --danger: #e74c3c;
    --success: #27ae60;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', sans-serif; }
body { background-color: #f4f7f6; display: flex; height: 100vh; overflow: hidden; }


#login-container {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex; justify-content: center; align-items: center; z-index: 1000;
}
.login-box {
    background: white; padding: 40px; border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2); width: 350px; text-align: center;
}
.login-box input {
    width: 100%; padding: 12px; margin: 10px 0; border: 1px solid #ddd; border-radius: 5px;
}
.btn {
    background: var(--accent); color: white; border: none; padding: 12px 20px;
    border-radius: 5px; cursor: pointer; font-weight: bold; width: 100%;
}
.btn:hover { opacity: 0.9; }


#sidebar {
    width: 250px; background: var(--primary); color: white; display: none; /* Hidden on login */
    flex-direction: column; padding: 20px;
}
#sidebar h2 { margin-bottom: 30px; text-align: center; border-bottom: 1px solid var(--secondary); padding-bottom: 10px; }
.nav-item {
    padding: 15px; cursor: pointer; border-radius: 5px; margin-bottom: 5px; transition: 0.3s;
}
.nav-item:hover, .nav-item.active { background: var(--secondary); border-left: 4px solid var(--accent); }


#main-content {
    flex: 1; padding: 30px; overflow-y: auto; display: none; /* Hidden on login */
}
.section { display: none; animation: fadeIn 0.5s; }
.section.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }


.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-bottom: 30px; }
.card { background: white; padding: 20px; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); border-left: 5px solid var(--accent); }
.card h3 { color: #7f8c8d; font-size: 0.9rem; }
.card p { font-size: 1.8rem; font-weight: bold; color: var(--primary); }

.data-table { width: 100%; border-collapse: collapse; background: white; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.data-table th, .data-table td { padding: 15px; text-align: left; border-bottom: 1px solid #eee; }
.data-table th { background-color: var(--secondary); color: white; }
.status-badge { padding: 5px 10px; border-radius: 15px; font-size: 0.8rem; color: white; }
.available { background-color: var(--success); }
.borrowed { background-color: var(--danger); }


.action-bar { display: flex; justify-content: space-between; margin-bottom: 20px; }
.search-input { padding: 10px; border: 1px solid #ddd; border-radius: 5px; width: 300px; }


.grade-card { background: white; padding: 20px; margin-bottom: 15px; border-radius: 8px; display: flex; justify-content: space-between; align-items: center; border-left: 5px solid var(--success); }