html {
  font-size: 14px;
  background-color: #232323;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
  background-color: #232323;
}

.top-bar {
  display: flex;
  flex-direction: row;
  position: relative;
  justify-content: space-between;
  top: 0;
  height: 100%;
  white-space: nowrap;
  background-color: #232323;
  border-bottom: 1px solid #dee2e6 !important;
  align-items: center;
}

.sidebar-toggle-btn {
  z-index: 1100;
  color: #bdc3c7;
  background: none;
  border: none;
  padding: 10px 12px;
  font-size: 1.4rem;
  border-radius: 4px;
  cursor: pointer;
}

.sidebar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background-color: #1e1f21;
  width: 20rem;
  overflow-x: hidden;
  transition: 0.3s ease;
  transform: translateX(-100%);
  z-index: 1000;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-behavior: smooth;
}

.sidebar::-webkit-scrollbar {
  display: none;
}

.getHome {
  font-weight: bold;
  position: relative;
  top: 0;
  align-items: center;
  display: flex;
  flex-direction: row;
  justify-content: center;
  border-bottom: 1px solid #dee2e6 !important;
}

.getHome a:hover {
  color: #fff;
  background-color: #333;
  border-radius: 4px;
}

.sidebar.visible {
  transform: translateX(0);
}

.sidebar-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-menu li {
  border-bottom: 1px solid #333;
  padding: .5rem 1rem;
  color: #fff;
}

.sidebar-menu li:last-child {
  border-bottom: 2px solid #333;
}

.sidebar-menu a {
  display: flex;
  align-items: center;
  padding: 0.95rem;
  color: #bdc3c7;
  text-decoration: none;
}

.sidebar-menu li a:hover {
  background-color: #333;
  color: #fff;
  border-radius: 4px;
}

.dropdown-heading {
  background: none;
  border: none;
  color: #bdc3c7;
  font-weight: bold;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background-color 0.2s ease;
  padding: 1.125rem 2.25rem;
  border-bottom: 2px solid #333;
  border-top: 1px solid #333;
}

.toggle-dropdown {
  background: none;
  border: none;
  color: #bdc3c7;
  font-weight: bold;
  width: 100%;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.toggle-dropdown-under {
  background: none;
  border: none;
  color: #bdc3c7;
  width: 100%;
  padding: 10px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.toggle-dropdown:hover, .toggle-dropdown-under:hover {
  background-color: #333;
}

.dropdown-arrow {
  transition: transform 0.3s ease;
}

.dropdown-list > a {
  font-weight: bold;
  color: #bdc3c7;
}

.menu-dropdown {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
  background-color: #2a2a2a;
  list-style: none;
  padding: 0;
  margin: 0;
}

.menu-dropdown li a {
  display: block;
  padding: 12px 30px;
  font-size: 0.95rem;
  color: #bdc3c7;
  text-decoration: none;
}
.menu-dropdown li a:hover {
  color: white;
  background-color: #333;
}

.dropdown-list.open .menu-dropdown {
  max-height: 500px;
}

.dropdown-list.open .dropdown-arrow {
  transform: rotate(180deg);
}

.logout-link {
  margin-top: auto;
  padding: 0.1rem !important;
  border-top: 1px solid #dee2e6;
  bottom: 0;
  width: 100%;
  position: relative;
  display: flex;
  justify-content: center;
}

.logout-link a {
  color: #e74c3c;
  font-weight: bold;
}

.sidebar-menu i {
  margin-right: 10px;
  min-width: 24px;
}

.sidebar-menu span {
  transition: opacity 0.2s ease;
}

.sidebar.expanded .sidebar-menu span {
  display: inline;
  opacity: 1;
}

.user {
  display: flex;
  flex-direction: row;
  align-items: center;
  margin-right: 2rem;
}

.user-data {
  display: flex;
  flex-direction: column;
  color: #bdc3c7;
  text-align: center;
}

.home {
  margin-left: 2rem;
  font-size: 1.7rem;
  color: #bdc3c7 !important;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}

body {
  background-color: #232323;
  overflow-x: hidden;
  margin-bottom: 60px;
}

.main-content {
  transition: margin-left .3s ease;
  margin-left: 0;
}

.main-content.shifted {
  margin-left: 20rem;
}

.page-content {
  padding: 1.5rem 5rem;
}

.welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  margin-top: 15rem;
  text-align: center;
  color: #bdc3c7;
}

.buttons {
  display: flex;
  flex-direction: row;
  justify-content: space-evenly;
  margin-top: 5rem;
  font-size: 1.2rem;
  color: #bdc3c7 !important;
  font-weight: 500;
}

.login, .signup {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #6a11cb, #2575fc);
  border: none;
  color: #fff;
  font-size: 1.2rem;
  font-weight: bold;
  padding: 12px 20px;
  border-radius: 30px; /* Abgerundete Ecken */
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: all 0.3s ease;
}

.signup:hover, .login:hover {
  transform: translateY(-3px);
  box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.3);
  background: linear-gradient(135deg, #2575fc, #6a11cb);
}

.login-row {
  display: flex;
  flex-wrap: wrap;
  margin-top: 7rem;
  margin-left: 20rem;
  margin-right: 20rem;
}

.register-row {
  display: flex;
  flex-wrap: wrap;
  margin: 5rem 20rem 3rem;
}

.login-card {
  display: flex;
  flex-direction: column;
  position: relative;
  min-width: 0;
  word-wrap: break-word;
  background: #2c3034;
  background-clip: border-box;
  border: #2575fc 2px solid;
  border-radius: 1.5rem;
  box-shadow: 0 0 1.2rem 0.1rem #6a11cb;
}

.login-card-body {
  flex: 1 1 auto;
  padding: 1.5rem 1.5rem;
}

.alert {
  display: flex;
  flex-direction: column;
  justify-content: center;
  font-size: 1.2rem;
  background: linear-gradient(135deg, #6a11cb, #2575fc);
  color: #bdc3c7 !important;
  text-align: center;
  word-wrap: break-word;
  line-height: 1rem;
}

.register-alert {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  font-size: 1.2rem;
  background: linear-gradient(135deg, #6a11cb, #2575fc);
  color: #bdc3c7 !important;
  text-align: center;
  word-wrap: break-word;
  line-height: 1.4rem;
  padding: 1rem 1rem;
  margin-bottom: 1rem;
  border-radius: .25rem;
  border: 1px solid transparent;
}

.form-group {
  margin-bottom: 2rem;
}

.register-form-group {
  margin-bottom: 1.5rem;
}

.textlabel {
  color : #bdc3c7 !important;
  font-weight: 500;
  font-size: 1.1rem;
}

.register-button {
  display: flex;
  flex-direction: row;
  justify-content: space-evenly;
  margin-top: 3rem;
  font-size: 1.2rem;
  color: #bdc3c7 !important;
  font-weight: 500;
}

.alert-message {
  margin-top: 2rem;
  border: #81BECE 2px solid;
}

.interface {
  display: flex;
  flex-direction: row;
}

.mail, .mdt {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-right: 5rem;
}

.mail-button, .mdt-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .1rem;
  background: linear-gradient(135deg, #6a11cb, #2575fc);
  border: none;
  color: #bdc3c7;
  font-weight: bold;
  padding: 12px 20px;
  border-radius: 30px;
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: all 0.3s ease;
}

.mail-button:hover, .mdt-button:hover {
  transform: translateY(-3px);
  box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.3);
  background: linear-gradient(135deg, #2575fc, #6a11cb);
}

.mail-button i, .mdt-button i {
  font-size: 3rem;
  transition: transform 0.3s ease;
}

.mail-button:hover i, .mdt-button:hover i {
  transform: scale(1.2);
}

.mail-button p, .mdt-button p {
  margin: 0;
  font-size: 1.3rem;
  text-decoration: none;
}

.board-wrapper, .mail-container, .content-wrapper,
.overview-wrapper, .lawbook-wrapper, .calendar-wrapper,
.case-wrapper {
  box-shadow: 0 0 1.2rem 0.1rem rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.form-container, .person-form-container {
  background: #2c3034;
  box-shadow: 0 0 1.2rem 0.1rem rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.mail-header, .board-header, .form-header,
.content-header, .person-form-header,
.overview-header, .lawbook-header, .calendar-header,
.case-header {
  background: linear-gradient(135deg, #6a11cb, #2575fc);
  color: #bdc3c7 !important;
  padding: 1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mail-header h1, .board-header h1,
.content-header h1, .person-form-header h1,
.overview-header h1, .lawbook-header h1, .calendar-header h1,
.case-header h1 {
  margin: 0;
  font-size: 4rem;
}

.mail-header h2, .board-header h2,
.content-header h2, .person-form-header h2,
.overview-header h2, .lawbook-header h2, .calendar-header h2,
.case-header h2 {
  margin: 0;
  font-size: 3.5rem;
}

.mail-nav ul {
  list-style: none;
  margin: 0;
  padding: 1rem 0 0;
  display: flex;
  justify-content: center;
  gap: 2rem;
  font-size: 1.5rem;
}

.mail-nav a {
  color: #bdc3c7 !important;
  text-decoration: none;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: color 0.3s ease;
}

.mail-nav a:hover, .nav a.active {
  color: #ffea00;
}

.mail-main, .board-main, .content-main,
.case-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  background: #2c3034;
}

.mail-welcome, .board-welcome {
  text-align: center;
}

.mail-welcome h2, .board-welcome h2 {
  font-size: 1.5rem;
  color: #bdc3c7 !important;
}

.mail-welcome p, .board-welcome p {
  font-size: 1.2rem;
  color: #bdc3c7 !important;
}

.btn-compose, .sendMail {
  background: #6a11cb;
  color: #bdc3c7 !important;
  border: none;
  padding: .5rem 1rem;
  border-radius: .5rem;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.3s ease;
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
  text-decoration: none;
}

.board {
  display: flex;
  flex-direction: row;
  margin-top: 3rem;
  color: #bdc3c7 !important;
  justify-content: space-evenly;
}

.category-filter, .label-filter, .createButtons {
  text-align: center;
  color: #bdc3c7 !important;
  text-decoration: none;
  font-size: 1.2rem;
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 5px;
  transition: color 0.3s ease;
}

.search-container {
  display: flex;
  align-items: center;
  background-color: #232323;
  padding: 0.6rem 1rem;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
  margin: 0 auto 1rem;
  width: 100%;
  max-width: 600px;
  transition: box-shadow 0.3s ease;
  position: relative;
}

.search-container:hover {
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.6);
}

.search-container input {
  background: transparent;
  border: none;
  outline: none;
  color: #ecf0f1;
  font-size: 1rem;
  width: 100%;
  font-family: inherit;
  text-align: center;
}

.search-container input::placeholder {
  color: #7f8c8d;
  opacity: 0.7;
}

.filter-btn, .create-btn {
  margin: 0.2rem 1rem;
  padding: 6px 14px;
  font-size: 16px;
  background: none;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  transition: 0.2s;
  color: #bdc3c7 !important;
}

.entry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 20px;
  padding: 1rem;
  justify-content: center;
}

.entry-grid a {
  color: #bdc3c7 !important;
  text-decoration: none;
}

.entry-card {
  background: #2c3034;
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.5);
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  position: relative;
  min-width: 250px;
  max-width: 450px;
}

.entry-card.hidden {
  display: none !important;
}

.entry-card:hover {
  transform: scale(1.01);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.entry-label {
  font-size: 12px;
  font-weight: bold;
  padding: 3px 8px;
  border-radius: 20px;
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
  text-transform: uppercase;
  color: #fff;
}

.entry-card h4 {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.entry-card a {
  margin-top: auto;
  align-self: flex-start;
  font-weight: bold;
  color: #007bff;
  text-decoration: none;
}

.entry-card p {
  flex-grow: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  max-height: 100px;
}

/* Farbige Labels je Kategorie */
.entry-label.wichtig {
  background-color: #dc3545; /* Rot */
}

.entry-label.neuigkeiten {
  background-color: #0d6efd; /* Blau */
}

.entry-label.allgemein {
  background-color: #198754; /* Grün */
}

.entry-title {
  color: #bdc3c7;
  text-decoration: none;
  font-size: 18px;
}

.entry-meta {
  font-size: 12px;
  color: #666;
  margin-top: 10px;
}

.btn-compose:hover, .sendMail:hover {
  background: #2575fc;
  transform: translateY(-3px);
}

.email-list {
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.5);
}

.email-list h3 {
  margin: 0 0 .5rem;
  font-size: 1.2rem;
  color: #bdc3c7 !important;
}

.mail-table, .person-table {
  width: 100%;
  border-collapse: collapse;
}

.mail-table th, .mail-table td, .person-table th, .mail-table td {
  text-align: center;
  padding: 12px;
  border-bottom: 1px solid #232323;
}

.mail-table th {
  font-weight: bold;
  color: #bdc3c7 !important;
}

.mail-table tbody tr:hover, .person-table tbody tr:hover {
  background-color: #232323;
  cursor: pointer;
}

.email-sender {
  font-weight: bold;
  color: #bdc3c7 !important;
}

.mail-table a.btn {
  color: #007BFF;
  text-decoration: none;
  font-weight: bold;
}

.mail-table a.btn:hover {
  text-decoration: underline;
}

.email-subject {
  color: #bdc3c7;
}

.email-time {
  font-size: 14px;
  color: #999;
}

.mail-form {
  background: #2c3034;
  padding: 2rem;
}

.board-container h1 {
  color: #bdc3c7 !important;
}

.toolbar,
.entry-form-group .entry-toolbar{
  margin-bottom: .5rem;
  padding: .2rem;
  display: flex;
  gap: 1rem;
}

.toolbar button, .toolbar select,
.entry-form-group .entry-toolbar button,
.entry-form-group .entry-toolbar #fontSizeSelect{
  padding: .25rem;
  font-size: 1rem;
  cursor: pointer;
  background: #232323;
  color: #bdc3c7 !important;
  border: none;
  border-radius: .5rem;
  transition: background 0.3s ease;
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
}
.toolbar button.active,
.entry-form-group .entry-toolbar button.active {
  background: #2575fc !important;
}

.toolbar button:hover {
  background: #bbb;
}

.changeColor, .changeBackground,
.entry-form-group .changeColor, .entry-form-group .changeBackground {
  width: 3rem !important;
  padding: .3rem !important;
}
i.bi-list-ol, .bi-list-ol, .bi-text-left,.bi-text-right, .bi-text-center, .bi-text-indent-left, .bi-text-indent-right {
  font-size: 1.3rem;
}

.editor {
  border: 1px solid #ddd;
  min-height: 200px;
  padding: 10px;
  font-size: 14px;
  background: #fff;
}

.editor:focus {
  outline: none;
}

.mail-form-group {
  margin-bottom: 1rem;
  color: #bdc3c7 !important;
}

.entry-form-info {
  display: flex;
  flex-direction: row;
  justify-content: space-evenly;
}

.entry-form-group {
  margin-bottom: 1rem;
  color: #bdc3c7 !important;
  padding: 1rem;
}

.entry-form-details {
  margin-bottom: 1rem;
  color: #bdc3c7 !important;
  padding: 1rem;
  width: 10rem;
  display: flex;
  flex-direction: column;
}

.mail-form-group label, .entry-form-group label {
  display: block;
  font-weight: bold;
  margin-bottom: 5px;
}

.hidden-editor {
  min-height: 150px;
  border: 1px solid #ccc;
  padding: 10px;
  background-color: #fff;
}

.mail-form-group input,
.mail-form-group select:last-child,
.mail-form-group .editor,
.entry-form-group input,
.entry-form-group select,
.entry-form-group textarea,
.entry-form-group .hidden-editor{
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 1rem;
  background: #2c3034;
  color: #bdc3c7 !important;
}

.entry-content {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 1rem;
  background: #2c3034;
  color: #bdc3c7 !important;
}

.entry-form-group #fontSizeSelect {
  width: auto;
}

.entry-form-group input:focus,
.entry-form-group select:focus,
.entry-form-group textarea:focus {
  background: #2c3034;
  outline: none;
}

.sendMail {
  background-color: #0056b3;
  color: white;
  padding: 10px 20px;
  font-size: 1rem;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.sendMail:hover {
  background-color: #003f7f;
}

.mail-message-content {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 1rem;
}

.mail-actions {
  display: flex;
  flex-direction: row;
  justify-content: space-evenly;
}

.entry-buttons {
  display: flex;
  flex-direction: row;
  justify-content: space-evenly;
  margin-bottom: 2rem;
}

.btn {
  padding: 0.7rem 1.4rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.3s ease, transform 0.2s ease;
}

.btn-save
{
  background: #2575fc;
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
}

.btn-back {
  background: grey;
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
}

.btn-save:hover,
.btn-back:hover,
.btn-warning:hover, 
.btn-danger:hover,
.btn-primary:hover, 
.btn-secondary:hover,
.resetBtn:hover{
  transform: translateY(-2px);
}

.save-toast, .success-toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #28a745;
  color: white;
  padding: 15px 20px;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
  font-size: 16px;
  z-index: 1000;
  animation: fadeOut 3s forwards;
  margin: 10px;
}

.error-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #dc3545;
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
    font-size: 16px;
    z-index: 1000;
    animation: fadeOut 3s forwards;
    margin: 10px;
}

.info-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #007bff;
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
    font-size: 16px;
    z-index: 1000;
    animation: fadeOut 3s forwards;
    margin: 10px;
}

@keyframes fadeOut {
   0% { opacity: 1; }
   70% { opacity: 1; }
   100% { opacity: 0; display: none; }
 }