/* Anmeldung, Kopfzeile der angemeldeten Person und Verwaltung (Testbetrieb). */

/* Kontomenü und Meldungen neben dem Hamburger-Menü, im Stil der übrigen Symbolknöpfe. */
.account-actions { display: flex; align-items: center; gap: 8px; }
.account-actions[hidden] { display: none; }
.account-menu-wrap { position: relative; }
/* Eine Plakettenform für die Kopfzeile: dieselben Maße wie die Seitenplakette am
   Hamburger-Menü (styles.css, .nav-current-page-icon), hier als Zahl offener Meldungen. */
.tab-button > .header-badge:not([hidden]) {
  display: inline-flex;
  position: absolute;
  top: -6px;
  right: -6px;
  z-index: 1;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border: 1px solid var(--amber-line, #e5c77d);
  border-radius: 10px;
  color: #ffd98a;
  background: var(--ink, #17212b);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  pointer-events: none;
}
.tab-button > .nav-current-page-icon:not([hidden]) { box-sizing: border-box; }

/* In der schmalen Ansicht stehen Hamburger und Personensymbol nebeneinander und haben
   dieselbe Zeichengröße; in der breiten gilt für das Personensymbol die Größe der übrigen
   Symbole der Leiste (18 px). Die 1050 px folgen styles.css. */
@media (max-width: 1050px) {
  .nav-menu-toggle > .tab-icon,
  .account-icon-button > .tab-icon { width: 22px; height: 22px; flex: 0 0 22px; color: #ffffff; stroke: #ffffff; }
  .nav-menu-toggle > .tab-icon path { stroke: #ffffff; }
}

.account-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 40;
  display: grid;
  gap: 2px;
  min-width: 220px;
  padding: 6px;
  background: #1c2731;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45);
}
.account-menu[hidden] { display: none; }
.account-menu-name { display: grid; gap: 2px; margin: 0; padding: 8px 12px 10px; color: #ffffff; border-bottom: 1px solid rgba(255, 255, 255, 0.12); }
.account-menu-name small { color: #aeb9c2; font-size: 12px; }
.account-menu-item {
  min-height: 40px;
  padding: 0 12px;
  color: #cdd6dd;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 8px;
  font: inherit;
  font-size: 14px;
  font-weight: 620;
  cursor: pointer;
}
.account-menu-item:hover,
.account-menu-item:focus-visible { color: #ffffff; background: rgba(255, 255, 255, 0.12); }

/* Angemeldet ersetzt das Kontomenü den Knopf „Kontoeinstellungen“ in der Leiste. */
body[data-role] #llmPanelButton { display: none; }

/* Startseite: Menü und Leiste bleiben aus wie bisher, Konto und Meldungen sind sichtbar. */
body[data-role][data-active-tab="home"] .tabbar { display: flex; }
body[data-role][data-active-tab="home"] .tabbar > .nav-menu-toggle,
body[data-role][data-active-tab="home"] .tabbar > .tab-list { display: none; }

/* Symbol „01 %“ für die Rechenleistung, etwas breiter als die übrigen. */
.compute-icon { width: 20px; flex-basis: 20px; }
.compute-modal .modal-icon .compute-icon { width: 22px; height: 22px; stroke: #ffffff; }
.compute-list { display: grid; gap: 12px; margin-top: 14px; }
.compute-row { display: grid; gap: 5px; }
.compute-row-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; font-size: 14px; }
.compute-row-head span { color: var(--muted, #5f6b76); }
.compute-bar { height: 8px; overflow: hidden; background: var(--surface, #f5f7f9); border: 1px solid var(--line, #d8dee4); border-radius: 4px; }
.compute-bar span { display: block; height: 100%; background: var(--teal, #0f766e); }

.login-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  margin: 0;
  padding: 16px;
  background: var(--surface, #f5f7f9);
}
.login-card {
  width: min(420px, 100%);
  padding: 28px 28px 20px;
  background: var(--paper, #ffffff);
  border: 1px solid var(--line, #d8dee4);
  border-top: 4px solid var(--teal, #0f766e);
  border-radius: 10px;
  box-shadow: var(--shadow);
}
.login-card .eyebrow { margin: 0; color: var(--muted, #5f6b76); }
.login-card h1 { margin: 4px 0 18px; font-size: 22px; }
.login-form { display: grid; gap: 12px; }
.login-form h2 { margin: 0; font-size: 16px; }
.login-form label { display: grid; gap: 4px; font-size: 13px; font-weight: 600; }
.login-form label[hidden] { display: none; }
.login-form input {
  min-height: 38px;
  padding: 6px 10px;
  font: inherit;
  font-weight: 400;
  border: 1px solid var(--line, #d8dee4);
  border-radius: var(--control-radius, 7px);
}
.login-form button { justify-self: start; }
.login-message { margin: 14px 0 0; padding: 8px 10px; color: var(--bad, #b91c1c); background: var(--soft-wine, #f9e9ee); border-radius: 6px; font-size: 13px; }
.login-note { margin: 12px 0 0; color: var(--muted, #5f6b76); font-size: 12px; }

.instructor-banner-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.admin-grid > .profile-wide,
.admin-notice,
.admin-toolbar { grid-column: 1 / -1; }
.admin-notice { padding: 8px 12px; border-radius: 6px; background: var(--soft-teal, #e8f5f3); color: var(--good, #166534); font-size: 13px; }
.admin-notice[data-kind="error"] { background: var(--soft-wine, #f9e9ee); color: var(--bad, #b91c1c); }
.admin-toolbar { display: flex; justify-content: flex-end; }
.admin-section h3 { margin-top: 0; }
.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th,
.admin-table td { padding: 6px 8px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--line, #d8dee4); }
.admin-table tbody th { white-space: nowrap; }
.admin-table thead th { color: var(--muted, #5f6b76); font-weight: 600; white-space: nowrap; }
.admin-table th small,
.admin-table td small { display: block; color: var(--muted, #5f6b76); font-weight: 400; }
.admin-table select,
.admin-form select,
.admin-form input,
.admin-person select,
.admin-quota input {
  min-height: 32px;
  padding: 4px 8px;
  font: inherit;
  border: 1px solid var(--line, #d8dee4);
  border-radius: var(--control-radius, 7px);
  background: #ffffff;
}
.admin-quota input { width: 84px; }
.admin-form { display: grid; gap: 10px; }
.admin-form label { display: grid; gap: 4px; font-size: 13px; font-weight: 600; }
.admin-form .source-note { margin: -4px 0 0; }
.admin-form-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-list { margin: 0 0 12px; padding-left: 18px; font-size: 13px; }
.admin-list small { color: var(--muted, #5f6b76); }
.admin-grant { padding: 8px 0; border-bottom: 1px solid var(--line, #d8dee4); }
.admin-grant summary { cursor: pointer; }
.admin-grant summary small { color: var(--muted, #5f6b76); }
.admin-grant-label { margin: 10px 0 4px; font-size: 12px; font-weight: 600; color: var(--muted, #5f6b76); }
.admin-checks,
.admin-people { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 13px; }
.admin-person { display: inline-flex; align-items: center; gap: 6px; }
.admin-person small { color: var(--muted, #5f6b76); }

/* Schlüssel, Qualitätsprofil und Rechenaktivität sieht nur der Admin; der Server nimmt
   einen mitgeschickten Schlüssel ebenfalls nur vom Admin an. */
body[data-role]:not([data-role="admin"]) #llmPanel { display: none !important; }


.account-settings-section { display: grid; gap: 14px; }
.account-settings-section h4 { margin: 0; font-size: 14px; }
.account-settings-form { display: grid; gap: 10px; max-width: 460px; padding-top: 12px; border-top: 1px solid var(--line, #d8dee4); }
.account-settings-form:first-of-type { border-top: 0; padding-top: 0; }
.account-settings-form label { display: grid; gap: 4px; font-size: 13px; font-weight: 600; }
.account-settings-form input {
  min-height: 36px;
  padding: 6px 10px;
  font: inherit;
  font-weight: 400;
  border: 1px solid var(--line, #d8dee4);
  border-radius: var(--control-radius, 7px);
}
.account-settings-form .source-note { margin: -4px 0 0; }
.account-settings-actions { display: flex; gap: 8px; }
.account-settings-message { margin: 0; padding: 6px 10px; border-radius: 6px; font-size: 13px; background: var(--soft-teal, #e8f5f3); color: var(--good, #166534); }
.account-settings-message[data-kind="error"] { background: var(--soft-wine, #f9e9ee); color: var(--bad, #b91c1c); }

.login-link { justify-self: start; padding: 0; color: var(--teal, #0f766e); background: none; border: 0; font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; }
.login-message[data-kind="ok"] { color: var(--good, #166534); background: var(--soft-teal, #e8f5f3); }
.login-form textarea {
  min-height: 70px;
  padding: 6px 10px;
  font: inherit;
  font-weight: 400;
  border: 1px solid var(--line, #d8dee4);
  border-radius: var(--control-radius, 7px);
  resize: vertical;
}

.notification-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.notification-item { display: grid; gap: 6px; padding: 10px 12px; border: 1px solid var(--line, #d8dee4); border-radius: 8px; background: #ffffff; }
.notification-item.is-open { border-left: 4px solid var(--amber-line, #e5c77d); }
.notification-item p { margin: 0; font-size: 13px; }
.notification-item small { color: var(--muted, #5f6b76); }
.notification-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-row-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.admin-row-actions .secondary-button { min-height: 30px; padding: 4px 10px; font-size: 13px; }
