:root {
  /*
    Farben und Schatten liegen als Variablen ganz oben.
    Wenn du spaeter das Design aendern willst, ist das hier der beste Startpunkt.
  */
  color-scheme: light;
  --bg: #fbf7ef;
  --surface: #ffffff;
  --surface-soft: #f3eadf;
  --text: #1d2528;
  --muted: #647074;
  --line: #d9d2c6;
  --green: #236b4b;
  --red: #a93d36;
  --blue: #2f5f82;
  --yellow: #d6a528;
  --rose: #d98983;
  --mint: #b8d8c5;
  --lilac: #c7b7e8;
  --shadow: 0 22px 58px rgba(27, 37, 40, 0.12);
  --shadow-soft: 0 14px 34px rgba(27, 37, 40, 0.08);
}

/* box-sizing macht Groessenberechnung viel einfacher und vorhersehbarer. */
* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

/* Grunddesign fuer die ganze Seite. */
body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(47, 95, 130, 0.12), transparent 32%),
    linear-gradient(315deg, rgba(214, 165, 40, 0.16), transparent 28%),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
}

.site-body {
  background:
    radial-gradient(circle at 10% 8%, rgba(184, 216, 197, 0.56), transparent 28%),
    radial-gradient(circle at 88% 16%, rgba(199, 183, 232, 0.45), transparent 28%),
    linear-gradient(180deg, #fffaf2 0%, #f8efe4 55%, #fbf7ef 100%),
    var(--bg);
}

.site-header,
.site-footer {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.site-header {
  padding: 18px 0;
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
}

.site-brand {
  color: var(--text);
  font-size: 1.28rem;
  font-weight: 900;
  text-decoration: none;
}

.site-nav,
.site-footer nav,
.site-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.site-nav a,
.site-footer a,
.text-link {
  color: var(--blue);
  font-weight: 800;
  text-decoration: none;
}

.site-nav a:not(.site-login-link) {
  border-radius: 8px;
  padding: 9px 12px;
}

.site-nav a:not(.site-login-link):hover {
  background: rgba(255, 255, 255, 0.7);
}

.site-login-link {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 10px 16px;
  box-shadow: 0 12px 26px rgba(27, 37, 40, 0.08);
}

.site-hero,
.site-section,
.content-page {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-hero {
  min-height: min(720px, calc(100vh - 86px));
  display: grid;
  grid-template-columns: minmax(0, 0.96fr) minmax(340px, 0.74fr);
  gap: 52px;
  align-items: center;
  padding: 54px 0 78px;
}

.site-hero-content {
  max-width: 820px;
}

.site-hero h1,
.content-page h1 {
  max-width: 900px;
  font-size: clamp(2.55rem, 7vw, 5.7rem);
  letter-spacing: 0;
}

.site-hero p,
.lead {
  max-width: 760px;
  color: var(--muted);
  font-size: 1.16rem;
  line-height: 1.7;
}

.site-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 18px;
  text-decoration: none;
}

.site-actions {
  margin-top: 26px;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.trust-row span,
.profile-meta-row span {
  border: 1px solid rgba(217, 210, 198, 0.95);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  padding: 8px 10px;
}

.site-section {
  padding: 58px 0;
}

.intro-band {
  border-block: 1px solid rgba(217, 210, 198, 0.9);
}

.intro-band p {
  max-width: 980px;
  margin: 0;
  color: var(--text);
  font-size: clamp(1.45rem, 3vw, 2.45rem);
  font-weight: 900;
  line-height: 1.2;
}

.section-heading {
  max-width: 820px;
  margin-bottom: 22px;
}

.section-heading h2,
.split-section h2 {
  font-size: clamp(2rem, 4.4vw, 3.6rem);
}

.feature-grid,
.info-grid,
.comparison-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.feature-card,
.comparison-grid article,
.info-card,
.auth-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: var(--shadow);
  padding: 22px;
}

.feature-card:nth-child(1) {
  background: rgba(184, 216, 197, 0.45);
}

.feature-card:nth-child(2) {
  background: rgba(255, 255, 255, 0.82);
}

.feature-card:nth-child(3) {
  background: rgba(216, 137, 131, 0.22);
}

.feature-card:nth-child(4) {
  background: rgba(199, 183, 232, 0.32);
}

.feature-card span {
  color: var(--yellow);
  font-weight: 900;
}

.feature-card h2,
.info-card h2,
.split-section h2 {
  margin-top: 10px;
}

.feature-card p,
.comparison-grid p,
.info-card p,
.site-copy p,
.legal-page p {
  color: var(--muted);
  line-height: 1.65;
}

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

.comparison-grid article {
  background: rgba(255, 255, 255, 0.78);
}

.comparison-grid strong {
  display: block;
  font-size: 1.08rem;
  margin-bottom: 8px;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 48px;
  align-items: start;
  border-top: 1px solid rgba(217, 210, 198, 0.95);
}

.steps-section,
.faq-section {
  border-top: 1px solid rgba(217, 210, 198, 0.95);
}

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

.steps-grid article,
.faq-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  padding: 24px;
  box-shadow: var(--shadow);
}

.steps-grid strong {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
}

.steps-grid p,
.faq-grid p {
  color: var(--muted);
  line-height: 1.65;
}

.beta-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  padding-inline: 28px;
}

.content-page {
  padding: 58px 0 88px;
}

.product-preview {
  border: 1px solid rgba(217, 210, 198, 0.95);
  border-radius: 8px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.95), rgba(243, 234, 223, 0.92));
  box-shadow: 0 34px 80px rgba(27, 37, 40, 0.16);
  padding: 18px;
  transform: rotate(1.2deg);
}

.preview-topbar {
  display: flex;
  gap: 7px;
  margin-bottom: 18px;
}

.preview-topbar span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--rose);
}

.preview-topbar span:nth-child(2) {
  background: var(--yellow);
}

.preview-topbar span:nth-child(3) {
  background: var(--green);
}

.preview-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.preview-summary article,
.preview-list span {
  border: 1px solid rgba(217, 210, 198, 0.88);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.preview-summary span,
.preview-list em {
  color: var(--muted);
  font-size: 0.82rem;
  font-style: normal;
  font-weight: 800;
}

.preview-summary strong {
  display: block;
  margin-top: 6px;
  font-size: 1.45rem;
}

.preview-chart {
  height: 190px;
  display: flex;
  align-items: end;
  gap: 12px;
  margin: 22px 0;
  padding: 16px;
  border: 1px solid rgba(217, 210, 198, 0.88);
  border-radius: 8px;
  background: rgba(246, 243, 237, 0.75);
}

.preview-chart div {
  flex: 1;
  height: var(--height);
  min-height: 28px;
  border-radius: 12px 12px 5px 5px;
  background: var(--blue);
}

.preview-chart div:nth-child(2) {
  background: var(--green);
}

.preview-chart div:nth-child(3) {
  background: var(--rose);
}

.preview-chart div:nth-child(4) {
  background: var(--yellow);
}

.preview-chart div:nth-child(5) {
  background: var(--lilac);
}

.preview-list {
  display: grid;
  gap: 10px;
}

.preview-list span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.auth-body {
  display: grid;
  place-items: center;
}

.auth-shell {
  width: min(460px, calc(100% - 32px));
}

.auth-panel {
  margin-top: 20px;
}

.auth-panel h1 {
  font-size: 2.2rem;
}

.auth-form {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.auth-note {
  color: var(--muted);
}

.auth-message {
  color: var(--blue);
  font-weight: 800;
  line-height: 1.5;
  margin: 0;
}

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  padding: 24px 0 34px;
}

.product-hero {
  position: relative;
  width: min(1440px, 100%);
  min-height: min(760px, calc(100vh - 72px));
  display: flex;
  grid-template-columns: none;
  align-items: center;
  overflow: hidden;
  padding: 64px max(32px, calc((100% - 1180px) / 2));
}

.product-hero-image,
.product-hero-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.product-hero-image {
  object-fit: cover;
  object-position: center;
}

.product-hero-shade {
  background: rgba(15, 25, 28, 0.68);
}

.product-hero .site-hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
  color: #fff;
}

.product-hero .eyebrow,
.product-hero .site-hero-content > p {
  color: rgba(255, 255, 255, 0.88);
}

.product-hero h1 {
  margin: 10px 0 18px;
  color: #fff;
}

.product-hero .primary-button {
  background: #fff;
  color: var(--green);
}

.product-hero .secondary-button {
  border-color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.product-hero .trust-row span {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(15, 25, 28, 0.48);
  color: #fff;
}

.product-tour {
  display: grid;
  gap: 72px;
}

.product-story {
  display: grid;
  grid-template-columns: minmax(240px, 0.65fr) minmax(0, 1.35fr);
  gap: 42px;
  align-items: center;
}

.product-story.reverse .product-story-copy {
  order: 2;
}

.product-story-copy {
  max-width: 480px;
}

.product-story-copy > span {
  color: var(--rose);
  font-size: 0.82rem;
  font-weight: 900;
}

.product-story-copy h3 {
  margin: 10px 0 14px;
  font-size: clamp(1.8rem, 3vw, 3rem);
}

.product-story-copy p,
.positioning-copy p,
.positioning-status p,
.trademark-note {
  color: var(--muted);
  line-height: 1.65;
}

.product-shot {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 28px 64px rgba(27, 37, 40, 0.16);
}

.product-shot img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
}

.product-positioning {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 54px;
  border-block: 1px solid var(--line);
}

.positioning-copy h2 {
  margin: 10px 0 18px;
  font-size: clamp(2rem, 4vw, 3.6rem);
}

.positioning-status {
  align-self: center;
  border-left: 4px solid var(--green);
  padding-left: 24px;
}

.positioning-status strong {
  display: block;
  margin-top: 20px;
  font-size: 1.08rem;
}

.positioning-status strong:first-child {
  margin-top: 0;
}

.trademark-note {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 0.78rem;
}

.beta-section .section-heading {
  margin-bottom: 0;
}

.beta-section .site-actions {
  margin-top: 20px;
}

/* Formularfelder und Buttons sollen dieselbe Schrift wie die Seite nutzen. */
button,
input,
select,
textarea {
  font: inherit;
}

/* Zentriert die App und begrenzt die maximale Breite. */
.app-body {
  background:
    radial-gradient(circle at 8% 8%, rgba(184, 216, 197, 0.52), transparent 28%),
    radial-gradient(circle at 88% 4%, rgba(199, 183, 232, 0.36), transparent 27%),
    linear-gradient(180deg, #fffaf2 0%, #f7eee3 54%, #fbf7ef 100%);
}

.app-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 44px;
}

/* Wiederverwendete Flexbox-Grundregel fuer mehrere Zeilen/Leisten. */
.topbar,
.app-hero,
.top-actions,
.panel-header,
.form-header,
.transaction,
.transaction-side,
.filters,
.field-row {
  display: flex;
  align-items: center;
}

/* Obere Leiste mit Titel links und Aktionsbuttons rechts. */
.topbar {
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.app-hero {
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 18px;
  border: 1px solid rgba(217, 210, 198, 0.95);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(248, 239, 228, 0.9)),
    var(--surface);
  box-shadow: var(--shadow);
  padding: clamp(20px, 3vw, 34px);
}

.app-hero-copy {
  max-width: 720px;
}

.app-hero-copy h1 {
  font-size: clamp(2.2rem, 5vw, 4.1rem);
}

.app-hero-copy p:not(.eyebrow) {
  max-width: 620px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.55;
}

.app-hero-panel {
  width: min(380px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  padding: 16px;
}

.profile-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.profile-meta-row span:first-child {
  color: var(--green);
}

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.top-actions {
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-top: 12px;
}

#profileSwitcher {
  min-height: 46px;
  box-shadow: none;
}

.app-feedback-link {
  text-decoration: none;
}

/* Kleine Ueberschrift ueber dem App-Namen. */
.eyebrow {
  margin: 0 0 6px;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

/* Gemeinsame Ueberschriften-Basis. */
h1,
h2 {
  margin: 0;
  line-height: 1.1;
}

/* clamp sorgt fuer flexible Groesse: klein auf Handy, gross auf Desktop. */
h1 {
  font-size: clamp(2rem, 6vw, 4.4rem);
}

h2 {
  font-size: 1.1rem;
}

/* Gemeinsames Button-Grunddesign fuer kleine Icon-/Loeschbuttons. */
.icon-button,
.delete-button {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

/* CSV-Button oben rechts. */
.icon-button {
  width: 46px;
  height: 44px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 800;
  box-shadow: var(--shadow);
}

/* Drei Uebersichtskarten nebeneinander. */
.summary-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 14px;
  margin-bottom: 18px;
}

/* Gemeinsames Karten-Design fuer mehrere Bereiche. */
.summary-card,
.entry-form,
.panel,
.transactions-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-soft);
}

/* Einzelne Karte fuer Gesamtstand/Einnahmen/Ausgaben. */
.summary-card {
  min-height: 124px;
  padding: 20px;
  display: grid;
  align-content: space-between;
  position: relative;
  overflow: hidden;
}

.summary-card::after {
  content: "";
  position: absolute;
  right: -34px;
  bottom: -46px;
  width: 118px;
  height: 118px;
  border-radius: 50%;
  background: rgba(184, 216, 197, 0.42);
}

/* Kleine Beschriftung in den Uebersichtskarten. */
.summary-card span {
  color: var(--muted);
  font-weight: 700;
  position: relative;
  z-index: 1;
}

/* Grosse Zahl in den Uebersichtskarten. */
.summary-card strong {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  line-height: 1;
  position: relative;
  z-index: 1;
}

/* Die Gesamtstand-Karte soll visuell staerker sein. */
.summary-card.total {
  background:
    linear-gradient(135deg, #1f3537, #2f5f82);
  color: #fff;
}

.summary-card.total span {
  color: #c9d5d5;
}

/* Hauptbereich: Formular links, Konten rechts. */
.workspace {
  display: grid;
  grid-template-columns: minmax(320px, 0.86fr) minmax(420px, 1.14fr);
  gap: 18px;
  align-items: start;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.95fr) minmax(380px, 1.05fr);
  gap: 18px;
  align-items: start;
}

.dashboard-grid .panel:last-child {
  grid-column: 1 / -1;
}

/* Innenabstand fuer die grossen Flaechen. */
.entry-form,
.panel,
.transactions-section {
  padding: clamp(18px, 2vw, 24px);
}

/* Das Formular ist ein vertikales Raster mit Abstand. */
.entry-form {
  display: grid;
  gap: 16px;
}

/* Kopfzeilen innerhalb von Formular und Panels. */
.form-header,
.panel-header {
  justify-content: space-between;
  gap: 12px;
}

.panel-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid rgba(47, 95, 130, 0.2);
  border-radius: 999px;
  background: rgba(47, 95, 130, 0.08);
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 900;
  padding: 7px 10px;
}

.panel-note {
  margin: 10px 0 16px;
  color: var(--muted);
  line-height: 1.5;
  font-weight: 700;
}

/* Label stehen ueber den Feldern. */
label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

/* Einheitliches Aussehen fuer Eingaben und Auswahlfelder. */
input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 10px 12px;
}

textarea {
  resize: vertical;
}

.feedback-form {
  display: grid;
  gap: 16px;
  margin-top: 24px;
  padding: 22px;
}

#feedbackWebsite {
  position: absolute;
  left: -10000px;
  opacity: 0;
}

button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* Zwei Formularfelder in einer Zeile. */
.field-row {
  gap: 12px;
}

.field-row > label {
  flex: 1;
}

/* Umschalter Einnahme/Ausgabe. */
.type-toggle {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  overflow: hidden;
}

/* Labels im Umschalter werden wie Buttons dargestellt. */
.type-toggle label {
  display: block;
  color: var(--text);
  font-size: 0.84rem;
}

/* Das echte Radio-Feld wird versteckt, bleibt aber fuer Bedienung vorhanden. */
.type-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* Sichtbarer Teil des Umschalters. */
.type-toggle span {
  display: block;
  min-width: 92px;
  padding: 10px 12px;
  text-align: center;
  cursor: pointer;
}

/* Aktive Auswahl im Umschalter. */
.type-toggle input:checked + span {
  background: var(--blue);
  color: #fff;
}

/* Gemeinsame Button-Basis fuer Hauptbutton, Backup-Button und Textbutton. */
.primary-button,
.secondary-button,
.text-button {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
  white-space: nowrap;
}

/* Gruener Button fuer die wichtigste Aktion. */
.primary-button {
  min-height: 48px;
  background: linear-gradient(135deg, var(--green), #2f7f78);
  color: #fff;
  box-shadow: 0 14px 30px rgba(35, 107, 75, 0.18);
}

/* Backup-Button oben rechts. */
.secondary-button {
  min-height: 48px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
  color: var(--blue);
  padding: 0 16px;
  box-shadow: 0 10px 22px rgba(27, 37, 40, 0.08);
}

.primary-button:hover,
.secondary-button:hover,
.nav-button:hover,
.edit-button:hover,
.icon-button:hover {
  transform: translateY(-1px);
}

/* Schlichter Button fuer Nebenaktionen. */
.text-button {
  background: transparent;
  color: var(--blue);
  padding: 8px 0;
}

/* Kleine Statusmeldung fuer Speichern und Backups. */
.status-message {
  min-height: 24px;
  margin: -12px 0 18px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.app-nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 18px;
  border: 1px solid rgba(217, 210, 198, 0.95);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
  padding: 8px;
}

.nav-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-weight: 800;
  padding: 0 16px;
}

.nav-button.active {
  background: var(--surface);
  color: var(--blue);
  border-color: var(--line);
  box-shadow: 0 10px 22px rgba(27, 37, 40, 0.08);
}

.nav-button.active::before {
  content: "";
  display: block;
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--green);
}

.nav-button:focus-visible,
.primary-button:focus-visible,
.secondary-button:focus-visible,
.text-button:focus-visible,
.icon-button:focus-visible,
.edit-button:focus-visible,
.delete-button:focus-visible {
  outline: 3px solid rgba(47, 95, 130, 0.28);
  outline-offset: 2px;
}

.warning-card {
  background: rgba(255, 255, 255, 0.9);
}

.warning-card strong {
  color: var(--green);
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.warning-card:has(strong.danger) {
  background: rgba(169, 61, 54, 0.1);
}

.warning-card strong.danger {
  color: var(--red);
}

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkbox-field input {
  width: 18px;
  min-height: 18px;
}

.form-actions,
.inline-form {
  display: flex;
  gap: 10px;
  align-items: center;
}

.compact {
  min-height: 44px;
  padding: 0 14px;
}

.transaction-filters {
  margin-top: 14px;
}

.stats-grid,
.stats-workspace,
.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.stats-story-panel {
  grid-column: auto;
}

.profile-panel {
  grid-column: 1 / -1;
}

.statistics-header {
  margin-bottom: 18px;
}

.stats-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.stat-tile {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 14px 34px rgba(27, 37, 40, 0.09);
  padding: 16px;
}

.stat-tile span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.stat-tile strong {
  color: var(--text);
  font-size: 1.35rem;
  overflow-wrap: anywhere;
}

.stat-tile.income strong {
  color: var(--green);
}

.stat-tile.expense strong {
  color: var(--red);
}

.stat-panel {
  min-height: 100%;
}

.wide-stat-panel {
  grid-column: auto;
}

.chart-list,
.budget-list,
.dashboard-budget-list,
.settings-list,
.stats-insight-list,
.cashflow-chart {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.chart-row,
.budget-row,
.settings-item,
.stats-insight,
.cashflow-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(243, 234, 223, 0.78);
  padding: 14px;
}

.chart-row:hover,
.budget-row:hover,
.settings-item:hover,
.stats-insight:hover,
.cashflow-row:hover,
.account:hover,
.transaction:hover,
.cash-row:hover {
  border-color: rgba(47, 95, 130, 0.34);
}

.stats-insight {
  display: grid;
  gap: 8px;
}

.stats-insight span,
.stats-insight p {
  color: var(--muted);
  font-weight: 800;
}

.stats-insight strong {
  font-size: 1.2rem;
}

.stats-insight p {
  margin: 0;
  line-height: 1.45;
}

.cashflow-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) minmax(110px, auto);
  align-items: center;
  gap: 12px;
}

.cashflow-label {
  color: var(--muted);
  font-weight: 900;
}

.cashflow-bars {
  display: grid;
  gap: 6px;
  min-height: 12px;
}

.cashflow-bar {
  display: block;
  min-width: 4px;
  height: 10px;
  border-radius: 999px;
}

.cashflow-bar.income {
  background: var(--green);
}

.cashflow-bar.expense {
  background: var(--red);
}

.budget-percent {
  color: var(--muted);
  font-weight: 900;
}

.chart-row-top,
.settings-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.settings-item-text,
.settings-item-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.settings-item-text {
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}

.settings-item-text span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.settings-item-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.profile-role-select {
  min-height: 40px;
}

.chart-row-top span,
.budget-row span {
  color: var(--muted);
  font-weight: 800;
}

.bar-track {
  width: 100%;
  height: 9px;
  border-radius: 999px;
  background: rgba(29, 37, 40, 0.12);
  overflow: hidden;
  margin-top: 10px;
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
}

.chart-row.income .bar-fill {
  background: var(--green);
}

.chart-row.danger .bar-fill,
.budget-row.over .bar-fill {
  background: var(--red);
}

body[data-color-mode="category"] .budget-row .bar-fill,
body[data-color-mode="category"] .chart-row .bar-fill {
  background: var(--category-color, var(--blue));
}

.budget-row.near .bar-fill {
  background: var(--yellow);
}

.budget-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(120px, 180px);
  align-items: center;
  gap: 12px;
}

.budget-row small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.budget-row .bar-track {
  grid-column: 1 / -1;
}

.month-input {
  width: auto;
}

.outlay-pill {
  border: 1px solid rgba(47, 95, 130, 0.35);
  border-radius: 999px;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 800;
  padding: 4px 8px;
}

.edit-button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--blue);
  cursor: pointer;
  font-weight: 800;
  min-height: 34px;
  padding: 0 10px;
}

.trend-panel {
  grid-column: auto;
}

.line-chart {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.line-chart svg,
.line-chart-inner svg {
  width: 100%;
  min-height: 260px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(243, 234, 223, 0.7));
  padding: 8px;
}

.line-chart line,
.line-chart-inner line {
  stroke: rgba(29, 37, 40, 0.22);
  stroke-width: 2;
}

.line-chart text,
.line-chart-inner text {
  fill: var(--muted);
  font-size: 0.75rem;
}

.line-chart .grid-line,
.line-chart-inner .grid-line {
  stroke: rgba(29, 37, 40, 0.1);
  stroke-width: 1;
}

.category-trend-card {
  border: 1px solid var(--line);
  border-left: 7px solid var(--category-color);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 28px rgba(27, 37, 40, 0.07);
  padding: 16px;
}

.category-trend-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.category-trend-header h3 {
  margin: 0;
  font-size: 1rem;
}

.line-legend,
.pie-legend,
.series-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.line-legend span,
.pie-legend span,
.series-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 800;
  padding: 6px 10px;
}

.line-legend i,
.pie-legend i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.series-toggle input {
  width: 14px;
  min-height: 14px;
}

.color-input {
  width: 44px;
  min-height: 34px;
  padding: 3px;
}

.pie-chart {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 16px;
  align-items: center;
  margin-top: 16px;
}

.pie-chart svg {
  width: 180px;
  height: 180px;
  border-radius: 50%;
}

.cashbox-total {
  color: var(--green);
  font-size: 1.35rem;
}

.cash-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 16px;
}

.cash-row {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) 92px minmax(120px, auto);
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--text);
  padding: 12px;
}

.cash-row input {
  min-height: 38px;
  text-align: right;
  margin: 0;
}

.cash-row strong {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.cash-denomination {
  color: var(--text);
  font-weight: 900;
}

.cash-summary {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.cash-summary article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  display: grid;
  gap: 8px;
  padding: 16px;
}

.cash-summary span {
  color: var(--muted);
  font-weight: 800;
}

.cash-summary strong {
  font-size: 1.4rem;
}

.danger {
  color: var(--red);
}

/* Kontokarten als 2-spaltiges Raster. */
.account-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

/* Einzelne Kontokarte. */
.account {
  min-height: 104px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.76), rgba(243, 234, 223, 0.84));
  display: grid;
  align-content: space-between;
  gap: 12px;
}

/* Kontoname. */
.account span {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

/* Kontostand. */
.account strong {
  font-size: 1.25rem;
}

/* Abstand zwischen oberem Arbeitsbereich und Buchungsliste. */
.transactions-section {
  margin-top: 18px;
}

/* Filter nebeneinander, aber umbrechbar. */
.filters {
  gap: 10px;
  flex-wrap: wrap;
}

.filters select {
  min-width: 160px;
}

.stat-period-select {
  width: auto;
  min-width: 140px;
  min-height: 38px;
  background: rgba(255, 255, 255, 0.82);
  font-weight: 800;
}

/* Liste der Buchungen. */
.transaction-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

/* Einzelne Buchungszeile. */
.transaction {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 68px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.84);
}

body[data-color-mode="category"] .transaction {
  border-left: 7px solid var(--category-color, var(--line));
}

/* Linker Teil der Buchungszeile. */
.transaction-main {
  min-width: 0;
}

/* Titel und Metadaten stehen untereinander. */
.transaction-title,
.transaction-meta {
  display: block;
}

/* Lange Beschreibungen duerfen umbrechen. */
.transaction-title {
  overflow-wrap: anywhere;
}

/* Datum, Konto und Kategorie kleiner und dezenter. */
.transaction-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.88rem;
}

/* Rechter Teil mit Betrag und Loeschbutton. */
.transaction-side {
  justify-content: flex-end;
  gap: 10px;
  flex-shrink: 0;
}

/* Einnahmen gruen. */
.transaction-amount.income {
  color: var(--green);
}

/* Ausgaben rot. */
.transaction-amount.expense {
  color: var(--red);
}

.transaction-amount.transfer {
  color: var(--blue);
}

.actions-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.6fr);
  gap: 18px;
  align-items: start;
}

.action-form,
.action-expense-form,
.action-list,
.action-detail,
.settlement-list,
.action-expense-list {
  display: grid;
  gap: 12px;
}

.action-list,
.action-detail {
  margin-top: 16px;
}

.action-card {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--text);
  cursor: pointer;
  display: grid;
  gap: 6px;
  padding: 14px;
  text-align: left;
}

.action-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.action-card-title small {
  color: var(--muted);
}

.action-positive {
  color: var(--green);
}

.action-card.active {
  border-color: rgba(35, 107, 75, 0.45);
  box-shadow: inset 5px 0 0 var(--green);
}

.action-card span,
.action-expense-row span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.participant-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.participant-checks label {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 12px;
}

.participant-checks input {
  width: 14px;
  min-height: 14px;
}

.action-member-picker {
  min-width: 0;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.action-member-picker legend {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
  padding: 0 6px;
}

.action-invite-link {
  align-self: center;
  font-size: 0.86rem;
  padding: 8px;
}

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

.action-overview article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(184, 216, 197, 0.3);
  display: grid;
  gap: 8px;
  padding: 16px;
}

.action-overview span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.action-overview strong {
  font-size: 1.3rem;
}

.action-paid-grid {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.action-paid-grid span {
  min-width: 132px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  display: grid;
  gap: 5px;
  padding: 10px;
}

.settings-intro {
  margin-bottom: 18px;
}

.settings-stack {
  display: grid;
  gap: 14px;
}

.settings-section {
  padding: 0;
  overflow: hidden;
}

.settings-section > summary {
  cursor: pointer;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 16px;
  list-style: none;
  padding: 20px 22px;
}

.settings-section > summary::-webkit-details-marker {
  display: none;
}

.settings-section > summary::after {
  content: "+";
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  color: var(--blue);
  font-size: 1.4rem;
  font-weight: 800;
}

.settings-section[open] > summary::after {
  content: "−";
}

.settings-section > summary span {
  font-size: 1.05rem;
  font-weight: 900;
}

.settings-section > summary small {
  color: var(--muted);
  font-weight: 700;
}

.settings-section-content {
  border-top: 1px solid var(--line);
  padding: 20px 22px 24px;
}

.settings-two-column,
.settings-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.settings-section h3 {
  margin: 0 0 14px;
}

.opening-balance-input {
  width: 140px;
}

.settings-legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 18px;
}

.settings-legal-links a {
  color: var(--blue);
  font-weight: 800;
}

.settlement-row,
.action-expense-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(243, 234, 223, 0.78);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 14px;
}

.action-transfer-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(140px, 1fr) auto;
  gap: 10px;
  margin-top: 4px;
}

/* Kleiner Loeschbutton. */
.delete-button {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  color: var(--muted);
}

.account-panel {
  grid-column: 1 / -1;
}

.danger-zone {
  border-color: rgba(169, 61, 54, 0.35);
}

.delete-account-button {
  border: 0;
  border-radius: 8px;
  background: var(--red);
  color: #fff;
  cursor: pointer;
  font-weight: 900;
  min-height: 44px;
  padding: 0 14px;
}

.app-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 28px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  padding: 22px 4px 0;
}

.app-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.app-footer a {
  color: var(--blue);
  font-weight: 800;
  text-decoration: none;
}

/* Anzeige, wenn keine Buchungen vorhanden sind oder Filter nichts finden. */
.empty-state {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 26px;
  color: var(--muted);
  text-align: center;
  background: rgba(255, 255, 255, 0.55);
}

/* Tablet/kleine Laptops: Layout wird einspaltig. */
@media (max-width: 820px) {
  .site-header,
  .site-footer,
  .split-section {
    align-items: flex-start;
    grid-template-columns: 1fr;
  }

  .site-header,
  .site-footer {
    flex-direction: column;
  }

  .site-hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 42px 0 64px;
  }

  .product-preview {
    transform: none;
  }

  .feature-grid,
  .info-grid,
  .comparison-grid,
  .steps-grid,
  .faq-grid {
    grid-template-columns: 1fr;
  }

  .summary-grid,
  .workspace,
  .actions-grid,
  .dashboard-grid,
  .stats-grid,
  .stats-workspace,
  .stats-summary-grid,
  .settings-grid,
  .cash-grid {
    grid-template-columns: 1fr;
  }

  .stats-story-panel,
  .wide-stat-panel {
    grid-column: auto;
  }

  .topbar,
  .app-hero,
  .panel-header {
    align-items: flex-start;
  }

  .app-hero {
    flex-direction: column;
  }

  .panel-header {
    flex-direction: column;
  }

  .filters,
  .filters select,
  .field-row,
  .inline-form,
  .form-actions {
    width: 100%;
  }

  .field-row,
  .inline-form,
  .form-actions {
    flex-direction: column;
  }

  .budget-row {
    grid-template-columns: 1fr;
  }

  .pie-chart {
    grid-template-columns: 1fr;
  }

  .cashflow-row {
    grid-template-columns: 1fr;
  }

  .action-transfer-row {
    grid-template-columns: 1fr;
  }

  .settings-two-column,
  .settings-form-grid,
  .action-overview {
    grid-template-columns: 1fr;
  }
}

/* Handys: engerer Rand und gestapelte Elemente. */
@media (max-width: 560px) {
  .app-shell {
    width: min(100% - 20px, 1180px);
    padding-top: 16px;
  }

  .summary-card,
  .entry-form,
  .panel,
  .transactions-section {
    padding: 16px;
  }

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

  .form-header,
  .app-hero,
  .topbar,
  .transaction {
    align-items: stretch;
    flex-direction: column;
  }

  .top-actions {
    align-items: stretch;
    justify-content: stretch;
  }

  .app-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .transaction-side {
    justify-content: space-between;
  }

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

  .cash-row {
    grid-template-columns: 1fr 76px;
  }

  .cash-row strong {
    grid-column: 1 / -1;
  }

  .app-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 10px;
  }

  .nav-button {
    flex: 0 0 auto;
  }

  .settings-item {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .opening-balance-input {
    width: 120px;
  }
}

@media (max-width: 820px) {
  .product-hero {
    width: 100%;
    min-height: calc(100vh - 118px);
    display: flex;
    padding: 52px 24px;
  }

  .product-hero-image {
    object-position: 62% center;
  }

  .product-story,
  .product-positioning {
    grid-template-columns: 1fr;
  }

  .product-story.reverse .product-story-copy {
    order: initial;
  }

  .product-story {
    gap: 24px;
  }

  .trademark-note {
    grid-column: auto;
  }
}

@media (max-width: 560px) {
  .product-hero {
    min-height: calc(100vh - 150px);
    padding: 42px 20px;
  }

  .product-hero .site-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .product-hero .site-button {
    width: 100%;
  }

  .product-tour {
    gap: 48px;
  }
}
