:root {
  --white: #ffffff;
  --ink: #1f1f1f;
  --muted: #666666;
  --bg: #f8f9fb;
  --card: #ffffff;
  --accent-blue: #4670b9;
  --accent-gold: #d79427;
  --accent-gold-light: #e8a940;
  --shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  --shadow-light: 0 8px 16px rgba(0, 0, 0, 0.06);
  --topbar-h: 90px;
  --sidenav-w: 200px;
}

html {
  scroll-behavior: smooth;
  height: 100%;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "DIN Pro", system-ui, sans-serif;
  color: var(--ink);
  background: linear-gradient(135deg, var(--white) 0%, #f3f5f9 100%);
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.page {
  padding: 32px 24px 56px;
  animation: rise 0.6s ease-out;
  min-width: 0;
  flex: 1;
  overflow-y: auto;
  height: 100%;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  padding: 12px 16px;
  background: var(--white);
  border-radius: 0;
  box-shadow: var(--shadow-light);
  border-bottom: 1px solid rgba(70, 112, 185, 0.12);
  flex-shrink: 0;
  z-index: 100;
}

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

.topbar-country-select {
  font-family: inherit;
  font-size: 0.82rem;
  padding: 6px 8px;
  height: 36px;
  min-width: 140px;
  border-radius: 6px;
}

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

.brand-mark {
  width: 180px;
  height: 64px;
  border-radius: 12px;
  background: var(--white);
  display: grid;
  place-items: center;
  padding: 4px;
  overflow: hidden;
  flex-shrink: 0;
}

.brand-mark img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.brand-title {
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
}

.brand-sub {
  color: var(--muted);
  font-size: 0.82rem;
}

.tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 12px;
  margin-left: auto;
}

.tab {
  border: 1px solid transparent;
  background: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
  font-weight: 600;
  color: var(--muted);
  transition: all 0.2s ease;
}

.tab.active {
  color: var(--white);
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  box-shadow: 0 8px 16px rgba(70, 112, 185, 0.25);
}

.layout-body {
  display: grid;
  grid-template-columns: var(--sidenav-w) 1fr;
  flex: 1;
  overflow: hidden;
  min-height: 0;
}

.sidenav {
  height: 100%;
  overflow-y: auto;
  padding: 20px 10px;
  border-right: 1px solid #e8e8e8;
  background: var(--white);
}

#sidenav-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidenav-link {
  display: block;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidenav-link:hover {
  background: #eef1f9;
  color: var(--accent-blue);
}

.sidenav-link.active {
  background: #e4eaf5;
  color: var(--accent-blue);
  font-weight: 600;
}

.main {
  margin-top: 28px;
}

.panel {
  display: none;
  padding: 24px;
  border-radius: 12px;
  background: var(--white);
  box-shadow: var(--shadow-light);
  border: 1px solid #e8e8e8;
}

.panel.active {
  display: block;
  animation: fadeIn 0.35s ease-out;
}

#tab-profile.panel.active {
  display: flex;
  flex-direction: column;
  height: clamp(680px, calc(100vh - 120px), 920px);
  min-height: 0;
  overflow: hidden;
}

.panel-title {
  padding: 16px 0 4px;
}

.panel-title h2 {
  margin: 0 0 4px;
  font-family: "DIN Pro", sans-serif;
}

.panel-title p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  padding: 12px 16px;
  margin: 10px -6px 16px;
  border: 1px solid #dde3ee;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(70, 112, 185, 0.08);
}

/* Profile-Panel nutzt overflow:hidden – sticky dort deaktivieren */
#tab-profile .panel-head {
  position: relative;
  top: auto;
}

.panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

#search-input {
  width: 320px;
}

#filter-country {
  margin-left: auto;
}

.browser-panel-head {
  flex-direction: row;
  align-items: center;
}

.browser-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

.browser-toolbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.browser-toolbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.input {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  background: var(--white);
  color: var(--ink);
}

.input:focus {
  outline: 2px solid rgba(70, 112, 185, 0.3);
  border-color: var(--accent-blue);
}

.btn {
  border: none;
  padding: 10px 16px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn.btn-sm {
  padding: 4px 10px;
  font-size: 12px;
  border-radius: 8px;
  font-weight: 500;
}

.btn.primary {
  background: var(--accent-blue);
  color: var(--white);
  box-shadow: 0 8px 16px rgba(70, 112, 185, 0.25);
}

.btn.primary:hover {
  background: #3858a0;
}

.btn.ghost {
  background: transparent;
  border: 1px solid #e0d1c6;
  color: var(--ink);
}

.btn.danger {
  background: #c0392b;
  color: #fff;
}

.btn.danger:hover {
  background: #a93226;
}

.btn-icon {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  color: var(--muted);
}

.btn-icon-danger:hover {
  color: #c0392b;
  background: rgba(192, 57, 43, 0.08);
}

.col-action {
  width: 40px;
  text-align: center;
}

.required {
  color: #c0392b;
  font-weight: 700;
}

.input.invalid {
  border-color: #c0392b;
  outline: 2px solid rgba(192, 57, 43, 0.2);
}

dialog.confirm-dialog {
  border: none;
  border-radius: 14px;
  padding: 28px 32px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.18);
  max-width: 420px;
  width: 100%;
}

dialog.confirm-dialog::backdrop {
  background: rgba(0, 0, 0, 0.35);
}

.confirm-dialog-message {
  font-size: 15px;
  margin: 0 0 24px;
  color: var(--ink);
  line-height: 1.5;
}

.confirm-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.table-wrap {
  margin-top: 24px;
  overflow: auto;
  border-radius: 10px;
  border: 1px solid #e0e0e0;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.table thead {
  background: #f3f5f9;
  border-bottom: 2px solid var(--accent-blue);
}

.table th,
.table td {
  padding: 12px 14px;
  border-bottom: 1px solid #f0f0f0;
  text-align: left;
  color: var(--ink);
}

.table tbody tr {
  cursor: pointer;
  transition: background 0.2s ease;
}

.table tbody tr:hover {
  background: #f8f9fb;
}

.pager {
  margin-top: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.pager-info {
  color: var(--muted);
}

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

.card-identity {
  grid-column: 1 / -1;
}

.card-address {
  grid-column: 1 / -1;
}

.card-geography {
  grid-column: 1 / -1;
  padding-bottom: 50px;
}

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

.identity-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.identity-col:last-child {
  align-items: stretch;
}

.identity-col:last-child .field {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.identity-col:last-child .textarea {
  flex: 1;
  min-height: auto;
  resize: none;
}

.identity-col h4 {
  margin: 0 0 8px;
  font-family: "DIN Pro", sans-serif;
  font-size: 14px;
  color: var(--accent-blue);
  font-weight: 600;
}

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

.address-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.address-col h4 {
  margin: 0 0 8px;
  font-family: "DIN Pro", sans-serif;
  font-size: 14px;
  color: var(--accent-blue);
  font-weight: 600;
}

.map-pane {
  position: relative;
  background: #f0f2f5;
  border: 1px solid #ddd;
  border-radius: 8px;
  height: 100%;
  min-height: 200px;
  overflow: hidden;
}

.map-message {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  padding: 12px;
  background: rgba(240, 242, 245, 0.9);
}

.card {
  background: var(--white);
  border-radius: 10px;
  padding: 18px;
  border: 1px solid #e8e8e8;
  box-shadow: var(--shadow-light);
  position: relative;
  scroll-margin-top: calc(var(--topbar-h) + 16px);
}

.card h3 {
  margin-top: 0;
  font-family: "DIN Pro", sans-serif;
  color: var(--accent-blue);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.geography-grid {
  grid-template-columns: repeat(3, 1fr);
  align-items: stretch;
  margin-bottom: 40px;
}

.geography-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 300px;
}

.geography-col:not(.geo-stack) .field {
  margin-top: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.geography-col:not(.geo-stack) .textarea {
  flex: 1;
}

.geo-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.geo-stack .field:first-child {
  flex: 0 0 auto;
}

.geo-stack .field:last-child {
  flex: 1;
}

.geography-grid .field {
  display: flex;
  flex-direction: column;
}

.card-geography .input,
.card-geography .textarea {
  font-family: "DIN Pro", system-ui, sans-serif;
  font-weight: 400;
}

.card-catalog .input,
.card-catalog .textarea,
.card-extracurriculars .textarea {
  font-family: "DIN Pro", system-ui, sans-serif;
  font-weight: 400;
}

.geo-textarea {
  resize: vertical;
}

.geo-compact {
  min-height: 90px;
  flex: 0 0 auto;
}

.geo-fill {
  min-height: 200px;
  flex: 1;
}

.bullet-textarea {
  white-space: pre-wrap;
}

.card-catalog {
  grid-column: 1 / -1;
  padding-bottom: 50px;
}

.card-extracurriculars {
  grid-column: 1 / -1;
  padding-bottom: 50px;
}

.catalog-grid {
  grid-template-columns: repeat(3, 1fr);
  align-items: stretch;
  gap: 12px;
}

.catalog-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 300px;
}

.catalog-col:first-child .field {
  display: flex;
  flex-direction: column;
}

.catalog-col:first-child .field:last-child {
  margin-top: auto;
  flex: 1;
}

.catalog-col:first-child .textarea {
  flex: 1;
}

.catalog-extraction {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.catalog-extraction .field {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.catalog-extraction .textarea {
  flex: 1;
}

.catalog-col:last-child .field {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.catalog-col:last-child .textarea {
  flex: 1;
}

.course-hidden-source {
  display: none;
}

.course-chip-editor {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  min-height: 0;
}

.course-chip-editor > .btn {
  width: 100%;
  justify-content: center;
}

.course-chip-list {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 8px;
  border: 1px solid #ddd;
  border-radius: 12px;
  background: var(--white);
  padding: 10px;
  flex: 1;
  min-height: 0;
  max-height: 300px;
  overflow-y: auto;
}

.course-chip-empty {
  font-size: 12px;
  color: var(--muted);
}

.course-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #e0e0e0;
  border-radius: 999px;
  background: #f3f5f9;
  color: var(--ink);
  padding: 4px 6px 4px 10px;
}

.course-chip-label {
  border: 0;
  background: transparent;
  color: inherit;
  font-family: "DIN Pro", system-ui, sans-serif;
  font-size: 13px;
  cursor: text;
  padding: 0;
}

.course-chip-remove {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
}

.course-chip-remove:hover {
  color: var(--ink);
}

/* Course box header with lang toggle */
.course-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.lang-toggle {
  display: flex;
  border: 1px solid #ddd;
  border-radius: 6px;
  overflow: hidden;
}

.lang-toggle-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: "DIN Pro", system-ui, sans-serif;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.lang-toggle-btn.active {
  background: var(--brand, #2563eb);
  color: #fff;
}

.lang-toggle-btn:not(.active):hover {
  background: #f0f0f0;
  color: var(--ink);
}

.course-chip-label--untranslated {
  opacity: 0.45;
  font-style: italic;
}

/* Add-course dialog fields */
.add-course-fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 12px 0 4px;
  min-width: 340px;
}

.course-chip-controls {
  display: flex;
  gap: 8px;
  width: 100%;
}

#grade11-course-add {
  margin-left: auto;
  align-self: flex-end;
}

.card-extracurriculars .catalog-col .field {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-extracurriculars .catalog-col .textarea {
  flex: 1;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}

.field-link {
  font-size: 12px;
  color: var(--accent-blue);
  text-decoration: none;
  font-weight: 600;
}

.field-link:hover {
  text-decoration: underline;
}

.field-link.disabled {
  color: #9aa3af;
  pointer-events: none;
  text-decoration: none;
}

/* All four "retrieved by" source attribution overlays share the same style */
.address-source,
.geo-source,
.catalog-source,
.extracurriculars-source {
  position: absolute;
  right: 16px;
  bottom: 12px;
  font-size: 11px;
  color: #8b93a1;
  text-align: right;
}

.textarea {
  flex: 1;
  min-height: 100px;
  resize: vertical;
}

.logo-preview {
  height: 160px;
  border-radius: 8px;
  background: #f8f9fb;
  border: 2px dashed var(--accent-gold);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.logo-preview img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.logo-placeholder {
  color: var(--muted);
  font-size: 14px;
}

.logo-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.hint {
  font-size: 12px;
  color: var(--muted);
}

.profile-grid {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.placeholder {
  background: #f8f9fb;
  border: 1px dashed var(--accent-gold);
  border-radius: 8px;
  padding: 16px;
  color: var(--muted);
}

/* ============================================================================
   Profile Generator Styles
   ============================================================================ */

.profile-workspace {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  flex: 1 1 auto;
  height: auto;
  margin-top: 20px;
  min-height: 0;
  overflow: hidden;
}

.profile-preview-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.profile-preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 4px;
  margin-bottom: 6px;
  flex-shrink: 0;
}

.profile-preview-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.btn-copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--primary);
  background: transparent;
  border: 1px solid var(--primary);
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  line-height: 1;
}

.btn-copy:hover:not(:disabled) {
  background: var(--primary);
  color: #fff;
}

.btn-copy:disabled {
  opacity: 0.35;
  cursor: default;
}

.btn-copy.copied {
  background: #16a34a;
  border-color: #16a34a;
  color: #fff;
}

.profile-save-status {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 12px;
  font-weight: 500;
  white-space: nowrap;
}
.profile-save-status.status-saved {
  color: #16a34a;
  background: #f0fdf4;
}
.profile-save-status.status-unsaved {
  color: #b45309;
  background: #fffbeb;
}
.profile-save-status.status-saving {
  color: #6b7280;
  background: #f3f4f6;
}

.profile-preview {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  background: var(--white);
  padding: 32px;
  border-radius: 10px;
  border: 1px solid #e8e8e8;
  box-shadow: var(--shadow-light);
}

.profile-placeholder {
  display: grid;
  place-items: center;
  height: 100%;
  color: var(--muted);
  text-align: center;
  font-size: 15px;
}

.profile-preview article {
  font-family: "DIN Pro", system-ui, sans-serif;
  line-height: 1.7;
  color: #1f2937;
}

.profile-preview article h2 {
  color: var(--accent-blue);
  font-size: 24px;
  margin-top: 24px;
  margin-bottom: 12px;
  font-weight: 600;
}

.profile-preview article h2:first-child {
  margin-top: 0;
}

.profile-preview article h3 {
  color: var(--accent-blue);
  font-size: 20px;
  margin-top: 20px;
  margin-bottom: 10px;
  font-weight: 600;
}

.profile-preview article p {
  margin: 12px 0;
}

.profile-preview article ul,
.profile-preview article ol {
  margin: 12px 0;
  padding-left: 24px;
}

.profile-preview article li {
  margin: 6px 0;
}

.profile-preview article strong {
  font-weight: 600;
  color: #111827;
}

.profile-preview article em {
  font-style: italic;
}

.profile-preview article section {
  margin-bottom: 24px;
}

.chat-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  background: var(--white);
  border-radius: 10px;
  border: 1px solid #e8e8e8;
  box-shadow: var(--shadow-light);
  overflow: hidden;
}

.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #e8e8e8;
  background: #f8f9fb;
}

.chat-header h3 {
  margin: 0;
  font-size: 18px;
  color: var(--accent-blue);
}

.chat-status {
  font-size: 12px;
  color: var(--muted);
  padding: 4px 10px;
  background: #e8e8e8;
  border-radius: 12px;
}

.chat-status.active {
  background: #d4edda;
  color: #155724;
}

.chat-messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chat-placeholder {
  display: grid;
  place-items: center;
  height: 100%;
  color: var(--muted);
  text-align: center;
  font-size: 14px;
  padding: 20px;
}

.chat-bubble {
  display: flex;
  flex-direction: column;
  max-width: 85%;
  animation: fadeIn 0.3s ease;
}

.chat-bubble.user {
  align-self: flex-end;
}

.chat-bubble.assistant {
  align-self: flex-start;
}

.chat-bubble-header {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  color: var(--muted);
}

.chat-bubble.user .chat-bubble-header {
  text-align: right;
  color: var(--accent-blue);
}

.chat-bubble.assistant .chat-bubble-header {
  color: var(--accent-gold);
}

.chat-bubble-content {
  padding: 12px 16px;
  border-radius: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.chat-bubble.user .chat-bubble-content {
  background: var(--accent-blue);
  color: var(--white);
  border-top-right-radius: 4px;
}

.chat-bubble.assistant .chat-bubble-content {
  background: #f8f9fb;
  color: #1f2937;
  border: 1px solid #e8e8e8;
  border-top-left-radius: 4px;
}

.chat-input-area {
  padding: 16px;
  border-top: 1px solid #e8e8e8;
  background: var(--white);
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-shrink: 0;
}

.chat-input-area textarea {
  flex: 1;
  resize: none;
  min-height: 60px;
  max-height: 120px;
  font-family: "DIN Pro", system-ui, sans-serif;
}

.chat-input-area button {
  flex-shrink: 0;
  height: 60px;
}

.chat-model-hint {
  padding: 0 16px 12px;
  font-size: 11px;
  line-height: 1.4;
  color: var(--muted);
}

.typing-indicator {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  padding: 12px 16px;
}

.typing-indicator small {
  margin-left: 6px;
  color: var(--muted);
  font-size: 12px;
}

.typing-indicator span {
  width: 8px;
  height: 8px;
  background: var(--muted);
  border-radius: 50%;
  animation: typing 1.4s infinite;
}

.typing-indicator span:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typing {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.5;
  }
  30% {
    transform: translateY(-10px);
    opacity: 1;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

  .sidenav {
    display: none;
  }

  .page {
    height: auto;
    overflow-y: visible;
  }

  body {
    height: auto;
    overflow: auto;
  }

  #tab-profile.panel.active {
    height: auto;
    overflow: visible;
  }

  .topbar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .tabs {
    flex-wrap: wrap;
  }

  .panel-actions {
    width: 100%;
  }

  .profile-workspace {
    grid-template-columns: 1fr;
    height: auto;
  }
  
  .profile-preview-container,
  .chat-panel {
    min-height: 500px;
  }
}
/* ============================================================================
   PICTURES GALLERY
   ============================================================================ */

.card-pictures {
  grid-column: 1 / -1;
}

.card-internes {
  grid-column: 1 / -1;
  min-height: 120px;
}

.card-berichte {
  grid-column: 1 / -1;
  min-height: 120px;
}

.card-visits {
  grid-column: 1 / -1;
  min-height: 120px;
}

.card-placeholder {
  color: var(--muted);
  font-size: 14px;
  font-style: italic;
  margin: 8px 0 0;
}

.pictures-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}

.picture-item {
  background: var(--white);
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.2s ease;
  cursor: pointer;
}

.picture-item:hover {
  box-shadow: 0 4px 12px rgba(70, 112, 185, 0.15);
  border-color: var(--accent-blue);
  transform: translateY(-2px);
}

.picture-item-image {
  width: 100%;
  height: 140px;
  background: linear-gradient(135deg, #f0f4f8 0%, #e0e8f0 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-size: 12px;
  color: var(--muted);
}

.picture-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.picture-item-info {
  padding: 10px;
  font-size: 12px;
}

.picture-item-category {
  background: #f0f4f8;
  color: var(--accent-blue);
  padding: 3px 6px;
  border-radius: 3px;
  display: inline-block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 11px;
}

.picture-item-meta {
  color: var(--muted);
  font-size: 11px;
  margin: 4px 0;
  word-break: break-word;
}

.picture-item-meta-small {
  color: #999;
  font-size: 10px;
  margin-top: 4px;
}

.picture-item-actions {
  display: flex;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid #f0f0f0;
  margin-top: 8px;
}

.picture-item-actions button {
  flex: 1;
  padding: 4px 6px;
  font-size: 11px;
  border: 1px solid #e0e0e0;
  background: var(--white);
  color: var(--ink);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.picture-item-actions button:hover {
  background: #f8f9fb;
  border-color: var(--accent-blue);
  color: var(--accent-blue);
}

.picture-item-actions .btn-delete {
  background: #fef0f0;
  color: #d32f2f;
  border-color: #ffccc2;
}

.picture-item-actions .btn-delete:hover {
  background: #ffccc2;
  border-color: #d32f2f;
  color: #b71c1c;
}

.gallery-stats {
  font-size: 13px;
  color: var(--muted);
  padding: 8px 12px;
  background: #f8f9fb;
  border-radius: 6px;
  display: inline-block;
}

.gallery-stats strong {
  color: var(--accent-blue);
  font-weight: 600;
}

.pictures-empty {
  background: #f8f9fb;
  border: 1px dashed #d0d0d0;
  border-radius: 8px;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}

.pictures-source {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #f0f0f0;
  font-size: 11px;
  color: #999;
}

/* Upload Modal */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: var(--white);
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-header {
  padding: 20px;
  border-bottom: 1px solid #e8e8e8;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, #f8f9fb 0%, #f0f4f8 100%);
}

.modal-header h3 {
  margin: 0;
  color: var(--accent-blue);
  font-size: 18px;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s ease;
}

.modal-close:hover {
  color: var(--ink);
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid #e8e8e8;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.form-field {
  margin-bottom: 18px;
}

.form-field label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 13px;
  color: var(--accent-blue);
}

.form-field input[type="file"],
.form-field input[type="text"],
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  font-family: inherit;
  font-size: 13px;
  color: var(--ink);
  background: var(--white);
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(70, 112, 185, 0.1);
}

.form-field textarea {
  resize: vertical;
  min-height: 80px;
}

.preview-image {
  width: 100%;
  max-height: 240px;
  margin-top: 10px;
  border-radius: 6px;
  object-fit: contain;
  border: 1px solid #e0e0e0;
}

/* ============================================================
   EXPORT TAB
   ============================================================ */
.export-workspace {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px 0;
}

.export-status-bar {
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
}
.export-status-bar.status-ok {
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #bbf7d0;
}
.export-status-bar.status-warn {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}

.export-section {
  padding: 20px 0 4px;
  border-top: 1px solid #ebebeb;
}

.export-section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.export-slot-hint {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}

/* Template cards */
.export-template-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.export-template-card {
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  padding: 14px 18px;
  cursor: pointer;
  min-width: 200px;
  transition: border-color 0.15s, box-shadow 0.15s;
  background: #fafafa;
}
.export-template-card:hover {
  border-color: var(--accent-blue);
}
.export-template-card.selected {
  border-color: var(--accent-blue);
  background: #f0f4ff;
  box-shadow: 0 0 0 3px rgba(30,74,146,0.1);
}
.export-template-card-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-blue);
  margin-bottom: 4px;
}
.export-template-card-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

/* Slot labels */
.export-slot-list {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.export-slot-badge {
  background: #e8edf5;
  color: var(--accent-blue);
  border-radius: 16px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}
.export-slot-badge .slot-num {
  background: var(--accent-blue);
  color: #fff;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  font-size: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Picture selection grid */
.export-pictures-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
}

.export-pic-card {
  position: relative;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.15s;
  aspect-ratio: 4/3;
}
.export-pic-card:hover {
  border-color: #aabbd6;
}
.export-pic-card.selected {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(30,74,146,0.15);
}
.export-pic-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.export-pic-slot-badge {
  position: absolute;
  top: 5px;
  left: 5px;
  background: var(--accent-blue);
  color: #fff;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 11px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
}
.export-pic-card-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0,0,0,0.45);
  color: #fff;
  font-size: 9px;
  padding: 2px 4px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.export-empty {
  color: var(--muted);
  font-size: 13px;
  padding: 12px 0;
}

/* Actions row */
.export-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

/* Preview iframe */
.export-preview-frame {
  width: 100%;
  height: 900px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fff;
}

@media (max-width: 768px) {
  .pictures-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
  }

  .picture-item-image {
    height: 120px;
  }

  .modal {
    width: 95%;
  }
}

/* ============================================================
   RM TABLE (Internes-Card)
   ============================================================ */

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

/* ── Geo KI-Update progress ────────────────────────────────── */
.geo-refresh-bar {
  height: 3px;
  border-radius: 2px;
  background: transparent;
  overflow: hidden;
  margin: -10px 0 4px;
}
.geo-refresh-bar.active {
  background: var(--color-bg-input, #e5e7eb);
}
.geo-refresh-bar.active::after {
  content: "";
  display: block;
  height: 100%;
  width: 40%;
  background: var(--color-accent, #2563eb);
  border-radius: 2px;
  animation: geo-shimmer 1.4s ease-in-out infinite;
}
@keyframes geo-shimmer {
  0%   { transform: translateX(-150%); }
  100% { transform: translateX(350%); }
}
.geo-refresh-status {
  font-size: 0.78rem;
  color: var(--color-text-muted, #6b7280);
  margin: 0 0 8px;
  min-height: 1em;
  transition: color 0.2s;
}
.geo-refresh-status.error   { color: #dc2626; }
.geo-refresh-status.success { color: #16a34a; }
@keyframes geo-field-flash {
  0%   { background-color: #fef9c3; }
  100% { background-color: transparent; }
}
.geo-flash { animation: geo-field-flash 1.4s ease-out; }

.rm-table-wrap {
  overflow-x: auto;
  border-radius: 10px;
  border: 1px solid #dde3ee;
}

.rm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: var(--white);
}

.rm-table thead {
  background: var(--bg);
}

.rm-table th {
  padding: 10px 12px;
  font-weight: 600;
  color: var(--muted);
  text-align: left;
  border-bottom: 1px solid #dde3ee;
  white-space: nowrap;
}

.rm-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #f0f2f7;
  vertical-align: top;
}

.rm-table tbody tr:last-child td {
  border-bottom: none;
}

.rm-table tbody tr:hover td {
  background: var(--bg);
}

.rm-col-date   { width: 90px;  white-space: nowrap; }
.rm-col-cat    { width: 110px; white-space: nowrap; }
.rm-col-user   { width: 130px; white-space: nowrap; }
.rm-col-comment { }  /* fluid — nimmt restlichen Platz */
.rm-col-file   { width: 70px;  text-align: center; }
.rm-col-action { width: 44px; text-align: center; }

td.rm-col-action { vertical-align: middle; }

td.rm-col-comment {
  white-space: pre-wrap;
  word-break: break-word;
  max-width: 0;           /* zwingt den Text, sich auf den verfügbaren Raum zu beschränken */
  line-height: 1.5;
}

td.rm-col-file a {
  color: var(--accent-blue);
  text-decoration: none;
  font-size: 16px;
}

td.rm-col-file a:hover {
  text-decoration: underline;
}

.visit-col-date     { width: 90px;  white-space: nowrap; }
.visit-col-location { width: 130px; white-space: nowrap; }
.visit-col-school   { width: 160px; white-space: nowrap; }
.visit-col-ate      { width: 130px; white-space: nowrap; }
.visit-col-mom      { min-width: 220px; }
.visit-col-doc      { width: 70px;  text-align: center; }
.visit-col-action   { width: 64px;  text-align: center; }

td.visit-col-action { vertical-align: middle; }

td.visit-col-mom {
  white-space: pre-wrap;
  word-break: break-word;
  max-width: 0;
  line-height: 1.5;
}

td.visit-col-doc a {
  color: var(--accent-blue);
  text-decoration: none;
  font-size: 16px;
}

td.visit-col-doc a:hover {
  text-decoration: underline;
}

.rm-empty {
  text-align: center;
  color: var(--muted);
  padding: 28px 12px;
  font-size: 13px;
}

/* Wider dialog for RM form (comment textarea needs space) */
dialog.add-rm-dialog {
  width: min(600px, 95vw);
}

.rm-comment-large {
  min-height: 120px;
  resize: vertical;
}

/* ============================================================
   Agent Tab
   ============================================================ */

.agent-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 0 16px;
  flex-wrap: wrap;
}

.agent-session-select {
  flex: 1;
  min-width: 200px;
  max-width: 480px;
}

.btn.ghost.danger {
  background: transparent;
  color: var(--danger, #c0392b);
  border-color: var(--danger, #c0392b);
}
.btn.ghost.danger:hover {
  background: var(--danger, #c0392b);
  color: #fff;
}

.agent-chat {
  flex: 1;
  min-height: 300px;
  max-height: 55vh;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--surface, #fafafa);
  margin-bottom: 12px;
}

.agent-bubble {
  max-width: 78%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.5;
  word-break: break-word;
}

/* Agent bubble — markdown prose */
.agent-bubble-agent {
  align-self: flex-start;
  background: var(--card-bg, #fff);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
  /* Remove pre-wrap here — markdown renderer handles whitespace */
}

/* Markdown content inside agent bubbles */
.agent-bubble-agent p          { margin: 0 0 0.6em; }
.agent-bubble-agent p:last-child { margin-bottom: 0; }
.agent-bubble-agent ul,
.agent-bubble-agent ol         { margin: 0.3em 0 0.6em 1.4em; padding: 0; }
.agent-bubble-agent li         { margin-bottom: 0.15em; }
.agent-bubble-agent h1,
.agent-bubble-agent h2,
.agent-bubble-agent h3         { margin: 0.6em 0 0.3em; font-size: 1em; font-weight: 600; }
.agent-bubble-agent h1         { font-size: 1.1em; }
.agent-bubble-agent code       { background: #f0f0f0; border-radius: 3px; padding: 1px 4px;
                                  font-size: 0.88em; font-family: ui-monospace, monospace; }
.agent-bubble-agent pre        { background: #f4f4f8; border-radius: 6px; padding: 10px 12px;
                                  overflow-x: auto; margin: 0.5em 0; }
.agent-bubble-agent pre code   { background: none; padding: 0; }
.agent-bubble-agent table      { border-collapse: collapse; margin: 0.5em 0; font-size: 13px;
                                  width: 100%; }
.agent-bubble-agent th         { background: var(--surface, #f5f5f5); font-weight: 600;
                                  text-align: left; }
.agent-bubble-agent th,
.agent-bubble-agent td         { border: 1px solid var(--border); padding: 5px 10px; }
.agent-bubble-agent blockquote { border-left: 3px solid var(--border); margin: 0.4em 0;
                                  padding-left: 10px; color: var(--muted); }
.agent-bubble-agent a          { color: var(--primary, #007aff); }
.agent-bubble-agent hr         { border: none; border-top: 1px solid var(--border); margin: 0.5em 0; }

/* Non-agent bubbles keep pre-wrap for plain text */
.agent-bubble-user,
.agent-bubble-system,
.agent-bubble-error            { white-space: pre-wrap; }

.agent-bubble-user {
  align-self: flex-end;
  background: var(--primary, #007aff);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.agent-bubble-system {
  align-self: center;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-style: italic;
}

.agent-bubble-error {
  align-self: flex-start;
  background: #fff0f0;
  border: 1px solid #ffb3b3;
  color: #c0392b;
  border-bottom-left-radius: 4px;
}

/* ─── Turn container ───────────────────────────────────── */
.agent-turn {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ─── Unified activity log ────────────────────── */
.agent-activity {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card-bg, #fff);
  font-size: 13px;
  overflow: hidden;
}

.agent-activity-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  background: var(--surface, #f8f8f8);
  font-weight: 500;
  font-size: 13px;
  color: var(--text, #333);
}
.agent-activity-summary::-webkit-details-marker { display: none; }

/* Status dot in summary */
.agent-activity-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #6b7280;
  flex-shrink: 0;
  transition: background 0.3s;
}
.agent-activity.streaming .agent-activity-dot {
  background: #a855f7;
  animation: activity-pulse 1.2s ease-in-out infinite;
}
@keyframes activity-pulse {
  0%, 100% { opacity: 1;   transform: scale(1); }
  50%       { opacity: 0.3; transform: scale(0.7); }
}
.agent-activity.done  .agent-activity-dot { background: #16a34a; }
.agent-activity.error .agent-activity-dot { background: #dc2626; }

.agent-activity-label { flex: 1; }

.agent-activity-body { padding: 2px 0; }

/* ── Thinking section inside activity log ────────────── */
.agent-activity-thinking {
  position: relative;
  padding: 8px 14px 8px 38px;
  font-size: 12.5px;
  color: #7c3aed;
  font-style: italic;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  border-bottom: 1px solid #ede9fe;
}
.agent-activity-thinking::before {
  content: "💭";
  position: absolute; left: 13px; top: 8px;
  font-style: normal; font-size: 13px;
}

/* ── Tool step row inside activity log ─────────────── */
.agent-activity-step {
  padding: 7px 14px;
  border-bottom: 1px solid var(--border);
}
.agent-activity-step:last-child { border-bottom: none; }

.agent-activity-step-header {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.agent-activity-step-label {
  font-weight: 500;
  font-size: 13px;
}

.agent-activity-step-args {
  color: var(--muted, #888);
  font-size: 12px;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.agent-activity-step-status {
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
  min-width: 16px;
  text-align: center;
}
.agent-activity-step-status.pending { color: #d97706; }
.agent-activity-step-status.ok      { color: #16a34a; }
.agent-activity-step-status.error   { color: #dc2626; }

.agent-activity-step-result {
  font-size: 12px;
  color: var(--muted, #666);
  margin-top: 2px;
  padding-left: 2px;
}
.agent-activity-step-result.error { color: #dc2626; }

/* Input row */
.agent-input-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.agent-input {
  flex: 1;
  resize: vertical;
  min-height: 62px;
  font-size: 14px;
}

.agent-send-btn {
  align-self: flex-end;
  padding: 10px 22px;
  flex-shrink: 0;
}

.agent-abort-btn {
  align-self: flex-end;
  padding: 10px 16px;
  flex-shrink: 0;
}

/* Status bar */
.agent-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  padding: 6px 0 2px;
}

.agent-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid var(--border);
  border-top-color: var(--primary, #007aff);
  border-radius: 50%;
  animation: agent-spin 0.7s linear infinite;
  flex-shrink: 0;
}

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

/* ============================================================
   Login Overlay
   ============================================================ */

.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--white) 0%, #f3f5f9 100%);
}

.login-overlay[hidden] {
  display: none;
}

.login-card {
  background: var(--card);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 40px 36px 32px;
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 8px;
}

.login-logo {
  width: 48px;
  height: 48px;
}

.login-brand-text .brand-title {
  font-size: 1.3rem;
}

.login-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 500;
}

.login-label .input {
  font-size: 0.95rem;
  padding: 10px 12px;
}

.login-error {
  color: #c0392b;
  font-size: 0.85rem;
  padding: 8px 12px;
  background: #fdecea;
  border-radius: 6px;
}

.login-submit {
  margin-top: 4px;
  padding: 12px;
  font-size: 0.95rem;
}

/* User display & logout in topbar */

.user-display {
  font-size: 0.82rem;
  color: var(--muted);
  white-space: nowrap;
}

.logout-btn {
  font-size: 0.82rem;
  padding: 4px 10px;
}
