/* 
- FONT SIZE SYSTEM (px)
  10 / 12 / 14 / 16 / 18 / 20 / 24 / 30 / 36 / 44 / 52 / 62 / 74 / 86 / 98

  - SPACING SYSTEM (px)
  2 / 4 / 8 / 12 / 16 / 24 / 32 / 48 / 64 / 80 / 96 / 128

- FONT WEIGHTS
  Default: 400
  Medium: 500
  Semi-Bold: 600
  Bold: 700

- LINE HEIGHTS
  Default: 1
  Small: 1.05
  Medium: 1.2
  Paragraph-Default: 1.6

- LETTER SPACING
  -0,5px
  0,75px 

- BOX SHADOW
  box-shadow: 0 0.8rem 1.6rem rgba(0, 0, 0, 0.1);
  
*/

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", sans-serif;
  background-color: #f9fafb;
  color: #1d1d3b;
}

header {
  background: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  position: relative;
  z-index: 1;
}

nav a {
  margin: 0 1rem;
  text-decoration: none;
  color: #3e3163;
  font-weight: 600;
}

p {
  font-size: 1rem;
  margin-bottom: 2rem;
  color: #30323d;
}

ul {
  display: flex;
  list-style: none;
}

section {
  scroll-margin-top: 3.6rem; /* oder so viel wie dein sticky header hoch ist */
}

/********************************/
/* GENERAL REUSABLE COMPONENTS */
/********************************/

.container {
  /*1140px ist auch eine Alternative Konvention genau wie 1200px */
  max-width: 120rem;
  padding: 0 3.2rem;
  margin: 0 auto;
}

/* .flex {
  display: flex;
}
.flex--center-v {
  align-items: center;
  justify-items: center;
} */

.grid {
  display: grid;
  column-gap: 2.4rem;
  row-gap: 1.6rem;
}

.grid:not(:last-child) {
  margin-bottom: 1rem;
}

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

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

.grid--4-cols {
  grid-template-columns: repeat(4, 1fr);
}

.grid--5-cols {
  grid-template-columns: repeat(5, 1fr);
}

.grid--center-v {
  align-items: center;
  justify-items: center;
}

/* HEADINGS */

.heading-primary,
.heading-secondary,
.heading-tertiary {
  font-weight: 700;
  color: #3e3163;
  line-height: 1.05;
  letter-spacing: -0.5px;
}

.heading-primary {
  font-size: 2.4rem;
  margin-bottom: 2.4rem;
}

.heading-secondary {
  font-size: 2rem;
  line-height: 1.2;
  margin-bottom: 2rem;
}

.heading-tertiary {
  font-size: 1.2rem;
  line-height: 1.2;
  margin-bottom: 1.6rem;
}

.subheading {
  display: block;
  font-size: 1.2rem;
  font-weight: 500;
  color: #5e4a89;
  text-transform: uppercase;
  letter-spacing: 0, 75px;
  margin-bottom: 1.6rem;
}

.topic-subheading {
  display: block;
  font-size: 1rem;
  font-style: italic;
  font-weight: 500;
  color: #5e4a89;
  text-transform: uppercase;
  letter-spacing: 0, 75px;
  margin-bottom: 2.6rem;
}

/* CTAs */

.cta-button {
  background-color: #8368b3;
  color: white;
  padding: 0.75rem 2rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s;
}
.cta-button:hover {
  background-color: #5e4a89;
}

/*  HELPER/SETTINGS CLASSES  */

.margin-right-sm {
  margin-right: 1.6rem !important;
}

.margin-bottom-sm {
  margin-bottom: 1.6rem !important;
}

.margin-bottom-md {
  margin-bottom: 4.8rem !important;
}

.margin-bottom-big {
  margin-bottom: 9.6rem !important;
}

.margin-top-sm {
  margin-top: 1.6rem !important;
}

.margin-top-md {
  margin-top: 4.8rem !important;
}

.margin-top-big {
  margin-top: 9.6rem !important;
}

.right {
  text-align: right !important;
}

.line {
  margin: 3rem auto;
  width: 46rem;
  height: 1px;
  background-color: #e0e0e0;
}

.line-l {
  margin: 3rem auto;
  width: 70rem;
  height: 1px;
  background-color: #e0e0e0;
}

.spinner {
  margin: 5rem auto;
  text-align: center;
  svg {
    height: 6rem;
    width: 6rem;
    fill: #5e4a89;
    animation: rotate 2s infinite linear;
  }
}

/* WICHTIG: Container als Referenz für das Overlay */
.page-wrapper {
  position: relative;
}

/* Globaler Spinner-Container, standardmäßig ausgeblendet */
#global-spinner {
  display: none; /* Standard: unsichtbar */
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;

  /* Overlay nur über dem Content-Bereich */
  display: none;
  align-items: center;
  justify-content: center;

  background: rgba(
    255,
    255,
    255,
    0.6
  ); /* leichtes Overlay, Header/Footers schimmern durch */
  z-index: 50; /* über Content, aber unter evtl. Nav-Bars */
}

/* Wenn sichtbar */
#global-spinner.is-visible {
  display: flex;
}

/* Dein bestehender Spinner-Stil kann darauf aufbauen */
#global-spinner svg {
  height: 6rem;
  width: 6rem;
  fill: #5e4a89;
  animation: rotate 2s infinite linear;
}

@keyframes rotate {
  to {
    transform: rotate(360deg);
  }
}

/********************************/
/* HEADER */
/********************************/

.header {
  position: relative; /* wichtig */
  z-index: 1000; /* damit es unter der Navigation bleibt */
}

.header__logo img {
  height: 3.5rem;
}

.logo {
  display: flex;
  align-items: center;
}

.company-name {
  margin-left: 0.5rem;
  font-weight: 700;
  font-size: 1.4rem;
  color: #5e4a89;
  text-align: center;
}

.alert {
  position: fixed;
  top: 0;
  left: 50%;
  -webkit-transform: translateX(-50%);
  transform: translateX(-50%);
  z-index: 9999;
  color: #fff;
  font-size: 1.8rem;
  font-weight: 400;
  text-align: center;
  border-bottom-left-radius: 5px;
  border-bottom-right-radius: 5px;
  padding: 1.6rem 15rem;
  -webkit-box-shadow: 0 2rem 4rem rgba(0, 0, 0, 0.25);
  box-shadow: 0 2rem 4rem rgba(0, 0, 0, 0.25);
}
.alert--success {
  background-color: #20bf6b;
}
.alert--error {
  background-color: #eb4d4b;
}

/********************************/
/* NAVIGATION */
/********************************/

.main-nav-list {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 2.4rem;
}

.main-nav-link:link,
.main-nav-link:visited {
  display: inline-block;
  text-decoration: none;
  color: #2c2c2c;
  font-weight: 500;
  font-size: 1rem;
  transition: all 0.3s;
}

.main-nav-link:hover,
.main-nav-link:active {
  color: #8368b3;
}

.main-nav-link:has(.main-nav-user) {
  display: flex;
  align-items: center;
}

.main-nav-user {
  height: 3.5rem;
  width: 3.5rem;
  border-radius: 50%;
  margin-right: 1rem;
}

.main-nav-username {
  margin-bottom: 0rem;
}

/* MOBILE */
.btn-mobile-nav {
  border: none;
  background: none;
  cursor: pointer;
  display: none;
}

.icon-mobile-nav {
  height: 3.6rem;
  width: 3.6rem;
  color: #333;
}

.icon-mobile-nav[name="close-outline"] {
  display: none;
}

.logout {
  width: 100%;
  background-color: #8368b3;
  color: white;
  padding: 0.5rem 2rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s;
}
.logout:hover {
  color: white;
  background-color: #5e4a89;
}

/* STICKY NAVIGATION */
/* .sticky .header {
  position: fixed;
  top: 0;
  bottom: 0;
  width: 100%;
  height: 4.4rem;
  padding-top: 0;
  padding-bottom: 0;
  background-color: rgba(255, 255, 255, 0.9);
  z-index: 999;
  box-shadow: 0 0.8rem 1.6rem rgba(0, 0, 0, 0.1);
}

.sticky .hero {
  margin-top: 9.6rem;
} */

/********************************/
/* BODY */
/********************************/

html,
body {
  height: 100%;
  margin: 0;
}

.page-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.plain-wrapper {
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem 2rem;
}
.plain-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.plain-list {
  display: flex;
  flex-direction: column;
}

main,
.main {
  flex: 1;
}

/********************************/
/* FOOTER */
/********************************/

footer {
  text-align: center;
  padding: 2rem 2rem 1rem;
  font-size: 0.9rem;
  background-color: #ece7f6;
  color: #5e4a89;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  justify-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.1rem;
}

.social-links {
  list-style: none;
  display: flex;
  gap: 2rem;
  justify-content: center;
  padding: 0;
  margin: 0;
}

.social-links a {
  text-decoration: none;
}

.social-icon {
  height: 1.6rem;
  width: 1.6rem;
  color: #5e4a89;
  transition: color 0.3s;
}

.social-icon:hover {
  color: #8368b3;
}

.footer-bottom {
  margin-top: 1rem;
  font-size: 0.8rem;
  display: flex;
  gap: 6rem;
}

.legal {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
}

.legal a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s;
}

.legal a:hover {
  color: #8368b3;
}

/***********************************************************************/
/******************************* CONTENT *******************************/
/***********************************************************************/

/******************************************************/
/* LOGIN & REGISTRATION */
/******************************************************/
.main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  box-sizing: border-box;
  background-color: #ffffff;
}

/* Login-Box */
.login-form,
.signup-form {
  background-color: #ffffff;
  border: 4px solid #ece7f6;
  box-shadow: 0 0.8rem 1.6rem rgba(0, 0, 0, 0.1);
  padding: 2rem;
  border-radius: 12px;
  width: 400px;
  animation: fadeIn 0.4s ease-in;
}

/* Formularelemente */
.form__group:not(:last-child) {
  margin-bottom: 1rem;
}

.form__label {
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 1rem;
  color: #333;
}

.form__input {
  width: 100%;
  font-size: 1rem;
  padding: 1rem;
  margin-top: 0.5rem;
  border: none;
  border-radius: 6px;
  background-color: #ece7f6;
  border-bottom: 2px solid transparent;
  transition: all 0.3s;
}

.form__input:focus {
  outline: none;
  border-bottom: 2px solid #b7d6c1;
  background-color: #fff;
}

.form__input:focus:invalid {
  border-bottom: 2px solid #f4c690;
}

.form__input::placeholder {
  color: #aaa;
}

.form__checkbox-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.form__checkbox-label {
  display: flex;
  align-items: center;
  font-size: 0.95rem;
  font-weight: 400;
  color: #333;
  cursor: pointer;
  gap: 0.5rem;
  flex-wrap: wrap; /* Optional, falls auf kleineren Screens umbrechen soll */
  margin: 0;
}

.form__checkbox {
  width: 1.2rem;
  height: 1.2rem;
  accent-color: #8368b3;
  cursor: pointer;
  margin: 0;
}

.login-button {
  width: 100%;
  background-color: #8368b3;
  color: white;
  padding: 0.5rem 2rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s;
}
.login-button:hover {
  background-color: #5e4a89;
}

.forgot-password {
  display: block;
  text-align: center;
  margin-top: 1rem;
  color: #0055a5;
  text-decoration: none;
}

.forgot-password:hover {
  text-decoration: underline;
}

/* Button */
.cta-button {
  width: 100%;
  padding: 1.2rem;
  font-size: 1.6rem;
  font-weight: bold;
  color: white;
  background-color: #7a5af8;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s;
}

.cta-button:hover {
  background-color: #6842f6;
}

/* Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(1rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/******************************************************/
/* ACCOUNT MANAGEMENT */
/******************************************************/

.user-view__content {
  -webkit-box-flex: 1;
  -ms-flex: 1;
  flex: 1;
  padding: 3rem 0;
  background-color: white;
}

.user-view__form-container {
  max-width: 50rem;
  margin: 0 auto;
  padding: 0 2rem;
}

.form__photo-upload {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  font-size: 1.6rem;
}

.form__user-photo {
  height: 6rem;
  width: 6rem;
  border-radius: 50%;
  margin-right: 2rem;
}

.form__label-photo {
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  color: #333;
}

.form__upload {
  width: 0.1px;
  height: 0.1px;
  opacity: 0;
  overflow: hidden;
  position: absolute;
  z-index: -1;
}

.save-button {
  width: 15rem;
  background-color: #8368b3;
  color: white;
  padding: 0.5rem 2rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s;
}

.save-button:hover {
  background-color: #5e4a89;
}

.product-actions {
  display: flex;
  gap: 1rem;
}

.accountCurrent {
  width: 12rem;
  background-color: #b7d6c1;
  color: white;
  padding: 0.5rem 2rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
}

.heading-small {
  margin-bottom: 1rem;
}

.remove-member-btn {
  width: 13rem;
  background-color: #f4c690;
  color: white;
  padding: 0.5rem 2rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s;
}
.remove-member-btn:hover {
  background-color: #f4c690;
}

.accountCTA {
  width: 13rem;
  background-color: #8368b3;
  color: white;
  padding: 0.5rem 2rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s;
}

.accountCTA:hover {
  background-color: #5e4a89;
}

/******************************************************/
/* WELCOME */
/******************************************************/

.welcome-container {
  max-width: 800px;
  margin: 2rem auto;
  padding: 1rem;
}

.features-section {
  margin-top: 2rem;
}

.feature-list {
  display: flex;
  flex-direction: column;
  list-style: none;
  padding: 0;
}

.feature-list li {
  margin: 1rem 0;
  font-size: 1.1rem;
}

.feature-detail p {
  margin: 0.5rem 0;
}

.continue-button {
  margin-top: 2.5rem;
  text-align: right;
}

.button {
  background-color: #8368b3;
  color: white;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 6px;
  text-decoration: none;
  font-size: 1rem;
  transition: background-color 0.2s;
}

.button:hover {
  background-color: #5e4a89;
}

@media (max-width: 600px) {
  .welcome-container {
    padding: 1rem 0.5rem;
  }

  .feature-list li {
    font-size: 1rem;
  }

  h1,
  h2,
  h3 {
    font-size: 1.4rem;
  }
}

/******************************************************/
/* ONBOARDING */
/******************************************************/

.setup-step {
  display: none;
}
.setup-step.active {
  display: flex; /* oder block, je nach Layout */
  gap: 2rem;
  align-items: stretch;
  margin-bottom: 3rem;
}

.step-form,
.step-info {
  flex: 1;
  background: #fff;
  padding: 1.5rem;
  border-radius: 12px;
  border: 4px solid #ece7f6;
  box-shadow: 0 0.8rem 1.6rem rgba(0, 0, 0, 0.1);
  height: 50rem;
  width: 30rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.step-info {
  position: relative;
  background: #f9f7ff;
  border: 3px solid #ece7f6;
  border-radius: 16px;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* kleine farbige Linie links als Akzent */
.step-info::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.5rem;
  bottom: 1.5rem;
  width: 4px;
  border-radius: 999px;
  background: #8368b3;
}

/* Titel im Step-Info-Block */
.step-info-title {
  font-size: 1rem;
  font-weight: 700;
  color: #4b3a73;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Call-to-Action Satz hervorheben */
.step-info-cta {
  margin-top: 0.75rem;
  font-weight: 600;
  color: #5e4a89;
}

.prev-button,
.next-button,
.submit-button {
  display: none;
}

.step-form,
.step-info {
  flex: 1;
  background: #fff;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Zieloptionen */
.goals {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.goal-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem;
  border: 2px solid #ccc;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.2s;
}

.goal-option input[type="checkbox"] {
  display: none;
}

.goal-option.selected {
  background-color: #ece7f6;
  border-color: #5e4a89;
}

/* Buttons */
.button-group button,
.children-buttons button {
  margin-right: 0.5rem;
  margin-top: 0.5rem;
  margin-bottom: 1rem;
  padding: 0.5rem 1rem;
  border: 2px solid #ccc;
  background: #fff;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.2s;
}

.button-group button.active,
.children-buttons button.active {
  background: #ece7f6;
  border-color: #5e4a89;
}

/* Label */

.step-form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

/* Inputfelder */
input[type="range"] {
  width: 100%;
  margin-bottom: 1rem;
  background-color: #8368b3;
}

input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 5px;
  background: linear-gradient(to right, #8368b3 0%, #ece7f6 0%);
  outline: none;
  margin-bottom: 0.5rem;
  transition: background 0.3s ease;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  background: #5e4a89;
  border-radius: 50%;
  cursor: pointer;
  border: none;
}

input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: #5e4a89;
  border: none;
  border-radius: 50%;
  cursor: pointer;
}

.income-value,
.expenses-value,
.savings-value {
  font-weight: bold;
  text-align: right;
  margin-top: -0.5rem;
  margin-bottom: 1rem;
  color: #111827;
}

select,
input[type="number"] {
  padding: 0.5rem;
  width: 100%;
  margin-bottom: 1rem;
  border-radius: 6px;
  border: 1px solid #ccc;
}

/* Asset-Input */
.asset-input {
  margin-bottom: 0.5rem;
}

.asset-checkbox-label {
  display: flex;
  align-items: center;
  font-size: 1rem;
  font-weight: 500;
  color: #333;
  cursor: pointer;
  gap: 0.5rem;
}

.asset-checkbox {
  width: 1.2rem;
  height: 1.2rem;
  accent-color: #8368b3;
  cursor: pointer;
  margin: 0;
}

.asset-input input[type="number"] {
  margin-top: 0.25rem;
}

.step-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 2rem;
}

.step-buttons button {
  padding: 0.5rem 1.5rem;
  border-radius: 8px;
  background: #8368b3;
  color: white;
  border: none;
  cursor: pointer;
}

.step-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.step-buttons .prev-button {
  order: 1;
}

.step-buttons .next-button,
.step-buttons .submit-button {
  order: 2;
  margin-left: auto;
}

.step-buttons button:hover {
  background: #5e4a89;
}

/******************************************************/
/* OVERVIEW */
/******************************************************/

.card {
  background-color: #ffffff;
  border: 4px solid #ece7f6;
  box-shadow: 0 0.8rem 1.6rem rgba(0, 0, 0, 0.1);
  padding: 2rem;
  border-radius: 12px;
  width: 40rem;
  height: 25rem;
  animation: fadeIn 0.4s ease-in;
}

/* NÄCHSTE SCHRITTE */
.nextSteps {
  list-style-type: decimal;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
  display: block;
}

.nextSteps li {
  margin-bottom: 0.75rem;
  font-weight: 500;
}

.nextSteps a {
  text-decoration: none;
  font-size: 1.1rem;
  display: inline-block;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nextSteps a:hover {
  color: #5e4a89; /* kräftiges Blau */
  transform: translateX(4px); /* leichter "Wisch"-Effekt */
  cursor: pointer;
}

.nextSteps a::after {
  content: " →";
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.nextSteps a:hover::after {
  opacity: 1;
  transform: translateX(2px);
}

a.nextStepsButton {
  display: block;
  width: 100%;
  padding: 0.4rem;
  font-size: 1rem;
  color: white;
  background-color: #8368b3;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s;
  margin-top: 1.6rem;
  text-decoration: none;
}

a.nextStepsButton:hover {
  background-color: #5e4a89;
}

/* ZIELE */

.goal-content {
  display: flex;
  flex-direction: column;
  margin-bottom: 1rem;
}

.goal-list {
  list-style: none;
  padding: 0;
  display: flex;
  gap: 0.75rem;
}

.goal-list li {
  margin-bottom: 1rem;
  background-color: #ffffff;
}

.goal {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.5rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}

.goal:hover {
  background-color: #f0f0f0;
}

.status-indicator {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.goal[data-status="done"] .status-indicator {
  background-color: #28a745; /* grün */
}

.goal[data-status="high"] .status-indicator {
  background-color: #dc3545; /* rot */
}

.goal[data-status="medium"] .status-indicator {
  background-color: #fd7e14; /* orange */
}

.development-content {
  display: flex;
}

/* für Planen */
.progress-bar {
  background-color: #e5e7eb;
  border-radius: 8px;
  height: 10px;
  overflow: hidden;
}

.progress {
  height: 100%;
  background-color: #5e4a89;
  transition: width 0.3s ease;
  border-radius: 8px;
}

.progress-dept {
  height: 100%;
  background-color: #f4c690;
  transition: width 0.3s ease;
  border-radius: 8px;
}

.divider-sm {
  border: none;
  border-top: 1px solid #ddd;
  margin: 1rem 0;
}

.divider-md {
  border: none;
  border-top: 1px solid #ddd;
  margin: 2rem 0;
}

.progress-overview {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.progress-circle {
  width: 5rem;
  height: 5rem;
}

.progress-description {
  font-size: 0.95rem;
  color: #4b5563;
}

/* GESAMTVERMÖGEN */

.wealth-content {
  display: flex;
  gap: 2rem;
  align-items: center;
  /* flex-wrap: wrap; */
}

.chart-wrapper {
  width: 100%;
  max-width: 18rem; /* oder was du brauchst */
  margin: 0 auto;
}

#walletPieChart {
  width: 100% !important;
  height: auto !important;
}

.asset-list {
  display: block;
  list-style: none;
  padding: 0;
  font-size: 0.95rem;
  color: #333;
}

.asset-list li {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.asset-list .label {
  font-weight: 500;
  margin-right: 1rem;
}

.asset-list .value {
  color: #1a202c;
}

.debt {
  font-size: 0.95rem;
  color: #7f1d1d;
  margin-top: 1rem;
  display: flex;
  justify-content: space-between;
}

.debt .label {
  font-weight: 600;
  margin-right: 0.5rem;
}

/******************************************************/
/* NEXT BEST STEP */
/* ************************************************** */

.main-nbs {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  box-sizing: border-box;
  background-color: #ffffff;
}

.container-nbs {
  display: flex;
  flex-direction: row;
  gap: 2rem;
  align-items: flex-start; /* wichtig! verhindert Umbruch */
}

.steps-column,
.detail-column {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.steps-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  max-height: 600px;
  min-height: 0;
  overflow: hidden; /* wichtig, damit der Scrollbereich funktioniert */
}

.detail-column {
  flex: 2;
}

.steps-column h2 {
  flex-shrink: 0;
  margin-bottom: 1rem;
}

.step-group h3 {
  font-size: 1rem;
  font-weight: bold;
  margin: 1.5rem 0 0.5rem;
  padding-left: 1rem;
  color: #444;
}

.step-group {
  margin-bottom: 0.5rem;
}

.step-group .step {
  margin-left: 1rem;
}

.steps-list {
  flex-grow: 1;
  flex-direction: column;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.step {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background-color: #fafafa;
  border: 1px solid #ddd;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}

.step:hover {
  background-color: #f0f0f0;
}

.status-indicator {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.step[data-status="done"] .status-indicator {
  background-color: #28a745; /* grün */
}

.step[data-status="high"] .status-indicator {
  background-color: #dc3545; /* rot */
}

.step[data-status="medium"] .status-indicator {
  background-color: #fd7e14; /* orange */
}

.step[data-status="done"] {
  color: #999;
  text-decoration: line-through;
}

.detail-content h3 {
  margin-top: 0;
}

.detail-content p {
  margin-bottom: 1rem;
  line-height: 1.5;
}

@media (max-width: 768px) {
  .main-nbs {
    flex-direction: column; /* ← neu */
    align-items: stretch; /* ← statt center */
    justify-content: flex-start; /* ← nach oben ausrichten */
  }
  .container-nbs {
    flex-direction: column;
  }
  .steps-column {
    max-height: 250px;
    margin-bottom: 1rem;
    width: 100%;
  }
  .detail-column {
    width: 100%;
  }
}

/******************************************************/
/* CASHFLOW */
/******************************************************/

.cashflow-view__content {
  -webkit-box-flex: 1;
  -ms-flex: 1;
  flex: 1;
  padding: 3rem 0;
  background-color: #ffffff;
}

.cashflow-view__form-container {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Formular */
.hide {
  display: none;
}

.hidden {
  display: none;
}

/* Suche & Filter */
.filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  margin-bottom: 2rem;
  flex-wrap: nowrap;
}

/* Suchfeld mit Icon */
.search-container {
  position: relative;
  flex: 1 1 40%;
}

.search-container input[type="text"] {
  width: 100%;
  padding: 0.8rem 3rem 0.8rem 1rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 8px;
}

.search-button {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.search-button ion-icon {
  font-size: 1.4rem;
  color: #8368b3;
}

/* Filter Dropdown */
.filter-dropdown-container {
  position: relative;
  flex: 0 0 auto;
}

.filter-toggle {
  background: none;
  border: none;
  cursor: pointer;
}

.filter-toggle ion-icon {
  font-size: 1.6rem;
  color: #8368b3;
}

/* Das eigentliche Menü */
.filter-menu {
  position: absolute;
  top: 2.5rem;
  right: 0;
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  list-style: none;
  padding: 0.5rem 0;
  margin: 0;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  z-index: 10;
  width: max-content;
  min-width: 180px;
}

.filter-menu li {
  padding: 0.5rem 1rem;
  cursor: pointer;
  font-size: 0.95rem;
  transition: background-color 0.2s ease;
}

.filter-menu li:hover {
  background-color: #f0f0f0;
}

/* ===== Cashflow Filter & Sort Modal ===== */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

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

.modal-dialog {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
  max-width: 52rem;
  width: 90%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1.75rem;
}

/* Header */

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

.modal-title {
  font-size: 1.4rem;
  font-weight: 600;
  margin: 0;
}

.modal-close {
  border: none;
  background: transparent;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

/* Body */

.modal-body {
  overflow-y: auto;
  padding-right: 0.5rem;
}

.modal-section {
  margin-bottom: 1.5rem;
}

.modal-section-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.modal-section-subtitle {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 0.75rem;
}

/* Footer */

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 1.5rem;
}

/* Buttons im Modal – nutzen vorhandenen Button-Stil leicht abgewandelt */

.modal-btn-primary,
.modal-btn-secondary {
  padding: 0.6rem 1.4rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.modal-btn-primary {
  background-color: #8368b3;
  color: #fff;
}

.modal-btn-primary:hover {
  background-color: #5e4a89;
}

.modal-btn-secondary {
  background-color: #f5f4f4;
  color: #333;
}

.modal-btn-secondary:hover {
  background-color: #e5e5e5;
}

/* Responsive: Auf sehr kleinen Bildschirmen eher "Bottom Sheet"-Gefühl */

@media (max-width: 600px) {
  .modal-dialog {
    width: 100%;
    max-width: 100%;
    border-radius: 12px 12px 0 0;
    align-self: flex-end;
  }
}

/* CTAs  */

.flex {
  display: flex;
  justify-content: space-between;
}

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

.save-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 1rem;
  width: 250px;
}

.save-button ion-icon {
  font-size: 1.6rem;
  color: #fff;
}

.btn-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 1rem;
  width: 250px;
  background-color: #f4c690;
  color: #333;
  padding: 0.5rem 2rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s;
}

.btn-secondary:hover {
  background-color: #f4c690;
}

/* Checkbox-Wrapper */
.form__checkbox {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  user-select: none;
  font-size: 0.95rem;
  color: #333;
}

/* Native Checkbox ausblenden */
.form__checkbox input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* Checkbox noch stylen */
.js-include-in-cashflow {
  width: 18px;
  height: 18px;
  border: 2px solid #5e4a89;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

/* Ausgabenübersicht - Cards */
.expenses-card {
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  padding: 1rem;
  transition: box-shadow 0.3s;
}

.expenses-card:hover {
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
}

.expenses-card-container-main {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: center;
}

.expenses-card-container-detail {
  display: flex;
  flex-direction: column;
}

.expenses-card-container-detail.hidden {
  display: none;
}

.card-container-contract {
  margin-bottom: 0;
}

.card-form__label {
  font-size: 1rem;
  font-weight: 500;
  color: #333;
}

.card-form__input {
  width: 100%;
  font-size: 1rem;
  padding: 0.5rem;
  border: none;
  border-radius: 6px;
  background-color: #ece7f6;
  border-bottom: 2px solid transparent;
  transition: all 0.3s;
  margin-bottom: 0rem !important;
}

.card-form__input:focus {
  outline: none;
  border-bottom: 2px solid #b7d6c1;
  background-color: #fff;
}

.card-form__input:focus:invalid {
  border-bottom: 2px solid #f4c690;
}

.card-form__input::placeholder {
  color: #333;
}

.card-form__input-fix {
  width: 100%;
  font-size: 1rem;
  padding: 0.5rem;
  border: none;
  border-radius: 6px;
  background-color: #f5f4f4;
  margin-bottom: 1rem !important;
}

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

.card-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 1rem;
  width: 150px;
}

.card-button ion-icon {
  font-size: 1.4rem;
  color: #fff;
}

.card-button {
  padding: 0.4rem 1.2rem;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.card-save {
  background-color: #8368b3;
  color: white;
}

.card-save:hover {
  background-color: #5e4a89;
}

.card-delete {
  background-color: #f4c690;
  color: #333;
}

.card-delete:hover {
  /* hier noch eine Shade Variante der Farbe einfügen */
  background-color: #f4c690;
}

.card-form__label-sum {
  width: 60%;
  font-size: 1rem;
  font-weight: 600;
  color: #333;
}

.card-form__input-fix-sum {
  margin: 0;
  width: 40%;
  font-size: 1rem;
  font-weight: 600;
  padding: 0.5rem;
  border: none;
  border-radius: 6px;
  background-color: #f5f4f4;
  text-align: right;
}

/* Organisation & Automation */
/* Layout */

.account-structure {
  display: flex;
  flex-direction: row;
  gap: 20px;
  justify-content: space-between;
}

.account-single,
.account-joint,
.account-partner {
  flex: 1;
  background: #fff;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.accounts {
  margin-bottom: 10px;
}

.add-account {
  background-color: #8368b3;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 1rem auto; /* zentriert den Button */
  gap: 0.5rem;
  font-size: 1rem;
  width: 250px;
  padding: 0.4rem 1.2rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.add-account ion-icon {
  font-size: 1.6rem;
  color: #fff;
}

.add-account:hover {
  background-color: #5e4a89;
}

/* Kontocard */

/* konto.css */
/* .account {
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 15px;
  margin: 20px 0;
  font-size: 1.1rem;
} */

.account {
  padding: 20px;
  margin: 30px 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  border-radius: 6px;
}

/* .account-income,
.account-info,
.account-details,
.account-withdrawals {
  border-bottom: 1px solid #ccc;
  padding-bottom: 10px;
} */

.account-income,
.account-info,
.account-details,
.account-withdrawals {
  border: none;
  padding-bottom: 0;
  margin-bottom: 20px;
}

.account-income,
.account-info,
.account-details,
.account-withdrawals {
  margin-bottom: 20px;
}

.withdrawals-header,
.account-income,
.account-balance,
.account-info {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}

.account-info {
  align-items: center;
}

.account button {
  background-color: white;
  border: none;
  border-radius: 4px;
}

.account ion-icon {
  font-size: 1.6rem;
  color: #8368b3;
  cursor: pointer;
}

.account ion-icon:hover {
  font-size: 1.6rem;
  color: white;
  color: #5e4a89;
  cursor: pointer;
}

.account-income strong {
  display: block;
  font-weight: bold;
  color: black;
}

.account-income span {
  display: block;
  font-weight: bold;
  color: green;
}

.account-details ul,
.account-withdrawals ul {
  display: block;
  padding-left: 10px;
  margin: 10px;
  list-style-position: inside;
  text-align: left;
  list-style: none;
}

.account-details li {
  padding-top: 2px;
  display: block;
}

.account-withdrawals p {
  padding-left: 10px;
  margin: 10px;
}

.account-income,
.account-details,
.withdrawals-header strong {
  font-size: 1.1rem;
  font-weight: 500;
  padding-left: 10px;
}

.account-balance span {
  font-weight: bold;
}

.account-balance.positive span {
  color: green;
}

.account-balance.negative span {
  color: red;
}

/* Automation */
/* Hier könnte man noch eine Auswertung / Liste anzeigen, für welches Konto welche Daueraufträge benötigt werden. Bzw. welcher Sparplan eingerichtet werden muss */

/* Absicherung */
/* Layout */

.hedging-card {
  position: relative;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 16px;
  background-color: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  margin: 12px 0;
  max-width: 100%;
  overflow: visible; /* <- erlaubt überstehende Elemente */
}

.hedging-card:hover {
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  padding-top: 10px;
}

.card-link ion-icon {
  font-size: 1.6rem;
  color: #8368b3;
  cursor: pointer;
  margin-bottom: 1.6rem;
}

.card-link ion-icon:hover {
  font-size: 1.6rem;
  color: white;
  color: #5e4a89;
  cursor: pointer;
}

.status-point {
  position: absolute;
  top: -30px; /* Etwas oberhalb der Card */
  right: -30px; /* Etwas außerhalb nach rechts */
  width: 35px;
  height: 35px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 14px;
  border: 2px solid white; /* Optional: sorgt für Kontrast zum Hintergrund */
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.15); /* Optional: kleine Tiefe */
  z-index: 1;
}

.status-point ion-icon {
  font-size: 16px;
}

/* Statusfarben */
.status-point.vorhanden {
  background-color: #4caf50;
}

.status-point.dringend {
  background-color: #ff9800;
}

.status-point.optional {
  background-color: #9e9e9e;
}

.card-body {
  margin-top: 12px;
}

.card-description {
  font-size: 0.95em;
  color: #333;
  margin: 0;
}

/* Rentenplanung */

/* Säulen */
.pillar {
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  padding: 1rem;
  transition: box-shadow 0.3s;
  flex: 1;
}

/* Optionsliste */
.option-list {
  display: flex;
  flex-direction: column;
  list-style: none;
  padding: 0;
  margin: 0;
}

.option-list li {
  margin-bottom: 0.8rem;
}

.option-list label {
  display: flex;
  align-items: flex-start;
  cursor: pointer;
  gap: 0.5rem;
  font-size: 1rem;
  line-height: 1.4;
  color: #444;
}

.option-list input[type="checkbox"] {
  margin-top: 2px;
  transform: scale(1.1);
}

/* Layout für Desktop: 3 Spalten */
@media (min-width: 900px) {
  .retirement-planning {
    flex-direction: row;
    align-items: flex-start;
  }
}

/******************************************************/
/* VERMÖGEN */
/******************************************************/

.invest-view__content {
  flex: 1;
  padding: 3rem 0;
  background-color: #ffffff;
}

.invest-view__container {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 2rem;
}

.invest-view__summary {
  display: flex;
  gap: 10rem;
  align-items: center;
}

.assetClasses-sum {
  flex: 1;
  min-width: 0;
}

.chart-container {
  flex: 2;
  min-width: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

canvas {
  width: 100%;
  height: auto;
  max-width: 100%;
}

.group:not(:last-child) {
  margin-bottom: 1rem;
}

.asset-class-block {
  background-color: #f8f6fc;
  border-radius: 0.5rem;
  padding: 1rem;
  box-shadow: 0 0.2rem 0.6rem rgba(0, 0, 0, 0.05);
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}

.asset-card__label {
  flex: 1;
  font-weight: bold;
  display: block;
}

.asset-card__sum {
  flex: 1;
  font-size: 1.4rem;
  color: #333;
  text-align: right;
  margin: 0;
}

/* Assetklassen */

.asset-class-detail {
  margin: 3rem 0;
}

.asset-class-detail__container {
  display: flex;
  gap: 4rem;
  flex-wrap: wrap;
}

.asset-class-detail__list {
  flex: 1;
  min-width: 250px;
}

.asset-class-detail__chart {
  flex: 1;
  max-width: 350px;
  min-width: 250px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.position {
  background-color: #f8f6fc;
  border-radius: 0.5rem;
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 0.2rem 0.4rem rgba(0, 0, 0, 0.05);
  display: flex;
  justify-content: space-between;
}

.position__label {
  font-weight: 500;
}

.position__amount {
  font-weight: bold;
  color: #333;
}

.button-add-position {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #5e4a89;
  color: white;
  font-weight: bold;
  border-radius: 0.5rem;
  padding: 1rem;
  margin-bottom: 1rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
  box-shadow: 0 0.2rem 0.4rem rgba(0, 0, 0, 0.05);
}

.button-add-position:hover {
  background-color: #8368b3;
}

.button-add-position button {
  all: unset;
  width: 100%;
  text-align: center;
}

@media (max-width: 768px) {
  .asset-class-detail__container {
    flex-direction: column;
  }

  .asset-class-detail__chart {
    margin-top: 2rem;
    max-width: 250px;
    margin: 0 auto;
  }

  .asset-class-detail__chart canvas {
    max-width: 100%;
    height: auto;
    display: block;
  }
}

/* CASH */

.cash-position {
  flex-direction: column;
  gap: 0.5rem;
  cursor: pointer;
}

.cash-position__main {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cash-position__meta {
  font-size: 0.9rem;
  color: #555;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: -0.25rem;
}

.cash-position__details {
  margin-top: 0.75rem;
}

/******************************************************/
/* PLANUNG */
/******************************************************/

.planning-view__content {
  flex: 1;
  padding: 3rem 0;
  background-color: #ffffff;
}

.planning-view__container {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Überblick */

.goal-overview {
  margin-bottom: 3rem;
}

.goal-overview__grid {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  justify-content: space-between;
}

.goal-box {
  flex: 1 1 30%;
  background-color: #f8f6fc;
  border: 2px solid #e6e1f0;
  border-radius: 0.75rem;
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  transition: background-color 0.3s, border-color 0.3s;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.goal-box:hover {
  background-color: #e6e1f0;
}

.goal-box:hover .goal-list li {
  background-color: #e6e1f0;
}

.goal-box h4 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
}

.goal-box p {
  margin: 0;
  font-size: 0.95rem;
  color: #555;
}

.goal-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.goal-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  background-color: #f8f6fc;
}

/* 80% / 20% Aufteilung */
.goal-info {
  flex: 1 1 80%;
  min-width: 0; /* wichtig, damit Text nicht das Layout sprengt */
}

.goal-info .goal-name {
  margin-bottom: 0.3rem; /* kleiner Abstand zur Progress-Bar */
}

.goal-actions {
  flex: 0 0 20%;
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

/* Falls du sicherstellen willst, dass Buttons nicht zu breit werden */
.goal-actions .goal-button {
  flex-shrink: 0;
}

/* vorhandene Styles leicht angepasst / wiederverwendet */

.goal-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 1rem;
  width: 40px; /* etwas kompakter */
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.goal-button:hover {
  transform: translateY(-1px);
}

.goal-button ion-icon {
  font-size: 1.4rem;
  color: #fff;
}

.goal-update {
  background-color: #8368b3;
  color: white;
}

.goal-update:hover {
  background-color: #5e4a89;
}

.goal-delete {
  background-color: #f4c690;
  color: #333;
}

.goal-delete:hover {
  background-color: #e9b87b; /* leicht dunklere Variante */
}

/* Responsive Anpassung */
@media (max-width: 900px) {
  .goal-box {
    flex: 1 1 45%;
  }
}

@media (max-width: 600px) {
  .goal-box {
    flex: 1 1 100%;
  }
}

/* Eingabemaske öffnen */

.add-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 1rem;
  width: 100%;
  background-color: #8368b3;
  color: white;
  padding: 0.5rem 2rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s;
}

.add-button:hover {
  background-color: #5e4a89;
}

.add-button ion-icon {
  font-size: 1.6rem;
  color: #fff;
}

/* Eingabemaske */
/* Übername CSS von Cashflow */
.cancel-button {
  gap: 0.5rem;
  font-size: 1rem;
  width: 250px;
  background-color: #f4c690;
  color: #333;
  padding: 0.5rem 2rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s;
}

.cancel-button:hover {
  background-color: #f4c690;
}

/* Jahresauswahl */
#year-select {
  margin-bottom: 2rem;
  padding: 0.5rem;
  font-size: 1rem;
}

/* ---------------------------------------------
   Übersichtstabelle (Highlevel)
---------------------------------------------- */

.overview {
  margin: 2rem 0 3rem;
  border: 1px solid #ccc;
  border-radius: 0.75rem;
  padding: 1.5rem;
  background-color: #fafafa;
}

.overview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin-top: 1rem;
}

.overview-table th,
.overview-table td {
  border: 1px solid #ddd;
  padding: 0.6rem;
  text-align: center;
}

.overview-table thead {
  background-color: #f9f9f9;
  font-weight: 600;
}

.overview-table td:first-child,
.overview-table th:first-child {
  text-align: left;
  background-color: #f0f0f0;
  font-weight: 600;
}

/* Markierung aktueller Monat */
.current-month {
  background-color: #ece7f6;
  font-weight: 700;
  color: #2c2c2c;
}

/* ---------------------------------------------
   Kurzfristige Ziele – Detailbereich
---------------------------------------------- */

/* Container des Shortterm-Goals */
.goal.goal--shortterm {
  margin-bottom: 3rem;
  border: 1px solid #ccc;
  border-radius: 0.75rem;
  padding: 1.5rem;
  background-color: #ffffff;
}

/* Zweispaltiges Layout: links Summary, rechts Tabelle */
.goal-detail-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr); /* links fixe Box, rechts flexibler Bereich */
  column-gap: 2rem;
  align-items: stretch;
  width: 100%;
}

/* linke Spalte – Zusammenfassung */
.goal-summary {
  background-color: #faf7ff;
  border-radius: 0.75rem;
  padding: 1.2rem;
  border: 1px solid #e1d9f3;
  display: flex;
  flex-direction: column; /* damit der Button nach unten kann */
  gap: 1rem;
}

.goal-summary__meta {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.goal-summary__meta .label {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #777;
}

.goal-summary__meta .value {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: #333;
}

/* Save-Button – sitzt immer unten in der Box */
.goal-summary .save-button {
  margin-top: auto; /* schiebt den Button an das untere Ende */
  /* display: inline-flex; */
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 1rem;
  width: 100%;
  background-color: #8368b3;
  color: white;
  padding: 0.5rem 2rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s;
}

.goal-summary .save-button:hover {
  background-color: #5e4a89;
}

/* rechte Spalte – Tabelle */
.goal-plan {
  width: 100%;
  height: 100%;
  min-width: 0; /* verhindert, dass die Tabelle das Layout sprengt */
}

/* Label + Select im Kopf der rechten Spalte */
.goal-plan label[for="year-select"] {
  font-size: 0.9rem;
  font-weight: 600;
  margin-right: 0.5rem;
}

.goal-plan #year-select {
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  border: 1px solid #ccc;
  font-size: 0.9rem;
}

/* Tabelle für Monatsplanung */
.goal-plan-table {
  width: 100%;
  table-layout: fixed; /* sorgt für gleichmäßige Verteilung */
  border-collapse: collapse;
  font-size: 0.9rem;
  margin-top: 0.75rem;
}

.goal-plan-table thead {
  background-color: #f5f5f5;
}

.goal-plan-table th,
.goal-plan-table td {
  border: 1px solid #ddd;
  padding: 0.6rem;
  text-align: left;
}

.goal-plan-table th:nth-child(1),
.goal-plan-table td:nth-child(1) {
  width: 15%;
}

.goal-plan-table th:nth-child(2),
.goal-plan-table td:nth-child(2) {
  width: 45%;
}

.goal-plan-table th:nth-child(3),
.goal-plan-table td:nth-child(3) {
  width: 20%;
}

.goal-plan-table th:nth-child(4),
.goal-plan-table td:nth-child(4) {
  width: 20%;
  text-align: right;
}

/* goal-plan-table: current month highlight */
.goal-plan-table tbody tr.current-month-row {
  outline: 2px solid rgba(131, 104, 179, 0.35);
  border-radius: 6px;
}

.goal-plan-table tbody tr.current-month-row td {
  font-weight: 700;
}

/* Geplante Monate hervorheben */
.goal-plan-table tr.planned {
  background-color: #f8f4ff;
}

/* Inputs in der Tabelle */
.goal-plan-table input[type="text"],
.goal-plan-table input[type="number"] {
  width: 100%;
  box-sizing: border-box;
  padding: 0.4rem 0.5rem;
  font-size: 0.85rem;
  border-radius: 4px;
  border: 1px solid #ccc;
  background-color: #fff;
  display: block; /* verhindert inline baseline issues */
  margin: 0; /* entfernt seltene Default-Margins */
}

.goal-plan-table input[type="text"]::placeholder,
.goal-plan-table input[type="number"]::placeholder {
  color: #bbb;
}

.goal-plan-table input[type="text"]:focus,
.goal-plan-table input[type="number"]:focus {
  outline: none;
  border-color: #8368b3;
  box-shadow: 0 0 0 2px rgba(131, 104, 179, 0.2);
}

.amount-cell {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.delete-planned-btn {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  color: #b02323;
}

.delete-planned-btn:hover {
  color: #7a1515;
}

/* Verbleibender Betrag (nur Anzeige) */
.goal-plan-table .remaining-cell {
  font-weight: 600;
  color: #333;
}

/* ---------------------------------------------
   Responsiv (Tablet / Mobile)
---------------------------------------------- */

@media (max-width: 960px) {
  .goal-detail-layout {
    grid-template-columns: 1fr;
    row-gap: 1rem;
  }

  .goal-summary {
    max-width: 100%;
    width: 100%;
  }
}

/* ---------------------------------------------
   Mittelfristige Ziele – Plan & Strategien
---------------------------------------------- */

/* Container-Styling für midterm wie bei shortterm */
.goal.goal--midterm {
  margin-bottom: 3rem;
  border: 1px solid #ccc;
  border-radius: 0.75rem;
  padding: 1.5rem;
  background-color: #ffffff;
}

/* rechte Seite im midterm-Layout */
.goal-plan--midterm {
  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Grid für die vier Strategiekarten */
.goal-strategies-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

/* Allgemeine Karte für eine Strategie */
.goal-strategy-card {
  background-color: #fafafa;
  border-radius: 0.75rem;
  border: 1px solid #e0e0e0;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  transition: box-shadow 0.2s ease, transform 0.1s ease, border-color 0.2s ease;
}

.goal-strategy-card:hover {
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
  border-color: #d0c4f0;
}

.goal-strategy-card__title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
}

.goal-strategy-card__desc {
  font-size: 0.85rem;
  color: #666;
  margin: 0 0 0.2rem;
}

/* Zahlenliste je Strategie */
.goal-strategy-card__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.goal-strategy-card__list li {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.85rem;
}

.goal-strategy-card__list .label {
  color: #777;
  width: 100px;
}

.goal-strategy-card__list .value {
  font-weight: 600;
  color: #333;
}

/* Footer mit Risikohinweis */
.goal-strategy-card__footer {
  margin-top: auto;
  display: flex;
  justify-content: flex-start;
}

/* Risiko-Badge */
.risk-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  width: 100%;
}

.risk-badge--low {
  background-color: #e0f6e8;
  color: #207d3b;
}

.risk-badge--medium {
  background-color: #fff4d8;
  color: #a56a00;
}

.risk-badge--high {
  background-color: #fde2e0;
  color: #b02323;
}

/* Optionale Farbakzente für Karten nach Typ (leicht, nicht zu bunt) */
.goal-strategy-card--cash {
  /* z.B. leicht neutrale Töne */
}

.goal-strategy-card--money {
  /* könntest du z.B. etwas bläulicher einfärben, wenn gewünscht */
}

.goal-strategy-card--equity {
  /* z.B. ganz leichte violette Tönung, falls du magst */
}

.goal-strategy-card--actual {
  border-style: solid;
  border-width: 2px;
  border-color: #8368b3;
}
.goal-strategy-card--actual {
  position: relative;
}

.goal-strategy-card--actual::after {
  content: "aktiv";
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: #8368b3;
  color: #fff;
}

/* ---------------------------------------------
   Mid/Long: Match height (right cards align to left column height)
---------------------------------------------- */

.goal-detail-layout--match-height {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  column-gap: 2rem;
  align-items: stretch;
}

/* right side should fill height */
.goal-detail-layout--match-height .goal-plan--midterm {
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* strategy grid fills remaining space */
.goal-detail-layout--match-height .goal-strategies-grid {
  flex: 1;
  align-content: stretch;
}

/* each card stretches to fill its grid cell */
.goal-detail-layout--match-height .goal-strategy-card {
  height: 100%;
}

/* responsive */
@media (max-width: 960px) {
  .goal-detail-layout--match-height {
    grid-template-columns: 1fr;
    row-gap: 1rem;
  }
}

/* Responsiv: ab Tablet weniger Spalten */
@media (max-width: 1100px) {
  .goal-strategies-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .goal-strategies-grid {
    grid-template-columns: 1fr;
  }
}

/******************************************************/
/* STRATEGY */
/******************************************************/

.strategy-view__content {
  flex: 1;
  padding: 3rem 0;
  background-color: #ffffff;
}

.strategy-view__container {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 2rem;
}

canvas#wealthChart {
  width: 100%;
  height: 650px;
}

.controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
}

.control-group {
  display: flex;
  flex-direction: column;
}

.control-group label {
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.control-group input,
.control-group select {
  padding: 0.5rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}

button#updateChart {
  grid-column: 1 / -1;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  background-color: #007bff;
  color: #fff;
  transition: background-color 0.2s ease;
}

button#updateChart:hover {
  background-color: #0056b3;
}

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

/***********************************************************************/
/******************************* QUERIES *******************************/
/***********************************************************************/

/* === DESKTOP LARGE (ab 1440px) === */
@media (max-width: 90em) {
  html {
    font-size: 93.75%; /* 15px */
  }
}

/* === DESKTOP STANDARD (ab 1200px) === */
@media (max-width: 75em) {
  html {
    font-size: 87.5%; /* 14px */
  }
  /* Optional: Container etwas schmaler */
  .container {
    max-width: 110rem;
  }
  .card {
    max-width: 35rem;
  }
  .grid--2-cols {
    grid-template-columns: 1fr;
  }
  /* Cashflow */
  .cashflow-view__form-container {
    max-width: 60rem;
    margin: 0 auto;
    padding: 0 2rem;
  }
  .save-button .button-label {
    display: none;
  }
  .save-button {
    justify-content: center;
    align-items: center;
    width: 3rem; /* optional: fixe Breite für sauberes Layout */
    height: 3rem; /* dito */
    padding: 0; /* kein Innenabstand */
    font-size: 0; /* verhindert ungewollte Zwischenräume */
  }
}

/* === TABLET (ab 900px) === */
@media (max-width: 56.25em) {
  html {
    font-size: 81.25%; /* 13px */
  }
  /* Optional: Container etwas schmaler */
  .container {
    max-width: 90rem;
  }

  .main-nav-list {
    gap: 3.2rem;
  }
}

/* === MOBILE LANDSCAPE (ab 768px) === */
@media (max-width: 48em) {
  html {
    font-size: 81.25%; /* 13px bleibt gleich */
  }

  /* MOBILE NAVIGATION */
  .btn-mobile-nav {
    display: block;
    z-index: 1000;
  }

  /* .main-nav {
    display: none;
  } */

  .main-nav {
    background-color: rgba(255, 255, 255, 0.6);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    transform: translateX(100%);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.5s ease-in;
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
  }
  .nav-open .main-nav {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
    transform: translateX(0);
  }
  .nav-open .icon-mobile-nav[name="close-outline"] {
    display: block;
  }
  .nav-open .icon-mobile-nav[name="menu-outline"] {
    display: none;
  }
  .main-nav-list {
    flex-direction: column;
    gap: 4.8rem;
  }
  .main-nav-link:link,
  .main-nav-link:visited {
    font-size: 1.6rem;
  }

  /* Footer */
  .footer-bottom {
    flex-direction: column;
    gap: 2rem;
  }

  /* Onboarding */
  .setup-step {
    flex-direction: column;
  }

  .step-form,
  .step-info {
    min-height: auto; /* Mobile: Höhe kann sich wieder anpassen */
  }

  /* Account */
  .user-view__form-container {
    max-width: 35rem;
    margin: 0 auto;
    padding: 0 2rem;
  }

  .line-l {
    width: 30rem;
  }

  /* Verträge */

  /* Konten */
  .account-structure {
    flex-direction: column;
  }

  .account-single {
    order: 1;
  }

  .account-partner {
    order: 2;
  }

  .account-joint {
    order: 3;
  }

  /* Invest */
  .invest-view__summary {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .chart-container {
    order: -1; /* Chart nach oben verschieben */
    margin-bottom: 2rem;
    width: 100%;
  }

  .assetClasses-sum {
    width: 100%;
  }

  /* Planung */
  table,
  thead,
  tbody,
  th,
  td,
  tr {
    display: block;
  }

  tr {
    margin-bottom: 1rem;
  }

  td {
    padding-left: 50%;
    position: relative;
  }

  td::before {
    content: attr(data-label);
    position: absolute;
    left: 0;
    width: 45%;
    padding-left: 0.5rem;
    font-weight: bold;
  }
  .overview-table,
  .overview-table thead,
  .overview-table tbody,
  .overview-table th,
  .overview-table td,
  .overview-table tr {
    display: block;
  }

  .overview-table thead {
    display: none;
  }

  .overview-table tr {
    margin-bottom: 1.5rem;
    border: 1px solid #ccc;
    border-radius: 0.5rem;
    overflow: hidden;
  }

  .overview-table td {
    text-align: left;
    padding-left: 50%;
    position: relative;
  }

  .overview-table td::before {
    content: attr(data-label);
    position: absolute;
    left: 1rem;
    top: 0.75rem;
    font-weight: bold;
    white-space: nowrap;
  }
}

/* === MOBILE PORTRAIT (ab 576px) === */
@media (max-width: 36em) {
  html {
    font-size: 65%; /* 12px */
  }
}

/********************************/
/* Fixing Safari flexbox gap */
/********************************/
/* Noch checken, was davon relevant ist!!!! */
.no-flexbox-gap .main-nav-list li:not(:last-child) {
  margin-right: 4.8rem;
}

.no-flexbox-gap .list-item:not(:last-child) {
  margin-bottom: 1.6rem;
}

.no-flexbox-gap .list-icon:not(:last-child) {
  margin-right: 1.6rem;
}

.no-flexbox-gap .delivered-faces {
  margin-right: 1.6rem;
}

.no-flexbox-gap .meal-attribute:not(:last-child) {
  margin-bottom: 2rem;
}

.no-flexbox-gap .meal-icon {
  margin-right: 1.6rem;
}

.no-flexbox-gap .footer-row div:not(:last-child) {
  margin-right: 6.4rem;
}

.no-flexbox-gap .social-links li:not(:last-child) {
  margin-right: 2.4rem;
}

.no-flexbox-gap .footer-nav li:not(:last-child) {
  margin-bottom: 2.4rem;
}

@media (max-width: 75em) {
  .no-flexbox-gap .main-nav-list li:not(:last-child) {
    margin-right: 3.2rem;
  }
}

@media (max-width: 59em) {
  .no-flexbox-gap .main-nav-list li:not(:last-child) {
    margin-right: 0;
    margin-bottom: 4.8rem;
  }
}
