/* Design-Tokens aus docs/design.md (Richtung A „Wochenplan“) */
:root {
  --bg: #FFFFFF;
  --bg-subtle: #FAFBFC;
  --surface-muted: #F1F3F6;
  --line: #E6E8EC;
  --line-strong: #E1E4E9;
  --ink: #1B1E25;
  --ink-2: #3B404B;
  --muted: #646B78;
  --faint: #8A909C;
  --accent: #2F5BD8;
  --accent-ink: #2A4FBF;
  --accent-soft: #EAF0FD;
  --accent-wash: #F3F6FE;
  --lecture: #E9ECF1;
  --lecture-ink: #454B57;
  --shift: #1F7A50;
  --ok-soft: #E3F3EA;
  --ok-ink: #1F6E48;
  --conflict: #C8402F;
  --part-soft: #FCF0DE;
  --part-ink: #8F4C0A;
  --part-dot: #C77A1E;

  --radius-chip: 6px;
  --radius-control: 8px;
  --radius-row: 10px;
  --radius-panel: 12px;
  --radius-pill: 16px;

  /* Abstände im 4-px-Raster */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;

  --font: "Inter", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

/* Kopfzeile */
.site-header {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 60px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

/* Logo statt Text-Wortmarke (#27), skaliert über die Höhe */
.wordmark {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.wordmark img {
  display: block;
  height: 34px;
  width: auto;
}

.main-nav {
  display: flex;
  gap: 4px;
  overflow-x: auto; /* fünf Einträge passen auf dem Handy nicht immer, dann scrollt nur die Navigation (#140) */
  scrollbar-width: none;
}

.main-nav a,
.main-nav span {
  padding: 6px 12px;
  border-radius: var(--radius-control);
  color: var(--ink-2);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap; /* „Gemerkt · 2“ bleibt auf einer Zeile (#124) */
}

.main-nav span {
  color: var(--faint);
  cursor: default;
}

.main-nav a:hover {
  background: var(--surface-muted);
}

.main-nav a[aria-current="page"] {
  background: var(--surface-muted);
  color: var(--ink);
}

.search {
  flex: 1;
  min-width: 160px; /* sonst schrumpft die Suche bei mittlerer Breite zu einem leeren Kästchen (#124) */
  max-width: 360px;
  margin-left: auto;
}

.search input {
  width: 100%;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  font: inherit;
  color: var(--ink);
  background: var(--bg);
}

.search input::placeholder {
  color: var(--faint);
}

.profile-button {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  text-decoration: none;
}

.avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-weight: 600;
}

.profile-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  white-space: nowrap;
}

.profile-name {
  font-weight: 600;
}

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

/* Rolle in der Kopfzeile (#150): kleine Pille, Firmenkonten zusätzlich mit feinem Streifen oben. */
.role-badge {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}

.role-badge-company {
  background: var(--ink);
  color: var(--bg);
}

.site-header-company {
  box-shadow: inset 0 3px 0 var(--accent);
}

.login-link {
  margin-left: auto;
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  color: var(--ink-2);
  font-weight: 500;
  text-decoration: none;
}

.search + .login-link {
  margin-left: 0;
}

/* Abmelden neben dem Profil-Knopf (#118), sieht aus wie „Anmelden“. */
.logout-header {
  margin: 0;
}

.logout-button {
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  background: none;
  color: var(--ink-2);
  font: inherit;
  font-weight: 500;
  cursor: pointer;
}

.logout-button:hover {
  border-color: var(--ink-2);
  color: var(--ink);
}

/* Mittlere Breite (#124): engere Abstände, beim Profil nur der Avatar (Name steht im Tooltip). */
@media (max-width: 1180px) {
  .site-header {
    gap: 16px;
  }

  .profile-text {
    display: none;
  }
}

/* Schmaler Desktop (#124): Navigation in die zweite Zeile wie auf dem Handy, die Suche bleibt oben. */
@media (min-width: 721px) and (max-width: 1000px) {
  .site-header {
    flex-wrap: wrap;
    height: auto;
    gap: 8px 16px;
    padding: 10px 24px;
  }

  .main-nav {
    order: 3;
    width: 100%;
  }
}

/* Handy: Wortmarke und Profil oben, Navigation darunter, Suche ausgeblendet */
@media (max-width: 720px) {
  .site-header {
    flex-wrap: wrap;
    height: auto;
    gap: 8px 16px;
    padding: 10px 16px;
  }

  .search,
  .profile-text {
    display: none;
  }

  /* Hinweis, Profil und Abmelden passen so in die erste Zeile (#124). */
  .site-header {
    column-gap: 10px;
  }

  .alert-hint-long {
    display: none;
  }

  .logout-button {
    padding: 0 10px;
  }

  /* Die Suche ist hier nur ausgeblendet, steht aber noch davor: deshalb auch .search + .login-link. */
  .profile-button,
  .login-link,
  .search + .login-link {
    margin-left: auto;
  }

  .main-nav {
    order: 3;
    width: 100%;
  }

  .wordmark img {
    height: 28px;
  }

  /* Klickflächen auf dem Handy mindestens 44 px hoch (docs/design.md) */
  .main-nav a,
  .wordmark,
  .profile-button,
  .login-link,
  .logout-button {
    display: flex;
    align-items: center;
    min-height: 44px;
  }
}

/* Zweispaltiges Layout: Liste links, Detail rechts */
.split {
  display: grid;
  grid-template-columns: minmax(380px, 440px) 1fr;
  min-height: calc(100vh - 61px);
}

.split-detail {
  min-width: 0;
}

.split-placeholder {
  display: grid;
  place-items: center;
  color: var(--muted);
}

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

  .split-placeholder {
    display: none;
  }
}

/* Stellenliste */
.job-list {
  padding: 24px 20px;
  border-right: 1px solid var(--line);
  background: var(--bg-subtle);
}

.job-list-heading {
  margin: 0 0 16px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

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

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: var(--bg);
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}

.chip:hover {
  border-color: var(--faint);
}

.chip.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--bg);
}

/* Suchfilter (#71): aufklappbar unter den Chips. */
/* Abstand vor dem ✕ in entfernbaren Filter-Chips (inline-flex verschluckt das Leerzeichen). */
.chip [aria-hidden="true"] {
  margin-left: 6px;
}

.filter-panel {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--bg);
}

.filter-panel summary {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  font-weight: 600;
  cursor: pointer;
}

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

.filter-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 13px;
  font-weight: 500;
}

.filter-field small {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}

.filter-field legend {
  margin-bottom: 4px;
  padding: 0;
}

.filter-field input {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  font: inherit;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}

.filter-field legend {
  width: 100%;
}

/* Schieberegler: Bezeichnung links, aktueller Wert rechts darüber. */
.filter-slider-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.filter-slider-head output {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--accent-ink);
  white-space: nowrap;
}

.filter-field input[type="range"] {
  padding: 0;
  border: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.filter-range {
  grid-column: 1 / -1;
}

.filter-range-inputs {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 8px 12px;
}

.filter-range-inputs label {
  color: var(--muted);
}

.filter-form .button {
  grid-column: 1 / -1;
  justify-self: start;
}

@media (max-width: 720px) {
  .filter-panel summary,
  .filter-field input,
  .filter-form .button {
    min-height: 44px;
  }

  .filter-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .filter-range-inputs {
    grid-template-columns: auto minmax(0, 1fr);
  }
}

.job-list-meta {
  display: flex;
  justify-content: space-between;
  margin: 20px 0 8px;
  font-size: 13px;
  color: var(--muted);
}

/* Job-Alerts (#34): Hinweis in der Kopfzeile und Liste der Alerts. */
.alert-hint {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
}

.alert-save {
  margin: 0 0 8px;
}

.alert-list {
  display: grid;
  gap: 12px;
  padding: 0;
  list-style: none;
}

.alert-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

/* Umschalter „Passt am besten · Effektiver Lohn“ (#42). */
.sort-links a {
  color: var(--muted);
}

.sort-links a.is-active {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.job-list-meta strong {
  color: var(--ink);
  font-weight: 600;
}

.job-rows {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.job-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 12px;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: var(--radius-row);
  text-decoration: none;
}

.job-row:hover {
  background: var(--bg);
  border-color: var(--line);
}

.job-row.is-selected {
  background: var(--bg);
  border-color: var(--accent);
}

.job-row-title {
  font-weight: 600;
}

.job-row-wage {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.job-row-meta,
.job-row-gross {
  font-size: 13px;
  color: var(--muted);
}

.job-row-gross {
  font-variant-numeric: tabular-nums;
  text-align: right;
}

/* Passung: Punkt und Text unter der Zeile (Farbe heißt Zustand, docs/design.md) */
.job-row-fit {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
}

.fit-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.fit-passt { color: var(--ok-ink); }
.fit-teilweise { color: var(--part-ink); }
.fit-teilweise .fit-dot { background: var(--part-dot); }
.fit-kollidiert { color: var(--conflict); }
.fit-flexibel { color: var(--accent-ink); }

/* „2 von 3 Anforderungen aus dem Studium“, über die ganze Zeilenbreite. */
.job-row-skills {
  grid-column: 1 / -1;
  font-size: 12px;
  color: var(--muted);
}

/* „✓ Du kannst diesen Job“ (#86): grün, wenn alles gelernt; blau, wenn der Rest noch im Studium kommt. */
.fit-badge {
  justify-self: start;
  grid-column: 1 / -1;
  width: fit-content;
  margin: 0;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--ok-soft);
  color: var(--ok-ink);
}

.fit-badge-bald {
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.job-detail-head .fit-badge {
  margin-top: 8px;
  font-size: 13px;
}

.fit-badge-detail {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.job-list-empty {
  padding: 24px 0;
  color: var(--muted);
}

@media (max-width: 720px) {
  .job-list {
    padding: 20px 16px;
    border-right: 0;
  }

  .chip {
    min-height: 44px;
  }
}

/* Stellendetail */
@media (max-width: 900px) {
  .split-has-detail .job-list {
    display: none;
  }
}

/* Desktop: die Liste scrollt neben dem Detail für sich, damit die geöffnete Stelle sichtbar bleibt. */
@media (min-width: 901px) {
  .split-has-detail .job-list {
    position: sticky;
    top: 0;
    align-self: start;
    /* Feste Höhe statt max-height: Bei kurzen Listen (Gemerkt, #127) reicht der graue Hintergrund bis unten. */
    height: 100vh;
    overflow-y: auto;
  }
}

.job-detail {
  padding: 28px 32px 48px;
}

.back-link {
  display: none;
  margin-bottom: 16px;
  color: var(--muted);
  text-decoration: none;
}

.job-detail-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tag {
  padding: 3px 8px;
  border-radius: var(--radius-chip);
  background: var(--surface-muted);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 500;
}

/* Skill, den die Studentin schon hat (aus Modul oder Profil), siehe docs/design.md „Qualifikation“. */
.tag-learned {
  background: var(--accent-soft);
  color: var(--accent-ink);
}

/* Skill kommt laut Lehrplan in einem späteren Semester: grau mit „ab 3. Semester“. */
.tag-upcoming {
  color: var(--ink-2);
}

/* Skill kommt im Studium nicht vor: grau und zurückgenommen, nur der Name. */
.tag-missing {
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 2px 7px;
  color: var(--muted);
}

.job-title {
  margin: 12px 0 4px;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.job-company {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--muted);
}

/* Firmenlogo (#73): Bild oder Initialen in der Akzentfarbe. Klein in der Listenzeile, groß im Stellendetail. */
.company-logo {
  flex: none;
  border-radius: var(--radius-chip);
  object-fit: contain;
  vertical-align: middle;
}

.company-logo-small {
  width: 20px;
  height: 20px;
  margin-right: 6px;
}

.company-logo-large {
  width: 48px;
  height: 48px;
}

.company-logo-initials {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-weight: 700;
  line-height: 1;
}

.company-logo-small.company-logo-initials {
  font-size: 10px;
}

.company-logo-large.company-logo-initials {
  font-size: 18px;
}

/* Karten-Popup: Logo links neben Titel und Firma. */
.map-popup-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.job-actions {
  display: flex;
  gap: 8px;
}

/* Das Formular um „Merken“ (#13) soll das Flex-Layout der Knöpfe nicht stören. */
.save-form {
  display: contents;
}

.button {
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  background: var(--bg);
  color: var(--ink-2);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.button-primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

/* Knopf als Link (z. B. „Neue Mail anfordern“): sonst bleibt er inline und min-height greift nicht (#97). */
a.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

/* Klickflächen auf dem Handy mindestens 44 px (docs/design.md, #97). */
@media (max-width: 720px) {
  .button {
    min-height: 44px;
  }
}

.tabs {
  display: inline-flex;
  gap: 2px;
  margin: 24px 0;
  padding: 3px;
  border-radius: 9px;
  background: var(--surface-muted);
}

.tabs a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 7px;
  color: var(--muted);
  font-weight: 500;
  text-decoration: none;
}

.tabs a[aria-current="page"] {
  background: var(--bg);
  color: var(--ink);
  box-shadow: 0 1px 2px rgb(27 30 37 / 0.08);
}

/* Der Punkt zeigt die Passung (#9); ohne Login bleibt er grau. */
.tab-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--faint);
}

.tab-dot.fit-passt { background: var(--shift); }
.tab-dot.fit-teilweise { background: var(--part-dot); }
.tab-dot.fit-kollidiert { background: var(--conflict); }
.tab-dot.fit-flexibel { background: var(--accent); }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.details-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 32px;
}

.details-main h2,
.details-side h2 {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 600;
}

.details-main section + section {
  margin-top: 24px;
}

.details-main p {
  margin: 0;
  color: var(--ink-2);
}

.details-main .fair-box {
  margin-top: 24px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
}

.panel {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
}

.facts {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 16px;
  margin: 0;
}

.facts dt {
  color: var(--muted);
}

.facts dd {
  margin: 0;
  text-align: right;
}

/* Lohnrechnung: vier Felder, effektiver Lohn hellblau */
.wage-calc {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin-top: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--line);
}

.wage-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px;
  background: var(--bg);
}

.wage-field-effective {
  background: var(--accent-wash);
}

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

.wage-field-effective .wage-label {
  color: var(--accent-ink);
}

.wage-value {
  font-size: 18px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

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

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

/* Social Media der Firma und Sharepic (#37) */
.share-links {
  margin-top: 16px;
  font-size: 13px;
}

.share-links p {
  margin: 0;
}

.link-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 0 0 8px;
  padding: 0;
  list-style: none;
}

/* Neben der Liste wird die Detailspalte unter 1200 px zu schmal für zwei Spalten. */
@media (max-width: 1200px) {
  .details-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .back-link {
    display: inline-block;
  }
}

@media (max-width: 720px) {
  .job-detail {
    padding: 16px 16px 40px;
  }

  .back-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    margin-bottom: 4px;
  }

  .job-actions {
    width: 100%;
  }

  .job-actions .button {
    flex: 1;
    min-height: 44px;
  }

  .tabs {
    display: flex;
  }

  .tabs a {
    flex: 1;
    justify-content: center;
    min-height: 44px;
  }
}

/* Formulare: Anmelden, Registrieren, Profil */
.form-page {
  max-width: 440px;
  margin: 0 auto;
  padding: 40px 16px 64px;
}

.form-logo {
  display: block;
  width: 240px;
  max-width: 100%;
  height: auto;
  margin: 0 auto 32px;
}

.form-page h1 {
  margin: 0 0 24px;
  font-size: 20px;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form label {
  display: block;
  margin-bottom: 4px;
  font-weight: 500;
}

.form input[type="text"],
.form input[type="email"],
.form input[type="password"],
.form input[type="number"] {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  font: inherit;
}

.form .helptext,
.form ul.errorlist {
  font-size: 12px;
  color: var(--muted);
}

.form ul.errorlist {
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
  color: var(--conflict);
}

.form #id_skills,
.skill-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.form #id_skills label,
.skill-choices label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  font-weight: 400;
}

.form-page .button {
  align-self: flex-start;
}

/* Demo-Login (#148) */
.demo-login {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px dashed var(--border, #ccc);
}
.demo-login h2 {
  font-size: 1rem;
  margin: 0;
}

/* Bewerben: Schritt „Wann würdest du arbeiten?“ (#141) */
.apply-step {
  max-width: 640px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.apply-shifts {
  margin: 0;
  padding: 0;
  list-style: none;
}

.apply-conflict {
  color: var(--conflict);
}

/* Schicht von Hand: Tag, Beginn, Ende und Knopf in einer Zeile, auf dem Handy umbrechend. */
.apply-add h3 {
  margin: 0 0 8px;
  font-size: 15px;
}

.apply-add-fields {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
}

.apply-add-fields label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: var(--muted);
}

.apply-add-fields select,
.apply-add-fields input {
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
}

.apply-add-fields select {
  min-width: 80px;
}

.apply-shifts li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.notice {
  padding: 10px 14px;
  border-radius: var(--radius-control);
  background: var(--ok-soft);
  color: var(--ok-ink);
}

.form select {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  background: var(--bg);
  font: inherit;
}

/* Lebenslauf im Profil (#50) */
.cv-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.cv-section h2 {
  margin: 0;
  font-size: 16px;
}

.cv-section p {
  margin: 0;
}

.cv-heading {
  font-weight: 500;
}

.logout-form {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

/* Karte (#21): Liste links, Karte rechts; auf dem Handy die Karte oben. */
.map-link {
  margin: 0 0 8px;
  font-size: 13px;
}

.map-link a {
  color: var(--accent-ink);
}

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

/* Umschalter Entfernung | Anreisedauer (#22) */
.sort-chips {
  margin-top: 12px;
}

.travel-hint {
  color: var(--ink-2);
}

.map-section-heading {
  margin: 24px 0 8px;
  font-size: 14px;
  font-weight: 600;
}

.map-column {
  min-width: 0;
}

/* Leaflet braucht eine feste Höhe. */
.job-map {
  height: 420px;
  border-bottom: 1px solid var(--line);
}

/* Kleines Kartenfenster im Stellendetail (#75). */
.detail-map {
  width: 100%;
  height: 180px;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}

.detail-map-link {
  margin: 6px 0 0;
  font-size: 13px;
}

@media (min-width: 901px) {
  .map-column {
    position: sticky;
    top: 0;
    align-self: start;
  }

  .job-map {
    height: calc(100vh - 61px);
    border-bottom: 0;
  }
}

@media (max-width: 900px) {
  .map-split .map-column {
    order: -1;
  }
}

@media (max-width: 720px) {
  .job-map {
    height: 320px;
  }

  .map-link a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
}

/* Mein Stundenplan (#7) */
.timetable-page {
  max-width: 1080px;
  margin: 0 auto;
  padding: 32px 24px 64px;
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.timetable-head h1 {
  margin: 0 0 var(--space-1);
  font-size: 20px;
}

.timetable-head p {
  margin: 0;
}

.free-summary {
  margin: 0;
  color: var(--ink-2);
}

.timetable-days {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--space-3);
}

.timetable-day {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
}

.timetable-day h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}

.timetable-day p {
  margin: 0;
}

.lecture-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: var(--space-2);
  border-radius: var(--radius-chip);
  background: var(--lecture);
  color: var(--lecture-ink);
  font-size: 13px;
}

.lecture-time {
  font-variant-numeric: tabular-nums;
  font-size: 12px;
}

.lecture-title {
  font-weight: 600;
}

.lecture-actions {
  display: flex;
  gap: var(--space-3);
  font-size: 12px;
}

.lecture-actions a,
.link-button {
  color: var(--accent-ink);
}

.link-button {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.free-block {
  padding: 6px var(--space-2);
  border: 1.5px dashed var(--accent);
  border-radius: var(--radius-chip);
  background: var(--accent-wash);
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.timetable-add {
  padding-top: var(--space-5);
  border-top: 1px solid var(--line);
}

.timetable-add h2 {
  margin: 0 0 var(--space-3);
  font-size: 16px;
}

.form-inline {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-end;
}

.form-inline > div {
  flex: 1 1 160px;
}

.form input[type="time"],
.form select {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  font: inherit;
  background: var(--bg);
}

.back-link-plain {
  display: inline-block;
  margin-bottom: var(--space-4);
  color: var(--muted);
  text-decoration: none;
}

.profile-links {
  margin: 0 0 var(--space-5);
}

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

@media (max-width: 720px) {
  .timetable-page {
    padding: 20px 16px 48px;
  }

  .lecture-actions a,
  .link-button {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
}

/* Messen und Events (#33) */
.fair-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 16px 64px;
}

.fair {
  margin-top: var(--space-5);
  padding: var(--space-5);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
}

.fair-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-4);
}

.fair-head h2,
.fair-company h3 {
  margin: 0;
}

.fair-head p {
  margin: 4px 0 0;
}

/* Firmen einer Messe als Kacheln (#111): zwei Spalten, auf dem Handy eine. */
.fair-companies {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: var(--space-4);
}

@media (max-width: 720px) {
  .fair-companies {
    grid-template-columns: minmax(0, 1fr);
  }
}

.fair-company {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-chip);
}

.fair-company h3 {
  font-size: 14px;
  overflow-wrap: anywhere;
}

.fair-company ul {
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
  line-height: 1.6;
}

.fair-company ul a {
  color: var(--ink);
  text-decoration: none;
}

.fair-company ul a:hover {
  color: var(--accent-ink);
  text-decoration: underline;
}

.fair-company > p {
  margin: 6px 0 0;
  font-size: 13px;
}

.fair-more a {
  color: var(--accent-ink);
}

/* Tippflächen auf dem Handy mindestens 44 px (docs/design.md, #115). */
@media (max-width: 720px) {
  .fair-company ul a,
  .fair-more a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
}

.my-fairs p,
.my-applications p {
  margin: 4px 0;
}

/* Bewerben (#14): Das Formular verhält sich in der Knopfleiste wie der Knopf selbst,
   nach der Bewerbung ist der Knopf deaktiviert. */
.job-actions form {
  display: contents;
}

.button:disabled {
  cursor: default;
  opacity: 0.7;
}

/* Firmen: Verfügbarkeit als Heatmap (#67). Je dunkler, desto mehr frei; die Zahl steht immer dabei. */
.availability-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

.availability-page h1 {
  margin: 0 0 var(--space-2);
  font-size: 20px;
}

.availability-form fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.availability-form legend {
  margin-bottom: var(--space-2);
  font-weight: 500;
}

/* Skill-Auswahl zugeklappt (#109): oben steht nur, was gewählt ist. */
.skill-picker {
  margin-bottom: var(--space-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-chip);
}

.skill-picker summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  padding: 10px 12px;
  cursor: pointer;
  list-style: none;
}

.skill-picker summary::-webkit-details-marker {
  display: none;
}

.skill-picker-label {
  font-weight: 500;
}

.skill-picker-toggle {
  margin-left: auto;
  color: var(--accent-ink);
  font-size: 13px;
}

.skill-picker[open] .skill-picker-toggle {
  visibility: hidden;
}

.skill-picker fieldset,
.skill-picker .button {
  margin: 0 12px 12px;
}

.availability-form legend {
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 400;
}

.availability-form #id_skills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.availability-form #id_skills label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 400;
  cursor: pointer;
}

.availability-form #id_skills label:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-wash);
  color: var(--accent-ink);
}

/* Tippflächen auf dem Handy mindestens 44 px (docs/design.md, #115). */
@media (max-width: 720px) {
  .skill-picker summary,
  .availability-form #id_skills label {
    min-height: 44px;
  }

  .skill-picker summary {
    align-items: center;
  }
}

.availability-page .button {
  align-self: flex-start;
}

.heatmap-scroll {
  overflow-x: auto;
}

.heatmap {
  width: 100%;
  border-collapse: separate;
  border-spacing: 3px;
  font-variant-numeric: tabular-nums;
}

.heatmap th {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}

.heatmap th[scope="row"] {
  padding-right: var(--space-2);
  text-align: right;
  white-space: nowrap;
  color: var(--faint);
}

.heatmap td {
  height: 36px;
  border-radius: var(--radius-chip);
  text-align: center;
  font-size: 13px;
  font-weight: 600;
}

.heatmap .heat-0 { background: var(--bg-subtle); color: var(--faint); font-weight: 400; }
.heatmap .heat-1 { background: var(--accent-wash); color: var(--accent-ink); }
.heatmap .heat-2 { background: var(--accent-soft); color: var(--accent-ink); }
.heatmap .heat-3 { background: #A9BDF0; color: var(--ink); }
.heatmap .heat-4 { background: var(--accent); color: #fff; }

@media (max-width: 720px) {
  .availability-page {
    padding: 20px 16px 48px;
  }

  .heatmap td {
    font-size: 12px;
  }
}

/* Onboarding (#35) */
.onboarding-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.onboarding-hint {
  margin: 0;
  padding: var(--space-3) var(--space-4);
  background: var(--surface-muted);
  text-align: center;
}

/* Onboarding auf dem Handy: Hinweis-Link und Auswahl mindestens 44 px hoch (#106) */
.onboarding-hint a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

@media (max-width: 720px) {
  .onboarding .skill-choices label {
    min-height: 44px;
  }
}

/* Tab „In meiner Woche“ (#10): Mo–Fr, 8–20 Uhr, 48 px pro Stunde (Handy: 30 px) */
.week-panel {
  --hour: 48px;
}

.week-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.fit-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--surface-muted);
  font-size: 13px;
  font-weight: 600;
}

.fit-pill.fit-passt { background: var(--ok-soft); }
.fit-pill.fit-teilweise { background: var(--part-soft); }
.fit-pill.fit-flexibel { background: var(--accent-soft); }

.week-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 12px;
  color: var(--muted);
}

.week-legend li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.legend-lecture { background: var(--lecture); }
.legend-shift { background: var(--shift); }
.legend-conflict { background: var(--conflict); }
.legend-own { background: var(--accent); }
.legend-free { border: 1px dashed var(--accent); background: var(--accent-wash); }

.week {
  display: grid;
  grid-template-columns: 28px repeat(5, minmax(0, 1fr));
  gap: 4px;
}

.week-axis {
  position: relative;
  height: calc(12 * var(--hour));
  margin-top: 24px;
  font-size: 11px;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}

.week-axis span {
  position: absolute;
  right: 4px;
  transform: translateY(-50%);
}

.week-day-label {
  height: 24px;
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  color: var(--ink-2);
}

.week-track {
  position: relative;
  height: calc(12 * var(--hour));
  border-radius: var(--radius-chip);
  background:
    repeating-linear-gradient(to bottom, var(--line) 0 1px, transparent 1px var(--hour)),
    var(--bg-subtle);
}

/* Überlappende Blöcke stehen nebeneinander (#135): --left und --width rechnet der Server */
.week-block {
  position: absolute;
  left: calc(var(--left, 0%) + 2px);
  width: calc(var(--width, 100%) - 4px);
  overflow: hidden;
  padding: 2px 4px;
  border-radius: var(--radius-chip);
  font-size: 11px;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
}

.week-block strong,
.week-block span {
  display: block;
}

.week-lecture {
  background: var(--lecture);
  color: var(--lecture-ink);
}

.week-shift,
.week-conflict {
  border: 2px solid var(--bg);
  color: #FFFFFF;
}

.week-shift { background: var(--shift); }
.week-conflict { background: var(--conflict); }

/* Vorlesung, mit der eine Schicht kollidiert, und Termine, die sich überschneiden (#135) */
.week-lecture-conflict,
.tt-overlap {
  box-shadow: inset 0 0 0 2px var(--conflict);
}

/* Flexible Stellen (#11): freie Blöcke gestrichelt blau, eigene Schichten blau gefüllt */
.week-free {
  border: 1px dashed var(--accent);
  background: var(--accent-wash);
  color: var(--accent-ink);
  text-decoration: none;
}

.week-free:hover,
.week-free:focus-visible {
  background: var(--accent-soft);
}

.week-own {
  margin: 0;
  padding: 0;
  border: 2px solid var(--bg);
  background: var(--accent);
}

.week-own button {
  width: 100%;
  height: 100%;
  padding: 2px 4px;
  border: 0;
  background: none;
  color: #FFFFFF;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.plan-hint {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-2) var(--space-4);
  margin-top: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-chip);
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.plan-hint p {
  margin: 0;
}

.plan-form {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.plan-form h3 {
  flex-basis: 100%;
  margin: 0;
}

.plan-form label {
  display: grid;
  gap: var(--space-1);
}

.plan-form input,
.plan-form .button,
.plan-form a {
  min-height: 44px;
}

.plan-form a {
  display: inline-flex;
  align-items: center;
}

@media (max-width: 720px) {
  .week-panel {
    --hour: 30px;
  }

  .week {
    grid-template-columns: 22px repeat(5, minmax(0, 1fr));
    gap: 2px;
  }

  .week-block span {
    display: none;
  }

  /* Achse am Handy alle 4 Stunden: 8, 12, 16, 20 */
  .week-axis span:nth-child(even) {
    display: none;
  }
}

/* Stundenplan aus ICS: Vorschau (#43) */
.ics-preview {
  margin: var(--space-4) 0;
  padding: 0;
  list-style: none;
}

.ics-preview li {
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}

.ics-preview .lecture-time {
  display: inline-block;
  min-width: 9em;
  color: var(--muted);
}

/* Stundenplan wie im Kalender (#87): dasselbe Raster wie „In meiner Woche“, zum Ziehen */
.tt-editor {
  position: relative;
  margin-top: var(--space-4);
}

.tt-help {
  margin: 0 0 var(--space-2);
  font-size: 13px;
}

.tt-help-touch {
  display: none;
}

@media (pointer: coarse) {
  .tt-help-mouse {
    display: none;
  }

  .tt-help-touch {
    display: inline;
  }
}

.tt-status {
  min-height: 1.4em;
  margin: 0 0 var(--space-2);
  font-size: 13px;
  color: var(--muted);
}

.tt-track {
  cursor: crosshair;
}

.tt-free {
  position: absolute;
  left: 2px;
  right: 2px;
  padding: 2px 4px;
  border: 1.5px dashed var(--accent);
  border-radius: var(--radius-chip);
  background: var(--accent-wash);
  color: var(--accent-ink);
  font-size: 11px;
  font-weight: 600;
  pointer-events: none;
}

.tt-block {
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.tt-block:focus-visible {
  z-index: 2;
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.tt-block.tt-dragging {
  z-index: 3;
  cursor: grabbing;
  opacity: 0.9;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.tt-block.tt-new {
  z-index: 3;
  border: 1.5px dashed var(--accent);
  background: var(--accent-soft);
  color: var(--accent-ink);
}

/* Eigene Schichten im Stundenplan (#140): Link zur Stelle, nicht ziehbar, bei Konflikt rot */
.tt-job {
  z-index: 1;
  text-decoration: none;
  cursor: pointer;
}

.week-block.tt-job strong,
.week-block.tt-job span {
  color: inherit;
}

/* Konfliktschicht rückt nach rechts, damit die Vorlesung links daneben sichtbar bleibt */
.tt-job-conflict {
  left: 28%;
}

.tt-job:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.shift-conflicts {
  margin: var(--space-3) 0;
  padding: var(--space-3);
  border: 1px solid var(--conflict);
  border-radius: var(--radius-panel);
}

.shift-conflicts h2 {
  margin: 0 0 var(--space-2);
  font-size: 14px;
  color: var(--conflict);
}

.shift-conflicts ul {
  margin: 0;
  padding-left: 1.2em;
  font-size: 13px;
}

.shift-row .lecture-title::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--shift);
}

.shift-row-conflict .lecture-title::before {
  background: var(--conflict);
}

.shift-conflict-text {
  display: block;
  color: var(--conflict);
  font-size: 13px;
}

/* Unterer Rand zum Verlängern */
.week-block .tt-resize {
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 10px;
  cursor: ns-resize;
}

.tt-popover {
  position: absolute;
  z-index: 10;
  width: min(300px, calc(100% - 16px));
  padding: var(--space-3);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-panel);
  background: var(--bg);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.tt-popover .form {
  gap: var(--space-2);
}

.tt-popover p {
  margin: 0;
  font-size: 13px;
}

.tt-popover-error {
  color: var(--conflict);
}

.tt-popover-error:empty {
  display: none;
}

.tt-popover-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

@media (max-width: 720px) {
  /* Zum Ziehen etwas höher als die Wochenansicht im Stellendetail */
  .week-panel.tt-editor {
    --hour: 40px;
  }

  .week-block .tt-resize {
    display: block;
    height: 14px;
  }
}

/* Lange Titel im Raster umbrechen statt abschneiden („Mathe-matik“) */
.tt-block strong {
  overflow-wrap: anywhere;
  hyphens: auto;
}

/* Termine außerhalb von 8–20 Uhr unter dem Raster (#123) */
.tt-outside {
  margin-top: var(--space-4);
}

.tt-outside h2 {
  margin: 0 0 var(--space-2);
  font-size: 14px;
}

/* Bewertungen für Arbeitgeber (#32) */
.rating {
  white-space: nowrap;
}

.rating [aria-hidden="true"],
.review-stars {
  color: var(--part-dot);
}

.rating-count {
  color: var(--faint);
}

.reviews {
  margin-top: 24px;
}

.reviews-summary {
  margin-bottom: 12px;
}

.review-list {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.review {
  display: grid;
  gap: 4px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.review-star-off {
  color: var(--line-strong);
}

.review-form {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
}

.review-form h3 {
  margin: 0;
  font-size: 14px;
}

.review-stars-input {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 0;
  padding: 0;
  border: 0;
}

.review-stars-input legend {
  margin-bottom: 4px;
}

.review-stars-input label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.review-form textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  font: inherit;
}

.review-form .button {
  justify-self: start;
}

@media (max-width: 720px) {
  .review-stars-input label {
    min-height: 44px;
  }
}

/* Freemium (#62): Kontingent unter „Mit Profil bewerben“. Die Knöpfe bleiben oben bündig. */
.job-actions {
  align-items: flex-start;
}

.apply {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.apply-quota {
  margin: 0;
  color: var(--muted);
  font-size: 0.8125rem;
}

@media (max-width: 720px) {
  .apply {
    flex: 1;
  }
}

/* Profilseite (#156): Kopf mit Kennzahlen, Inhalte in Karten */
.profile-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 16px 64px;
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.profile-hero {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-4);
  align-items: center;
}

.profile-avatar {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 26px;
  font-weight: 600;
}

.profile-hero h1 {
  margin: 0;
  font-size: 22px;
}

.profile-hero p {
  margin: 2px 0 0;
}

.profile-facts {
  color: var(--ink-2);
  font-weight: 500;
}

.profile-page .profile-links {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: 0;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.profile-stats a {
  display: flex;
  flex-direction: column;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-row);
  background: var(--bg-subtle);
  color: var(--muted);
  text-decoration: none;
}

.profile-stats a:hover {
  border-color: var(--accent);
}

.profile-stats strong {
  color: var(--ink);
  font-size: 22px;
  line-height: 1.2;
}

.profile-card {
  margin: 0;
  padding: var(--space-5);
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--bg);
}

.profile-card h2 {
  margin: 0 0 var(--space-3);
  font-size: 16px;
}

.profile-card.cv-section {
  margin-top: 0;
  padding-top: var(--space-5);
  border-top: 1px solid var(--line);
}

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

.profile-list li {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-top: 1px solid var(--line);
}

.profile-list li:first-child {
  border-top: 0;
  padding-top: 0;
}

.profile-list-text {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.profile-list-text > a {
  font-weight: 500;
}

.status-pill {
  flex-shrink: 0;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  background: var(--ok-soft);
  color: var(--ok-ink);
  font-size: 12px;
  font-weight: 500;
}

.fair-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  width: 44px;
  padding: 4px 0;
  border-radius: var(--radius-control);
  background: var(--accent-wash);
  color: var(--accent-ink);
  font-size: 11px;
  text-transform: uppercase;
}

.fair-date strong {
  font-size: 17px;
  line-height: 1.1;
}

.profile-form h2 {
  margin-bottom: 0;
}

.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

.profile-grid-wide {
  grid-column: 1 / -1;
}

.profile-details {
  border: 1px solid var(--line);
  border-radius: var(--radius-row);
  padding: 0 var(--space-4);
}

.profile-details summary {
  padding: var(--space-3) 0;
  font-weight: 500;
  cursor: pointer;
}

.profile-details[open] {
  padding-bottom: var(--space-4);
}

.profile-details > p {
  margin: 0 0 var(--space-3);
}

.profile-details #id_courses {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 6px var(--space-4);
}

.profile-details #id_courses label {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 0;
  font-weight: 400;
}

.profile-details #id_courses input {
  margin: 3px 0 0;
}

@media (max-width: 600px) {
  .profile-stats {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .profile-card {
    padding: var(--space-4);
  }
}

.profile-page .form .button,
.profile-page .cv-section .button {
  align-self: flex-start;
}

/* Firmenbereich im Profil-Stil (#158) */
.company-logo-hero {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
}

.company-logo-hero.company-logo-initials {
  font-size: 24px;
}

.profile-stats span {
  display: flex;
  flex-direction: column;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-row);
  background: var(--bg-subtle);
  color: var(--muted);
}

.status-pill-muted {
  background: var(--surface-muted);
  color: var(--muted);
}
