:root {
  --bg: #05020a;
  --surface: #130c1c;
  --surface2: #1e142b;
  --primary: #d946ef;
  --secondary: #8b5cf6;
  --accent: #06b6d4;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --text-main: #e2e8f0;
  --text-muted: #9ca3af;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --radius-lg: 6px;
  --radius-pill: 999px;
  --shadow-card: 0 18px 50px rgba(0, 0, 0, 0.7);
  color-scheme: dark;
}

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

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Poppins", sans-serif;
  background-color: var(--bg);
  background-image: radial-gradient(
      circle at 15% 50%,
      rgba(139, 92, 246, 0.16),
      transparent 25%
    ),
    radial-gradient(
      circle at 85% 30%,
      rgba(217, 70, 239, 0.16),
      transparent 25%
    );
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Typo-Defaults */

button,
input,
select {
  font-family: "Poppins", sans-serif;
  font-weight: 500;
}

/* Basic focus styles */

/* Scrollbar */

::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #4b5563;
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: #6b7280;
}

/* Glass-Effekt */

.card,
.nav-finanzplan,
.top-nav,
.sparziel-card {
  background: linear-gradient(
    145deg,
    rgba(30, 20, 43, 0.7),
    rgba(19, 12, 28, 0.7)
  );
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-card);
}

.card-verfuegbar {
  border: 1px solid rgba(217, 70, 239, 0.3);
  box-shadow: 0 10px 40px -10px rgba(217, 70, 239, 0.2);
}

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

.top-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: 1.5rem;
}

.nav-left {
  display: flex;
  align-items: center;
}

.nav-center {
  flex: 1;
  display: flex;
  justify-content: center;
}

.nav-center-content {
  align-items: center;
  gap: 0.6rem;
  padding: 0.35rem 1.1rem;
  border-radius: 999px;
  background-color: var(--surface2);
  border: 1px solid rgba(255, 255, 255, 0.11);
}

.month-prev,
.month-next {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: none;
  background: rgba(255, 255, 255, 0.06);
  color: #e5e7eb;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, transform 0.1s ease;
}
.month-prev:hover,
.month-next:hover {
  background: linear-gradient(135deg, var(--secondary), var(--primary));
  color: #fff;
  transform: translateY(-1px);
}

.month-label {
  min-width: 130px;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 500;
}

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

.profile-switch {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  background: var(--surface2);
  border-radius: 999px;
  padding: 0.15rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.btn-Julius,
.btn-Lara {
  border-radius: 999px;
  border: none;
  padding: 0.35rem 0.9rem;
  font-size: 0.8rem;
  cursor: pointer;
  background: transparent;
  color: #9ca3af;
  transition: background 0.18s ease, color 0.18s ease;
}

.active-user {
  background: linear-gradient(135deg, var(--secondary), var(--primary));
  color: #fff;
  font-weight: 600;
}

.btn-bell {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  cursor: pointer;
}

.btn-bell svg {
  width: 16px;
  height: 16px;
}

.btn-bell-dot {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #ef4444;
  border: 2px solid var(--surface2);
  top: 7px;
  right: 7px;
}

/* Hamburger (nur mobile sichtbar) */

.navf-toggle {
  width: 38px;
  height: 32px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(19, 12, 28, 0.9);
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 0;
  cursor: pointer;
}

.navf-toggle-bar {
  height: 2px;
  width: 18px;
  border-radius: 999px;
  background: #ffffff;
}

/* ---- Layout ---- */

main {
  display: flex;
  flex: 1;
  min-height: 0;
}

.nav-finanzplan {
  width: 260px;
  padding: 1.5rem 1.4rem 1.3rem;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
}

.screen-wrapper {
  flex: 1;
  padding: 1.8rem 2.2rem 2.4rem;
  min-width: 0;
}

.screen {
  display: none;
}

.screen.active {
  display: block;
}

/* ---- Sidebar ---- */

.navf-top {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 2.4rem;
}

.navf-logo {
  width: 42px;
  height: 42px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.9);
}

.navf-logo-inner svg {
  width: 20px;
  height: 20px;
  color: #fff;
}

.navf-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.navf-title {
  font-weight: 600;
  font-size: 1.1rem;
}

.navf-subtitle {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.navf-menu {
  list-style: none;
  padding: 0;
  margin: 0 0 2.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.navf-item a {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 0.9rem;
  border-radius: 16px;
  color: #9ca3af;
  text-decoration: none;
  font-size: 0.9rem;
  transition: background 0.18s ease, color 0.18s ease, transform 0.1s ease,
    border-left 0.18s ease;
}

.navf-item.active a,
.navf-item a:hover {
  background: linear-gradient(90deg, rgba(217, 70, 239, 0.1), transparent);
  color: #ffffff;
  transform: translateY(-1px);
  border-left: 3px solid var(--primary);
}

.navf-icon {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.navf-icon svg {
  width: 16px;
  height: 16px;
  color: currentColor;
}

.navf-logout {
  margin-top: auto;
  border: none;
  padding: 0.6rem 0.8rem;
  border-radius: 16px;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: #fca5a5;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.18s ease;
}

.navf-logout:hover {
  background: rgba(248, 113, 113, 0.1);
}

.navf-logout-icon {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: rgba(248, 113, 113, 0.14);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ---- Finanzplan Layout ---- */

.finanzplan {
  max-width: auto;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(0, 1.8fr);
  gap: 1.6rem;
}

.finanzplan-1,
.finanzplan-2 {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

/* KPI-Karten */

.rechnung {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.card {
  border-radius: var(--radius-lg);
  padding: 1.2rem 1.3rem;
}

.summary-card {
  position: relative;
  overflow: hidden;
}

.summary-card::after {
  content: "";
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: 999px;
  background: radial-gradient(
    circle at top,
    rgba(217, 70, 239, 0.26),
    transparent
  );
  right: -40px;
  top: -40px;
  opacity: 0.7;
}

.summary-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.3rem;
}

.summary-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.summary-icon {
  font-size: 1rem;
}

.summary-value {
  margin: 0.15rem 0;
  font-size: 1.4rem;
  font-weight: 600;
}

.summary-subtext {
  margin: 0.15rem 0 0.7rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.summary-subtext span {
  color: #fecaca;
}

.text-income {
  color: #6ee7b7;
}

.text-negative {
  color: #fca5a5;
}

.text-var {
  color: #fed7aa;
}

.text-positive {
  color: #22c55e;
}

/* Progressbar */

.summary-progress {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.4);
  overflow: hidden;
}

.summary-progress-bar {
  display: block;
  width: 45%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
}

/* Pill */

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.1rem 0.55rem;
  font-size: 0.7rem;
}

.pill-warning {
  background: rgba(248, 113, 113, 0.15);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Neue Ausgabe + Tabelle */

.finanzplan-1-main {
  align-items: flex-start;
}

.neue-ausgabe-toggle > summary {
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
}

.neue-ausgabe-content {
  margin-top: 0.8rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.neue-ausgabe-content input,
.neue-ausgabe-content select {
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.5rem 0.75rem;
  background: rgba(19, 12, 28, 0.9);
  color: var(--text-main);
  font-size: 0.85rem;
}

.neue-ausgabe-content input::placeholder {
  color: rgba(148, 163, 184, 0.6);
}

.hinzufügen-btn {
  grid-column: 1 / -1;
  border-radius: var(--radius-pill);
  border: none;
  padding: 0.55rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.hinzufügen-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(148, 27, 255, 0.4);
}

/* Laufende Kosten */

.uebersicht {
  padding: 1.1rem 1.25rem;
}

.ausgaben-summary-title {
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
}

.Ausgaben {
  margin-top: 0.8rem;
}

.ausgaben-kopf {
  display: grid;
  grid-template-columns: 2.5fr 1fr 1fr 1.1fr 0.9fr;
  gap: 0.6rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #9ca3af;
  border-bottom: 1px solid rgba(148, 163, 184, 0.3);
  padding-bottom: 0.35rem;
}

.zeilen {
  margin-top: 0.5rem;
  font-size: 0.85rem;
}

/* Beispiel-Zeilen – nur fürs Design */

.ausgaben-zeile {
  display: grid;
  grid-template-columns: 2.5fr 1fr 1fr 1.1fr 0.9fr;
  gap: 0.6rem;
  align-items: center;
  padding: 0.45rem 0.35rem;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.35);
  margin-bottom: 0.35rem;
}

.ausgaben-name {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.ausgaben-icon {
  width: 32px;
  height: 32px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

.ausgaben-icon-wohnen {
  background: rgba(59, 130, 246, 0.2);
  color: #bfdbfe;
}

.ausgaben-icon-abo {
  background: rgba(147, 51, 234, 0.25);
  color: #e9d5ff;
}

.ausgaben-titel {
  margin: 0;
  font-weight: 500;
}

.ausgaben-kategorie {
  margin: 0;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.ausgaben-betrag {
  text-align: right;
}

.ausgaben-faellig {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.ausgaben-status {
  font-size: 0.75rem;
  text-align: center;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
}

.status-paid {
  background: rgba(16, 185, 129, 0.12);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.status-open {
  background: rgba(239, 68, 68, 0.12);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.ausgaben-aktion {
  text-align: center;
}

.aktion-btn {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: transparent;
  color: #e5e7eb;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease,
    transform 0.1s ease;
}

.aktion-btn:hover {
  background: rgba(148, 163, 184, 0.1);
  border-color: var(--primary);
  transform: translateY(-1px);
}

/* ---- Rechte Seite ---- */

.umsaetze-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.7rem;
}

.umsaetze-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.umsaetze-title h3 {
  margin: 0;
  font-size: 0.95rem;
}

.umsaetze-icon {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}

.umsaetze-filter {
  display: flex;
  gap: 0.35rem;
}

.chip {
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  font-size: 0.75rem;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.05);
  color: #9ca3af;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, transform 0.1s ease;
}

.chip-active,
.chip:hover {
  background: linear-gradient(135deg, var(--secondary), var(--primary));
  color: #fff;
  transform: translateY(-2px);
}

.umsaetze-body {
  min-height: 130px;
  font-size: 0.85rem;
}

.right-column {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* ---- Offene Umsätze Screen ---- */

.offen-header h2 {
  margin: 0 0 0.4rem;
  font-size: 1.2rem;
}

.offen-header .placeholder-text {
  margin: 0 0 1.2rem;
}

.offen-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  gap: 1.2rem;
}

.offen-kontostand-input {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  margin-bottom: 1rem;
}

.offen-kontostand-input input {
  flex: 1;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.55rem 0.75rem;
  background: var(--surface2);
  color: #fff;
  font-size: 0.9rem;
}

.offen-kpis {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.offen-kpi {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.offen-kpi-label {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.offen-kpi-value {
  font-size: 1.05rem;
  font-weight: 600;
}

.offen-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.8rem;
}

.offen-list-header h3 {
  margin: 0;
  font-size: 0.95rem;
}

.offen-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-height: 120px;
}

.offen-row {
  display: grid;
  grid-template-columns: 2.2fr 1fr 0.9fr;
  gap: 0.6rem;
  align-items: center;
  padding: 0.55rem 0.55rem;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.offen-row .offen-name {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}

.offen-row .offen-title {
  margin: 0;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.offen-row .offen-sub {
  margin: 0;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.offen-row .offen-amount {
  text-align: right;
  font-weight: 600;
  color: #fca5a5;
}

.offen-row .offen-status {
  justify-self: end;
}

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

/* Diagramm (CSS-Donut als Platzhalter) */

.chart-card {
  padding-bottom: 1.3rem;
}

.chart-header h3 {
  margin: 0 0 0.6rem;
  font-size: 0.95rem;
}

.chart-placeholder {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.chart-donut {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: transparent;
  position: relative;
}

.chart-donut::after {
  content: "";
  position: absolute;
  inset: 22%;
  border-radius: 50%;
  background: radial-gradient(circle at top, var(--surface2), var(--surface));
}

.chart-legend {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  margin-right: 0.4rem;
}

.legend-fix {
  background: var(--danger);
}

.legend-var {
  background: var(--warning);
}

.legend-sparen {
  background: var(--primary);
}

/* Monatsgehalt */

.finanzplan-3 h3 {
  margin: 0 0 0.7rem;
  font-size: 0.9rem;
}

.monatsgehalt {
  display: flex;
  gap: 0.6rem;
}

.monatsgehalt input {
  flex: 1;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.45rem 0.75rem;
  background: var(--surface2);
  color: #fff;
  font-size: 0.85rem;
}

.save-btn {
  width: 40px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(139, 92, 246, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}
.save-btn:hover {
  background: linear-gradient(135deg, var(--secondary), var(--primary));
  transform: translateY(-2px);
}

.save-btn svg {
  width: 18px;
  height: 18px;
  color: var(--primary);
}

/* Sparziel */

.sparziel-card {
  border-radius: var(--radius-lg);
  padding: 1rem 1.1rem;
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.sparziel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.sparziel-header h3 {
  margin: 0;
  font-size: 0.9rem;
}

.sparziel-percentage {
  font-size: 0.78rem;
  color: var(--primary);
  font-weight: 600;
}

.progressbar {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.35);
  overflow: hidden;
  margin-bottom: 0.4rem;
}

.progressbar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), #3b82f6);
}

.sparziel-footer {
  text-align: right;
  color: var(--text-muted);
  font-size: 0.78rem;
}

/* Sparziele Screen */

.sparziele-screen {
  max-width: 900px;
  margin: 0 auto;
}

.sparziele-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.btn-sparziel-neu {
  border-radius: 999px;
  border: none;
  padding: 0.4rem 0.95rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  font-size: 0.85rem;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-sparziel-neu:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(148, 27, 255, 0.4);
}

.sparziele-list {
  display: grid;
  gap: 1rem;
}

/* Placeholder-Text */

.placeholder-text {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Mobile Bottom Nav */

.mobile-bottom-nav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0.1rem;
  z-index: 25;
  width: 100%;

  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;

  padding: 0.45rem 0.55rem;

  background: linear-gradient(
    145deg,
    rgba(30, 20, 43, 0.78),
    rgba(19, 12, 28, 0.78)
  );
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.65);
}

.mobile-bottom-nav::before {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 999px;
  background: radial-gradient(
      circle at 30% 0%,
      rgba(217, 70, 239, 0.22),
      transparent 55%
    ),
    radial-gradient(
      circle at 80% 100%,
      rgba(139, 92, 246, 0.22),
      transparent 55%
    );
  filter: blur(10px);
  opacity: 0.9;
  z-index: -1;
}

.mb-item {
  width: 78px;
  height: 48px;
  border-radius: 999px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;

  text-decoration: none;
  color: #9ca3af;

  transition: transform 0.12s ease, background 0.18s ease, color 0.18s ease;
}

.mb-item svg {
  width: 18px;
  height: 18px;
  fill: #9ca3af;
}

.mb-label {
  font-size: 0.68rem;
  line-height: 1;
  letter-spacing: 0.02em;
}

.mb-item:hover {
  transform: translateY(-1px);
}

.mb-item.active {
  background: linear-gradient(
    135deg,
    rgba(139, 92, 246, 0.35),
    rgba(217, 70, 239, 0.28)
  );
  border: 1px solid rgba(217, 70, 239, 0.25);
  color: #fff;
}

.mb-item.active svg {
  fill: #fff;
}

/* ---- Typo ---- */

h2 {
  font-size: 1.35rem;
  margin-top: 0;
}

/* Floating Action Button "Neue Ausgabe" */

.neue-ausgabe-fab {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  z-index: 40;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 15px 40px rgba(148, 27, 255, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.neue-ausgabe-fab:hover {
  transform: translateY(-2px) scale(1.03) rotate(90deg);
  box-shadow: 0 20px 50px rgba(148, 27, 255, 0.7);
}

/* ===== Modal "Neue Ausgabe" ===== */

.na-modal.hidden {
  display: none;
}

.na-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
}

.na-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
}

.na-modal-content {
  position: relative;
  max-width: 600px;
  margin: 25vh auto;
  padding: 1.4rem 1.5rem 1.3rem;
  border-radius: 20px;
  background: linear-gradient(145deg, var(--surface2), var(--surface));
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.8);
}

.na-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.9rem;
}

.na-modal-header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.na-modal-close {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
}

.na-modal-body {
  font-size: 0.85rem;
}

.na-modal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
  margin-bottom: 0.8rem;
}

.na-modal-grid label {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.na-modal-grid span {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.na-modal-grid input,
.na-modal-grid select {
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 0.5rem 0.75rem;
  background: rgba(19, 12, 28, 0.9);
  color: #fff;
  font-size: 0.85rem;
}

.na-modal-grid input::placeholder {
  color: rgba(148, 163, 184, 0.7);
}

.na-modal-save {
  width: 100%;
}

/* Sparziele – Detailkarte & Aktionen */

.sparziel-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.sparziel-badge-pausiert {
  align-self: flex-start;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(248, 113, 113, 0.16);
  color: #fecaca;
}

.sparziel-auto-info,
.sparziel-last-info {
  margin: 0;
}

.sparziel-frist-text,
.sparziel-etf-text,
.sparziel-ohne-ziel-text {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.sparziel-progress {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.35);
  overflow: hidden;
  margin-top: 0.2rem;
}

.sparziel-progress-bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), #3b82f6);
}

.sparziel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.6rem;
}

.sparziel-actions button {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: transparent;
  color: #e5e7eb;
  font-size: 0.75rem;
  padding: 0.25rem 0.7rem;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease,
    transform 0.1s ease;
}

.sparziel-actions button:hover {
  border-color: var(--primary);
  background: rgba(217, 70, 239, 0.12);
  transform: translateY(-1px);
}

/* Sparziele – Modal Typ-Switch */

.sparziel-type-switch {
  display: inline-flex;
  padding: 0.18rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.4);
  margin-bottom: 0.8rem;
  gap: 0.15rem;
}

.sparziel-type-switch button {
  border-radius: 999px;
  border: none;
  padding: 0.25rem 0.7rem;
  font-size: 0.75rem;
  background: transparent;
  color: #9ca3af;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}

.sparziel-type-switch button.active {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
}

.sparziel-type-extra {
  display: none;
}

/* Auth Screen */

.auth-screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(
    circle at top,
    rgba(15, 23, 42, 0.9),
    rgba(3, 7, 18, 0.98)
  );
  z-index: 999;
}

.auth-card {
  width: 100%;
  max-width: 380px;
  padding: 2rem 2.2rem;
  border-radius: 18px;
  background: linear-gradient(
    145deg,
    rgba(30, 20, 43, 0.9),
    rgba(15, 23, 42, 0.95)
  );
  border: 1px solid rgba(148, 163, 184, 0.4);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.75);
}

.auth-card h1 {
  margin: 0 0 0.3rem;
  font-size: 1.6rem;
}

.auth-subtitle {
  margin: 0 0 1.2rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.auth-tabs {
  display: flex;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  padding: 0.15rem;
  margin-bottom: 1.1rem;
}

.auth-tab {
  flex: 1;
  border: none;
  border-radius: 999px;
  padding: 0.4rem 0.75rem;
  background: transparent;
  color: #9ca3af;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}

.auth-tab.active {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.auth-form label span {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: block;
  margin-bottom: 0.2rem;
}

.auth-form input {
  width: 100%;
  padding: 0.45rem 0.65rem;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: rgba(15, 23, 42, 0.9);
  color: #e5e7eb;
  font-weight: 500;
}

.auth-submit {
  margin-top: 0.5rem;
  border-radius: 999px;
  border: none;
  padding: 0.5rem 0.8rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  cursor: pointer;
  font-size: 0.9rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.auth-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(148, 27, 255, 0.4);
}

.auth-error {
  min-height: 18px;
  margin: 0.4rem 0 0;
  font-size: 0.78rem;
  color: #fca5a5;
}

/* Utility */

.hidden {
  display: none !important;
}

/* Overrides / Spezialfälle */

.btn-bell {
  display: none;
}

/* ---- Responsive ---- */

@media (max-width: 1100px) {
  .finanzplan {
    grid-template-columns: minmax(0, 1fr);
  }

  .finanzplan-1-main {
    grid-template-columns: minmax(0, 1fr);
  }

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

@media (max-width: 900px) {
  .nav-finanzplan {
    display: none;
  }

  .screen-wrapper {
    padding-inline: 1.2rem;
  }

  .top-nav {
    padding-inline: 1rem;
  }

  .mobile-bottom-nav {
    display: flex;
  }

  main {
    padding-bottom: 4rem;
  }
}

@media (max-width: 640px) {
  .rechnung {
    grid-template-columns: minmax(0, 1fr);
  }

  .neue-ausgabe-content {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 900px) {
  .neue-ausgabe-fab {
    width: 50px;
    height: 50px;
    right: 0.5rem;
    bottom: 4.5rem;
    font-size: 1.8rem;
  }
}

@media (max-width: 425px) {
  .chip {
    padding: 0.25rem 0.2rem;
    font-size: 0.6rem;
  }
}

select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 0.5rem 2.2rem 0.5rem 0.75rem;
  background: linear-gradient(
    145deg,
    rgba(19, 12, 28, 0.9),
    rgba(15, 23, 42, 0.95)
  );
  color: var(--text-main);
  font-size: 0.85rem;
  cursor: pointer;
}

.neue-ausgabe-content select,
.na-modal-grid select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

select:hover,
input:hover {
  border-color: var(--primary);
}

select option {
  background-color: #020617;
  color: var(--text-main);
}

.card,
.navf-item a,
.mb-item,
button,
.aktion-btn,
.chip,
input,
select {
  transition: transform 0.14s ease, box-shadow 0.18s ease, background 0.18s ease,
    color 0.18s ease, border-color 0.18s ease, filter 0.18s ease,
    opacity 0.18s ease;
}

/* Cards: leichter Lift + mehr Tiefe beim Hover */
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.85);
}

/* KPI Cards: ein Hauch "Glow" (subtil) */
.summary-card:hover {
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.85), 0 0 22px rgba(217, 70, 239, 0.18);
}

/* Sidebar Links: kleines Lift, aktiver/hover "glow" bleibt dezent */
.navf-item a:hover {
  transform: translateY(-2px);
}

.navf-item.active a {
  box-shadow: 0 0 24px rgba(217, 70, 239, 0.16);
}

/* Buttons: Press-Feedback */
button:active,
.aktion-btn:active,
.chip:active,
.mb-item:active {
  transform: scale(0.97);
}

/* Action Buttons (✔ / ↺ / ✕) etwas lebendiger */
.aktion-btn:hover {
  border-color: rgba(217, 70, 239, 0.55);
  box-shadow: 0 0 18px rgba(217, 70, 239, 0.16);
}

/* Inputs: Fokus sichtbarer + im Theme */
input:focus,
select:focus {
  outline: none;
  border-color: rgba(217, 70, 239, 0.45);
  box-shadow: 0 0 0 3px rgba(217, 70, 239, 0.14);
}

/* Accessibility: Nur Keyboard-Fokus stärker */
:focus-visible {
  outline: 2px solid rgba(217, 70, 239, 0.6);
  outline-offset: 2px;
}

/* Reduce motion respektieren */
@media (prefers-reduced-motion: reduce) {
  .card,
  .navf-item a,
  .mb-item,
  button,
  .aktion-btn,
  .chip,
  input,
  select {
    transition: none !important;
  }

  .card:hover,
  .summary-card:hover,
  .navf-item a:hover {
    transform: none !important;
  }
}

.summary-value,
.ausgaben-betrag,
.monatsgehalt input,
#salary {
  font-variant-numeric: tabular-nums;
}

.summary-label {
  letter-spacing: 0.12em;
  font-weight: 500;
  opacity: 0.95;
}

.summary-value {
  font-weight: 650;
  line-height: 1.15;
}

.summary-subtext {
  line-height: 1.35;
}

h2 {
  letter-spacing: 0.01em;
  font-weight: 650;
}

h3 {
  letter-spacing: 0.01em;
  font-weight: 600;
}

.ausgaben-titel {
  letter-spacing: 0.01em;
}
