/* ============================================================
   Corporate Identity — Farbpalette & Logo
   ============================================================
   Ändere hier die CSS-Variablen, um Farben und Logo anzupassen.
   
   Beispiel:
     --ci-primary: #0ea5e9;
     --ci-primary-hover: #0284c7;
     --ci-logo-url: url('/img/logo.svg');
   ============================================================ */

:root {
  /* --- Primärfarbe (Buttons, Fokus-Ringe, Links) --- */
  --ci-primary: #6366f1;
  --ci-primary-hover: #4f46e5;
  --ci-primary-light: rgba(99, 102, 241, 0.25);

  /* --- Hintergrundfarben --- */
  --ci-bg-body: #0f172a;
  --ci-bg-card: #1e293b;
  --ci-bg-input: #0f172a;

  /* --- Rahmen --- */
  --ci-border: #334155;

  /* --- Texte --- */
  --ci-text-body: #e2e8f0;
  --ci-text-heading: #f8fafc;
  --ci-text-muted: #94a3b8;
  --ci-text-label: #cbd5e1;
  --ci-text-placeholder: #475569;

  /* --- Akzent (Hinweis-Links) --- */
  --ci-accent: #818cf8;

  /* --- Status: Erfolg --- */
  --ci-success-bg: rgba(34, 197, 94, 0.15);
  --ci-success-border: rgba(34, 197, 94, 0.3);
  --ci-success-text: #4ade80;

  /* --- Status: Fehler --- */
  --ci-error-bg: rgba(239, 68, 68, 0.15);
  --ci-error-border: rgba(239, 68, 68, 0.3);
  --ci-error-text: #f87171;

  /* --- Status: Loading --- */
  --ci-loading-bg: rgba(99, 102, 241, 0.15);
  --ci-loading-border: rgba(99, 102, 241, 0.3);
  --ci-loading-text: #a5b4fc;

  /* --- Logo --- */
  --ci-logo-url: none;
  --ci-logo-height: 3rem;
  --ci-logo-show: none; /* auf 'block' setzen wenn Bild-Logo genutzt wird */
  --ci-icon-emoji: '🔐';
}


/* ============================================================
   Basis-Styles
   ============================================================ */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: var(--ci-bg-body);
  color: var(--ci-text-body);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.container {
  width: 100%;
  max-width: 640px;
}


/* ============================================================
   Header & Logo
   ============================================================ */

.header {
  text-align: center;
  margin-bottom: 2rem;
}

.header .icon {
  font-size: 3rem;
  margin-bottom: 0.5rem;
  display: var(--ci-logo-show);
}

.header .icon::before {
  content: var(--ci-icon-emoji);
}

/* Bild-Logo: alternativ zum Emoji */
.header .logo-img {
  display: var(--ci-logo-show);
  height: var(--ci-logo-height);
  width: auto;
  margin: 0.5rem auto;
}

.header .icon:empty {
  display: none;
}

.header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--ci-text-heading);
}

.header p {
  color: var(--ci-text-muted);
  margin-top: 0.5rem;
  font-size: 0.95rem;
}


/* ============================================================
   Card / Form
   ============================================================ */

.card {
  background: var(--ci-bg-card);
  border: 1px solid var(--ci-border);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.form-group {
  margin-bottom: 1.25rem;
}

label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ci-text-label);
  margin-bottom: 0.5rem;
}

input,
textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--ci-bg-input);
  border: 1px solid var(--ci-border);
  border-radius: 8px;
  color: var(--ci-text-body);
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--ci-primary);
  box-shadow: 0 0 0 3px var(--ci-primary-light);
}

input::placeholder,
textarea::placeholder {
  color: var(--ci-text-placeholder);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

.hint {
  font-size: 0.8rem;
  color: var(--ci-text-placeholder);
  margin-top: 0.35rem;
}

.hint a {
  color: var(--ci-accent);
  text-decoration: none;
}

.hint a:hover {
  text-decoration: underline;
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 500px) {
  .row {
    grid-template-columns: 1fr;
  }
}


/* ============================================================
   Buttons
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.875rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--ci-primary);
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  background: var(--ci-primary-hover);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}


/* ============================================================
   Status-Meldungen
   ============================================================ */

.status {
  margin-top: 1rem;
  padding: 0.875rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  display: none;
}

.status.visible {
  display: block;
}

.status.success {
  background: var(--ci-success-bg);
  border: 1px solid var(--ci-success-border);
  color: var(--ci-success-text);
}

.status.error {
  background: var(--ci-error-bg);
  border: 1px solid var(--ci-error-border);
  color: var(--ci-error-text);
}

.status.loading {
  background: var(--ci-loading-bg);
  border: 1px solid var(--ci-loading-border);
  color: var(--ci-loading-text);
}


/* ============================================================
   Spinner
   ============================================================ */

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
