/* =========================
  Colors & Theme
========================= */

:root {
  --brand:      #1f4aa8;
  --accent:     #4a4af4;
  --accent-bg:  #ebebff;
  --bg:         #f6f8fb;
  --surface:    #ffffff;
  --border:     #e6e8ee;
  --ink:        #111111;
  --ink-soft:   #6b7280;
  --danger:     #e53e3e;
  --success-bg: #d1fae5;
  --success-bd: #34d399;
  --success-tx: #065f46;
  --radius:     12px;
  --shadow:     0 2px 16px rgba(74, 74, 244, .08);
}

/* =========================
  Base Layout
========================= */

html, body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  font-family: 'DM Sans', Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--ink);
}

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.logo {
  height: 40px;
  width: auto;
}

#main {
  flex: 1 0 auto;
}

/* =========================
  Accessibility
========================= */

.skip-link {
  position: absolute;
  left: -999px;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  padding: .5rem .75rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: .5rem;
  z-index: 1000;
}

/* =========================
  Header
========================= */

.app-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.app-title {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--ink);
}

.app-subtitle {
  font-size: .85rem;
  color: var(--ink-soft);
}

.app-brand:hover .app-title {
  color: var(--brand);
}

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

.app-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.footer-link {
  color: var(--ink-soft);
  text-decoration: none;
}

.footer-link:hover {
  color: var(--brand);
}

/* =========================
  Nice defaults
========================= */

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  background: var(--surface);
}

.btn-primary {
  background: var(--brand);
  border-color: var(--brand);
}

.btn-primary:hover {
  filter: brightness(.95);
}

.form-page {
  max-width: 880px;
}

h1, h2, h3, h4, h5 {
  font-weight: 600;
  letter-spacing: -0.01em;
}

.form-label {
  font-weight: 500;
}

.form-control,
.form-select {
  padding: .6rem .75rem;
  border-radius: 10px;
}

/* =========================
  Stepper
========================= */

.stepper {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  margin-bottom: 2rem;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  position: relative;
  text-align: center;
}

/* Connecting line between steps */
.step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 18px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: var(--border);
  z-index: 0;
}

.step.done:not(:last-child)::after {
  background: var(--accent);
}

.step-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .82rem;
  font-weight: 700;
  position: relative;
  z-index: 1;
  background: #fff;
  border: 2px solid var(--border);
  color: var(--ink-soft);
  transition: background .2s, border-color .2s, box-shadow .2s;
}

.step.done .step-circle {
  background: var(--success-bg);
  border-color: var(--success-bd);
  color: var(--success-tx);
  font-size: 0; /* hide number, show checkmark only */
}

.step.done .step-circle::after {
  content: '✓';
  font-size: .85rem;
}

.step.active .step-circle {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(74, 74, 244, .15);
}

.step-label {
  font-size: .72rem;
  margin-top: .45rem;
  color: var(--ink-soft);
  font-weight: 400;
}

.step.active .step-label {
  color: var(--ink);
  font-weight: 600;
}

.step.done .step-label {
  color: var(--success-tx);
}

@media (max-width: 768px) {
  .stepper {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: .5rem;
  }

  .step {
    flex: 0 0 auto;
    min-width: 90px;
  }

  .step-label {
    font-size: .7rem;
  }
}

/* =========================
  Exam form sections
========================= */

.exam-shell {
  max-width: 1080px;
  margin: 0 auto;
  padding: 2rem 1rem 4rem;
}

.exam-header {
  margin-bottom: 2rem;
}

.exam-header h1 {
  font-size: 1.9rem;
  line-height: 1.2;
  margin: 0 0 .4rem;
}

.exam-header p {
  color: var(--ink-soft);
  font-size: .9rem;
  margin: 0;
}

.form-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.75rem;
  margin-bottom: 1.25rem;
  transition: box-shadow .2s;
}

.form-section:focus-within {
  box-shadow: 0 4px 24px rgba(74, 74, 244, .13);
}

.section-label {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--accent-bg);
}

.field {
  margin-bottom: 1.1rem;
}

.field:last-child {
  margin-bottom: 0;
}

.field label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: .4rem;
}

.field input[type="text"],
.field input[type="number"],
.field select,
.field textarea {
  width: 100%;
  padding: .65rem .9rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: .9rem;
  color: var(--ink);
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
  outline: none;
  appearance: none;
  box-sizing: border-box;
}

.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7280' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .85rem center;
  padding-right: 2.2rem;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(74, 74, 244, .12);
}

.field input.is-invalid,
.field select.is-invalid {
  border-color: var(--danger);
}

.field .invalid-feedback {
  font-size: .78rem;
  color: var(--danger);
  margin-top: .3rem;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

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

.info-box {
  display: flex;
  gap: .65rem;
  align-items: flex-start;
  background: var(--accent-bg);
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  padding: .75rem 1rem;
  font-size: .82rem;
  color: var(--ink-soft);
  margin-bottom: 1.25rem;
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.radio-option,
.check-row {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .6rem .85rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  font-size: .88rem;
}

.radio-option:has(input:checked),
.check-row:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-bg);
}

.radio-option input,
.check-row input {
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.toggle-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .82rem;
  color: var(--accent);
  font-weight: 500;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
  margin-top: .25rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.submit-btn {
  width: 100%;
  padding: .85rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 9px;
  font-family: inherit;
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: .02em;
  cursor: pointer;
  transition: background .15s, transform .1s, box-shadow .15s;
  box-shadow: 0 4px 14px rgba(74, 74, 244, .35);
}

.submit-btn:hover {
  background: #3030d0;
  box-shadow: 0 6px 20px rgba(74, 74, 244, .45);
}

.submit-btn:active {
  transform: scale(.99);
}

/* Flash messages */
.flash-stack {
  margin-bottom: 1.25rem;
}

.flash-item {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  padding: .75rem 1rem;
  border-radius: 8px;
  font-size: .85rem;
  margin-bottom: .5rem;
}

.flash-item.danger  { background: #fff5f5; border: 1px solid #feb2b2; color: #742a2a; }
.flash-item.warning { background: #fffbeb; border: 1px solid #fbd38d; color: #744210; }
.flash-item.success { background: #f0fff4; border: 1px solid #9ae6b4; color: var(--success-tx); }
.flash-item.info    { background: var(--accent-bg); border: 1px solid #c3c3ff; color: #2d2d8e; }

/* =========================
  Info grid (confirmation)
========================= */

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 2rem;
}

.info-label {
  font-size: .8rem;
  color: var(--ink-soft);
}

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

.decision-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.decision-buttons .btn {
  flex: 1;
}

/* =========================
  Success / Reject screens
========================= */

.success-icon {
  font-size: 2.5rem;
  color: var(--brand);
}

.reject-icon {
  font-size: 2.5rem;
  color: #dc3545;
}

/* =========================
  Legal pages
========================= */

.legal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem 2rem;
}

.legal-section {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  background: #fff;
}

.legal-title {
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--ink-soft);
  margin-bottom: .35rem;
}

.legal-text {
  font-weight: 500;
}
/* =========================
  Module cards (dashboard)
========================= */

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

    .pruefung-wrapper {
        font-family: 'Inter', sans-serif;
        max-width: 1200px;
        margin: 0 auto;
        padding: 4rem 2rem 3rem;
    }

    .pruefung-header {
        margin-bottom: 2.5rem;
    }

    .pruefung-header .badge {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        background: #eff6ff;
        color: #1d4ed8;
        font-size: 0.72rem;
        font-weight: 500;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        padding: 5px 12px;
        border-radius: 99px;
        margin-bottom: 1.25rem;
        border: 1px solid #dbeafe;
    }

    .pruefung-header h1 {
        font-size: clamp(1.9rem, 4vw, 2.75rem);
        font-weight: 600;
        color: #0f172a;
        letter-spacing: -0.03em;
        line-height: 1.2;
        margin: 0 0 0.75rem;
    }

    .pruefung-header p {
        font-size: 1rem;
        color: #64748b;
        font-weight: 400;
        margin: 0;
        line-height: 1.6;
    }

    .module-grid {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }

    .module-card {
        background: #fff;
        border: 1px solid #e2e8f0;
        border-radius: 14px;
        padding: 1.5rem 2rem;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 2rem;
        transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
        animation: fadeUp 0.4s ease both;
    }

    .module-card:nth-child(1) {
        animation-delay: 0.05s;
    }

    .module-card:nth-child(2) {
        animation-delay: 0.12s;
    }

    .module-card:nth-child(3) {
        animation-delay: 0.19s;
    }

    @keyframes fadeUp {
        from {
            opacity: 0;
            transform: translateY(12px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .module-card:hover {
        border-color: #93c5fd;
        box-shadow: 0 4px 24px rgba(59, 130, 246, 0.08);
        transform: translateY(-2px);
    }

    .card-left {
        display: flex;
        align-items: center;
        gap: 1.25rem;
    }

    .card-icon {
        width: 44px;
        height: 44px;
        border-radius: 10px;
        background: #eff6ff;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }

    .card-icon svg {
        width: 18px;
        height: 18px;
        stroke: #2563eb;
        fill: none;
        stroke-width: 1.75;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .card-meta {
        display: flex;
        flex-direction: column;
        gap: 2px;
    }

    .card-number {
        font-size: 0.7rem;
        font-weight: 500;
        color: #cbd5e1;
        letter-spacing: 0.06em;
    }

    .module-card h4 {
        font-size: 1.05rem;
        font-weight: 600;
        color: #0f172a;
        margin: 0;
        letter-spacing: -0.01em;
    }

    .btn-anmeldung {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 0.6rem 1.25rem;
        background: #0f172a;
        color: #fff;
        border-radius: 9px;
        font-size: 0.875rem;
        font-weight: 500;
        text-decoration: none;
        white-space: nowrap;
        flex-shrink: 0;
        transition: background 0.15s, gap 0.15s;
        letter-spacing: -0.01em;
    }

    .btn-anmeldung:hover {
        background: #1e293b;
        color: #fff;
        text-decoration: none;
        gap: 12px;
    }

    .btn-anmeldung .arrow {
        opacity: 0.5;
        transition: opacity 0.15s;
    }

    .btn-anmeldung:hover .arrow {
        opacity: 1;
    }

    .flash-container {
        margin-bottom: 1.5rem;
    }

    @media (max-width: 576px) {
  .module-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .module-card .btn-anmeldung {
    width: 100%;
    justify-content: center;
  }
}

    /* ── Examiner grid ── */
    .examiner-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }

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

    .examiner-slot__badge {
        font-size: .72rem;
        font-weight: 700;
        letter-spacing: .06em;
        text-transform: uppercase;
        color: var(--ink-soft);
        margin-bottom: .5rem;
    }

    .required-star {
        color: var(--danger);
    }

    .examiner-slot__locked {
        display: flex;
        align-items: center;
        gap: .5rem;
        padding: .6rem .85rem;
        background: var(--bg);
        border: 1.5px solid var(--border);
        border-radius: 8px;
        font-size: .88rem;
        font-weight: 500;
        color: var(--ink);
    }

    .examiner-slot__locked i:first-child {
        color: var(--accent);
        font-size: .9rem;
    }

    .examiner-slot__lock-icon {
        margin-left: auto;
        color: var(--border);
        font-size: .75rem;
    }

    /* ── Unknown seminars ── */
    .unknown-seminars-box {
        background: #fffbeb;
        border: 1.5px solid #fbd38d;
        border-radius: 8px;
        padding: .9rem 1.1rem;
        font-size: .88rem;
        color: #744210;
        white-space: pre-wrap;
        line-height: 1.6;
    }

    /* ── Admin action buttons ── */
    .admin-actions {
        display: flex;
        justify-content: space-between;
        gap: 1rem;
        margin-top: 1.5rem;
    }

    .action-btn {
        display: inline-flex;
        align-items: center;
        gap: .5rem;
        padding: .8rem 1.75rem;
        border-radius: 9px;
        font-family: inherit;
        font-size: .9rem;
        font-weight: 600;
        cursor: pointer;
        border: 2px solid transparent;
        transition: background .15s, border-color .15s, transform .1s, box-shadow .15s;
    }

    .action-btn:active {
        transform: scale(.99);
    }

    .action-btn--reject {
        background: #fff5f5;
        border-color: #feb2b2;
        color: #c53030;
    }

    .action-btn--reject:hover {
        background: #fed7d7;
        border-color: #fc8181;
    }

    .action-btn--confirm {
        background: var(--accent);
        border-color: var(--accent);
        color: #fff;
        box-shadow: 0 4px 14px rgba(74, 74, 244, .35);
    }

    .action-btn--confirm:hover {
        background: #3030d0;
        box-shadow: 0 6px 20px rgba(74, 74, 244, .45);
    }

    /* ── Module badge ── */
    .module-badge {
        display: inline-flex;
        align-items: center;
        gap: .4rem;
        background: var(--accent-bg);
        color: var(--accent);
        font-size: .75rem;
        font-weight: 600;
        letter-spacing: .05em;
        text-transform: uppercase;
        padding: .3rem .75rem;
        border-radius: 99px;
        margin-bottom: .75rem;
    }