* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  overflow-x: hidden;
  font-family: Arial, sans-serif !important;
  font-size: 16px;
}

body {
  background-color: white;
}

.navbar {
  background: #ffffff;
  padding: 0.75rem 1.5rem;
}

.navbar-brand {
  font-weight: 700;
  color: #1a1a1a;
}

.nav-link {
  margin-left: 15px;
  border-radius: 4px;
  color: #555;
}

.nav-link:hover {
  background-color: #f8f9fa;
  color: #28a745;
  border-color: #e9ecef;
}

.nav-link.active {
  background-color: #e8f5e9;
  color: #28a745 !important;
  border-color: #c8e6c9;
  font-weight: 600;
}

#welcome-section {
  background-color: white;
  border: 2px solid #333;
  border-radius: 4px;
  padding: 30px;
  margin: 20px;
  text-align: center;
}

#welcome-section h2 {
  margin-bottom: 20px;
}

#welcome-text {
  text-align: justify;
  line-height: 1.6;
}

.features-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin: 30px 20px;
}

@media (min-width: 768px) {
  .features-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .features-container {
    grid-template-columns: repeat(3, 1fr);
  }
}

.feature-card {
  background-color: white;
  border: 2px solid #333;
  border-radius: 4px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.feature-card h3 {
  color: #333;
}

.preview-image {
  width: 100%;
}

.footer {
  background-color: #f8f9fa;
  border-top: 2px solid #333;
  margin-top: 40px;
  padding: 30px 20px;
  text-align: center;
}

.footer-content {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 20px;
}

.footer a {
  color: #333;
  text-decoration: none;
  transition: color 0.4s;
}

.footer a:hover {
  color: green;
  text-decoration: underline;
}

.separator {
  color: #999;
}

.transaction-card {
  background-color: white;
  border: 2px solid #333;
  border-radius: 4px;
  padding: 20px;
  height: 469.4px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.data-visual {
  background-color: white;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  height: 469.4px;
}

.data-visual p {
  text-align: center;
  margin: 0px;
}

.data-visual-overview {
  background-color: white;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.data-visual-overview p {
  text-align: center;
  margin: 0px;
}

.table-container {
  overflow-x: auto;
  overflow-y: auto;
  max-height: 320px;
  flex: 1;
  min-height: 0;
}

.transaction-table {
  text-align: left;
  width: 100%;
}

th,
td {
  padding: 10px;
}

.transactions-container {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  /*1 fr would overflow */
  gap: 20px;
  margin: 30px 20px;
}

#account-balance-dif {
  color: #198754;
}

.kontostand-card {
  background-color: white;
  border: 2px solid #333;
  border-radius: 4px;
  padding: 30px;
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.kontostand-container {
  display: flex;
  justify-content: center;
  margin: 40px 20px;
}

@media (min-width: 1400px) {
  .transactions-container {
    grid-template-columns: 33.3% 33.3% 33.3%;
    gap: 0;
  }
}

.page-container {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  /*1 fr would overflow */
  margin: 30px 20px;
}

@media (min-width: 1400px) {
  .page-container {
    display: grid;
    grid-template-columns: 37.5% 37.5% 25%;
    margin: 30px 20px 0px 20px;
    height: fit-content;
  }
}

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

.form-control.error,
.dropdown.error {
  border-color: #dc3545 !important;
  border-width: 2px;
  background-color: #fff5f5;
}

.dropdown {
  border-radius: 4px;
  accent-color: #198754;
}

.dropdown option:checked {
  background-color: #198754;
  color: white;
}

.dropdown option:focus {
  outline: 2px solid #198754 !important;
  outline-offset: 0px;
  border-color: #198754;
  box-shadow: 0 0 0 2px #198754;
}

.category-filter {
  flex-direction: row;
}

.chart-container {
  overflow-y: scroll;
  height: 429.4px;
}

.chart-scroll-wrapper {
  overflow-x: auto !important; 
  overflow-y: hidden;
}

.piechart_ausgaben {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background-image: conic-gradient(#FFA500 0deg 293.4deg,
      #87CEEB 293.4deg 326.75deg,
      #FFB6C1 326.75deg 352.18deg,
      #90EE90 352.18deg 358deg,
      #FFD700 358deg 360deg);
  margin: 0 auto 40px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.piechart_ausgaben_nach_aenderung {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background-image: conic-gradient(#FFA500 0deg 293deg,
      #87CEEB 293deg 326.4deg,
      #FFB6C1 326.4deg 352deg,
      #90EE90 352deg 357.8deg,
      #FFD700 357.8deg 360deg);
  margin: 0 auto 40px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.piechart_einnahmen {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background-image: conic-gradient(#FFD700 0deg 84.2deg,
      #87CEEB 84.2deg 213.0deg,
      #90EE90 213.0deg 267.8deg,
      #FFB6C1 267.8deg 277.8deg,
      #FFA500 277.8deg 359.6deg,
      #FFB347 359.6deg 360deg);
  margin: 0 auto 20px;
}

.piechart_einnahmen_nach_aenderung {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background-image: conic-gradient(#FF6B6B 0deg 141.0deg,
      #87CEEB 141.0deg 216.2deg,
      #FFD700 216.2deg 265.1deg,
      #FFA500 265.1deg 312.1deg,
      #90EE90 312.1deg 344.0deg,
      #FFB347 344.0deg 355.3deg,
      #FFB6C1 355.3deg 360deg);
  margin: 0 auto 20px;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  line-height: 1.4;
  text-align: center;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.legend-color {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  flex-shrink: 0;
}

.legend-text {
  color: #333;
}

.form-switch {
  align-self: center;
}

#logo {
  height: 47.2px;
  width: 47.2px;
}

#login-button {
  width: 426.8px;
  height: 48px;
}

#btn-bearbeiten {
  display: flex;
  gap: 10px;
}

#btn-bearbeiten button {
  width: 50%;
}

/*-----------Temporäres statisches Balkendiagramm--------------*/

.legend {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.legend span {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #666;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 4px;
  flex-shrink: 0;
}

.chart-row {
  display: flex;
  align-items: flex-start; 
  position: relative;
  overflow: visible;
}

.y-labels {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 220px; 
  width: 55px;         
  text-align: right;   
  margin-right: 12px;  
  flex-shrink: 0;     
  overflow: visible !important;  
}

.y-labels span {
  color: #bbb;
  font-size: 0.85rem;  
  line-height: 1;      
  display: block;
  overflow: visible !important;
  white-space: nowrap;
}

.barchart {
  flex: 1;
  display: flex;
  align-items: flex-end;
  height: 220px;
  gap: 0;
  border-bottom: 2px solid #bbb;
  position: relative;
  overflow-x: visible;
  min-width: max-content;
}

.group {
  flex: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 5px;
  height: 100%;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  width: 90px;

}

.bar {
  width: 36%;
  border-radius: 4px 4px 0 0;
  flex-shrink: 0;
}

.red {
  background: #c0392b;
}

.green {
  background: #27ae60;
}

.months {
  display: flex;
  gap: 0;
  margin-top: 10px;
  overflow-x: visible;
  min-width: max-content;
}

.months span {
  width: 90px;
  flex: 1;
  text-align: center;
  color: #999;
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  min-width: 50px;
}

.disabled-link {
  color: #d9dde0 !important;
  pointer-events: none;
}

.card {
  border: 2px solid #333;
  border-radius: 4px !important;
}

.zentriertBestaetigung {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
}

.action-buttons {
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
}

tr:hover .action-buttons {
  opacity: 1;
}

.btn {
  border-radius: 4px !important;
}

.form-control {
  border-radius: 4px !important;
}

.alert {
  border-radius: 4px;
  text-align: center;
}

.alert-success {
  border: none;
  background-color: lightgreen;
}