/* ════════════════════════════════════════════════════════════════
   auth.css — Ergänzung zu app.css
   Server-Pfad: /var/www/html/assets/css/auth.css
   Login, Konto, Benutzerverwaltung. app.css bleibt unverändert.
   ════════════════════════════════════════════════════════════════ */

/* ── Login-Seite ───────────────────────────────────────────────── */

.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(900px 480px at 18% -12%, rgba(124,108,255,.20), transparent 62%),
    radial-gradient(760px 420px at 88% 108%, rgba(255,107,107,.14), transparent 60%),
    var(--bg);
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 34px 32px 30px;
  box-shadow: 0 24px 60px rgba(0,0,0,.45);
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 26px;
}

.auth-logo .logo-text { font-size: 22px; }

.auth-title {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin-bottom: 6px;
}

.auth-sub {
  font-size: 13px;
  color: var(--text2);
  margin-bottom: 24px;
  line-height: 1.6;
}

.auth-card .form-group:last-of-type { margin-bottom: 22px; }

.auth-submit { width: 100%; justify-content: center; }

.auth-foot {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text3);
  text-align: center;
  line-height: 1.6;
}

/* ── Meldungen ─────────────────────────────────────────────────── */

.auth-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.55;
  margin-bottom: 20px;
  border: 1px solid transparent;
}

.auth-alert i { margin-top: 2px; flex-shrink: 0; }

.auth-alert-error {
  background: rgba(255,107,107,.12);
  border-color: rgba(255,107,107,.32);
  color: #ffb4b4;
}

.auth-alert-success {
  background: rgba(6,214,160,.12);
  border-color: rgba(6,214,160,.32);
  color: #7ff0d0;
}

.auth-alert-warning {
  background: rgba(251,191,36,.12);
  border-color: rgba(251,191,36,.32);
  color: #ffd97a;
}

/* ── Passwortfeld mit Anzeigen-Schalter ────────────────────────── */

.auth-pw-field { position: relative; }

.auth-pw-field .form-control { padding-right: 44px; }

.auth-pw-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--text3);
  cursor: pointer;
  border-radius: 6px;
  font-size: 14px;
}

.auth-pw-toggle:hover { color: var(--text); background: var(--surface3); }

.auth-hint {
  font-size: 12px;
  color: var(--text3);
  margin-top: 6px;
  line-height: 1.5;
}

/* ── Benutzer-Block in der Sidebar ─────────────────────────────── */

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 12px 4px;
  margin-top: 8px;
  border-top: 1px solid var(--border);
}

.sidebar-user-avatar {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
}

.sidebar-user-meta { min-width: 0; }

.sidebar-user-name {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-role { font-size: 11px; color: var(--text3); }

/* ── Benutzertabelle ───────────────────────────────────────────── */

.users-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.users-table th {
  text-align: left;
  padding: 10px 12px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: var(--text3);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.users-table td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text2);
  vertical-align: middle;
}

.users-table tr:last-child td { border-bottom: none; }
.users-table tr:hover td { background: rgba(255,255,255,.02); }

.users-table .user-name { color: var(--text); font-weight: 500; }

.user-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.auth-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  max-width: 620px;
}

.auth-code {
  display: block;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  color: var(--accent3);
  word-break: break-all;
  margin: 8px 0;
}

@media (max-width: 720px) {
  .users-table thead { display: none; }
  .users-table, .users-table tbody, .users-table tr, .users-table td { display: block; width: 100%; }
  .users-table tr { border-bottom: 1px solid var(--border); padding: 6px 0; }
  .users-table td { border-bottom: none; padding: 6px 12px; }
  .user-actions { justify-content: flex-start; }
}
