/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --text: #1b1f24;
  --muted: #61697a;
  --border: #d5d9e0;
  --accent: #2f5fd0;
  --accent-text: #ffffff;
  --notice-bg: #e6f4ea;
  --notice-text: #1b6b3a;
  --alert-bg: #fdeced;
  --alert-text: #a02128;
  --radius: 10px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14171c;
    --surface: #1d222a;
    --text: #e8eaed;
    --muted: #99a1b0;
    --border: #333a45;
    --accent: #6c93f0;
    --accent-text: #10141a;
    --notice-bg: #17301f;
    --notice-text: #8fd8a8;
    --alert-bg: #34181b;
    --alert-text: #f0a2a6;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--mila-font);
  font-size: 16px;
  line-height: 1.5;
}

h1 {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
}

a {
  color: var(--accent);
}

code {
  font-size: 0.9em;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: var(--bg);
  border: 1px solid var(--border);
}

.muted {
  color: var(--muted);
  margin: 0 0 1.25rem;
}

/* Flash-Meldungen (zentral im Layout gerendert) */

.flashes {
  max-width: 26rem;
  margin: 1.5rem auto 0;
  padding: 0 1.25rem;
  display: grid;
  gap: 0.5rem;
}

.flash {
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius);
  font-size: 0.925rem;
}

.flash--notice {
  background: var(--notice-bg);
  color: var(--notice-text);
}

.flash--alert {
  background: var(--alert-bg);
  color: var(--alert-text);
}

/* Anmelde- und Passwortseiten */

.auth {
  max-width: 26rem;
  margin: 3rem auto;
  padding: 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.auth__aside {
  margin: 1.25rem 0 0;
  font-size: 0.925rem;
}

.form {
  display: grid;
  gap: 1rem;
}

.field {
  display: grid;
  gap: 0.35rem;
}

.field label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted);
}

.field input {
  width: 100%;
  padding: 0.6rem 0.7rem;
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
}

.field input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.button,
.form input[type="submit"] {
  padding: 0.6rem 1rem;
  font: inherit;
  font-weight: 600;
  color: var(--accent-text);
  background: var(--accent);
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
}

.button--quiet {
  color: var(--text);
  background: transparent;
  border-color: var(--border);
  font-weight: 500;
}

/* Kopfzeile und Inhaltsbereich der angemeldeten Ansicht */

.topbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.5rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.topbar__brand {
  font-weight: 700;
}

.topbar__account {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.topbar__account form {
  margin: 0;
}

.topbar__user {
  color: var(--muted);
  font-size: 0.925rem;
}

.page {
  max-width: 46rem;
  margin: 2.5rem auto;
  padding: 0 1.5rem;
}
