.bewerbung-page {
  margin: 0;
  min-height: 100vh;
  background: #e8ece9;
  color: var(--text, #222);
}

.bewerbung-window {
  display: flex;
  height: 100vh;
  background: var(--surface, #fff);
}

.bewerbung-nav {
  width: 260px;
  flex-shrink: 0;
  background: var(--surface-muted, #fafafa);
  border-right: 1px solid var(--border, #ddd);
  padding: 20px 16px;
}

.bewerbung-nav h1 {
  margin: 0 0 4px 0;
  font-size: 18px;
}

.bewerbung-event {
  display: block;
  margin: 0 0 8px;
  padding: 0;
  border: 0;
  font-size: 12px;
  color: var(--muted, #555);
}

.bewerbung-event legend {
  padding: 0;
}

.event-pick-list {
  display: flex;
  flex-direction: column;
  max-height: 180px;
  overflow: auto;
  margin-top: 4px;
  border: 1px solid var(--border-strong, #ccc);
  border-radius: 4px;
  background: var(--surface, #fff);
}

.event-pick-list label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 6px 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text, #222);
}

.event-pick-list input {
  width: auto;
  margin: 0;
}

.bewerbung-form .radio-label:has(input:disabled) {
  opacity: 0.45;
}

.bewerbung-nav .subtitle {
  margin: 0 0 20px 0;
  font-size: 12px;
  color: var(--quiet, #777);
}

.bewerbung-nav nav {
  display: flex;
  flex-direction: column;
}

.menu-item {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  color: var(--brand, #1a5d3a);
  border: none;
  border-radius: 0;
  padding: 8px 4px;
  font-size: 14px;
  cursor: pointer;
}

.menu-item:hover {
  background: transparent;
  text-decoration: underline;
}

.menu-item.active {
  background: transparent;
  color: var(--text-strong, #111);
  font-weight: 600;
  box-shadow: none;
  text-decoration: none;
}

#accounting-panel .menu-item[data-panel="danger"],
#accounting-panel .menu-item[data-panel="danger"].active,
#accounting-panel .menu-item[data-panel="danger"]:hover {
  color: var(--danger, #a33);
}

.menu-group .menu-sub {
  padding-left: 22px;
  font-size: 13px;
  font-weight: 400;
}

.bewerbung-main {
  flex: 1;
  overflow-y: auto;
  padding: 28px 32px 40px;
}

.bewerbung-group,
.bewerbung-form {
  max-width: 640px;
}

.bewerbung-form {
  margin-top: 16px;
}

.bewerbung-form h2 {
  margin: 0 0 16px 0;
  font-size: 18px;
  color: var(--text, #222);
}

.bewerbung-form label {
  display: block;
  font-size: 13px;
  color: var(--muted, #555);
  margin-bottom: 10px;
}

.bewerbung-form input[type="text"],
.bewerbung-form input.num-entry,
.bewerbung-form input[type="number"],
.bewerbung-form select,
.bewerbung-form textarea {
  width: 100%;
  margin-top: 4px;
  padding: 8px 10px;
  border: 1px solid var(--border-strong, #ccc);
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
  background: var(--surface, #fff);
  color: var(--text, #222);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.bewerbung-form .radio-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--text, #222);
  font-size: 14px;
}

.bewerbung-form .radio-label input {
  width: auto;
  margin: 0;
}

.bewerbung-form .accessories-list {
  max-height: none;
}

.bewerbung-form label.accessory-option {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.bewerbung-form label.accessory-option input.num-entry {
  width: 64px;
  flex: 0 0 64px;
  margin-top: 0;
}

.bewerbung-form button[type="submit"],
.bewerbung-group button {
  margin-top: 8px;
  padding: 10px 16px;
  font-size: 14px;
}

.form-message {
  padding: 8px 10px;
  border-radius: 4px;
  font-size: 13px;
  margin: 0 0 10px 0;
}

.form-message.ok {
  background: #e7f6ea;
  color: #1a5d3a;
  border: 1px solid #b7dfc0;
}

.form-message.err {
  background: #fbeaea;
  color: #822;
  border: 1px solid #e0b0b0;
}

.thanks-page {
  max-width: 640px;
  margin: 32px auto;
  padding: 28px 28px 36px;
  background: var(--surface, #fff);
  color: var(--text, #222);
  border: 1px solid var(--border-strong, #c5c5c5);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.thanks-page h2 {
  margin: 0 0 20px 0;
  font-size: 22px;
}

.thanks-section {
  margin: 0 0 18px 0;
}

.thanks-section h3 {
  margin: 0 0 6px 0;
  font-size: 14px;
  color: var(--brand, #1a5d3a);
}

.thanks-section p {
  margin: 0 0 4px 0;
  font-size: 15px;
  line-height: 1.4;
}

#email-code-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
}

#email-code-panel {
  width: 360px;
  max-width: 92vw;
  background: var(--surface, #fff);
  border-radius: 6px;
  padding: 16px 18px 18px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

#email-code-panel h2 {
  margin: 0 0 8px 0;
  font-size: 18px;
}

#email-code-panel p {
  margin: 0 0 12px 0;
  font-size: 14px;
  color: var(--text-mid, #333);
}

#email-code-panel label {
  display: block;
  font-size: 13px;
  color: var(--muted, #555);
}

#email-code-input {
  width: 100%;
  margin-top: 4px;
  padding: 8px 10px;
  border: 1px solid var(--border-strong, #ccc);
  border-radius: 4px;
  font-size: 18px;
  letter-spacing: 0.2em;
}

.email-code-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.email-code-actions button {
  flex: 1;
}

html[data-theme="dark"] body.bewerbung-page {
  background-color: #0d1117;
  background-image: var(--application-bg, none);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--text, #e6edf3);
}

html[data-theme="dark"] .bewerbung-window {
  height: calc(100vh - 32px);
  margin: 16px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

html[data-theme="dark"] body.application-page {
  background-image: none;
}

html[data-theme="dark"] body.application-page::before {
  content: "";
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: var(--application-bg-left, 276px);
  background-color: #0d1117;
  background-image: var(--application-bg, none);
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  pointer-events: none;
  z-index: 0;
}

html[data-theme="dark"] body.application-page .bewerbung-window,
html[data-theme="dark"] body.application-page .bewerbung-main {
  position: relative;
  z-index: 1;
  background: transparent;
}

html[data-theme="dark"] body.application-page .thanks-page {
  position: relative;
  z-index: 1;
}

html[data-theme="dark"] body.application-page .bewerbung-nav {
  background: var(--surface, #161b22);
}

html[data-theme="dark"] body.bewerbung-page .bewerbung-group,
html[data-theme="dark"] body.bewerbung-page .bewerbung-form {
  background: rgba(13, 17, 23, 0.88);
  border-radius: 8px;
  padding: 20px 22px 24px;
}

html[data-theme="dark"] .decision-choice,
html[data-theme="dark"] .invite-thanks {
  background: transparent;
  color: var(--text, #e6edf3);
}

html[data-theme="dark"] .thanks-page {
  background: var(--surface, #161b22);
  color: var(--text, #e6edf3);
  border-color: var(--border, #30363d);
}

html[data-theme="dark"] .lot-pick-panel,
html[data-theme="dark"] .lot-map-panel {
  background: var(--surface, #161b22);
  color: var(--text, #e6edf3);
}

html[data-theme="dark"] .lot-pick-table th,
html[data-theme="dark"] .lot-pick-table td {
  border-bottom-color: var(--line, #21262d);
}

html[data-theme="dark"] .lot-pick-table tr.selected {
  background: var(--selected, #1c3a2a);
}

html[data-theme="dark"] .lot-pick-footer {
  border-top-color: var(--line, #21262d);
}

html[data-theme="dark"] .lot-id-link {
  color: var(--brand-ink, #7ee787);
}

@media (max-width: 720px) {
  .bewerbung-window,
  html[data-theme="dark"] .bewerbung-window {
    flex-direction: column;
    height: auto;
    min-height: calc(100vh - 32px);
  }

  .bewerbung-nav {
    width: auto;
    border-right: none;
    border-bottom: 1px solid var(--border, #ddd);
  }

  .field-row {
    grid-template-columns: 1fr;
  }
}
