@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --brand-color: #8b91ff;
  --brand-hover-color: #7a7fff;
  --base-color: #f2f4f8;
  --surface-color: #fff;
  --text-color: #191b23;
  --secondary-text-color: #3c404f;
  --base-transparent-90: rgba(247, 247, 247, 0.9);
  --base-transparent-100: rgba(247, 247, 247, 1);
}





body {
  font-family: Poppins, sans-serif;
  margin: 2rem;
  background: var(--base-color);
  color: var(--text-color);
  margin-top: 2rem;
}



button, input, textarea {
  font: inherit;
}

header {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: end;
  align-items: center;
  margin-bottom: 2rem;
  margin-left: 5rem;

  column-gap: 10px;
}

header .bar{
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;

  gap: 10px;
}

header svg{
  height: 4rem;
  aspect-ratio: 1;

  color: var(--base-color);
  background-color: var(--brand-color);

  border-radius: 1rem;
  border: 10px transparent solid;

  position: absolute;
  left: 15px;
  top: 15px;
}

.open-search-btn{
  position: fixed;
  right: 2%;
  top: 2%;
  z-index: 3;

  background-color: var(--brand-color);
  padding: 5px;
  color: white;
  border-radius: 0.75rem;
  border-color: transparent;
  
  height: 50px;
  width: 50px;

  display: flex;
  align-items: center;
  justify-content: center;
}

.open-search-btn svg{
  height: auto;
  width: auto;
  color: white;
}

.open-search-btn:hover{
  background-color: var(--brand-hover-color);
}

.add-note-btn {
  background: var(--brand-color);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
}

.add-note-btn:hover {
  background: var(--brand-hover-color);
}

.kunden-list{
  height: 20px;
}

.notes-grid, .group-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.note-card {
  background: var(--surface-color);
  border-radius: 0.75rem;
  padding: 1.5rem;
  border: 1px solid var(--surface-color);
  transition: all 0.2s ease;
  position: relative;
}

.note-card:hover {
  transform: scale(1.02);
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
}

.note-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text-color);
  word-wrap: break-word;
}

.note-card h3 a{
  text-decoration: none;
  color: var(--text-color);
}

.note-card h3 a:hover{
  font-size: 1.3rem;
  text-decoration: underline;
}

.note-zeit{
  display: flex;

}

.zeit{
  width: 100%;
}

.note-content {
  color: var(--secondary-text-color);
  line-height: 1.6;
  margin-bottom: 1rem;
  word-wrap: break-word;
  white-space: pre-wrap;
}

.note-date{
  position: absolute;

  right: 15px;
  bottom: 5px;

  font-size: 12px;
  color: #929292;
}

.note-actions {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: flex;
  gap: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
}

.note-card:hover .note-actions {
  opacity: 1;
  visibility: visible;
}

.edit-btn, .delete-btn {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 0.375rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
  background: var(--base-transparent-90);
  color: var(--text-color);
  border: 1px solid var(--surface-color);
}

.edit-btn:hover {
  background: var(--base-transparent-100);
  transform: scale(1.05);
}

.delete-btn{
  background-color: #ff5252;
  color: white;
}

.delete-btn:hover {
  background: #ff5252;
  transform: scale(1.05);
  color: white;
}

.note-dialog {
  margin: auto;
  inset: 0;
  border: none;
  border-radius: 1rem;
  padding: 0;
  background: var(--surface-color);
  color: var(--text-color);
  max-width: 500px;
  width: 90vw;

  transition: all 0.25s ease;
}

.note-dialog::backdrop {
  background: rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(4px);
}

.dialog-content {
  padding: 2rem;
}

.dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.dialog-title {
  font-size: 1.5rem;
  font-weight: 600;
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--secondary-text-color);
  padding: 0.25rem;
  border-radius: 0.25rem;
  transition: background 0.2s ease;
}

.close-btn:hover {
  background: var(--surface-color);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-color);
}

.form-input, .form-textarea {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid var(--surface-color);
  border-radius: 0.5rem;
  font-size: 1rem;
  transition: border-color 0.2s ease;
  background: var(--base-color);
  color: var(--text-color);
}

.form-input:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--brand-color);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.dialog-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
}

.cancel-btn, .save-btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
}

.cancel-btn {
  background: var(--base-color);
  color: var(--text-color);
}

.save-btn {
  background: var(--brand-color);
  color: white;
}

.save-btn:hover {
  background: #7a7fff;
}


.delete-dialog{
  margin: auto;
  inset: 0;
  border: none;
  border-radius: 1rem;
  padding: 20px;
  background: var(--surface-color);
  color: var(--text-color);
  max-width: 500px;
  width: 90vw;

  transition: all 0.25s ease;
}
.delete-dialog::backdrop {
  background: rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(4px)
}

.sure-text h1{
  margin: 0;
}
.sure-text p{
  font-size: 1.3rem;
}

.sure-btn{
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  gap: 10px;
  margin-top: 30px;
}

.yes-btn, .no-btn{
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
}

.no-btn{
  background: var(--base-color);
  color: var(--text-color);
}
.yes-btn{
  background-color:#ff5252;
  color: white;
}




.search-dialog {
  margin: auto;
  inset: 0;
  border: none;
  border-radius: 1rem;
  padding: 0;
  background: var(--surface-color);
  color: var(--text-color);
  width: 90%;
  max-width: 500px;

  height: auto;
  
  margin-top: 20px;
}

.search-dialog::backdrop {
  background: rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(4px)
}

.search-over{
  display: flex;

  justify-content: center;

  height: 100%;
  width: 100%;

  overflow: hidden;

  position: relative;

}


.search-form{
  display: flex;
  justify-content: center;
  align-items: center;

  position: fixed;
  z-index: 2;

  margin-top: 20px;
  padding: 20px;

  width: 90%;
  
  max-width: 500px;
  gap: 10px;
}

.form-search{
  background-color: var(--brand-color);
  padding: 10px;
  border-radius: 0.75rem;
  border-color: transparent;
  color: white;
  width: 80%;
}

.form-search::placeholder{
  color: #ffffff91;
}

.form-search:focus{
  border: 2px solid #6e6eff;
  outline: none;
}

.search-btn{
  background-color: var(--brand-color);
  padding: 5px;
  color: white;
  border-radius: 0.75rem;
  border-color: transparent;
}


.kunden-list {
  overflow-y: auto;    /* Scrollbar bei zu vielen Einträgen */
  scrollbar-width: none;
  display: none;       /* erst mal unsichtbar */
  position: absolute;  /* unter dem Input */

  top: 100px;
  bottom: 10px;
  left: 0;
  height: 90%;
  width: 90%;
  margin-bottom: 30px;
  padding-bottom: 1000px;

  
  padding: 20px;
}
.kunden-list div {
  padding: 15px;
  height: auto;
  width: auto;
  cursor: pointer;
  background: var(--brand-color);
  margin-top: 10px;
  border-radius: 200px;
}
.kunden-list div:hover {
  background: var(--brand-hover-color);
}



.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--secondary-text-color);
}

.empty-state h2 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.empty-state p {
  font-size: 1rem;
  margin-bottom: 2rem;
}