/* =========================================================
   WeedExpert – Hochwertige botanische Oberfläche
   Datei: styles.css
   Alle Kommentare auf Deutsch
   ========================================================= */

/* -------------------- Farben und Grundeinstellungen -------------------- */

:root {
  color-scheme: dark;

  --hintergrund: #0a0a0a;
  --hintergrund-hell: #0f0f0f;
  --seitenleiste: #0d0d0d;
  --flaeche: #141414;
  --flaeche-hell: #1a1a1a;
  --flaeche-gruen: #143d1f;

  --rand: rgba(20, 61, 31, 0.15);
  --rand-gruen: rgba(20, 61, 31, 0.25);
  --rand-glow: rgba(20, 61, 31, 0.4);

  --text: #f0f0f0;
  --text-sanft: #c0c0c0;
  --text-leise: #707070;

  --gruen: #2d7a3f;
  --gruen-hell: #4a9d5e;
  --gruen-dunkel: #143d1f;

  --schrift: "Outfit", ui-sans-serif, system-ui, sans-serif;
  --schrift-titel: "Fraunces", Georgia, "Times New Roman", serif;

  --fehler: #f08b8b;

  --seitenleisten-breite: 276px;
  --inhaltsbreite: 1080px;

  --radius-klein: 8px;
  --radius-mittel: 12px;
  --radius-gross: 18px;

  --schatten: 0 20px 50px rgba(0, 0, 0, 0.4);
  --uebergang: 200ms ease;
}

/* -------------------- Allgemeine Grundeinstellungen -------------------- */

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
  scrollbar-color: #2f4f36 #050807;
  scrollbar-width: thin;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;

  background: var(--hintergrund);

  color: var(--text);

  font-family: var(--schrift);

  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(
    ellipse at 50% 50%,
    rgba(20, 61, 31, 0.03),
    transparent 70%
  );
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

a {
  color: inherit;
  text-decoration: none;
}

::selection {
  background: rgba(79, 195, 107, 0.3);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--gruen-hell);
  outline-offset: 3px;
}

button,
a,
input {
  -webkit-tap-highlight-color: transparent;
}

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -52px;
  z-index: 80;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--gruen);
  color: #041208;
  font-size: 13px;
  font-weight: 650;
}

.skip-link:focus {
  top: 12px;
}

/* -------------------- Kopfzeile -------------------- */

.site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: var(--seitenleisten-breite);
  z-index: 20;

  min-height: 74px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;

  padding: 0 34px;

  background: rgba(13, 13, 13, 0.95);
  border-bottom: 1px solid var(--rand);

  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.site-header-copy {
  min-width: 0;
}

.site-header h1 {
  margin: 0;

  color: var(--text);
  font-family: var(--schrift-titel);
  font-size: 22px;
  font-weight: 680;
  letter-spacing: -0.03em;
}

.site-header h1::before {
  content: "🌿";
  display: inline-block;
  margin-right: 9px;
  font-size: 15px;
  font-family: var(--schrift);
}

.site-header-copy p {
  margin: 3px 0 0;
  color: var(--text-leise);
  font-size: 12px;
}

.site-header-badge {
  margin: 0;
  padding: 6px 11px;

  border: 1px solid rgba(154, 240, 174, 0.22);
  border-radius: 999px;

  background: rgba(24, 52, 33, 0.7);
  color: var(--gruen-hell);

  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* -------------------- Grundaufbau der Anwendung -------------------- */

.app-layout {
  min-height: 100vh;
}

.app-main {
  min-height: 100vh;
  margin-left: var(--seitenleisten-breite);
  padding-top: 70px;
}

.page-section {
  width: min(
    calc(100% - 68px),
    var(--inhaltsbreite)
  );

  margin: 0 auto;
  padding: 55px 0 92px;
}

/* -------------------- Seitenleiste -------------------- */

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;

  width: var(--seitenleisten-breite);

  display: flex;
  flex-direction: column;

  padding: 23px 15px 18px;

  background: rgba(13, 13, 13, 0.95);

  border-right: 1px solid var(--rand);

  overflow-y: auto;
  overscroll-behavior: contain;
}

.sidebar::-webkit-scrollbar {
  width: 5px;
}

.sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 99px;
}

/* -------------------- Markenbereich -------------------- */

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 3px 8px 26px;
}

.sidebar-brand-mark {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;

  display: grid;
  place-items: center;

  border: 1px solid rgba(139, 229, 160, 0.28);
  border-radius: 13px;

  background: linear-gradient(
    145deg,
    #203d27,
    #122018
  );

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 7px 22px rgba(0, 0, 0, 0.18);

  font-size: 20px;
}

.sidebar-brand strong {
  display: block;
  color: var(--text);
  font-family: var(--schrift-titel);
  font-size: 18px;
  font-weight: 680;
  letter-spacing: -0.03em;
}

.sidebar-brand span {
  display: block;
  margin-top: 1px;
  color: var(--text-leise);
  font-size: 10px;
  letter-spacing: 0.025em;
}

/* -------------------- Schaltfläche für einen neuen Chat -------------------- */

.new-chat-button {
  width: 100%;
  min-height: 45px;

  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;

  padding: 0 13px;

  border: 1px solid rgba(139, 229, 160, 0.29);
  border-radius: 11px;

  background: linear-gradient(
    135deg,
    #1d3a25,
    #14291b
  );

  color: #e8f8eb;

  font-size: 12px;
  font-weight: 680;

  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);

  transition:
    background var(--uebergang),
    border-color var(--uebergang),
    transform var(--uebergang);
}

.new-chat-button:hover {
  background: linear-gradient(
    135deg,
    #25492f,
    #193421
  );

  border-color: rgba(139, 229, 160, 0.48);
}

.new-chat-button:active {
  transform: translateY(1px);
}

.sidebar-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;

  display: inline-grid;
  place-items: center;

  color: var(--text-leise);
  font-size: 16px;
}

.new-chat-button .sidebar-icon {
  color: var(--gruen-hell);
  font-size: 19px;
}

/* -------------------- Navigation -------------------- */

.sidebar-section {
  margin-top: 27px;
}

.sidebar-label {
  margin: 0 10px 9px;

  color: #87968a;
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.navigation {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-link {
  min-height: 42px;

  display: flex;
  align-items: center;
  gap: 10px;

  padding: 0 10px;

  border: 1px solid transparent;
  border-radius: 10px;

  color: #b2beb4;
  font-size: 12px;
  font-weight: 560;

  transition:
    color var(--uebergang),
    background var(--uebergang),
    border-color var(--uebergang);
}

.sidebar-link:hover {
  color: #f2f8f3;
  background: rgba(255, 255, 255, 0.045);
}

.sidebar-link.active {
  color: #e7f7e9;

  background: linear-gradient(
    90deg,
    rgba(53, 116, 66, 0.24),
    rgba(34, 66, 40, 0.13)
  );

  border-color: rgba(119, 214, 138, 0.13);
}

.sidebar-link.active .sidebar-icon {
  color: var(--gruen-hell);
}

/* -------------------- Gespeicherte Chats -------------------- */

.chat-history {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.history-empty {
  margin: 0 4px;
  padding: 11px;

  color: var(--text-leise);
  font-size: 11px;
  line-height: 1.6;

  border: 1px solid var(--rand);
  border-radius: 10px;

  background: rgba(255, 255, 255, 0.018);
}

.chat-history-item {
  position: relative;

  display: flex;
  align-items: center;
  gap: 3px;

  min-width: 0;
  padding: 3px;

  border: 1px solid transparent;
  border-radius: 10px;

  transition:
    background var(--uebergang),
    border-color var(--uebergang);
}

.chat-history-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

.chat-history-item.active {
  background: rgba(72, 173, 98, 0.105);
  border-color: rgba(72, 173, 98, 0.14);
}

.chat-history-open {
  min-width: 0;
  flex: 1;

  padding: 7px 6px;
  overflow: hidden;

  border: 0;
  border-radius: 7px;

  background: transparent;
  color: #b7c3b9;

  text-align: left;
  font-size: 11px;
}

.chat-history-item.active .chat-history-open {
  color: #e8f5eb;
}

.chat-history-title {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-history-menu {
  position: relative;
  flex: 0 0 auto;
}

.chat-history-menu-button {
  width: 29px;
  height: 29px;

  display: grid;
  place-items: center;

  border: 1px solid transparent;
  border-radius: 7px;

  background: transparent;
  color: #8c9a8f;
  opacity: 0.75;

  transition:
    color var(--uebergang),
    background var(--uebergang),
    opacity var(--uebergang);
}

.chat-history-item:hover .chat-history-menu-button,
.chat-history-menu-button[aria-expanded="true"] {
  opacity: 1;
}

.chat-history-menu-button:hover,
.chat-history-menu-button[aria-expanded="true"] {
  color: var(--text);
  background: rgba(255, 255, 255, 0.075);
}

.chat-history-menu-dropdown {
  position: absolute;
  top: calc(100% + 5px);
  right: 0;
  z-index: 50;

  min-width: 150px;
  padding: 5px;

  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 11px;

  background: #141d16;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
}

.chat-history-delete {
  width: 100%;

  display: flex;
  align-items: center;
  gap: 8px;

  padding: 9px 10px;

  border: 0;
  border-radius: 8px;

  background: transparent;
  color: var(--fehler);

  text-align: left;
  font-size: 11px;
}

.chat-history-delete:hover {
  background: rgba(239, 107, 107, 0.11);
}

/* -------------------- Hinweis in der Seitenleiste -------------------- */

.sidebar-note {
  margin-top: auto;
  padding: 14px 12px;

  border: 1px solid rgba(72, 173, 98, 0.17);
  border-radius: 12px;

  background: linear-gradient(
    145deg,
    rgba(24, 45, 29, 0.8),
    rgba(14, 24, 16, 0.9)
  );
}

.sidebar-note strong {
  display: block;
  color: #dceee0;
  font-size: 11px;
  font-weight: 720;
}

.sidebar-note p {
  margin: 5px 0 0;
  color: var(--text-leise);
  font-size: 10px;
  line-height: 1.65;
}

/* -------------------- Seitenüberschriften -------------------- */

.page-heading {
  max-width: 800px;
  margin-bottom: 35px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;

  margin: 0 0 12px;

  color: var(--gruen-hell);
  font-size: 10px;
  font-weight: 780;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 19px;
  height: 1px;
  background: var(--gruen);
}

.page-heading h2 {
  margin: 0;

  color: var(--text);
  font-family: var(--schrift-titel);
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 680;
  line-height: 1.08;
  letter-spacing: -0.038em;
}

.page-heading > p:not(.eyebrow) {
  max-width: 680px;
  margin: 16px 0 0;

  color: var(--text-sanft);
  font-size: 14px;
  line-height: 1.85;
}

/* -------------------- Begrüßungsbereich des Chats -------------------- */

#welcome-screen {
  position: relative;
  isolation: isolate;
  overflow: hidden;

  max-width: 1100px;
  margin: 0 auto 30px;
  padding: 40px 36px 36px;

  border: 1px solid var(--rand);
  border-top: 2px solid var(--rand-glow);
  border-radius: var(--radius-gross);

  background: rgba(15, 15, 15, 0.85);

  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);

  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.02);

  text-align: center;
}

#welcome-screen::before,
#welcome-screen::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;

  border: 1px solid rgba(139, 229, 160, 0.07);
  border-radius: 50%;
}

#welcome-screen::before {
  width: 280px;
  height: 280px;
  top: -205px;
  left: -100px;
}

#welcome-screen::after {
  width: 350px;
  height: 350px;
  right: -180px;
  bottom: -275px;
}

#welcome-screen.hidden {
  display: none;
}

.welcome-leaf {
  width: 57px;
  height: 57px;

  display: grid;
  place-items: center;

  margin: 0 auto 18px;

  border: 1px solid rgba(139, 229, 160, 0.25);
  border-radius: 17px;

  background: linear-gradient(
    145deg,
    #24432b,
    #142319
  );

  box-shadow:
    0 8px 28px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);

  font-size: 25px;
}

#welcome-screen h3 {
  margin: 0;

  color: #f0f8f1;
  font-family: var(--schrift-titel);
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 680;
  letter-spacing: -0.03em;
}

#welcome-screen > p:not(.welcome-hint) {
  max-width: 640px;
  margin: 12px auto 25px;

  color: #b5c4b8;
  font-size: 13px;
  line-height: 1.85;
}

/* -------------------- Vorschläge für erste Fragen -------------------- */

.suggestion-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;

  text-align: left;
}

.suggestion-button {
  min-height: 58px;

  display: flex;
  align-items: center;
  gap: 11px;

  padding: 13px 15px;

  border: 1px solid var(--rand);
  border-radius: 13px;

  background: rgba(20, 20, 20, 0.5);
  color: var(--text-sanft);

  font-size: 12px;
  font-weight: 570;
  line-height: 1.6;
  text-align: left;

  transition:
    border-color var(--uebergang),
    background var(--uebergang),
    color var(--uebergang),
    transform var(--uebergang);
}

.suggestion-button:hover {
  border-color: var(--rand-glow);
  background: rgba(25, 25, 25, 0.6);
  color: var(--text);
  transform: translateY(-1px);
}

.suggestion-button:active {
  transform: translateY(0);
  background: #16241a;
}

.welcome-hint {
  margin: 19px 0 0;
  color: #89978c;
  font-size: 11px;
}

.welcome-hint strong {
  color: #c2d4c6;
}

/* -------------------- Infobereiche und Speicherhinweise -------------------- */

.info-panel {
  margin-top: 24px;
  padding: 18px 19px;

  border: 1px solid var(--rand);
  border-radius: 13px;

  background: linear-gradient(
    145deg,
    rgba(17, 26, 19, 0.95),
    rgba(13, 20, 15, 0.95)
  );
}

.info-panel strong {
  color: #e0ede2;
  font-size: 12px;
  font-weight: 720;
}

.info-panel p {
  margin: 6px 0 0;
  color: var(--text-leise);
  font-size: 12px;
  line-height: 1.8;
}

.chat-save-notice {
  border-color: rgba(72, 173, 98, 0.2);
  background: rgba(16, 26, 19, 0.9);
  text-align: left;
}

/* -------------------- Themenkarten und Wissensbereiche -------------------- */

.topic-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
}

.topic-card {
  position: relative;
  overflow: hidden;

  min-width: 0;
  min-height: 255px;

  display: flex;
  flex-direction: column;

  padding: 22px;

  border: 1px solid var(--rand);
  border-radius: 12px;

  background: rgba(20, 20, 20, 0.5);

  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);

  transition:
    border-color var(--uebergang),
    background var(--uebergang),
    transform var(--uebergang),
    box-shadow var(--uebergang);
}

.topic-card:hover {
  border-color: var(--rand-glow);
  border-top-color: var(--gruen-hell);

  background: rgba(25, 25, 25, 0.6);

  transform: translateY(-2px);

  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.3),
    0 0 20px rgba(20, 61, 31, 0.15);
}

.topic-card::after {
  content: "";
  position: absolute;
  top: -65px;
  right: -65px;

  width: 145px;
  height: 145px;

  border-radius: 50%;
  background: rgba(72, 173, 98, 0.045);

  pointer-events: none;
}

.topic-card-icon {
  width: 43px;
  height: 43px;

  display: grid;
  place-items: center;

  margin-bottom: 18px;

  border: 1px solid var(--rand);
  border-radius: 12px;

  background: rgba(30, 30, 30, 0.8);

  font-size: 18px;
}

.topic-card h3 {
  margin: 0;

  color: #eff7f0;
  font-family: var(--schrift-titel);
  font-size: 18px;
  font-weight: 650;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.topic-card p {
  margin: 9px 0 18px;

  color: #a0afa3;
  font-size: 12px;
  line-height: 1.8;
}

.topic-button {
  width: fit-content;
  margin-top: auto;
  padding: 7px 0;

  border: 0;
  background: transparent;

  color: var(--gruen-hell);
  font-size: 12px;
  font-weight: 690;

  transition: color var(--uebergang);
}

.topic-button:hover {
  color: #b0f3bc;
}

/* -------------------- Nachrichten im Chat -------------------- */

#messages {
  max-width: 900px;
  margin: 0 auto 25px;
}

#messages:empty {
  display: none;
}

#messages > * {
  margin-bottom: 16px;
}

.message {
  max-width: 820px;
  padding: 16px 18px;

  border: 1px solid var(--rand);
  border-radius: 15px;

  font-size: 14px;
  line-height: 1.85;

  overflow-wrap: anywhere;

  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.08);
}

.message p {
  margin: 0 0 12px;
}

.message p:last-child {
  margin-bottom: 0;
}

.message h1,
.message h2,
.message h3 {
  margin: 19px 0 8px;
  color: #f0f8f1;
  line-height: 1.35;
}

.message h1 {
  font-size: 21px;
}

.message h2 {
  font-size: 18px;
}

.message h3 {
  font-size: 15px;
}

.message ul,
.message ol {
  padding-left: 23px;
  margin: 10px 0 14px;
}

.message li {
  margin: 4px 0;
}

.message strong {
  color: #f2f9f3;
}

.message em {
  color: #d0dfd3;
}

.message code {
  padding: 2px 5px;
  border-radius: 5px;

  background: rgba(255, 255, 255, 0.075);
  color: #b9efc6;

  font-size: 0.92em;
}

.message hr {
  height: 1px;
  margin: 16px 0;
  border: 0;
  background: var(--rand);
}

/* Nachrichten des Nutzers */

.message.user {
  margin-left: auto;

  border-color: rgba(92, 196, 115, 0.23);
  border-radius: 15px 15px 5px 15px;

  background: linear-gradient(
    145deg,
    #1b3a24,
    #14291b
  );

  color: #eaf7ed;
}

/* Antworten der KI */

.message.bot {
  margin-right: auto;

  border-color: rgba(223, 244, 228, 0.08);
  border-radius: 15px 15px 15px 5px;

  background: linear-gradient(
    145deg,
    #121a14,
    #0e1510
  );

  color: #d4e0d6;
}

/* Tabellen in KI-Antworten */

.chat-table-wrapper {
  max-width: 100%;
  margin: 14px 0;
  overflow-x: auto;

  border: 1px solid var(--rand);
  border-radius: 10px;
}

.chat-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.chat-table th,
.chat-table td {
  min-width: 100px;
  padding: 10px 12px;

  border-bottom: 1px solid var(--rand);

  text-align: left;
  vertical-align: top;
}

.chat-table th {
  background: #1a2b1e;
  color: #e7f5e9;
  font-weight: 700;
}

.chat-table td {
  color: #c7d4ca;
}

.chat-table tr:last-child td {
  border-bottom: 0;
}

/* -------------------- Eingabefeld für den Chat -------------------- */

#chat-form {
  position: sticky;
  bottom: 16px;
  z-index: 10;

  max-width: 900px;
  margin: 0 auto;

  display: flex;
  align-items: center;
  gap: 8px;

  padding: 10px 10px 10px 12px;

  border: 1px solid var(--rand);
  border-top: 1px solid var(--rand-glow);
  border-radius: 18px;

  background: rgba(20, 20, 20, 0.8);

  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);

  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

#message-input {
  flex: 1;
  min-width: 0;
  height: 45px;

  padding: 0 14px;

  border: 1px solid transparent;
  border-radius: 10px;
  outline: 0;

  background: rgba(25, 25, 25, 0.6);
  color: var(--text);

  font-size: 13px;

  transition:
    background var(--uebergang),
    border-color var(--uebergang);
}

#message-input::placeholder {
  color: #808080;
}

#message-input:focus {
  border-color: var(--rand-glow);
  background: rgba(30, 30, 30, 0.7);
}

#chat-form > button {
  flex: 0 0 auto;
  min-width: 118px;
  height: 45px;

  padding: 0 16px;

  border: 1px solid rgba(154, 240, 174, 0.28);
  border-radius: 12px;

  background: linear-gradient(
    135deg,
    #2f9a4c,
    #1d6d32
  );

  color: #f5fff7;

  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;

  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);

  transition:
    background var(--uebergang),
    transform var(--uebergang);
}

#chat-form > button:hover:not(:disabled) {
  background: linear-gradient(
    135deg,
    #3db65b,
    #2b9145
  );
}

#chat-form > button:active:not(:disabled) {
  transform: translateY(1px);
}

/* -------------------- Kontobereich -------------------- */

.account-panel {
  max-width: 540px;
  padding: 27px;

  border: 1px solid var(--rand);
  border-radius: 17px;

  background: rgba(20, 20, 20, 0.7);

  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);

  box-shadow: var(--schatten);
}

#auth-status {
  margin: 0 0 21px;
  color: var(--text-sanft);
  font-size: 13px;
  overflow-wrap: anywhere;
}

#auth-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#auth-form label {
  margin-top: 7px;
  color: #bdcbbf;
  font-size: 11px;
  font-weight: 680;
}

#auth-form input {
  width: 100%;
  height: 45px;

  padding: 0 13px;

  border: 1px solid var(--rand);
  border-radius: 10px;
  outline: none;

  background: rgba(25, 25, 25, 0.6);
  color: var(--text);

  font-size: 13px;

  transition:
    border-color var(--uebergang),
    background var(--uebergang);
}

#auth-form input::placeholder {
  color: #808080;
}

#auth-form input:focus {
  border-color: var(--rand-glow);
  background: rgba(30, 30, 30, 0.7);
}

#auth-form input:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* -------------------- Schaltflächen im Kontobereich -------------------- */

.account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 18px;
}

.account-actions button {
  min-height: 41px;
  padding: 0 15px;

  border-radius: 10px;

  font-size: 12px;
  font-weight: 680;

  transition:
    background var(--uebergang),
    border-color var(--uebergang);
}

#login-button {
  border: 1px solid rgba(119, 214, 138, 0.24);
  background: #278743;
  color: #f4fff6;
}

#login-button:hover:not(:disabled) {
  background: #329d50;
}

#signup-button {
  border: 1px solid var(--rand);
  background: #19231b;
  color: #d7e3d9;
}

#signup-button:hover:not(:disabled) {
  background: #202e23;
  border-color: rgba(255, 255, 255, 0.14);
}

#logout-button {
  border: 1px solid rgba(239, 119, 119, 0.22);
  background: rgba(239, 119, 119, 0.07);
  color: #f0a3a3;
}

#logout-button:hover:not(:disabled) {
  background: rgba(239, 119, 119, 0.14);
}

#auth-message {
  min-height: 20px;
  margin: 17px 0 0;

  color: var(--text-leise);
  font-size: 12px;
  line-height: 1.7;

  overflow-wrap: anywhere;
}

/* -------------------- Fußzeile -------------------- */

footer {
  margin-left: var(--seitenleisten-breite);
  padding: 0 30px 28px;

  color: #748176;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
}

/* -------------------- Tabletansicht -------------------- */

@media (max-width: 1050px) {
  :root {
    --seitenleisten-breite: 232px;
  }

  .site-header {
    padding: 0 24px;
  }

  .page-section {
    width: min(
      calc(100% - 46px),
      var(--inhaltsbreite)
    );
  }

  .topic-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* -------------------- Mobilgeräte -------------------- */

@media (max-width: 760px) {
  :root {
    --seitenleisten-breite: 0px;
  }

  .site-header {
    position: relative;
    left: 0;

    min-height: 60px;
    height: auto;

    padding: 12px 16px;
    gap: 12px;

    backdrop-filter: none;
    -webkit-backdrop-filter: none;

    background: #090e0b;
  }

  .site-header h1 {
    font-size: 16px;
  }

  .site-header-copy p {
    display: none;
  }

  .site-header-badge {
    font-size: 9px;
    padding: 5px 9px;
  }

  .sidebar {
    position: relative;
    inset: auto;

    width: 100%;
    min-height: auto;

    padding: 12px;

    border-right: 0;
    border-bottom: 1px solid var(--rand);
  }

  .sidebar-brand {
    padding: 2px 4px 13px;
  }

  .sidebar-brand-mark {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }

  .sidebar-note {
    display: none;
  }

  .sidebar-section {
    margin-top: 14px;
  }

  .navigation {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
  }

  .sidebar-label {
    margin-bottom: 7px;
  }

  .chat-history {
    max-height: 130px;
    overflow-y: auto;
  }

  .app-main {
    margin-left: 0;
    padding-top: 0;
  }

  .page-section {
    width: calc(100% - 30px);
    padding: 36px 0 72px;
  }

  .page-heading {
    margin-bottom: 27px;
  }

  .page-heading h2 {
    font-size: 32px;
  }

  .page-heading > p:not(.eyebrow) {
    font-size: 13px;
  }

  #welcome-screen {
    padding: 26px 17px;
    border-radius: 16px;
  }

  #welcome-screen h3 {
    font-size: 20px;
  }

  .suggestion-list {
    grid-template-columns: 1fr;
  }

  .suggestion-button {
    min-height: 52px;
  }

  .topic-grid {
    grid-template-columns: 1fr;
  }

  .topic-card {
    min-height: auto;
    padding: 20px;
  }

  #chat-form {
    bottom: 9px;
    width: 100%;
    padding: 6px;
    border-radius: 13px;
  }

  #message-input {
    height: 43px;
    padding: 0 10px;
    font-size: 12px;
  }

  #chat-form > button {
    min-width: 69px;
    height: 43px;
    padding: 0 12px;
    font-size: 11px;
  }

  .account-panel {
    padding: 20px;
  }

  footer {
    margin-left: 0;
    padding-bottom: 21px;
  }
}

/* -------------------- Sehr kleine Bildschirme -------------------- */

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

  .sidebar-link {
    min-height: 38px;
  }

  .new-chat-button {
    min-height: 41px;
  }

  .page-section {
    width: calc(100% - 24px);
  }

  .page-heading h2 {
    font-size: 28px;
  }

  #welcome-screen {
    padding: 22px 12px;
  }

  .account-actions button {
    flex: 1 1 auto;
  }

  #chat-form > button {
    min-width: 61px;
    padding: 0 9px;
  }
}

/* -------------------- Barrierearme reduzierte Bewegung -------------------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}