:root {
  --primary-blue: #2563eb;
  --secondary-blue: #3b82f6;
  --dark-blue: #1e40af;
  --light-blue: #dbeafe;
  --green: #10b981;
  --red: #ef4444;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(135deg, var(--light-blue) 0%, var(--gray-50) 100%);
  min-height: 100vh;
  color: var(--gray-800);
  line-height: 1.6;
}

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

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

.login-box {
  background: white;
  padding: 40px;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 420px;
}

.login-header {
  text-align: center;
  margin-bottom: 32px;
}

.login-header h1 {
  color: var(--primary-blue);
  font-size: 28px;
  margin-bottom: 8px;
}

.login-header p {
  color: var(--gray-600);
  font-size: 14px;
}

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

.form-group label {
  display: block;
  color: var(--gray-700);
  font-weight: 500;
  margin-bottom: 8px;
  font-size: 14px;
}

.form-group input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--gray-200);
  border-radius: 8px;
  font-size: 15px;
  transition: all 0.3s;
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px var(--light-blue);
}

.btn {
  width: 100%;
  padding: 14px;
  background: var(--primary-blue);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.btn:hover {
  background: var(--dark-blue);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  background: var(--gray-300);
  cursor: not-allowed;
  transform: none;
}

.error-message {
  background: #fee;
  color: var(--red);
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 14px;
  border-left: 4px solid var(--red);
}

/* Dashboard */
.dashboard {
  padding: 40px 20px;
  min-height: 100vh;
}

.dashboard-header {
  background: white;
  padding: 24px 32px;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  margin-bottom: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dashboard-header h1 {
  color: var(--primary-blue);
  font-size: 28px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.user-name {
  color: var(--gray-700);
  font-weight: 500;
}

.btn-logout {
  padding: 10px 20px;
  background: var(--gray-200);
  color: var(--gray-700);
  border: none;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-logout:hover {
  background: var(--gray-300);
}

/* Cards */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.card {
  background: white;
  padding: 28px;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: all 0.3s;
}

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

.card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--gray-100);
}

.card-icon {
  width: 48px;
  height: 48px;
  background: var(--light-blue);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.card-title {
  font-size: 22px;
  color: var(--gray-800);
  font-weight: 600;
}

.file-list {
  list-style: none;
}

.file-item {
  padding: 12px;
  margin-bottom: 8px;
  background: var(--gray-50);
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s;
  cursor: pointer;
}

.file-item:hover {
  background: var(--light-blue);
  transform: translateX(4px);
}

.file-name {
  color: var(--gray-700);
  font-weight: 500;
}

.file-date {
  color: var(--gray-600);
  font-size: 12px;
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--gray-600);
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

/* Admin specifiek */
.admin-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 24px;
}

.sidebar {
  background: white;
  padding: 24px;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  height: fit-content;
  position: sticky;
  top: 20px;
}

.sidebar h2 {
  color: var(--gray-800);
  margin-bottom: 20px;
  font-size: 20px;
}

.student-list {
  list-style: none;
}

.student-item {
  padding: 12px;
  margin-bottom: 8px;
  background: var(--gray-50);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.student-item:hover {
  background: var(--light-blue);
}

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

.btn-add-student {
  width: 100%;
  margin-top: 16px;
  background: var(--green);
}

.btn-add-student:hover {
  background: #059669;
}

.main-content {
  background: white;
  padding: 32px;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.content-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--gray-100);
}

.btn-secondary {
  padding: 10px 20px;
  background: var(--secondary-blue);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-secondary:hover {
  background: var(--primary-blue);
}

.btn-danger {
  background: var(--red);
  padding: 8px 16px;
  font-size: 14px;
}

.btn-danger:hover {
  background: #dc2626;
}

.materials-section {
  margin-bottom: 32px;
}

.section-title {
  color: var(--gray-700);
  font-size: 18px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge {
  background: var(--light-blue);
  color: var(--primary-blue);
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: white;
  padding: 32px;
  border-radius: 16px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
  margin-bottom: 24px;
}

.modal-header h2 {
  color: var(--gray-800);
  font-size: 24px;
}

.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.btn-cancel {
  background: var(--gray-200);
  color: var(--gray-700);
}

.btn-cancel:hover {
  background: var(--gray-300);
}

/* Upload form */
.upload-area {
  border: 2px dashed var(--gray-300);
  border-radius: 12px;
  padding: 32px;
  text-align: center;
  margin-bottom: 20px;
  transition: all 0.3s;
}

.upload-area:hover {
  border-color: var(--primary-blue);
  background: var(--light-blue);
}

.upload-icon {
  font-size: 48px;
  margin-bottom: 16px;
  color: var(--gray-400);
}

/* Responsive */
@media (max-width: 768px) {
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .dashboard-header {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  .login-box {
    padding: 24px;
  }
}

/* Loading spinner */
.spinner {
  border: 3px solid var(--gray-200);
  border-top: 3px solid var(--primary-blue);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 20px auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.success-message {
  background: #d1fae5;
  color: var(--green);
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 14px;
  border-left: 4px solid var(--green);
}