/* =========================
   1. RESET & BASE
========================= */

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: Arial, Helvetica, sans-serif;
}

body {
  background: linear-gradient(180deg, #07192d 0%, #102a45 100%);
  color: #ffffff;
  min-height: 100vh;
}

/* =========================
   2. LAYOUT (HEADER / CONTENT)
========================= */

.site-header {
  background: rgba(4, 18, 33, 0.96);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.content-area {
  padding: 40px 20px;
}

.content-box {
  max-width: 1200px;
  margin: 0 auto;
  background: #ffffff;
  color: #1b2430;
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.2);
}

/* =========================
   3. TYPOGRAPHY
========================= */

h1, h2, h3 {
  color: #0d2f57;
  margin-top: 0;
}

p {
  color: #2f3b4a;
}

/* =========================
   4. NAVIGATION
========================= */

.site-logo {
  height: 60px;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-nav a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 999px;
  min-width: 110px;
  text-align: center;
  transition: background 0.2s ease;
}

.top-nav a:hover,
.top-nav a.active {
  background: #376da6;
}

/* USER MENU */

.user-menu {
  position: relative;
}

.user-menu-toggle {
  background: #376da6;
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 600;
  cursor: pointer;
}

.user-menu-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  min-width: 180px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
  overflow: hidden;
  z-index: 200;
}

.user-menu-dropdown a {
  display: block;
  padding: 12px 16px;
  color: #1b2430;
  text-decoration: none;
}

.user-menu-dropdown a:hover {
  background: #eef4fb;
  color: #0d2f57;
}

.user-menu:hover .user-menu-dropdown,
.user-menu:focus-within .user-menu-dropdown {
  display: block;
}

/* =========================
   5. BUTTONS
========================= */

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 20px;
  border-radius: 12px;
  font-weight: 700;
  text-decoration: none;
}

.btn-primary {
  background: #1f5ea8;
  color: #fff;
  border: 1px solid #1f5ea8;
}

.btn-secondary {
  background: #eef4fb;
  color: #0d2f57;
  border: 1px solid #dce3ea;
}

.btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 20px;
  border-radius: 12px;
  font-weight: 700;
  text-decoration: none;
  box-sizing: border-box;

  background: #b62323;
  color: #fff;
  border: 1px solid #b62323;
  cursor: pointer;
}

.btn-small {
  height: 40px;
  min-width: 100px;
  padding: 0 16px;
  font-size: 14px;
  border-radius: 10px;
}
/* =========================
   BUTTON INTERACTION
========================= */

.btn-primary,
.btn-secondary,
.btn-danger,
.btn-small,
.user-menu-toggle,
button {
  cursor: pointer;
}

/* =========================
   6. FORMS
========================= */

.login-form .form-row {
  margin-bottom: 16px;
}

.login-form label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: #0d2f57;
}

.login-form input {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #c9d2db;
}

/* =========================
   7. FEEDBACK
========================= */

.error-box {
  background: #ffe7e7;
  color: #8d1d1d;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 16px;
}

.success-box {
  background: #e8f7e8;
  color: #1f6b1f;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 16px;
}

#mandant-create-error {
  margin-bottom: 14px;
}
/* =========================
   8. COMPONENTS
========================= */

.hero-box,
.pricing-section,
.info-section {
  margin-bottom: 30px;
}

.two-col {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
}

.image-panel img {
  width: 100%;
  border-radius: 12px;
}

/* =========================
   9. ADMIN PANEL
========================= */

.admin-panel {
  background: #f8fbff;
  border: 1px solid #dce3ea;
  border-radius: 18px;
  padding: 24px;
  margin-bottom: 24px;
}

.admin-actions {
  display: flex;
  gap: 16px;
  margin-top: 16px;
}
/* =========================
   ADMIN FORM LAYOUT
========================= */

.admin-grid-form {
  display: grid;
  grid-template-columns: 200px minmax(320px, 1fr);
  gap: 14px 20px;
  align-items: center;
  max-width: 760px;
}

.admin-grid-form .form-row {
  display: contents;
}

.admin-grid-form label {
  margin: 0;
  font-weight: 700;
  color: #0d2f57;
}

.admin-grid-form input[type="text"],
.admin-grid-form input[type="email"],
.admin-grid-form input[type="number"] {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #cfd8e3;
  border-radius: 10px;
  font-size: 16px;
  box-sizing: border-box;
}

.form-row-full {
  grid-column: 1 / -1;
  margin-top: 8px;
}
.table-actions .btn-primary,
.table-actions .btn-danger {
  min-width: 110px;
}
/* =========================
   10. TABLES
========================= */

.mandanten-table {
  width: 100%;
  border-collapse: collapse;
}

.mandanten-table th {
  background: #eef4fb;
  color: #0d2f57;
  text-align: left;
  padding: 14px;
}

.mandanten-table td {
  padding: 14px;
  border-bottom: 1px solid #e7edf3;
}

.mandanten-table tr:hover td {
  background: #fbfdff;
}

/* =========================
   11. RESPONSIVE
========================= */

@media (max-width: 900px) {

  .two-col {
    grid-template-columns: 1fr;
  }

  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .top-nav a {
    min-width: auto;
  }
}

.group-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.group-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: #eef4fb;
  color: #0d2f57;
  font-weight: 600;
  font-size: 14px;
  border: 1px solid #dce3ea;
}
/* =========================
   12. NEW USER
========================= */
.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  padding: 4px 0;
}

.checkbox-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #eef4fb;
  border: 1px solid #dce3ea;
  border-radius: 10px;
  color: #0d2f57;
  font-weight: 600;
}

.checkbox-item input[type="checkbox"] {
  margin: 0;
}

.admin-grid-form select {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #cfd8e3;
  border-radius: 10px;
  font-size: 16px;
  box-sizing: border-box;
  background: #fff;
}
/* =========================
   PRICING PAGE
========================= */

.pricing-hero {
  text-align: center;
  margin-bottom: 36px;
}

.pricing-hero h1 {
  font-size: 52px;
  margin-bottom: 18px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pricing-lead {
  max-width: 980px;
  margin: 0 auto 16px;
  font-size: 22px;
  line-height: 1.5;
  color: #526172;
}

.pricing-note-strong {
  font-size: 18px;
  font-weight: 700;
  color: #0d2f57;
  margin-bottom: 0;
}

.pricing-levels {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
  align-items: start;
  margin-bottom: 40px;
}

.level-card {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid #d8e0ea;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.08);
}

.level-card.featured {
  transform: translateY(-18px);
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.14);
}

.level-card-header {
  min-height: 150px;
  padding: 28px 24px 24px;
  background: linear-gradient(180deg, #7f8793 0%, #a5acb5 100%);
  color: #ffffff;
  text-align: center;
}

.level-card-header h2 {
  margin: 0 0 14px;
  font-size: 28px;
  line-height: 1.15;
}

.level-card-header p {
  margin: 0;
  color: rgba(255, 255, 255, 0.95);
  font-size: 17px;
  line-height: 1.35;
}

.level-a .level-card-header h2 {
  color: #1970c8;
}

.level-b .level-card-header h2 {
  color: #f2c200;
}

.level-c .level-card-header h2 {
  color: #e83a2d;
}

.level-card-price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  padding: 26px 20px 24px;
  background: #f8fbff;
  border-bottom: 1px solid #dce3ea;
}

.level-card-price .currency {
  font-size: 28px;
  color: #7e8793;
}

.level-card-price .amount {
  font-size: 70px;
  line-height: 1;
  font-weight: 800;
}

.level-card-price .period {
  font-size: 18px;
  color: #7e8793;
}

.level-a .amount {
  color: #1970c8;
}

.level-b .amount {
  color: #d4aa00;
}

.level-c .amount {
  color: #e83a2d;
}

.level-card-body {
  padding: 28px 28px 30px;
}

.level-highlight {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.25;
  color: #1b2430;
  margin-bottom: 18px;
}

.level-meta {
  font-size: 16px;
  color: #5f6c7b;
  margin-bottom: 20px;
}

.level-card-body hr {
  border: 0;
  border-top: 2px solid #d6dde6;
  margin: 22px 0 24px;
}

.level-module-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.level-module-list li {
  margin-bottom: 16px;
  color: #2f3b4a;
  line-height: 1.5;
}

.level-actions {
  margin-top: 24px;
}

.level-actions .btn-primary {
  width: 100%;
}

.pricing-bottom-note {
  margin-top: 18px;
}

/* =========================
   RESPONSIVE PRICING
========================= */

@media (max-width: 1200px) {
  .pricing-levels {
    grid-template-columns: 1fr;
  }

  .level-card.featured {
    transform: none;
  }

  .pricing-hero h1 {
    font-size: 40px;
  }

  .pricing-lead {
    font-size: 19px;
  }
}

@media (max-width: 700px) {
  .level-card-header {
    min-height: auto;
    padding: 22px 18px;
  }

  .level-card-header h2 {
    font-size: 24px;
  }

  .level-card-header p {
    font-size: 16px;
  }

  .level-card-price {
    flex-wrap: wrap;
    padding: 22px 18px;
  }

  .level-card-price .amount {
    font-size: 52px;
  }

  .level-card-price .period {
    width: 100%;
    text-align: center;
  }

  .level-card-body {
    padding: 22px 18px 24px;
  }

  .level-highlight {
    font-size: 21px;
  }
}

/* =========================
   COUNTRY SWITCH
========================= */

.country-switch-form {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: 16px;
}

.country-label {
  color: #ffffff;
  font-weight: 600;
  font-size: 14px;
}

.country-switch-form select {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  background: #376da6;
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
}

.country-switch-form select:focus {
  outline: none;
  border-color: #8fb6e2;
  box-shadow: 0 0 0 3px rgba(143, 182, 226, 0.2);
}

/* =========================
   Kurse 
========================= */


.course-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.course-card {
  background: #fff;
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}

.course-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 30px;
}

/* =========================
   Dokumente 
========================= */
.status-ok {
  color: #178b35;
  font-weight: 700;
}

.status-missing {
  color: #b62323;
  font-weight: 700;
}
.col-id {
  width: 60px;
}

.mandanten-table td,
.mandanten-table th {
  vertical-align: middle;
}

.file-block {
  display: flex;
  flex-direction: column;
}

.file-name {
  font-weight: 600;
  color: #3a2b7a;
  text-decoration: none;
}

.file-name:hover {
  text-decoration: underline;
}

.file-meta {
  font-size: 12px;
  color: #6b7280;
  margin-top: 4px;
}


.admin-grid-form select,
.mandanten-table select {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #cfd8e3;
  border-radius: 10px;
  font-size: 16px;
  box-sizing: border-box;
  background: #fff;
}

/* ===============================
   Progress Bar Dokumente
   =============================== */

.progress-box {
  margin: 20px 0 30px;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  margin-bottom: 6px;
  color: #334155;
}

.progress-bar {
  width: 100%;
  height: 12px;
  background: #e5eaf0;
  border-radius: 8px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #4caf50, #2e7d32);
  border-radius: 8px;
  transition: width 0.3s ease;
}

.progress-red {
  background: #d32f2f;
}

.progress-yellow {
  background: #f9a825;
}

.progress-green {
  background: #2e7d32;
}

/* ===============================
   Home 
   =============================== */
.section {
  margin: 40px 0;
}

.section.alt {
  background: #f6f8fb;
  padding: 30px;
  border-radius: 16px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.card {
  background: #fff;
  padding: 20px;
  border-radius: 14px;
  border: 1px solid #e3e8ef;
}

.hero-actions {
  margin-top: 20px;
  display: flex;
  gap: 12px;
}

.cta-section {
  text-align: center;
}

.checkbox-group {
  display: flex;
  gap: 20px;
  margin-top: 8px;
}

.checkbox-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: normal;
}

/* ===============================
   Footer
   =============================== */

.site-footer {
  margin-top: 60px;
  padding: 20px 30px;
  background: #0f172a;
  color: #cbd5e1;
  font-size: 14px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  color: #cbd5e1;
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}

/* ===============================
   Impressum / Legal
   =============================== */

.legal-section {
  padding: 10px 20px;
}

.legal-section h2 {
  margin-top: 0;
}

.legal-section ul {
  padding-left: 18px;
}

.legal-footer {
  margin-top: 40px;
  text-align: center;
  font-size: 14px;
  color: #64748b;
}

.responsive-stack {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

@media (max-width: 768px) {
  .responsive-stack {
    grid-template-columns: 1fr;
  }
}

.admin-grid-form textarea {
  width: 100%;
  min-height: 110px;
  padding: 10px 12px;
  border: 1px solid #cfd8e3;
  border-radius: 10px;
  font-size: 16px;
  box-sizing: border-box;
  resize: vertical;
  font-family: Arial, Helvetica, sans-serif;
}


/* assessment fragen */
/* Grundlayout */
.content-section.ai-explainer {
  padding: 40px 20px;
  background: #f9fafb;
}

.content-wrapper {
  max-width: 900px;
  margin: 0 auto;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: #1f2937;
  line-height: 1.6;
}

/* Titel */
.section-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 20px;
  color: #111827;
}

/* Lead Text */
.lead {
  font-size: 18px;
  margin-bottom: 20px;
}

/* Standard Paragraph */
.content-wrapper p {
  margin-bottom: 16px;
}

/* Listen */
.example-list,
.key-points {
  margin: 15px 0 20px 20px;
  padding: 0;
}

.example-list li,
.key-points li {
  margin-bottom: 8px;
}

/* Quote / Highlight */
.highlight-quote {
  margin: 25px 0;
  padding: 20px;
  background: #eef2ff;
  border-left: 5px solid #6366f1;
  font-size: 18px;
  font-weight: 500;
  color: #1e3a8a;
  border-radius: 6px;
}

/* Responsive */
@media (max-width: 768px) {
  .section-title {
    font-size: 22px;
  }

  .lead {
    font-size: 16px;
  }

  .highlight-quote {
    font-size: 16px;
  }
}

.mandanten-table textarea {
  width: 100%;
  min-height: 70px;
  padding: 10px 12px;
  border: 1px solid #cfd8e3;
  border-radius: 10px;
  font-size: 14px;
  box-sizing: border-box;
  resize: vertical;
  font-family: Arial, Helvetica, sans-serif;
}

/* ===============================
   Kursverwaltung Tabelle
   =============================== */

.input-small {
  width: 60px;
  padding: 6px 8px;
}

.input-full {
  width: 100%;
  margin-bottom: 6px;
}

.textarea-inline {
  width: 100%;
  min-height: 60px;
  padding: 8px 10px;
  border: 1px solid #cfd8e3;
  border-radius: 8px;
  font-size: 14px;
  resize: vertical;
  box-sizing: border-box;
}

/* ===============================
   Kursfortschritt (grün/grau)
   =============================== */

.course-progress-box {
  margin-bottom: 24px;
}

.course-progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  margin-bottom: 6px;
  color: #334155;
}

/* Hintergrund = grau */
.course-progress-bar {
  width: 100%;
  height: 12px;
  background: #e5e7eb; /* grau */
  border-radius: 8px;
  overflow: hidden;
}

/* Fortschritt = grün */
.course-progress-fill {
  height: 100%;
  background: #22c55e; /* grün */
  border-radius: 8px;
  transition: width 0.3s ease;
}

/* ===============================
   CSV Upload User
   =============================== */

.upload-panel {
  max-width: 1100px;
}

.upload-form {
  margin-top: 8px;
}

.upload-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 28px;
  align-items: start;
}

.upload-main {
  background: #f8fbff;
  border: 1px solid #dce3ea;
  border-radius: 16px;
  padding: 24px;
}

.upload-label {
  display: block;
  margin-bottom: 12px;
  font-weight: 700;
  color: #0d2f57;
  font-size: 20px;
}

.upload-info-card {
  background: #f8fbff;
  border: 1px solid #dce3ea;
  border-radius: 16px;
  padding: 24px;
}

.upload-info-card h2 {
  margin: 0 0 10px;
  font-size: 22px;
  color: #0d2f57;
}

.upload-info-card h2:not(:first-child) {
  margin-top: 22px;
}

.upload-code {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 10px;
  background: #eef4fb;
  border: 1px solid #dce3ea;
  color: #0d2f57;
  font-family: monospace;
  font-size: 18px;
}

.upload-example {
  margin: 0;
  padding: 14px 16px;
  border-radius: 12px;
  background: #0f172a;
  color: #e2e8f0;
  font-family: monospace;
  font-size: 16px;
  line-height: 1.5;
  overflow-x: auto;
}

.upload-hints {
  margin: 0;
  padding-left: 18px;
}

.upload-hints li {
  margin-bottom: 8px;
}

.upload-actions {
  margin-top: 24px;
}

.error-list {
  margin: 10px 0 0;
  padding-left: 18px;
}

@media (max-width: 900px) {
  .upload-grid {
    grid-template-columns: 1fr;
  }
}

.admin-actions-spaced {
  margin-bottom: 22px;
}

.status-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  align-items: center;
  margin-bottom: 18px;
  padding: 12px 14px;
  background: #f8fbff;
  border: 1px solid #dce3ea;
  border-radius: 12px;
  color: #334155;
}

.status-legend strong {
  color: #0d2f57;
}

.admin-subtitle {
  margin: 6px 0 0;
  color: #526172;
}

/* ===============================
   Profil Layout
   =============================== */

.profile-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  row-gap: 14px;
  column-gap: 20px;
  align-items: center;
  margin-top: 20px;
}

/* Labels linksbündig */
.profile-label {
  text-align: left;
  font-weight: 700;
  color: #1e3a5f;
}

/* Werte */
.profile-value {
  color: #1f2937;
}

/* Gruppen-Badges */
.badge {
  display: inline-block;
  padding: 6px 14px;
  margin-right: 8px;
  border-radius: 999px;
  background: #e7edf5;
  color: #1e3a5f;
  font-weight: 600;
  font-size: 14px;
}

@media (max-width: 700px) {
  .profile-grid {
    grid-template-columns: 1fr;
  }

  .profile-label {
    margin-top: 10px;
  }
}

.profile-label {
  color: #64748b;
}

.profile-value {
  font-weight: 500;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.dashboard-card {
  padding: 16px;
  background: #f8fbff;
  border: 1px solid #dce3ea;
  border-radius: 12px;
}

.dashboard-value {
  font-size: 28px;
  font-weight: bold;
}


.report-filters {
  margin: 20px 0;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.error-box {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
  padding: 16px;
  border-radius: 10px;
  font-weight: 600;
}

/* ===============================
   Kursübersicht User
   =============================== */

.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.course-card {
  background: #ffffff;
  border: 1px solid #dce3ea;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.course-card-completed {
  background: #eaf8ee;
  border: 1px solid #9fd3ac;
}

.course-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  gap: 10px;
}

.course-code {
  font-size: 14px;
  font-weight: 800;
  color: #0d2f57;
  letter-spacing: 0.04em;
}

.course-badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.course-badge-completed {
  background: #22c55e;
  color: #ffffff;
}

.course-card h3 {
  margin: 0 0 10px;
  color: #0d2f57;
}

.course-card p {
  margin: 0 0 16px;
  color: #475569;
}

.course-actions {
  margin-top: 10px;
}

/* Kurs Grid */
.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

/* Karte */
.course-card {
  background: #ffffff;
  border: 1px solid #dce3ea;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

/* Fertig */
.course-card-completed {
  background: #eaf8ee;
  border: 1px solid #9fd3ac;
}

/* Header */
.course-card-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

/* Code */
.course-code {
  font-weight: 800;
  color: #0d2f57;
}

/* Badge */
.course-badge {
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.course-badge-completed {
  background: #22c55e;
  color: white;
}

/* Progress */
.progress-box {
  margin: 10px 0 20px;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 6px;
  color: #475569;
  font-weight: 600;
}

.progress-bar {
  width: 100%;
  height: 10px;
  background: #e5eaf0;
  border-radius: 8px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #22c55e, #15803d);
}

/* ===============================
   User Dropdown Menü (neu)
   =============================== */

.user-menu {
  position: relative;
}

.user-menu-btn {
  background: #eef3f9;
  border: none;
  padding: 8px 14px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  color: #1f2f46;
}

.user-dropdown {
  position: absolute;
  right: 0;
  top: 42px;
  min-width: 240px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  padding: 10px 0;
  display: none;
  z-index: 1000;
}

/* Hover öffnen */
.user-menu:hover .user-dropdown {
  display: block;
}

/* Gruppen */
.menu-group {
  padding: 6px 0;
}

/* Titel */
.menu-group-title {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  padding: 6px 16px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Links */
.user-dropdown a {
  display: block;
  padding: 10px 16px;
  color: #1f2937;
  text-decoration: none;
  font-size: 14px;
  transition: background 0.2s ease;
}

/* Hover Effekt */
.user-dropdown a:hover {
  background: #f1f5f9;
}

/* Separator */
.menu-separator {
  height: 1px;
  background: #e2e8f0;
  margin: 6px 0;
}

/* Pastell-Hintergründe pro Gruppe */

.menu-group:nth-child(1) {
  background: #f8fafc;
}

.menu-group:nth-child(3) {
  background: #f0fdf4;
}

.menu-group:nth-child(5) {
  background: #fefce8;
}

.menu-group:nth-child(7) {
  background: #fdf2f8;
}

/*********************/
/*. User Menü        */
/*********************/
.top-nav a,
.user-menu-btn,
.lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  height: 44px;
  min-width: 140px;   /* 👈 gleich breit */
  padding: 0 18px;

  border-radius: 22px;
  font-weight: 600;
  font-size: 15px;

  box-sizing: border-box;
}

.top-nav a,
.lang-btn {
  gap: 8px;
}

.user-menu {
  position: relative;
}

/* 🔥 WICHTIG: kein Abstand mehr */
.user-dropdown {
  position: absolute;
  right: 0;
  top: 100%;          /* direkt anschließen */
  margin-top: 4px;    /* kleiner Abstand erlaubt */

  min-width: 240px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);

  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: all 0.2s ease;
}

/* 🔥 Hover stabil */
.user-menu:hover .user-dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.user-menu::after {
  content: "";
  position: absolute;
  top: 100%;
  right: 0;
  height: 10px;
  width: 100%;
}

/* ===============================
   Error Pages
   =============================== */

.error-page {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 60px 20px;
}

.error-card {
  max-width: 480px;
  width: 100%;
  background: #ffffff;
  border-radius: 18px;
  padding: 40px 30px;
  text-align: center;
  box-shadow: 0 12px 40px rgba(0,0,0,0.08);
}

.error-icon {
  font-size: 48px;
  margin-bottom: 15px;
}

.error-card h1 {
  margin-bottom: 10px;
  color: #0d2f57;
}

.error-card p {
  color: #475569;
  margin-bottom: 25px;
}

.error-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.btn-secondary {
  background: #e2e8f0;
  color: #1f2937;
  padding: 10px 16px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
}

.form-hint {
  margin-top: 8px;
  font-size: 14px;
  color: #526172;
}

.checkbox-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 8px;
}

.checkbox-card {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border: 1px solid #dce3ea;
  border-radius: 14px;
  background: #f8fbff;
  cursor: pointer;
  font-weight: 600;
  color: #1e3a5f;
}

.checkbox-card input[type="checkbox"] {
  width: 18px;
  height: 18px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

.admin-table th {
  text-align: left;
  padding: 10px;
  background: #f1f5f9;
}

.admin-table td {
  padding: 10px;
  border-bottom: 1px solid #e2e8f0;
}

.status-active {
  color: #15803d;
  font-weight: 600;
}

.status-inactive {
  color: #b91c1c;
  font-weight: 600;
}

/* Level Badges */
.level-badge {
  padding: 6px 10px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 13px;
}

.level-1 {
  background: #dcfce7;
  color: #166534;
}

.level-2 {
  background: #fef9c3;
  color: #854d0e;
}

.level-3 {
  background: #e0f2fe;
  color: #075985;
}

.actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Basis Button */
.btn-icon {
  width: 34px;
  height: 34px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border-radius: 10px;
  border: 1px solid transparent;

  font-size: 15px;
  cursor: pointer;

  transition: all 0.2s ease;
}

/* EDIT */
.btn-edit {
  background: #e0f2fe;
  color: #075985;
}

.btn-edit:hover {
  background: #bae6fd;
  transform: translateY(-1px);
}

/* DELETE */
.btn-delete {
  background: #fee2e2;
  color: #991b1b;
  border: none;
}

.btn-delete:hover {
  background: #fecaca;
  transform: translateY(-1px);
}

.user-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* kleines Level-Icon */
.user-level-icon {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.6);
}

/* Farben passend zu deinen Badges */

/* 🟡 GOLD */

.level-1 {

  background: linear-gradient(145deg, #ffd700, #e6b800);

  border: 1px solid #c9a200;

}

/* ⚪ SILBER */

.level-2 {

  background: linear-gradient(145deg, #d1d5db, #9ca3af);

  border: 1px solid #6b7280;

}

/* 🟤 BRONZE */

.level-3 {

  background: linear-gradient(145deg, #cd7f32, #a65a1f);

  border: 1px solid #7c3e0a;

}