/* Gemeinsames Grundstyling fuer alle Seiten. Sobald das Design an
   buchhaltung-akademie.de angelehnt wird, hier zentral anpassen. */

:root {
  --blue-900: #0b2545;
  --blue-700: #13315c;
  --blue-500: #1d5fb8;
  --blue-300: #6fa8ff;
  --bg: #eef3fb;
  --surface: #ffffff;
  --surface-secondary: #f1f5fb;
  --border: rgba(11, 37, 69, 0.12);
  --text: #0b2545;
  --text-muted: #5b6b85;
  --accent: #1d5fb8;
  --accent-hover: #17509c;
  --error-bg: #fde7e7;
  --error-text: #b3261e;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Byte-genau an admin/lernassistent/support angeglichen (2026-09-13) -
   vorher nur farblich angepasst, aber mit eigenen Massen/Schriftgroessen
   (siehe Git-Historie), was neben den anderen drei Apps trotz gleicher
   Farbpalette noch sichtbar anders aussah. Bewusst weiterhin ueber
   .access-card skopiert statt .form-group direkt zu ueberschreiben -
   .form-group wird andernorts in dieser Datei (Quiz-Builder) mit eigenen,
   fuer helle Flaechen gedachten Werten verwendet. */
.access-gate {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: radial-gradient(circle at 20% 20%, var(--blue-500), var(--blue-900) 65%);
}

.access-card {
  width: 100%;
  max-width: 26rem;
  padding: 2.5rem;
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  color: #fff;
}

.access-kicker {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}

.access-card h1 {
  margin: 0 0 1rem;
  font-size: 1.6rem;
}

.auth-tabs {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.auth-tab {
  flex: 1;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.8rem;
  font-family: inherit;
  cursor: pointer;
}

.auth-tab.active {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
}

.auth-hint {
  margin: 0 0 1.25rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.75);
}

.access-card .form-group {
  margin-bottom: 1rem;
}

.access-card label {
  display: block;
  font-size: 0.8rem;
  font-weight: 400;
  margin-bottom: 0.35rem;
  color: rgba(255, 255, 255, 0.85);
}

.access-card input {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border-radius: 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 0.95rem;
}

.access-card input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 2.75rem;
}

.password-toggle {
  position: absolute;
  right: 0.4rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 0.3rem;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.7);
  line-height: 0;
}

.password-toggle:hover {
  color: #fff;
}

.auth-message {
  margin: 0.9rem 0 0;
  font-size: 0.85rem;
  color: #ffd7d7;
}

.access-card button[type="submit"] {
  width: 100%;
  padding: 0.75rem;
  border: none;
  border-radius: 0.6rem;
  background: linear-gradient(135deg, var(--blue-300), var(--blue-500));
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  margin-top: 0.25rem;
}

.access-card button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.save-password-option {
  align-items: center;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  flex-direction: row;
  font-size: 0.88rem;
  gap: 9px;
  width: fit-content;
}

.save-password-option input {
  accent-color: var(--accent);
  height: 17px;
  min-height: auto;
  width: 17px;
}

main {
  max-width: 960px;
  margin: 0 auto;
  padding: 44px 24px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

header {
  align-items: flex-start;
  display: flex;
  gap: 18px;
  justify-content: space-between;
}

.user-menu {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

#user-email {
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 600;
}

h1 {
  font-size: 1.65rem;
  letter-spacing: 0;
  line-height: 1.15;
  margin: 0 0 8px;
}

.subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.access-denied-card {
  gap: 8px;
  max-width: 480px;
}

.access-denied-card h2 {
  font-size: 1.2rem;
  margin: 0;
}

.access-denied-card p {
  line-height: 1.5;
}

.view-nav {
  background: var(--surface-secondary);
  border: 1px solid var(--border);
  border-radius: 999px;
  display: inline-grid;
  gap: 3px;
  grid-auto-flow: column;
  padding: 3px;
}

.view-tab {
  background: transparent;
  border-radius: 999px;
  color: var(--text-muted);
  min-height: 38px;
  padding: 8px 18px;
}

.view-tab:hover {
  background: rgba(255, 255, 255, 0.72);
}

.view-tab.active {
  background: #fff;
  box-shadow: 0 1px 3px rgba(24, 24, 27, 0.12);
  color: var(--text);
}

#workspace-view,
#admin-view {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.admin-invite-card {
  gap: 18px;
}

.invite-form {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.invite-form label {
  font-size: 0.86rem;
  gap: 7px;
}

.invite-form input,
.invite-form select {
  background: var(--surface-secondary);
  border: 1px solid var(--border);
  border-radius: 11px;
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 400;
  min-height: 44px;
  padding: 9px 12px;
}

.invite-form input:focus,
.invite-form select:focus {
  border-color: rgba(29, 95, 184, 0.55);
  box-shadow: 0 0 0 3px rgba(29, 95, 184, 0.12);
  outline: none;
}

.invite-form button {
  align-self: end;
  grid-column: 1 / -1;
  justify-self: start;
}

.invite-role-field {
  grid-column: 1 / -1;
}

.role-hint {
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 400;
}

.user-row-meta {
  display: grid;
  gap: 2px;
}

.user-row-meta .role-pill {
  background: rgba(29, 95, 184, 0.12);
  border-radius: 999px;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.15rem 0.6rem;
  text-transform: capitalize;
  width: fit-content;
}

.user-row-meta .role-pill.inactive {
  background: var(--error-bg);
  color: var(--error-text);
}

.user-actions select {
  background: var(--surface-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font: inherit;
  font-size: 0.86rem;
  min-height: 40px;
  padding: 7px 10px;
}

.mode-chooser {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mode-card {
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-height: 118px;
  padding: 22px;
  text-align: left;
}

.mode-card:hover {
  background: var(--surface);
  border-color: rgba(11, 37, 69, 0.28);
}

.mode-card.active {
  border-color: rgba(29, 95, 184, 0.55);
  box-shadow: 0 0 0 3px rgba(29, 95, 184, 0.12), 0 1px 2px rgba(0, 0, 0, 0.03);
}

.mode-card span {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0;
}

.mode-card small {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.35;
}

#glossary-tool {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

#glossary-tool[hidden] {
  display: none;
}

#quiz-tool[hidden] {
  display: none;
}

.form-group,
label {
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.file-picker {
  align-items: center;
  background: var(--surface-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  gap: 12px;
  min-height: 46px;
  padding: 6px 6px 6px 14px;
}

.file-picker input[type="file"] {
  height: 1px;
  opacity: 0;
  overflow: hidden;
  position: absolute;
  width: 1px;
}

#file-name,
#quiz-file-name {
  color: var(--text-muted);
  flex: 1;
  font-size: 0.9rem;
  font-weight: 500;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#file-button,
#quiz-file-button {
  background: var(--surface);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  color: var(--text);
  flex: 0 0 auto;
  padding: 8px 14px;
}

#file-button:hover,
#quiz-file-button:hover {
  background: var(--surface);
}

.word-count-field {
  display: grid;
  gap: 10px;
}

.word-count-field p {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0;
}

.word-count-controls {
  align-items: center;
  background: var(--surface-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 3px;
  padding: 3px;
  width: fit-content;
}

.word-count-controls label {
  cursor: pointer;
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
}

.word-count-controls input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.word-count-controls span {
  border-radius: 9px;
  color: var(--text-muted);
  display: block;
  line-height: 1;
  min-width: 54px;
  padding: 10px 15px;
  text-align: center;
  transition: background 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}

.word-count-controls input[type="radio"]:checked + span {
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(24, 24, 27, 0.12);
  color: var(--text);
}

.word-count-controls input[type="radio"]:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.custom-word-count {
  align-items: center;
  display: flex;
}

.custom-word-count[hidden] {
  display: none;
}

#custom-word-count {
  border: 1px solid var(--border);
  border-radius: 9px;
  font-size: 0.9rem;
  font-weight: 600;
  height: 34px;
  padding: 0 8px;
  width: 76px;
}

#custom-word-count:disabled {
  opacity: 0.45;
}

.quiz-builder {
  gap: 22px;
}

.settings-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.setting-panel {
  display: grid;
  gap: 10px;
}

.setting-panel p {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0;
}

#custom-question-count {
  border: 1px solid var(--border);
  border-radius: 9px;
  font-size: 0.9rem;
  font-weight: 600;
  height: 34px;
  padding: 0 8px;
  width: 76px;
}

#custom-question-count:disabled {
  opacity: 0.45;
}

.quiz-type-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.quiz-type-grid label {
  cursor: pointer;
  display: block;
}

.quiz-type-grid input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.quiz-type-grid span {
  align-items: center;
  background: var(--surface-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text-muted);
  display: flex;
  font-size: 0.86rem;
  font-weight: 600;
  justify-content: center;
  min-height: 46px;
  padding: 10px 12px;
  text-align: center;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}

.quiz-type-grid input[type="checkbox"]:checked + span {
  background: #fff;
  border-color: rgba(29, 95, 184, 0.45);
  box-shadow: 0 0 0 3px rgba(29, 95, 184, 0.1);
  color: var(--text);
}

.quiz-type-grid input[type="checkbox"]:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.quiz-review {
  border-top: 1px solid var(--border);
  display: grid;
  gap: 18px;
  padding-top: 22px;
}

.review-header {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.review-header h2 {
  font-size: 1.15rem;
  margin: 0 0 4px;
}

.quiz-review-body {
  display: grid;
  gap: 14px;
}

.quiz-question-card {
  background: var(--surface-secondary);
  border: 1px solid var(--border);
  border-radius: 14px;
  display: grid;
  gap: 14px;
  padding: 18px;
}

.quiz-question-header {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.accept-toggle {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  flex-direction: row;
  gap: 8px;
  padding: 7px 12px;
  width: fit-content;
}

.accept-toggle input {
  accent-color: var(--accent);
}

.quiz-question-type {
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 700;
  margin: 0;
  text-transform: uppercase;
}

.editable-field {
  display: grid;
  gap: 7px;
}

.editable-field input,
.editable-field textarea,
.quiz-option-row input {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font: inherit;
  font-size: 0.92rem;
  padding: 10px 12px;
  width: 100%;
}

.editable-field textarea {
  min-height: 86px;
  resize: vertical;
}

.quiz-options-editor {
  display: grid;
  gap: 8px;
}

.quiz-options-editor > p {
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0;
}

.quiz-option-row {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.secondary-button,
.icon-button {
  background: var(--surface);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  color: var(--text);
}

.secondary-button:hover,
.icon-button:hover {
  background: var(--surface);
}

.icon-button {
  min-height: 40px;
  padding: 8px 13px;
}

button {
  align-items: center;
  align-self: flex-start;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 0.6rem;
  display: inline-flex;
  gap: 9px;
  justify-content: center;
  min-height: 44px;
  padding: 11px 22px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, opacity 0.15s ease, transform 0.15s ease;
}

button:hover {
  background: var(--accent-hover);
}

button:active {
  transform: scale(0.98);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

button.is-loading {
  opacity: 1;
  cursor: wait;
}

button.is-loading::before {
  animation: spin 0.85s linear infinite;
  border: 2px solid color-mix(in srgb, currentColor 35%, transparent);
  border-top-color: currentColor;
  border-radius: 50%;
  content: "";
  flex: 0 0 auto;
  height: 15px;
  width: 15px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 640px) {
  main {
    padding: 28px 16px;
  }

  header {
    flex-direction: column;
  }

  .mode-chooser {
    grid-template-columns: 1fr;
  }

  .card,
  .mode-card {
    border-radius: 14px;
    padding: 20px;
  }

  .settings-grid,
  .quiz-type-grid {
    grid-template-columns: 1fr;
  }

  .review-header,
  .quiz-question-header,
  .archive-header,
  .archive-item-main,
  .archive-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .quiz-option-row,
  .reviewer-form {
    grid-template-columns: 1fr;
  }

  .toolbar-actions,
  .toolbar-actions button,
  .archive-actions button,
  .archive-actions select {
    width: 100%;
  }

  .file-picker {
    align-items: stretch;
    flex-direction: column;
    padding: 12px;
  }

  #file-button,
  #quiz-file-button {
    width: 100%;
  }
}

.error {
  background: var(--error-bg);
  color: var(--error-text);
  border-radius: 6px;
  padding: 12px;
  font-size: 0.85rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.results-panel {
  align-self: center;
  width: min(calc(100vw - 48px), 1320px);
}

.results-toolbar {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.toolbar-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.results-toolbar h2 {
  font-size: 1.1rem;
  margin: 0;
}

#usage-info {
  margin: 4px 0 0;
}

.results-panel .table-wrap {
  margin-top: 12px;
}

.results-panel table {
  min-width: 1120px;
  table-layout: fixed;
}

.results-panel th:nth-child(1),
.results-panel td:nth-child(1) {
  width: 72px;
}

.results-panel th:nth-child(2),
.results-panel td:nth-child(2) {
  width: 20%;
}

.results-panel th:nth-child(3),
.results-panel td:nth-child(3) {
  width: 13%;
}

.results-panel th:nth-child(4),
.results-panel td:nth-child(4) {
  width: 18%;
}

.results-panel th:nth-child(5),
.results-panel td:nth-child(5) {
  width: auto;
}

.results-panel th:nth-child(6),
.results-panel td:nth-child(6) {
  width: 132px;
}

.results-panel td:nth-child(6) {
  padding-left: 16px;
  padding-right: 20px;
}

th,
td {
  text-align: left;
  padding: 8px 12px;
  border-top: 1px solid var(--border);
  vertical-align: top;
}

td:first-child,
td:last-child {
  width: 1%;
  white-space: nowrap;
}

thead th {
  background: var(--surface-secondary);
  color: var(--text-muted);
  border-top: none;
}

.muted {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.italic {
  font-style: italic;
}

.table-wrap {
  background: var(--surface);
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.editable-cell {
  min-width: 0;
}

.vocabulary-field {
  color: var(--text-muted);
  display: grid;
  font-size: 0.72rem;
  font-weight: 600;
  gap: 5px;
  margin-bottom: 8px;
}

.vocabulary-field > span {
  display: block;
}

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

.vocabulary-editable {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 500;
  line-height: 1.35;
  min-height: 34px;
  min-width: 0;
  overflow-wrap: anywhere;
  padding: 7px 9px;
  white-space: pre-wrap;
  width: 100%;
}

.vocabulary-editable:focus {
  border-color: rgba(29, 95, 184, 0.55);
  box-shadow: 0 0 0 3px rgba(29, 95, 184, 0.12);
  outline: none;
}

.archive-panel {
  align-self: center;
  width: min(calc(100vw - 48px), 1320px);
}

.archive-header,
.archive-item-main,
.archive-actions {
  align-items: center;
  display: flex;
  gap: 14px;
  justify-content: space-between;
}

.archive-header h2 {
  font-size: 1.15rem;
  margin: 0 0 4px;
}

.reviewer-form {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
}

.reviewer-form input,
.archive-actions select {
  background: var(--surface-secondary);
  border: 1px solid var(--border);
  border-radius: 11px;
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  min-height: 42px;
  padding: 9px 12px;
  width: 100%;
}

.reviewer-form input:focus,
.archive-actions select:focus {
  border-color: rgba(29, 95, 184, 0.55);
  box-shadow: 0 0 0 3px rgba(29, 95, 184, 0.12);
  outline: none;
}

.archive-list {
  display: grid;
  gap: 10px;
}

.archive-item,
.archive-empty {
  background: var(--surface-secondary);
  border: 1px solid var(--border);
  border-radius: 14px;
  display: grid;
  gap: 14px;
  padding: 16px;
}

.archive-empty {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.archive-note {
  color: var(--text-muted);
  font-size: 0.86rem;
  margin: 0;
}

.archive-item h3 {
  font-size: 1rem;
  line-height: 1.25;
  margin: 0 0 4px;
}

.archive-item p {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin: 0;
}

.status-badge {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  flex: 0 0 auto;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 7px 11px;
}

.archive-actions {
  justify-content: flex-start;
}

.archive-actions select {
  max-width: 360px;
}

.course-select-wrap {
  align-items: center;
  color: var(--text-muted);
  display: flex;
  font-size: 0.82rem;
  font-weight: 600;
  gap: 8px;
}

.course-select-wrap select,
.course-select-wrap input {
  background: var(--surface-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font: inherit;
  min-height: 38px;
  padding: 6px 10px;
}

.course-select-wrap input {
  min-width: 200px;
}

.mine-toolbar {
  align-items: center;
  display: flex;
  gap: 10px;
  margin-bottom: 4px;
}

.mine-toolbar select {
  background: var(--surface-secondary);
  border: 1px solid var(--border);
  border-radius: 11px;
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  min-height: 42px;
  padding: 9px 12px;
}

.review-detail {
  color: var(--text-muted);
  display: grid;
  font-size: 0.82rem;
  gap: 2px;
}

.review-comment {
  background: var(--surface-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font: inherit;
  font-size: 0.85rem;
  min-height: 56px;
  padding: 8px 10px;
  width: 100%;
}

.archive-item.decision-changes_requested {
  border-color: rgba(214, 84, 46, 0.5);
}

.archive-item.decision-published {
  border-color: rgba(45, 148, 92, 0.5);
}

/* Fixed statt im normalen Fluss: die Login-/Passwort-Screens sind
   min-height:100vh, ohne "position: fixed" wuerde der Footer-Link erst nach
   Scrollen sichtbar (Alexander stiess genau darauf, u.a. bei "Stoerung
   melden" - der Link muss immer sichtbar sein, nicht erst nach Scrollen). */
.app-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  box-sizing: border-box;
  padding: 8px 24px;
  text-align: center;
  background: rgba(11, 37, 69, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.app-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  justify-content: center;
}

.app-footer a {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.82rem;
  text-decoration: none;
}

.app-footer a:hover {
  color: #fff;
  text-decoration: underline;
}

/* Druckansicht: nur sichtbar, wenn tatsächlich gedruckt wird (siehe @media print) */
#print-view {
  display: none;
}

@media print {
  @page {
    size: A4;
    margin: 18mm 14mm 32mm;
  }

  html,
  body {
    background: #fff;
  }

  body {
    margin: 0;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .no-print {
    display: none !important;
  }

  #print-view {
    display: block;
    padding: 0;
  }

  #print-title {
    font-size: 14pt;
    line-height: 1.2;
    margin: 0 0 12pt;
    break-after: avoid;
    page-break-after: avoid;
  }

  #print-list {
    display: block;
  }

  .print-vocabulary {
    box-sizing: border-box;
    overflow: visible;
    width: calc(100% - 4pt);
    font-size: 8.5pt;
    line-height: 1.3;
    padding-bottom: 4mm;
  }

  .print-vocabulary-header,
  .print-vocabulary-row {
    background-image:
      linear-gradient(#cfcfcf, #cfcfcf),
      linear-gradient(#cfcfcf, #cfcfcf);
    background-position: 27% 0, 55% 0;
    background-repeat: no-repeat;
    background-size: 0.5pt 100%, 0.5pt 100%;
    box-sizing: border-box;
    display: block;
    font-size: 0;
    position: relative;
    overflow: visible;
    width: 100%;
    break-inside: avoid-page;
    page-break-inside: avoid;
  }

  .print-vocabulary-header::after,
  .print-vocabulary-row::after {
    content: "";
    position: absolute;
    top: -0.5pt;
    right: 0;
    bottom: -0.5pt;
    width: 0.5pt;
    background: #cfcfcf;
  }

  .print-vocabulary-header {
    background-color: #f2f2f2;
    border: 0.5pt solid #cfcfcf;
    color: #333;
    font-weight: 600;
    break-after: avoid;
    page-break-after: avoid;
  }

  .print-vocabulary-row {
    background-color: #fff;
    border: 0.5pt solid #cfcfcf;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
  }

  .print-vocabulary-header > div,
  .print-vocabulary-row > div {
    box-sizing: border-box;
    display: inline-block;
    font-size: 8.5pt;
    min-width: 0;
    min-height: 100%;
    overflow: visible;
    overflow-wrap: anywhere;
    padding: 5pt 6pt;
    text-align: left;
    vertical-align: top;
    word-break: normal;
    hyphens: auto;
  }

  .print-vocabulary-header > div:nth-child(1),
  .print-vocabulary-row > div:nth-child(1) {
    width: 27%;
  }

  .print-vocabulary-header > div:nth-child(2),
  .print-vocabulary-row > div:nth-child(2) {
    width: 28%;
  }

  .print-vocabulary-header > div:nth-child(3),
  .print-vocabulary-row > div:nth-child(3) {
    width: 45%;
  }

  .print-word,
  .print-details,
  .print-example-de,
  .print-example-ru {
    display: block;
  }

  .print-word {
    font-weight: 600;
  }

  .print-details,
  .print-example-ru {
    color: #666;
    font-size: 7.3pt;
  }

  .print-example-ru {
    font-style: italic;
    margin-top: 2pt;
  }

  .print-quiz {
    color: #1d1d1f;
    font-size: 9.5pt;
    line-height: 1.38;
  }

  .print-quiz-meta {
    border-bottom: 0.5pt solid #cfcfcf;
    color: #666;
    font-size: 8pt;
    margin-bottom: 10pt;
    padding-bottom: 6pt;
  }

  .print-quiz-question {
    break-inside: avoid-page;
    page-break-inside: avoid;
    border: 0.5pt solid #d6d6d6;
    margin: 0 0 8pt;
    padding: 8pt;
  }

  .print-quiz-question h2,
  .print-answer-key h2 {
    font-size: 11pt;
    line-height: 1.25;
    margin: 0 0 5pt;
  }

  .print-quiz-instruction {
    color: #666;
    font-size: 8pt;
    margin: 0 0 5pt;
  }

  .print-quiz-prompt {
    font-size: 9.5pt;
    margin: 0 0 6pt;
  }

  .print-quiz-options {
    margin: 0;
    padding-left: 15pt;
  }

  .print-quiz-options li {
    margin: 0 0 3pt;
  }

  .print-answer-lines {
    display: grid;
    gap: 8pt;
    margin-top: 8pt;
  }

  .print-answer-lines span {
    border-bottom: 0.5pt solid #b8b8b8;
    display: block;
    height: 12pt;
  }

  .print-answer-key {
    break-before: page;
    page-break-before: always;
    font-size: 8.5pt;
  }

  .print-answer-key p {
    border-bottom: 0.5pt solid #e2e2e2;
    margin: 0;
    padding: 5pt 0;
  }

  .print-answer-key span {
    color: #666;
  }
}
