/* === Reset & Basislayout === */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: #f4f4f4;
  color: #333;
  display: flex;
  flex-direction: column;
  font-family: 'Segoe UI', sans-serif;
  height: 100vh;
  line-height: 1.6;
  overflow: hidden;
}

/* === Header & Footer === */
header, footer {
  background-color: #004481;
  color: white;
  padding: 1rem;
  position: fixed;
  width: 100%;
  z-index: 1000;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  top: 0;
}

footer {
  bottom: 0;
  text-align: center;
}

/* === Navigation === */
nav ul,
.main-nav ul {
  display: flex;
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

nav a {
  color: white;
  font-weight: bold;
  text-decoration: none;
}

.menu-toggle {
  background: none;
  border: none;
  cursor: pointer;
  display: none;
  font-size: 24px;
}

.main-nav {
  display: flex;
}

/* === Hauptbereich === */
main {
  flex: 1;
  margin-top: 60px;
  margin-bottom: 10px;
  overflow-y: auto;
  padding: 1rem;
}

/* === Tabellen === */
table {
  background-color: white;
  border-collapse: collapse;
  margin-top: 1rem;
  width: 100%;
}

table th,
table td {
  border: 1px solid #ccc;
  padding: 0.75rem;
  text-align: left;
}

table th {
  background-color: #e0e0e0;
}

/* === Formulare === */
form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

input,
textarea,
select {
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  color: #333;
  font-size: 1rem;
  padding: 0.5rem;
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%204%205'%3E%3Cpath%20fill='gray'%20d='M2%200L0%202h4L2%200zM2%205L0%203h4L2%205z'/%3E%3C/svg%3E");
  background-position: right 0.75rem center;
  background-repeat: no-repeat;
  background-size: 0.65rem auto;
}

/* === Buttons === */
button {
  background-color: #004481;
  border: none;
  border-radius: 4px;
  color: white;
  cursor: pointer;
  padding: 0.75rem;
}

button:hover {
  background-color: #0066b3;
}

/* === Login & Auth === */
.login-box {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  left: 50%;
  max-width: 400px;
  padding: 2rem;
  position: absolute;
  text-align: center;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  z-index: 10;
}

.auth-link a,
.selected a {
  background-color: #ffcc00;
  border-radius: 4px;
  color: #004481;
  font-weight: bold;
  padding: 0.4rem 0.8rem;
  transition: background-color 0.3s ease;
}

.selected a {
  background-color: #ffcccc;
}

.auth-link a:hover {
  background-color: #e6b800;
  color: white;
}

/* === Content Boxen & Hervorhebungen === */
.content-box {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
  padding: 1rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tr-deposit {
  background-color: #eafaf1 !important;
}

.tr-withdraw {
  background-color: #fcebea !important;
}

.tr-interest {
  background-color: #fffbe6 !important;
}

.hidden {
  display: none;
}

/* === Responsive Design === */
@media (max-width: 768px) {
  .main-nav {
    background-color: #004481;
    display: none;
    flex-direction: column;
    left: 0;
    position: absolute;
    top: 80px;
    width: 100%;
  }

  .main-nav.open {
    display: flex;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 10px;
    padding: 10px;
  }

  .menu-toggle {
    display: block;
  }

  nav ul {
    flex-direction: column;
    gap: 0.5rem;
  }

  main {
    padding: 0.5rem;
  }
}

.zinsrechner-wrapper {
  display: flex;
  height: calc(100vh - 120px); /* Platz für Header + Footer */
  overflow: hidden;
  position: relative;
}

.zins-formular {
  width: 300px;
  background-color: #fff;
  padding: 1rem;
  border-right: 1px solid #ccc;
  position: fixed;
  top: 60px; /* Höhe des Headers */
  bottom: 60px; /* Höhe des Footers */
  left: 0;
  overflow-y: auto;
  z-index: 10;
}

.zins-tabelle {
  margin-left: 300px;
  padding: 1rem;
  height: calc(100vh - 120px);
  overflow-y: auto;
}

/* Mobile Ansicht */
@media (max-width: 768px) {
  .zinsrechner-wrapper {
    flex-direction: column;
    height: auto;
  }

  .zins-formular {
    position: relative;
    width: 100%;
    height: auto;
    top: 0;
    bottom: auto;
    left: 0;
    border-right: none;
    border-bottom: 1px solid #ccc;
    z-index: auto;
  }

  .zins-tabelle {
    margin-left: 0;
    padding: 1rem 0.5rem;
    height: auto;
  }
}
