/* breber.de Shared-Auth — Login-Optik.
 * Konsolidiert aus dem KMS-frnpf-base-Stack (reset.css, variables.css,
 * components.css, pages/login.css). Werte 1:1 uebernommen, damit die
 * Login-Seite optisch identisch zu KMS aussieht. Nur Login-relevante
 * Regeln (Card, Form, Button, Login-Page) — kein Dashboard/Tabellen-CSS.
 */

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; -webkit-text-size-adjust: 100%; }
body { height: 100%; font-family: var(--font-family); color: var(--text); background: var(--bg); line-height: 1.5; -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
input, button, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }

/* ── Variablen ── */
:root {
  /* Font */
  --font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Roboto', 'Segoe UI', 'Helvetica Neue', sans-serif;

  /* Accent: Forest (default) */
  --accent-primary: #2d6a1f;
  --accent-light: #4a9e33;
  --accent-dark: #1a3d12;
  --accent-soft: #edf7e8;

  /* Light mode (default) */
  --bg: #f4f2ee;
  --sidebar-bg: #16201a;
  --sidebar-hover: #243028;
  --card: #ffffff;
  --border: #e0dbd0;
  --input-bg: #ffffff;
  --text: #1a1f18;
  --text-sub: #5a6656;
  --text-muted: #8a9886;
  --gray-100: #f7f5f0;
  --gray-200: #ece8e0;
  --red: #c0392b;
  --orange: #d4621f;
  --green: #2d8a3e;
  --shadow: 0 1px 2px rgba(0,0,0,0.04);

  /* Layout */
  --radius-sm: 2px;
  --radius-md: 3px;
  --radius-lg: 4px;

  /* Spacing (8px grid) */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
}

/* ── Dark Mode ── */
[data-theme="dark"] {
  --bg: #0c0f0c;
  --sidebar-bg: #080a08;
  --sidebar-hover: #141a14;
  --card: #131613;
  --border: #1e261e;
  --input-bg: #0c0f0c;
  --text: #e8f0e4;
  --text-sub: #7a9474;
  --text-muted: #4a6044;
  --gray-100: #111511;
  --gray-200: #1e261e;
  --red: #e57373;
  --orange: #ffb74d;
  --green: #66bb6a;
  --shadow: 0 1px 2px rgba(0,0,0,0.10);
}

/* ── Button ── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 36px; padding: 8px 16px; font-size: 14px;
  border-radius: var(--radius-sm); font-weight: 500; letter-spacing: 0.01em;
  transition: opacity 0.15s, background 0.15s, box-shadow 0.15s; border: none;
  cursor: pointer;
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-sm { padding: 6px 13px; font-size: 12px; min-height: 30px; }
.btn-md { padding: 8px 17px; font-size: 14px; min-height: 36px; }
.btn-lg { padding: 11px 22px; font-size: 15px; min-height: 42px; }
.btn-primary { background: var(--accent-primary); color: #fff; }
.btn-primary:hover { opacity: 0.88; }
.btn-ghost { background: transparent; color: var(--accent-primary); border: 1.5px solid var(--accent-primary); }
.btn-ghost:hover { background: color-mix(in srgb, var(--accent-primary) 6%, transparent); }
.btn-subtle { background: var(--gray-100); color: var(--text); border: 1px solid var(--border); }
.btn-subtle:hover { background: var(--gray-200); }

/* ── Input ── */
.form-group { margin-bottom: 16px; }
.form-label { font-size: 13px; font-weight: 500; color: var(--text-sub); margin-bottom: 6px; letter-spacing: 0.01em; }
.form-input {
  width: 100%; height: 36px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 8px 12px;
  font-size: 14px; background: var(--input-bg); color: var(--text);
  outline: none; line-height: 1.4; box-sizing: border-box;
}
.form-input:focus { border-color: var(--accent-primary); }
.form-helper { font-size: 12px; color: var(--text-muted); margin-top: 5px; }

/* ── Divider ── */
.divider { height: 1px; background: var(--border); margin: 14px 0; }

/* ── Login ── */

/* Full-page centered layout */
.login-page {
  min-height: 100vh;
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 24px;
}

/* Card — centered, max-width 400px, clean and modern */
.login-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 44px 48px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.4);
  border: none;
}
.login-card-secondary {
  padding: 20px 28px;
  text-align: center;
}

/* Brand */
.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}
.login-brand-icon {
  width: 44px;
  height: 44px;
  background: var(--accent-primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Title */
.login-title {
  margin: 0 0 28px;
  font-size: 24px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
}

/* Error message */
.login-error {
  background: color-mix(in srgb, var(--red) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--red) 20%, transparent);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13px;
  color: var(--red);
  margin-bottom: 20px;
}

/* Form fields — large enough for mobile (min-height 44px) */
.login-card .form-group {
  margin-bottom: 20px;
}
.login-card .form-input {
  min-height: 44px;
  padding: 12px 14px;
  font-size: 15px;
}

/* Submit button — full width, 44px height, prominent */
.login-submit {
  width: 100%;
  background: var(--accent-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  padding: 0 20px;
  min-height: 44px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: opacity 0.15s;
}
.login-submit:hover { opacity: 0.9; }
.login-submit:active { opacity: 0.8; }
.login-submit:disabled { opacity: 0.45; cursor: not-allowed; }

/* Hint text */
.login-hint {
  margin-top: 16px;
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}

/* ── Mobile ── */
@media (max-width: 480px) {
  .login-card { padding: 32px 24px; }
  .login-page { padding: 16px; }
}
