/* Flight Sim Alerts – Verwaltung */

.admin-body { background: var(--muted-bg); min-height: 100vh; }

.admin-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 72px; }
.admin-header__meta { display: flex; align-items: center; gap: 20px; font-size: .9375rem; color: #c9d0d7; }
.admin-header__meta a { color: #c9d0d7; text-decoration: none; }
.admin-header__meta a:hover { color: #fff; }
.admin-header__user strong { color: #fff; font-weight: 600; }
@media (max-width: 720px) {
  .admin-header__meta a, .admin-header__user { display: none; }
}

/* Anmeldung */
.auth { display: grid; place-items: start center; padding: 72px 16px; }
.auth__card { width: 100%; max-width: 420px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 32px; }
.auth__card h1 { font-size: 1.75rem; margin-bottom: 8px; }
.auth__text { color: var(--text-soft); margin: 0 0 24px; font-size: 1rem; }
.auth__text code { font-size: .9em; background: var(--muted-bg); padding: 1px 5px; border-radius: 3px; }
.auth__error { background: #fcefee; color: #9c2b25; border-left: 3px solid #c8413b; padding: 10px 12px; border-radius: 0 4px 4px 0; margin: 0 0 18px; font-size: 1rem; }
.auth__card .button { width: 100%; margin-top: 8px; }

/* Felder */
.field { display: flex; flex-direction: column; gap: 6px; margin: 0 0 16px; border: 0; padding: 0; min-width: 0; }
.field > span, .field legend { font-weight: 600; font-size: .9375rem; }
.field small { font-weight: 400; color: var(--text-soft); }
.field input, .field select, .field textarea, .toolbar select, .toolbar__search, .pairs input, .confirm-select {
  font: inherit; font-size: 1rem; color: var(--text); background: #fff;
  border: 1px solid #c6ced6; border-radius: 4px; padding: 9px 11px; width: 100%;
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .toolbar select:focus, .toolbar__search:focus, .pairs input:focus, .confirm-select:focus {
  outline: none; border-color: var(--blue-text); box-shadow: 0 0 0 3px rgba(68, 170, 255, .25);
}
.check { display: inline-flex; align-items: center; gap: 8px; margin-right: 20px; font-size: 1rem; font-weight: 400; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--blue-text); }
.check--block { display: flex; margin: 8px 0; }

/* Buttons */
.button--secondary { background: #fff; color: var(--text); border-color: #c6ced6; }
.button--secondary:hover { background: var(--muted-bg); border-color: #aab4bd; }
.button--danger { background: #c8413b; border-color: #c8413b; color: #fff; }
.button--danger:hover { background: #a8332e; border-color: #a8332e; }
.button--danger-ghost { background: #fff; color: #b23a34; border-color: #efc2bf; }
.button--danger-ghost:hover { background: #fcefee; border-color: #c8413b; }
.button:disabled { opacity: .5; cursor: not-allowed; }

.icon-btn { font: inherit; font-size: .9375rem; background: none; border: 1px solid transparent; border-radius: 4px; padding: 4px 8px; color: var(--blue-text); cursor: pointer; }
.icon-btn:hover { background: var(--c-blue-bg); }
.icon-btn--danger { color: #b23a34; }
.icon-btn--danger:hover { background: #fcefee; }

/* Verwaltung */
.admin { padding-top: 36px; padding-bottom: 72px; max-width: 1340px; }
.admin__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 20px; }
.admin__head h1 { font-size: 2rem; }
.admin__updated { margin: 0; color: var(--text-soft); font-size: .9375rem; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.tabs__tab {
  font: inherit; font-size: 1rem; background: none; border: 0; border-bottom: 2px solid transparent;
  padding: 10px 14px; color: var(--text-soft); cursor: pointer; white-space: nowrap; margin-bottom: -1px;
}
.tabs__tab:hover { color: var(--text); }
.tabs__tab[aria-selected="true"] { color: var(--text); font-weight: 600; border-bottom-color: var(--blue-text); }
.tabs__tab span { font-size: .875rem; color: #8a939c; font-weight: 400; margin-left: 4px; }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.toolbar__search { flex: 1 1 260px; width: auto; }
.toolbar select { width: auto; min-width: 200px; }
.toolbar__text { margin: 0 auto 0 0; color: var(--text-soft); font-size: 1rem; }

.admin-table-wrap { background: #fff; border: 1px solid var(--line); border-radius: 8px; overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 1rem; }
.admin-table th { text-align: left; font-size: .875rem; font-weight: 600; color: var(--text-soft); background: #f7f9fa; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.admin-table td { padding: 10px 12px; border-bottom: 1px solid #edf0f2; vertical-align: middle; }
.admin-table tbody tr:last-child td { border-bottom: 0; }
.admin-table tbody tr:hover td { background: #fafbfc; }
.col-check { width: 40px; }
.col-check input { width: 18px; height: 18px; accent-color: var(--blue-text); }
.col-actions { width: 1%; white-space: nowrap; text-align: right; }
.row-actions { display: flex; gap: 2px; justify-content: flex-end; }
.cell-strong { font-weight: 600; }
.cell-code { font-family: var(--mono); font-size: .9375rem; margin-left: 8px; word-break: break-word; }
.cell-sub { display: block; font-size: .875rem; color: var(--text-soft); }
.cell-nowrap { white-space: nowrap; }
.admin-empty { margin: 0; padding: 28px; text-align: center; color: var(--text-soft); }

.account-form { max-width: 420px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 24px; }
.account-form h2 { font-size: 1.375rem; margin-bottom: 16px; }

/* Dialoge */
.dialog { width: min(720px, calc(100vw - 32px)); max-height: calc(100vh - 48px); border: 0; border-radius: 10px; padding: 0; box-shadow: 0 24px 60px rgba(0, 0, 0, .25); color: var(--text); }
.dialog--small { width: min(460px, calc(100vw - 32px)); }
.dialog::backdrop { background: rgba(24, 27, 31, .55); }
.dialog form { padding: 24px 28px; }
.dialog h2 { font-size: 1.375rem; margin-bottom: 18px; }
.dialog p { margin: 0 0 12px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.field--full { grid-column: 1 / -1; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } .dialog form { padding: 20px; } }
.dialog__error { background: #fcefee; color: #9c2b25; border-left: 3px solid #c8413b; padding: 10px 12px; border-radius: 0 4px 4px 0; font-size: 1rem; }
.dialog__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.dialog__delete { margin-right: auto; }

.pairs { display: grid; gap: 8px; margin-bottom: 10px; }
.pairs__row { display: grid; grid-template-columns: 1.4fr 1fr auto; gap: 8px; align-items: center; }
@media (max-width: 600px) { .pairs__row { grid-template-columns: 1fr 1fr; } .pairs__row .icon-btn { grid-column: 1 / -1; justify-self: end; } }

.confirm-options { background: var(--muted-bg); border-radius: 6px; padding: 12px 14px; margin-bottom: 12px; }
.confirm-options .confirm-select { margin: 2px 0 8px 26px; width: calc(100% - 26px); }
.confirm-options .field { margin: 0; }
.confirm-options .field .confirm-select { margin: 0; width: 100%; }

@media (max-width: 900px) {
  .admin-table { min-width: 820px; }
  .cell-code { word-break: normal; white-space: nowrap; }
  .toolbar select { flex: 1 1 auto; min-width: 0; }
}
.admin-body { overflow-x: hidden; }
