/*
 * Konten im gehosteten Orbit: Anmeldeseite, Admin-Bereich, Kontomenü und Ansichts-Hinweis.
 * Nutzt die Tokens aus base.css.
 */

/* ------------------------------------------------------------------ Seiten (Anmelden, Admin) */
body.acct-page { overflow: auto; }
.acct-page [hidden], .acct-form[hidden], .acct-err[hidden] { display: none !important; }
.acct-wrap { max-width: 420px; margin: 0 auto; padding: 64px 16px 40px; }
.acct-brand { display: flex; align-items: center; gap: 8px; margin-bottom: 24px; color: var(--ink); }
.acct-brand b { font: 800 22px var(--f-head); letter-spacing: -.04em; }
.acct-brand .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--violet); }
.acct-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 22px 20px; display: grid; gap: 14px;
}
.acct-tabs { display: flex; gap: 4px; background: var(--surface-2); border-radius: 9px; padding: 3px; }
.acct-tabs button {
  flex: 1; height: 32px; border: 0; border-radius: 7px; background: transparent; color: var(--ink-2); font-weight: 600;
}
.acct-tabs button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .06); }
.acct-form { display: grid; gap: 12px; }
.acct-form label { display: grid; gap: 4px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.acct-form input, .acct-in {
  height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface);
  font-size: 14px; width: 100%;
}
.acct-form input:focus, .acct-in:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 3px var(--violet-soft); }
.acct-hint { font-size: 12.5px; color: var(--muted); }
.acct-err { font-size: 13px; color: var(--red); background: var(--red-soft); border-radius: 8px; padding: 8px 10px; }
.acct-ok { font-size: 13px; color: var(--green); background: var(--green-soft); border-radius: 8px; padding: 8px 10px; }

/* Admin */
.adm-wrap { max-width: 1100px; margin: 0 auto; padding: 24px 16px 60px; display: grid; gap: 22px; }
.adm-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.adm-head h1 { font-size: 22px; }
.adm-head .spacer { flex: 1; }
.adm-sec { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; display: grid; gap: 12px; min-width: 0; }
.adm-sec h2 { font-size: 16px; }
.adm-sub { font-size: 14px; font-weight: 600; margin-top: 4px; color: var(--ink); }
.adm-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; }
.adm-row label { display: grid; gap: 4px; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.adm-row .acct-in { height: 32px; width: auto; min-width: 90px; }
.adm-row input[type="file"].acct-in { padding-top: 4px; font-size: 12.5px; }
.adm-table-wrap { overflow-x: auto; }
.adm-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.adm-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.adm-table td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.adm-table tr:last-child td { border-bottom: 0; }
.adm-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.adm-code { font: 600 13px var(--f-mono); letter-spacing: .02em; }
.adm-tag { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 9px; background: var(--surface-2); color: var(--ink-2); }
.adm-tag.ok { background: var(--green-soft); color: var(--green); }
.adm-tag.off { background: var(--red-soft); color: var(--red); }
.adm-tag.busy { background: var(--amber-soft); color: var(--amber); }
.adm-feed { display: grid; gap: 10px; }
.adm-note { border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; display: grid; gap: 6px; }
.adm-note-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 12px; color: var(--muted); }
.adm-note-meta b { color: var(--ink); }
.adm-note-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.adm-note img { max-width: 100%; border-radius: 8px; border: 1px solid var(--line); }
.adm-empty { color: var(--muted); font-size: 13px; }

/* ------------------------------------------------------------------ In Orbit: Kontomenü, Ansichts-Hinweis */
.acct-btn { display: inline-flex; align-items: center; gap: 6px; }
.acct-pop {
  position: fixed; z-index: 60; min-width: 200px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: 0 8px 28px rgba(30, 20, 60, .14); padding: 6px; display: grid; gap: 2px;
}
.acct-pop .who { padding: 6px 10px 8px; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.acct-pop .who b { display: block; color: var(--ink); font-size: 13.5px; }
.acct-pop button, .acct-pop a {
  display: block; text-align: left; border: 0; background: transparent; padding: 7px 10px; border-radius: 7px;
  color: var(--ink); text-decoration: none; font-size: 13.5px;
}
.acct-pop button:hover, .acct-pop a:hover { background: var(--surface-2); }

.view-as-bar {
  position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 70;
  display: flex; align-items: center; gap: 10px; max-width: calc(100vw - 32px);
  background: var(--amber-soft); color: var(--ink); border: 1px solid var(--amber); border-radius: 999px;
  padding: 6px 8px 6px 14px; font-size: 13px; box-shadow: 0 6px 20px rgba(0, 0, 0, .12);
}
.view-as-bar b { color: var(--amber); }

/* Testerinnen und Tester ändern weder das Abo-Token noch Pipeline-Einstellungen. */
body.acct-tester .chat-key,
body.acct-tester #debug-btn { display: none !important; }

/* Version im Kontomenü und Hinweis auf der Testinstanz */
.acct-pop .ver { padding: 2px 10px 8px; font-size: 11.5px; color: var(--muted); border-bottom: 1px solid var(--line); margin-bottom: 4px; font-variant-numeric: tabular-nums; }
.orbit-dev-tag {
  position: fixed; left: 10px; bottom: 10px; z-index: 900; pointer-events: none;
  padding: 4px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600;
  background: #b45309; color: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.18); opacity: .92;
}
.adm-ver { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* Sprachschalter unter der Anmeldekarte. */
.lang-switch.acct-lang { display: block; margin: 16px auto 0; padding: 4px 10px; border: 0; background: none; color: var(--muted); font: inherit; font-size: 13px; }
.lang-switch.acct-lang:hover { color: var(--ink); text-decoration: underline; }

/* Versionsverlauf im Admin-Bereich */
.ver-log { display: grid; gap: 14px; }
.ver-entry { border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.ver-entry:last-of-type { border-bottom: 0; }
.ver-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.ver-title { font-weight: 600; }
.ver-points { margin: 6px 0 0; padding-left: 18px; font-size: 13px; color: var(--ink-2); display: grid; gap: 3px; }
