/* --- Grundlegendes --- */
body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.85)),
              url('pics/shredcode_logo.png') no-repeat center center fixed;
  background-size: cover;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
  overflow-x: hidden;
  overflow-y: auto;
  position: relative;
}

.overlay {
  position: fixed;
  top: 0; left: 0;
  height: 100%;
  width: 100%;
  background: linear-gradient(120deg, rgba(255,255,255,0.05), rgba(255,255,255,0.01));
  pointer-events: none;
  animation: shimmer 5s infinite alternate;
  z-index: 1;
}

@keyframes shimmer {
  0% { opacity: 0.1; }
  50% { opacity: 0.2; }
  100% { opacity: 0.1; }
}

/* --- Login Box --- */
.login-box {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  width: 100%;
  max-width: 400px;
  text-align: center;
  color: #fff;
  position: relative;
  z-index: 10;
}

.login-box.hidden {
  opacity: 0;
  transform: translateY(-40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
  pointer-events: none;
}

.login-box.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.login-box h1 {
  margin-bottom: 24px;
  font-size: 28px;
  color: #ff4d4d;
}

.login-box input[type="text"],
.login-box input[type="password"] {
  width: 100%;
  padding: 12px;
  margin: 10px 0;
  border: none;
  border-radius: 8px;
  outline: none;
  font-size: 16px;
}

.login-box button {
  width: 100%;
  padding: 12px;
  background: #ff4d4d;
  border: none;
  border-radius: 8px;
  color: white;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.login-box button:hover {
  background: #e64343;
}

@media (max-width: 480px) {
  .login-box {
    padding: 20px;
    max-width: 100%;
  }

  .login-box h1 {
    font-size: 22px;
  }

  .login-box input,
  .login-box button {
    padding: 10px;
    font-size: 14px;
  }
}

/* --- Modal Container --- */
#modalContainer {
  display: none; /* unsichtbar bis JS zeigt */
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1200;

  display: flex;             /* flexbox für Zentrierung */
  justify-content: center;   /* horizontal zentrieren */
  align-items: center;       /* vertikal zentrieren */

  padding: 20px;
  box-sizing: border-box;

  overflow-y: auto;
}

/* --- Modal Inhalt --- */
.modal-content {
  background-color: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  padding: 30px 40px;
  border-radius: 16px;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  color: white;

  display: flex;
  flex-direction: column;

  overflow-y: auto;
  position: relative;
  box-sizing: border-box;
}

/* --- Schließen Button --- */
.modal-close {
  position: absolute;
  top: 12px;
  right: 20px;
  font-size: 1.8rem;
  border: none;
  background: transparent;
  cursor: pointer;
  color: #ff4d4d;
  transition: color 0.3s ease, transform 0.2s ease;
  z-index: 1300;
  user-select: none;
}

.modal-close:hover {
  color: #e64343;
  transform: scale(1.1);
}

/* --- Responsive Anpassungen für kleine Bildschirme */
@media (max-width: 480px) {
  #modalContainer .modal-content {
    max-width: 90vw;
    padding: 25px 20px;
  }

  #modalContainer .modal-content h2 {
    font-size: 24px;
  }
}

/* --- Tabellenstil --- */
.client-table {
  width: 100%;
  border-collapse: collapse;
  color: #fff;
  background-color: rgba(255,255,255,0.05);
  margin-top: 20px;
}

.client-table th,
.client-table td {
  padding: 12px 8px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  text-align: left;
}

.client-table th {
  font-weight: bold;
  color: #ff4d4d;
  cursor: pointer;
  user-select: none;
}

.client-table tr:hover {
  background-color: rgba(255,255,255,0.1);
}

@media (max-width: 768px) {
  .client-table th,
  .client-table td {
    font-size: 0.85rem;
    padding: 8px 5px;
  }
}

@media (max-width: 600px) {
  .client-table th,
  .client-table td {
    padding: 8px 10px;
    font-size: 0.85rem;
  }
}

/* --- Responsive Login Box --- */
@media (max-width: 480px) {
  .login-box {
    padding: 20px;
    max-width: 100%;
  }

  .login-box h1 {
    font-size: 22px;
  }

  .login-box input,
  .login-box button {
    padding: 10px;
    font-size: 14px;
  }

  /* Modal Content auf kleinen Bildschirmen */
  #modalContainer .modal-content {
    max-width: 90vw;
    padding: 25px 20px;
  }

  #modalContainer .modal-content h2 {
    font-size: 24px;
  }
}

/* --- Trainer Dashboard Styles --- */
body.dashboard-trainer h2 {
  color: #ff4d4d;
  font-size: 2.5rem;
  margin-bottom: 30px;
  text-align: center;
  text-shadow: 0 0 5px rgba(255, 77, 77, 0.7);
}

body.dashboard-trainer button {
  background-color: #ff4d4d;
  color: white;
  font-size: 1.1rem;
  padding: 15px 25px;
  margin: 10px 15px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(255, 77, 77, 0.5);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  display: inline-block;
}

body.dashboard-trainer button:hover {
  background-color: #e64343;
  box-shadow: 0 6px 20px rgba(230, 67, 67, 0.7);
}

body.dashboard-trainer {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  min-height: 100vh;
  padding: 40px 20px;
  overflow-y: auto;
}

body.dashboard-trainer #modalContainer {
  padding: 30px;
}

body.dashboard-trainer #modalContainer::-webkit-scrollbar {
  width: 10px;
}

body.dashboard-trainer #modalContainer::-webkit-scrollbar-thumb {
  background-color: rgba(255, 77, 77, 0.5);
  border-radius: 10px;
}

@media (max-width: 600px) {
  body.dashboard-trainer button {
    width: 90%;
    margin: 10px auto;
  }

  body.dashboard-trainer h2 {
    font-size: 2rem;
  }
}

/* --- Kundenakte spezifisch --- */
.kundenakte-container {
  max-width: 600px;
  margin: 40px auto;
  color: white;
  background: rgba(255,255,255,0.05);
  padding: 30px;
  border-radius: 12px;
  backdrop-filter: blur(10px);
}

.kundenakte-container h3 {
  display: flex;
  align-items: center;
}

.link-note {
  color: #ff4d4d;
  margin-left: 10px;
  font-weight: normal;
  font-size: 0.9rem;
  text-decoration: underline;
  cursor: pointer;
}

.link-back {
  color: #ff4d4d;
  text-decoration: none;
  margin-top: 20px;
  display: inline-block;
}
.anamnese-box {
  background: rgba(255, 255, 255, 0.03);
  padding: 20px;
  border-radius: 12px;
  margin-top: 30px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.anamnese-box h3 {
  font-size: 1.4rem;
  color: #ff4d4d;
  margin-bottom: 16px;
}

.anamnese-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.anamnese-grid div {
  padding: 10px;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
}

.anamnese-grid span {
  display: block;
  color: #ff4d4d;
  font-weight: bold;
  margin-bottom: 5px;
}
@media (min-width: 600px) {
  .anamnese-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.kundeninfo-box {
  background: rgba(255, 255, 255, 0.03);
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 30px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.kundeninfo-box h3 {
  font-size: 1.4rem;
  color: #ff4d4d;
  margin-bottom: 16px;
}

.kundeninfo-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.kundeninfo-grid div {
  padding: 10px;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
}

.kundeninfo-grid span {
  display: block;
  color: #ff4d4d;
  font-weight: bold;
  margin-bottom: 5px;
}

@media (min-width: 600px) {
  .kundeninfo-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.kundenaktionen {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin-top: 30px;
  margin-bottom: 20px;
}

.kundenaktionen button {
  background-color: #ff4d4d;
  color: white;
  font-size: 1rem;
  padding: 12px 20px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(255, 77, 77, 0.3);
  transition: all 0.3s ease;
}

.kundenaktionen button:hover {
  background-color: #e64343;
  box-shadow: 0 6px 20px rgba(230, 67, 67, 0.5);
}

@media (max-width: 480px) {
  .kundenaktionen {
    flex-direction: column;
    align-items: center;
  }

  .kundenaktionen button {
    width: 90%;
    max-width: 300px;
  }
}
.meal-item {
  margin-bottom: 12px;
}

.meal-item-name {
  font-weight: bold;
  color: #ffffff;
}

.meal-item-macros {
  font-size: 0.85rem;
  color: #ccc;
}
.small-red-button {
  background-color: #ff4d4d;
  color: white;
  font-size: 0.85rem;
  padding: 6px 12px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(255, 77, 77, 0.3);
  transition: all 0.3s ease;
  margin-left: 10px;
  vertical-align: middle;
}

.small-red-button:hover {
  background-color: #e64343;
  box-shadow: 0 5px 15px rgba(230, 67, 67, 0.4);
}
.form-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 500px;
  margin: 0 auto;
  color: white;
  text-align: left;
  font-family: 'Segoe UI', sans-serif;
}

.form-container h2 {
  color: #ff4d4d;
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 10px;
  text-shadow: 0 0 6px rgba(255, 77, 77, 0.7);
}

fieldset {
  border: 1.5px solid rgba(255, 77, 77, 0.8);
  border-radius: 12px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 0 10px rgba(0,0,0,0.2);
}

legend {
  color: #ff4d4d;
  font-weight: 700;
  padding: 0 10px;
  font-size: 1.1rem;
  user-select: none;
}

.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 14px;
}

.form-group label {
  color: #ff4d4d;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 1rem;
  user-select: none;
}

.form-group input , 
form textarea,
form select {
  padding: 12px 16px;
  border-radius: 12px;
  border: 1.5px solid rgba(255, 77, 77, 0.8);
  background: rgba(0,0,0, 0.6);
  color: rgb(180, 9, 9);
  font-size: 1rem;
  outline: none;
  box-shadow: inset 0 2px 5px rgba(0,0,0,0.3);
  transition: border-color 0.3s ease, background 0.3s ease;
}

.form-group input:focus,
form textarea:focus,
form select:focus  {
  border-color: #ff4d4d;
  background: rgba(255, 255, 255, 0.15);
}


button[type="submit"] {
  background-color: #ff4d4d;
  color: white;
  font-weight: 700;
  font-size: 1.2rem;
  padding: 14px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(255, 77, 77, 0.6);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  margin-top: 10px;
}

button[type="submit"]:hover {
  background-color: #e64343;
  box-shadow: 0 8px 25px rgba(230, 67, 67, 0.7);
}

#measurementsStatus {
  margin-top: 10px;
  min-height: 1.2em;
  color: #ff4d4d;
  font-weight: 600;
}

/* Responsive */
@media (max-width: 480px) {
  .form-container {
    max-width: 90vw;
  }
}
.accordion {
  width: 100%;
  margin-bottom: 20px;
}

.accordion-item {
  border: 1px solid rgba(255, 77, 77, 0.4);
  border-radius: 10px;
  margin-bottom: 10px;
  background: rgba(255, 255, 255, 0.03);
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  overflow: hidden;
}

.accordion-header {
  padding: 15px 20px;
  font-size: 1.1rem;
  font-weight: bold;
  color: #ff4d4d;
  cursor: pointer;
  user-select: none;
  transition: background 0.3s ease;
  backdrop-filter: blur(6px);
}

.accordion-header:hover {
  background-color: rgba(255, 77, 77, 0.05);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
  padding: 0 20px;
  color: white;
}

.accordion-item.active .accordion-content {
  max-height: 1000px; /* groß genug, um Inhalt zu zeigen */
  padding: 15px 20px;
}
.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 20px;
  justify-content: center;
}

.checkin-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 77, 77, 0.2);
  padding: 20px;
  border-radius: 12px;
  width: 100px;
  color: white;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  transition: transform 0.2s ease;
}

.checkin-card:hover {
  transform: scale(1.03);
}

.checkin-card h3 {
  margin-bottom: 10px;
  color: #ff4d4d;
  font-size: 1.4rem;
}

.checkin-card p {
  font-size: 1.1rem;
}
.checkin-wrapper {
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 77, 77, 0.2);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.checkin-header {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
}

.checkin-header button {
  background-color: #222;
  color: white;
  border: 1px solid #ff4d4d;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.checkin-header button:hover {
  background-color: #ff4d4d;
  color: white;
  transform: scale(1.05);
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
  padding: 0;
  list-style: none;
}

.pagination li {
  display: inline-block;
}

.pagination li a {
  display: inline-block;
  padding: 8px 12px;
  background-color: #ff4d4d;
  color: white;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.pagination li.active a {
  background-color: #cc0000;
}

.pagination li a:hover {
  background-color: #e60000;
}

.chat-box {
  border: 1px solid #ccc;
  padding: 10px;
  border-radius: 10px;
  max-width: 600px;
  margin: 20px auto;
}
.chat-messages {
  height: 300px;
  overflow-y: auto;
  border: 1px solid #ddd;
  padding: 5px;
  margin-bottom: 10px;
  background: rgba(221, 221, 221, 0.5); /* 0.5 = 50% Deckkraft */
}
#chat-input {
  width: 100%;
  height: 50px;
}
#closeChatBtn:hover {
  color: red;
}
