/* E-Learning System - Stylesheet */

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background: #f5f5f5; font-size: 0.875rem; line-height: 1.6; }

/* Header */
.header { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; padding: 0.875rem 2rem; box-shadow: 0 2px 10px rgba(0,0,0,0.1); }
.header-content { max-width: 1400px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; }
.header-logo { display: flex; align-items: center; gap: 0.75rem; }
.header-logo img { height: 40px; width: auto; }
.header-logo span { font-size: 1.1rem; font-weight: bold; }
.logo { font-size: 1.25rem; font-weight: bold; }
.nav { display: flex; gap: 1rem; align-items: center; font-size: 0.875rem; }
.nav a { color: white; text-decoration: none; padding: 0.5rem 1rem; border-radius: 5px; transition: background 0.3s; }
.nav a:hover { background: rgba(255,255,255,0.2); }

/* Buttons */
.btn { padding: 0.5rem 1.25rem; border: none; border-radius: 5px; cursor: pointer; font-size: 0.875rem; transition: all 0.3s; text-decoration: none; display: inline-block; }
.btn-primary { background: #4CAF50; color: white; }
.btn-primary:hover { background: #45a049; }
.btn-danger { background: #f44336; color: white; }
.btn-danger:hover { background: #da190b; }
.btn-block { display: block; width: 100%; }
.btn-sm { padding: 0.375rem 0.75rem; font-size: 0.75rem; }

/* Container */
.container { max-width: 1400px; margin: 0 auto; }

/* Layout dengan Sidebar */
.layout { display: flex; min-height: calc(100vh - 140px); }

/* Sidebar */
.sidebar { width: 260px; background: white; box-shadow: 2px 0 10px rgba(0,0,0,0.1); padding: 1.5rem 0; }
.sidebar-title { font-size: 1rem; font-weight: bold; color: #333; padding: 0 1.5rem 1.5rem; border-bottom: 2px solid #f0f0f0; margin-bottom: 1rem; }
.sidebar-menu { list-style: none; }
.sidebar-menu li { margin-bottom: 0.5rem; }
.sidebar-menu a { display: block; padding: 0.625rem 1.5rem; color: #555; text-decoration: none; transition: all 0.3s; border-left: 3px solid transparent; font-size: 0.875rem; }
.sidebar-menu a:hover { background: #f8f9fa; border-left-color: #667eea; color: #667eea; }
.sidebar-menu a.active { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; border-left-color: #667eea; }

/* Main Content */
.main-content { flex: 1; padding: 1.5rem; }

/* Cards */
.card { background: white; border-radius: 10px; padding: 1.25rem; margin-bottom: 1.5rem; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.card h2 { color: #333; margin-bottom: 1rem; font-size: 1.25rem; }
.card h3 { color: #333; margin-bottom: 0.75rem; font-size: 1.125rem; }
.card h4 { color: #333; margin-bottom: 0.5rem; font-size: 1rem; }

/* Grid */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.5rem; }

/* Stats */
.stat-card { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; padding: 1.5rem; border-radius: 10px; text-align: center; }
.stat-number { font-size: 2rem; font-weight: bold; margin-bottom: 0.5rem; }
.stat-label { font-size: 0.875rem; opacity: 0.9; }

/* Table */
table { width: 100%; border-collapse: collapse; margin-top: 1rem; font-size: 0.875rem; }
th, td { padding: 0.625rem; text-align: left; border-bottom: 1px solid #ddd; }
th { background: #667eea; color: white; font-size: 0.875rem; }
tr:hover { background: #f5f5f5; }

/* Form */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: 0.5rem; color: #333; font-weight: 500; font-size: 0.875rem; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 0.625rem; border: 1px solid #ddd; border-radius: 5px; font-size: 0.875rem; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: #667eea; }
.form-group small, .help-text { font-size: 0.75rem; color: #666; margin-top: 0.25rem; }

/* Alert */
.alert { padding: 0.875rem; border-radius: 5px; margin-bottom: 1rem; font-size: 0.875rem; }
.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

/* Login Page */
.login-container { max-width: 400px; margin: 4rem auto; }
.login-box { background: white; padding: 2rem; border-radius: 10px; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.login-logo { text-align: center; margin-bottom: 1.5rem; }
.login-logo img { max-width: 150px; height: auto; }
.login-title { text-align: center; margin-bottom: 2rem; color: #333; font-size: 1.25rem; line-height: 1.4; }

/* Badge */
.badge { display: inline-block; padding: 0.25rem 0.625rem; border-radius: 20px; font-size: 0.75rem; font-weight: 500; }
.badge-admin { background: #f44336; color: white; }
.badge-lecturer { background: #2196F3; color: white; }
.badge-student { background: #4CAF50; color: white; }
.badge-secondary { background: #6c757d; color: white; }
.badge-file { background: #28a745; color: white; }
.badge-link { background: #17a2b8; color: white; }
.badge-text { background: #6f42c1; color: white; }
.badge-video { background: #dc3545; color: white; }

/* Footer */
.footer { text-align: center; padding: 1.5rem; color: #666; margin-top: 2rem; border-top: 1px solid #ddd; font-size: 0.875rem; }

/* Responsive */
@media (max-width: 768px) {
    .layout { flex-direction: column; }
    .sidebar { width: 100%; }
    .header-content { flex-direction: column; gap: 1rem; }
    .nav { flex-wrap: wrap; justify-content: center; }
}
