.auth-card { max-width: 560px; }

.auth-tabs {
  display: flex;
  gap: 0;
  margin: 0 0 22px;
  border-bottom: 1px solid #66302a;
}

.auth-tab {
  flex: 1;
  display: block;
  text-align: center;
  background: transparent;
  color: #ccc;
  border: 0;
  border-bottom: 3px solid transparent;
  padding: 12px 8px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.auth-tab.is-active,
.auth-tab[aria-selected="true"] {
  color: var(--gold);
  border-bottom-color: var(--red);
}

a.auth-tab { text-decoration: none; }

.inner-main h1.intern-title {
  font-size: clamp(23px, 2.5vw, 40px);
  margin-top: 8px;
}

.intern-tabs { flex-wrap: wrap; }

.intern-tabs .auth-tab { letter-spacing: 0.4px; }

.tab-count {
  display: inline-block;
  min-width: 1.5em;
  margin-left: 8px;
  padding: 0 6px;
  background: var(--red);
  color: #fff;
  border-radius: 10px;
  font-size: 13px;
  letter-spacing: 0;
  line-height: 1.5;
  vertical-align: 1px;
}

.field { margin: 0 0 16px; }

.field label,
.toolbar label {
  display: block;
  margin-bottom: 6px;
  color: var(--gold);
  font-size: 15px;
  font-weight: 700;
}

.optional { color: #aaa; font-weight: 400; }

.field input,
.field select,
.field textarea,
.toolbar input,
.toolbar select {
  width: 100%;
  background: #101010;
  color: #fff;
  border: 1px solid #66302a;
  padding: 12px 14px;
  font: 16px/1.4 Arial, Helvetica, sans-serif;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.toolbar input:focus,
.toolbar select:focus {
  outline: 2px solid var(--red);
  border-color: var(--red);
}

.field input:disabled {
  color: #aaa;
  background: #141414;
}

.password-wrap { position: relative; }

.password-wrap input { padding-right: 108px; }

.password-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  min-width: 84px;
  min-height: 36px;
  border: 0;
  background: transparent;
  color: var(--gold);
  font-weight: 700;
  cursor: pointer;
}

.check {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 4px 0 18px;
  color: #ddd;
}

.check input { width: 18px; height: 18px; accent-color: var(--red); }

.field-error {
  margin: 6px 0 0;
  color: #ff8d90;
  font-size: 14px;
}

.alert {
  padding: 12px 14px;
  margin: 0 0 16px;
  border: 1px solid #66302a;
  background: #120c0c;
  color: #eee;
}

.alert.ok { border-color: #6a5a32; color: var(--gold); }
.alert.err { border-color: var(--red); }

.auth-switch { margin: 16px 0 0; }
.auth-switch a { color: var(--gold); }

button.btn,
.intern-actions button {
  cursor: pointer;
  font-family: Arial, Helvetica, sans-serif;
  color: #fff;
}

.btn.small {
  padding: 8px 12px;
  font-size: 13px;
}

.btn.quiet {
  background: transparent;
}

.btn.danger {
  border-color: #bf2226;
}

.button-row,
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.button-row { margin-top: 8px; }
.button-row form,
.inline-form { margin: 0; }

.greeting-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  margin: 0 0 18px;
}

.greeting-row form { margin: 0; }

.greeting-row h1.intern-title { margin-bottom: 0; }

.greeting {
  color: var(--gold);
  font: 700 28px Georgia, serif;
  margin: 0;
}

.admin-entry-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0;
}

.admin-entry-buttons .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.admin-entry-buttons .tab-count { margin-left: 0; }

.info-card { margin-bottom: 18px; }

.intern-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, .8fr);
  gap: 18px;
  align-items: start;
}

.account-list { margin: 0 0 18px; }
.account-list div {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 8px 16px;
  padding: 8px 0;
  border-bottom: 1px solid #2c2422;
}
.account-list dt { color: var(--gold); font-weight: 700; }
.account-list dd { margin: 0; overflow-wrap: anywhere; }

.gold-count {
  color: var(--gold);
  font: 700 28px Georgia, serif;
}

nav.intern-actions {
  position: static;
  display: flex;
  flex-flow: row wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 10px 18px;
  margin: 0 0 22px;
  background: transparent;
  box-shadow: none;
}

nav.intern-actions a,
nav.intern-actions button {
  display: inline;
  flex: none;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  min-height: 0;
  width: auto;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--gold);
  font: 700 16px/1.4 Arial, Helvetica, sans-serif;
  letter-spacing: 0;
  text-transform: none;
  white-space: normal;
  cursor: pointer;
}

nav.intern-actions a::before {
  content: none;
  display: none;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 0 0 22px;
}

.stat {
  background: #171717;
  border: 1px solid #66302a;
  border-top: 3px solid var(--red);
  padding: 16px 18px;
}

.stat strong {
  display: block;
  color: var(--gold);
  font: 700 36px/1 Georgia, serif;
}

.stat span { color: #ccc; font-size: 15px; }

.wide-card { max-width: none; }

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
  margin: 0 0 18px;
}

.toolbar .grow { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.toolbar input[type="search"] { flex: 1 1 220px; width: auto; }
.toolbar select { width: auto; min-width: 160px; }

.mail-note { margin-top: 0; }

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

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

.user-table th {
  color: var(--gold);
  text-align: left;
  font-weight: 700;
  padding: 10px 8px;
  border-bottom: 1px solid #66302a;
}

.user-table td {
  padding: 10px 8px;
  border-bottom: 1px solid #2c2422;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border: 1px solid #66302a;
  color: #eee;
  font-size: 13px;
}

.badge-active { border-color: #6a5a32; color: var(--gold); }
.badge-pending { border-color: #8a6a32; }
.badge-blocked { border-color: var(--red); color: #ff8d90; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: 24px 16px;
  background: rgba(0, 0, 0, 0.72);
}

.modal-backdrop[hidden] { display: none !important; }

.modal {
  width: min(640px, 100%);
  margin: auto;
  position: relative;
  background: #171717;
  border: 1px solid #66302a;
  padding: 28px 22px 22px;
}

.modal h2 {
  color: var(--gold);
  font: 700 32px/1.2 Georgia, serif;
  margin: 0 36px 16px 0;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid #66302a;
  background: #101010;
  color: #fff;
  font-size: 28px;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
}

.discard-bar {
  margin: 0 0 16px;
  padding: 12px;
  border: 1px solid var(--red);
  background: #120c0c;
}

.discard-bar p { margin: 0 0 10px; }

.auth-card :focus-visible,
.modal :focus-visible,
.btn:focus-visible,
.auth-tab:focus-visible,
.password-toggle:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

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

  .account-list div { grid-template-columns: 1fr; gap: 2px; }

  .user-table,
  .user-table tbody,
  .user-table tr,
  .user-table td { display: block; width: 100%; }

  .user-table thead { display: none; }

  .user-table tr {
    margin: 0 0 14px;
    border: 1px solid #66302a;
    background: #141414;
    padding: 6px 0;
  }

  .user-table td {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    border: 0;
  }

  .user-table td::before {
    content: attr(data-label);
    color: var(--gold);
    font-weight: 700;
    flex: 0 0 42%;
  }

  .user-table td.actions-cell { display: block; }
  .user-table td.actions-cell::before { display: block; margin-bottom: 8px; }

  .member-table tr.member-add-row td { display: block; }
  .member-table tr.member-add-row td::before { display: none; }
}

@media (max-width: 1260px) {
  nav.intern-actions,
  nav.intern-actions.open {
    display: flex;
    position: static;
    flex-direction: row;
    background: transparent;
    box-shadow: none;
  }

  nav.intern-actions a {
    min-height: 0;
    padding: 0;
    font-size: 16px;
    gap: 0;
  }
}

@media (max-width: 700px) {
  .stat-grid,
  .intern-grid { grid-template-columns: 1fr; }

  .toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .toolbar input[type="search"],
  .toolbar select,
  .toolbar .btn {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
  }

  .auth-tab { letter-spacing: 0; font-size: 14px; }

  .greeting { font-size: 24px; }

  .modal { padding: 24px 14px 16px; }
}

.settings-tabs { margin-top: 4px; }

.settings-tabs .auth-tab {
  flex: 0 0 auto;
  padding: 12px 22px;
}

.member-admin-block { margin: 8px 0 28px; }

.member-admin-block:last-child { margin-bottom: 0; }

.member-admin-block h2 {
  margin: 18px 0 10px;
  color: var(--gold);
  font: 700 28px/1.2 Georgia, serif;
  text-transform: uppercase;
}

.member-table tr { scroll-margin-top: 148px; }

.member-table td { vertical-align: middle; }

.member-table tr.is-editing { background: #1c1614; }

.member-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.member-actions form { margin: 0; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid #66302a;
  background: #101010;
  color: var(--gold);
  text-decoration: none;
  cursor: pointer;
}

.icon-btn svg {
  width: 18px;
  height: 18px;
  display: block;
}

.icon-btn:hover { background: #b11d22; color: #fff; }

.icon-btn.danger { color: #ff8d90; }

.icon-btn:disabled,
.icon-btn:disabled:hover {
  background: #101010;
  color: #666;
  border-color: #3a2a28;
  cursor: default;
}

.icon-btn:focus-visible,
.file-btn:focus-within {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.member-thumb {
  display: block;
  width: 96px;
  height: 72px;
  object-fit: cover;
  background: #101010;
  border: 1px solid #66302a;
}

.cell-input {
  width: 100%;
  min-width: 140px;
  background: #101010;
  color: #fff;
  border: 1px solid #66302a;
  padding: 8px 10px;
  font: 16px/1.4 Arial, Helvetica, sans-serif;
}

.cell-input:focus {
  outline: 2px solid var(--red);
  border-color: var(--red);
}

select.cell-input { min-width: 160px; }

.bild-edit {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.bild-hint { display: block; max-width: 220px; }

.file-btn { position: relative; cursor: pointer; }

.file-btn input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.member-add-row td { padding-top: 16px; padding-bottom: 16px; }

.member-crop-modal {
  width: min(400px, 100%);
  padding-left: 16px;
  padding-right: 16px;
}

.member-crop-modal p { margin: 0 0 16px; }

.member-crop-stage {
  display: flex;
  justify-content: center;
  margin: 0 0 18px;
  overflow: auto;
}

.member-crop-frame {
  position: relative;
  width: 324px;
  height: 243px;
  flex: 0 0 auto;
  overflow: hidden;
  background: #101010;
  border: 1px solid #66302a;
  cursor: grab;
  touch-action: none;
}

.member-crop-frame.is-dragging { cursor: grabbing; }

.member-crop-frame img {
  position: absolute;
  top: 0;
  left: 0;
  max-width: none;
  user-select: none;
  -webkit-user-drag: none;
}

.fahrt-toolbar { margin: 0 0 18px; }

.fahrt-sheet {
  width: min(860px, 100%);
  margin: 0 0 16px;
  padding: 36px 40px 28px;
  background: #fff;
  color: #1c1c1c;
  border: 1px solid #d7d0c8;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  color-scheme: light;
}

.fahrt-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 18px;
}

.fahrt-titleblock {
  flex: 1 1 auto;
  min-width: 0;
  background: #f2f2f2;
  border: 1px solid #b5b5b5;
  padding: 12px 14px;
}

.fahrt-head img {
  width: 112px;
  height: 112px;
  object-fit: contain;
  flex: 0 0 auto;
}

.fahrt-sheet h2 {
  margin: 0;
  color: #111;
  font: 700 26px/1.15 Arial, Helvetica, sans-serif;
}

.fahrt-club {
  margin: 6px 0 0;
  color: #333;
  font-size: 14px;
  line-height: 1.35;
}

.fahrt-sheet h3 {
  margin: 18px 0 4px;
  color: #111;
  font: 700 16px/1.3 Arial, Helvetica, sans-serif;
}

.fahrt-lead {
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 1.4;
}

.fahrt-table {
  border: 1px solid #b5b5b5;
  margin: 0 0 6px;
}

.fahrt-person { width: min(100%, 620px); }

.fahrt-row {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
  margin: 0;
  border-bottom: 1px solid #b5b5b5;
}

.fahrt-row:last-child { border-bottom: 0; }

.fahrt-row label,
.fahrt-label {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 8px 10px;
  background: #f2f2f2;
  border-right: 1px solid #b5b5b5;
  color: #111;
  font-weight: 700;
  font-size: 14px;
}

.fahrt-row > div,
.fahrt-row > .fahrt-total {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 4px 8px;
  background: #fff;
}

.fahrt-sheet input[type="text"],
.fahrt-sheet input[type="date"] {
  width: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #1c1c1c;
  padding: 6px 2px;
  font: 16px/1.4 Arial, Helvetica, sans-serif;
}

.fahrt-sheet input[type="text"]:focus,
.fahrt-sheet input[type="date"]:focus {
  outline: 2px solid #d21d24;
  outline-offset: 1px;
}

.fahrt-sheet .field-error { color: #a1161c; }

.fahrt-total {
  font-size: 18px;
}

.fahrt-sign { margin-top: 22px; }

.fahrt-confirm {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 0 0 14px;
  font-size: 15px;
  line-height: 1.45;
}

.fahrt-confirm input {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  flex: 0 0 auto;
  accent-color: #d21d24;
}

.fahrt-sign-line {
  height: 28px;
  border-bottom: 1px solid #222;
}

.fahrt-sign-caption {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 4px;
  color: #333;
  font-size: 13px;
}

.fahrt-electronic {
  margin: 4px 0 0;
  font-size: 15px;
  line-height: 1.45;
}

.fahrt-electronic p { margin: 0 0 4px; }

.fahrt-received {
  margin: 0 0 4px;
  font-weight: 700;
}

.fahrt-list-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin: 28px 0 8px;
}

.fahrt-list-title {
  margin: 0;
  color: var(--gold);
  font: 700 28px Georgia, serif;
}

.recipient-list {
  min-height: 180px;
  resize: vertical;
}

.fahrt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  white-space: nowrap;
}

.fahrt-action-row,
.fahrt-actions form { margin: 0; }

.fahrt-action-row {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.fahrt-sub {
  margin: 0 0 14px;
  color: #ccc;
  font-size: 15px;
}

.user-table .nowrap { white-space: nowrap; }

@media (max-width: 700px) {
  .fahrt-sheet { padding: 22px 16px 18px; }

  .fahrt-head { align-items: flex-start; }

  .fahrt-head img { width: 84px; height: 84px; }

  .fahrt-sheet h2 { font-size: 20px; }

  .fahrt-row { grid-template-columns: 1fr; }

  .fahrt-row label,
  .fahrt-label { border-right: 0; border-bottom: 1px solid #b5b5b5; }
}
