html,
body {
  overflow-x: hidden;
  height: 100%;
  min-height: 100vh;
  margin: 0;

  /* display: grid; */
  /* grid-template-rows: auto 1fr auto; */
}

.box-shadow {
  box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.05);
}

.form-auth {
  margin-top: 10%;
  width: 100%;
  padding: 15px;
}

.form-auth .checkbox {
  font-weight: 400;
}

.form-auth .form-control {
  position: relative;
  box-sizing: border-box;
  height: auto;
  padding: 10px;
  font-size: 16px;
}

.form-auth .form-control:focus {
  z-index: 2;
}

.form-auth input[type="email"] {
  margin-bottom: -1px;
}

.form-auth input[type="password"] {
  margin-bottom: 10px;
}

/* --------------User Image Upload---------------------- */

.avatar-upload {
  text-align: center;
  display: inline-block;
}

.avatar-edit {
  top: 150px;
  margin-right: -125px;
  margin-top: -40px;
}

.avatar-upload .avatar-edit input {
  display: none;
}

.avatar-upload .avatar-edit input + label {
  width: 34px;
  height: 34px;
  margin-bottom: 0;
  border-radius: 100%;
  z-index: 1000000;
  background: blue;
  border: 1px solid transparent;
  box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  font-weight: normal;
  transition: all 0.2s ease-in-out;
}

.avatar-upload .avatar-edit input + label:hover {
  background: #757575;
  border-color: #757575;
}

.avatar-upload .avatar-edit input + label:after {
  color: #757575;
  position: absolute;
  top: 5px;
  left: 1px;
  right: 0;
  text-align: center;
  margin: auto;
}

.avatar-upload .avatar-preview {
  width: 162px;
  height: 162px;
  position: relative;
  border-radius: 100%;
  box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.3);
}

.avatar-upload .avatar-preview > div {
  width: 100%;
  height: 100%;
  border-radius: 100%;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
}

.navbar-img {
  width: 30px;
  height: 30px;
  object-fit: cover;
  border-radius: 50%;
}

/* --------------Profile card---------------------- */

.card-profile {
  width: 230px;
  min-height: 330px;
  margin: 50px auto;
  /* background-color: #e6e5e1; */
  border-radius: 0;
  border: 0;
}

.card-profile .card-img-top {
  border-radius: 0;
}

.card-img-profile {
  width: 110px;
  height: 110px;
  object-fit: cover;
  border-radius: 50%;
  margin-top: -45px;
  margin-bottom: 35px;
  border: 2px solid #ffffff;
}

.edit-profile {
  position: absolute;
  right: 10px;
  top: 110px;
}

.card-img-profile {
  transition: transform 0.2s;
}

.card-img-profile:hover {
  transform: scale(1.02);
}

.card-profile .card-title {
  margin-bottom: 30px;
}

.card-profile .card-title small {
  display: block;
  font-size: 0.6em;
  margin-top: 0.2em;
  padding-left: 20px;
  padding-right: 20px;
}

.card-profile .fa {
  color: grey;
}

.card-profile .fa:hover {
  color: blue;
}

/* --------------Footer---------------------- */

footer {
  margin-top: 100px;
}

#myFooter {
  background-color: #3c3d41;
  color: white;
  padding-top: 30px;
}

#myFooter .footer-copyright {
  background-color: #333333;
  padding-top: 3px;
  padding-bottom: 3px;
  text-align: center;
}

#myFooter .row {
  margin-bottom: 60px;
}

#myFooter .navbar-brand {
  margin-top: 45px;
  height: 65px;
}

#myFooter .footer-copyright p {
  margin: 10px;
  color: #ccc;
}

#myFooter .footer-copyright a:hover {
  color: #d84b6b;
}

#myFooter ul {
  list-style-type: none;
  padding-left: 0;
  line-height: 1.7;
}

#myFooter h5 {
  font-size: 18px;
  color: white;
  font-weight: bold;
  margin-top: 30px;
}

#myFooter h2 a {
  font-size: 50px;
  text-align: center;
  color: #fff;
}

#myFooter a {
  color: #d2d1d1;
  text-decoration: none;
}

#myFooter a:hover,
#myFooter a:focus {
  text-decoration: none;
  color: white;
}

#myFooter .social-networks {
  text-align: center;
  padding-top: 30px;
  padding-bottom: 16px;
}

#myFooter .social-networks a {
  font-size: 32px;
  color: #f9f9f9;
  padding: 10px;
  transition: 0.2s;
}

#myFooter .social-networks a:hover {
  text-decoration: none;
  color: #d84b6b;
}

#myFooter .btn {
  color: white;
  background-color: #d84b6b;
  border-radius: 20px;
  border: none;
  width: 150px;
  display: block;
  margin: 0 auto;
  margin-top: 10px;
  line-height: 25px;
}

.container {
  max-width: 1200px;
}

/* ==================== MODERNE NAVBAR - DARK MODE ==================== */

:root {
  --nav-primary-color: #667eea;
  --nav-secondary-color: #764ba2;
  --nav-dark-bg: #1a1a2e;
  --nav-darker-bg: #16213e;
  --nav-accent: #667eea;
}

/* Navbar Base */
.navbar {
  transition: all 0.3s ease;
  box-shadow: 0 6px 30px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  position: relative;
  z-index: 1000;
}

/* Logged In Navbar - Modern Dark Mode */
.navbar-green {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%) !important;
  color: white !important;
  border-bottom: 2px solid rgba(102, 126, 234, 0.3);
  position: relative;
}

.navbar-green::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--nav-accent) 50%, transparent 100%);
  opacity: 0.5;
}

/* Not Logged In Navbar - Clean White */
.navbar-light.bg-white {
  background: white !important;
  border-bottom: 3px solid #f0f0f0;
}

/* Navbar Brand */
.navbar-brand {
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
}

.navbar-brand:hover {
  transform: translateY(-2px);
}

.navbar-brand img {
  transition: all 0.3s ease;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.navbar-brand:hover img {
  transform: rotate(360deg) scale(1.1);
}

/* Nav Links - Dark Mode */
.navbar-green .navbar-brand,
.navbar-green .nav-link,
.navbar-green .dropdown-item {
  color: #e0e0e0 !important;
}

.navbar-green .navbar-brand {
  color: white !important;
}

.navbar-green .dropdown-menu {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border: 1px solid rgba(102, 126, 234, 0.2);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  border-radius: 12px;
  padding: 0.5rem 0;
  margin-top: 0.5rem;
  z-index: 1100;
  position: relative;
}

.navbar-green .dropdown-item {
  padding: 0.75rem 1.5rem;
  transition: all 0.3s ease;
  border-radius: 8px;
  margin: 0.25rem 0.5rem;
  color: #e0e0e0 !important;
}

.navbar-green .dropdown-item:hover {
  background: rgba(102, 126, 234, 0.2);
  transform: translateX(5px);
  color: white !important;
}

.navbar-green .dropdown-item i {
  color: var(--nav-accent);
}

.btn-dark {
  background: rgba(102, 126, 234, 0.15) !important;
  border: 2px solid rgba(102, 126, 234, 0.3);
  border-radius: 50px;
  padding: 0.5rem 1rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.btn-dark:hover {
  background: rgba(102, 126, 234, 0.25) !important;
  border-color: rgba(102, 126, 234, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* Nav Links Advanced Styling - Dark Mode */
.nav-link {
  position: relative;
  display: inline-block;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  font-weight: 500;
  letter-spacing: 0.3px;
}

.navbar-green .nav-link::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 5px;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--nav-accent) 0%, rgba(102, 126, 234, 0.4) 100%);
  transition: all 0.3s ease;
  transform: translateX(-50%);
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(102, 126, 234, 0.5);
}

.navbar-green .nav-link:hover {
  background-color: rgba(102, 126, 234, 0.15);
  color: #ffffff !important;
  transform: translateY(-2px);
}

.navbar-green .nav-link:hover::after {
  width: 80%;
}

.navbar-green .nav-link.active {
  background: rgba(102, 126, 234, 0.25);
  color: #ffffff !important;
  box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.navbar-green .nav-link.active::after {
  width: 80%;
  background: linear-gradient(90deg, var(--nav-accent) 0%, rgba(102, 126, 234, 0.6) 100%);
  box-shadow: 0 0 10px rgba(102, 126, 234, 0.7);
}

/* Light Navbar Links */
.navbar-light .nav-link {
  color: #333 !important;
}

.navbar-light .nav-link::after {
  background: linear-gradient(90deg, var(--nav-primary-color) 0%, var(--nav-secondary-color) 100%);
}

.navbar-light .nav-link:hover {
  background-color: #f8f9ff;
  color: var(--nav-primary-color) !important;
}

.navbar-light .nav-link.active {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
  color: var(--nav-primary-color) !important;
}

/* Mobile Toggler */
.navbar-toggler {
  border: none;
  padding: 0.5rem;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.navbar-toggler:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

.navbar-toggler-icon-custom {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 24px;
  cursor: pointer;
}

.navbar-toggler-icon-custom::before,
.navbar-toggler-icon-custom::after {
  content: "";
  display: block;
  height: 3px;
  width: 100%;
  background-color: white;
  border-radius: 3px;
  transition: all 0.3s ease;
}

.navbar-toggler-icon-custom::before {
  transform-origin: top left;
}

.navbar-toggler-icon-custom::after {
  transform-origin: bottom left;
}

/* Profile Image in Dropdown - Dark Mode */
.navbar-img {
  width: 35px;
  height: 35px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid rgba(102, 126, 234, 0.4);
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), 0 0 15px rgba(102, 126, 234, 0.2);
}

.btn-dark:hover .navbar-img {
  border-color: rgba(102, 126, 234, 0.8);
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), 0 0 20px rgba(102, 126, 234, 0.4);
}

/* Dropdown Toggle Arrow */
.dropdown-toggle::after {
  margin-left: 0.25rem;
  transition: transform 0.3s ease;
}

/* Special styling for dropdown toggle - no jump animation, just highlight */
.navbar-green .nav-link.dropdown-toggle:hover {
  transform: none !important;
  background-color: rgba(102, 126, 234, 0.2) !important;
  box-shadow: 0 0 15px rgba(102, 126, 234, 0.3);
}

.navbar-green .dropdown.show .nav-link.dropdown-toggle {
  background-color: rgba(102, 126, 234, 0.25) !important;
  box-shadow: 0 0 20px rgba(102, 126, 234, 0.4);
  transform: none !important;
}

/* Fix line positioning for dropdown toggles - center under text, not including arrow */
.navbar-green .nav-link.dropdown-toggle::after {
  left: calc(50% - 0.375rem); /* Adjust for arrow space (half of 0.25rem + margin) */
  transform: translateX(-50%);
}

/* Keep line visible when dropdown is open */
.navbar-green .dropdown.show .nav-link.dropdown-toggle::after {
  width: 80%;
}

.dropdown {
  position: relative;
  z-index: 1050;
}

.dropdown.show {
  z-index: 1100;
}

.dropdown.show .dropdown-toggle::after {
  transform: translateX(-50%);
}

/* ==================== ALERT MESSAGES ==================== */

.alert {
  border: none;
  border-radius: 12px;
  padding: 1rem 1.5rem;
  margin: 1rem auto;
  max-width: 1200px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  animation: slideInTop 0.4s ease;
  position: relative;
  overflow: hidden;
}

@keyframes slideInTop {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.alert::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 5px;
  height: 100%;
}

/* Danger Alert */
.alert-danger {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
  font-weight: 600;
  display: flex;
  align-items: center;
  min-height: 60px;
  padding-right: 4rem;
}

.alert-danger::before {
  background: #dc3545;
}

/* Success Alert */
.alert-success {
  background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%);
  color: #155724;
  font-weight: 600;
  display: flex;
  align-items: center;
  min-height: 60px;
  padding-right: 4rem;
}

.alert-success::before {
  background: #28a745;
}

/* Secondary Alert (Debug) */
.alert-secondary {
  background: linear-gradient(135deg, #e0e7ff 0%, #cfd9ff 100%);
  color: #383d41;
  font-weight: 600;
  display: flex;
  align-items: center;
  min-height: 60px;
}

.alert-secondary::before {
  background: #6c757d;
}

/* Alert Icons */
.alert-danger::after {
  content: '⚠️';
  position: absolute;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  flex-shrink: 0;
}

.alert-success::after {
  content: '✓';
  position: absolute;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
  background: #28a745;
  color: white;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-weight: bold;
  flex-shrink: 0;
}

/* ==================== RESPONSIVE ==================== */

@media (max-width: 768px) {
  .navbar-brand {
    font-size: 1.1rem;
  }
  
  .navbar-brand img {
    width: 40px;
    height: 40px;
  }
  
  .navbar-collapse {
    background: rgba(0, 0, 0, 0.05);
    padding: 1rem;
    border-radius: 12px;
    margin-top: 1rem;
  }
  
  .navbar-green .navbar-collapse {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(102, 126, 234, 0.2);
  }
  
  .nav-link {
    margin: 0.25rem 0;
  }
  
  .alert {
    margin: 0.5rem;
    font-size: 0.9rem;
  }
}

/* ==================== MODERNE FOOTER - DARK MODE ==================== */

body,
html {
  height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

#myFooter {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  color: white;
  text-align: center;
  padding: 2rem 0;
  position: relative;
  width: 100%;
  box-shadow: 0 -6px 30px rgba(0, 0, 0, 0.3);
  border-top: 2px solid rgba(102, 126, 234, 0.3);
  margin-top: 4rem;
}

#myFooter::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--nav-accent) 50%, transparent 100%);
  opacity: 0.5;
}

#myFooter .container {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

#myFooter h2,
#myFooter p,
#myFooter a {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.8;
}

#myFooter a {
  color: #e0e0e0;
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
}

#myFooter a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--nav-accent) 0%, rgba(102, 126, 234, 0.4) 100%);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

#myFooter a:hover {
  color: white;
  background: rgba(102, 126, 234, 0.15);
  transform: translateY(-2px);
}

#myFooter a:hover::after {
  width: 80%;
}

#myFooter img {
  height: 50px;
  width: auto;
  margin-right: 1rem;
  transition: all 0.3s ease;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

#myFooter .logo a:hover img {
  transform: rotate(360deg) scale(1.1);
}

#myFooter p {
  color: #b0b0b0;
  font-weight: 400;
  letter-spacing: 0.3px;
}

#myFooter p a {
  display: inline-block;
  margin: 0 0.5rem;
}

#myFooter .btn {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  background: rgba(102, 126, 234, 0.15);
  border: 2px solid rgba(102, 126, 234, 0.3);
  border-radius: 8px;
  color: white;
  transition: all 0.3s ease;
}

#myFooter .btn:hover {
  background: rgba(102, 126, 234, 0.25);
  border-color: rgba(102, 126, 234, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* Footer Animation */
#myFooter {
  animation: slideInUp 0.6s ease;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* User Info in Footer */
.user-info-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 15px 0;
  flex-wrap: wrap;
}

.user-role-badge {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 0.875rem;
  font-weight: 600;
  color: white;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.user-role-badge:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Spezifische Farben für verschiedene Rollen */
.role-admin {
  background: linear-gradient(135deg, rgba(220, 38, 127, 0.3), rgba(220, 38, 127, 0.1));
  border-color: rgba(220, 38, 127, 0.5);
  box-shadow: 0 2px 10px rgba(220, 38, 127, 0.2);
}

.role-admin:hover {
  background: linear-gradient(135deg, rgba(220, 38, 127, 0.4), rgba(220, 38, 127, 0.2));
  box-shadow: 0 4px 15px rgba(220, 38, 127, 0.3);
}

.role-member {
  background: linear-gradient(135deg, rgba(52, 152, 219, 0.3), rgba(52, 152, 219, 0.1));
  border-color: rgba(52, 152, 219, 0.5);
  box-shadow: 0 2px 10px rgba(52, 152, 219, 0.2);
}

.role-member:hover {
  background: linear-gradient(135deg, rgba(52, 152, 219, 0.4), rgba(52, 152, 219, 0.2));
  box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.role-kollektiv {
  background: linear-gradient(135deg, rgba(46, 204, 113, 0.3), rgba(46, 204, 113, 0.1));
  border-color: rgba(46, 204, 113, 0.5);
  box-shadow: 0 2px 10px rgba(46, 204, 113, 0.2);
}

.role-kollektiv:hover {
  background: linear-gradient(135deg, rgba(46, 204, 113, 0.4), rgba(46, 204, 113, 0.2));
  box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
}

.role-helper {
  background: linear-gradient(135deg, rgba(241, 196, 15, 0.3), rgba(241, 196, 15, 0.1));
  border-color: rgba(241, 196, 15, 0.5);
  box-shadow: 0 2px 10px rgba(241, 196, 15, 0.2);
}

.role-helper:hover {
  background: linear-gradient(135deg, rgba(241, 196, 15, 0.4), rgba(241, 196, 15, 0.2));
  box-shadow: 0 4px 15px rgba(241, 196, 15, 0.3);
}

.user-name-footer {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(5px);
}

/* Footer Responsive */
@media (max-width: 768px) {
  #myFooter {
    padding: 1.5rem 0;
    margin-top: 2rem;
  }

  #myFooter .container {
    flex-direction: column;
    gap: 1rem;
  }

  #myFooter img {
    height: 40px;
    margin: 0;
  }

  #myFooter p {
    font-size: 0.85rem;
  }

  #myFooter p a {
    display: block;
    margin: 0.5rem 0;
  }

  .user-info-footer {
    margin: 10px 0;
    gap: 8px;
  }

  .user-role-badge,
  .user-name-footer {
    font-size: 0.8rem;
    padding: 5px 10px;
  }
}
