*{box-sizing:border-box}
:root{
  --bg:#0b0d10;
  --card:#0f1419;
  --muted:#9aa4b2;
  --accent:#2b6cff;
  --danger:#d9534f;
}
body{
  margin:0;
  font-family:Inter, "Segoe UI", Roboto, Arial, sans-serif;
  background: linear-gradient(180deg,#051025 0%, #071523 100%);
  color:#e9f0ff;
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
}

/* Site wrapper centers content; pages are full width but content card centered */
.site {
  width:100%;
  max-width:1050px;
}

/* Header */
header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:18px;
}
.header-left{
  display:flex;
  align-items:center;
  gap:14px;
}
.logo{height:48px}
.header-title{font-weight:600;font-size:20px}
.header-right{display:flex;align-items:center;gap:8px}

/* Card */
.card{
  background:var(--card);
  border-radius:12px;
  padding:20px;
  box-shadow:0 6px 20px rgba(2,6,23,0.6);
}

/* Center main content vertically on small pages (like login) */
.center-box{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:60vh;
}

/* Buttons */
button{
  background:var(--accent);
  color:white;
  border:0;
  padding:8px 12px;
  border-radius:8px;
  cursor:pointer;
  font-weight:600;
}
button.secondary{background:#2f3640}
button.danger{background:var(--danger)}
button.small{padding:6px 8px;font-size:13px}

/* Form/inputs */
input[type="text"], input[type="password"], input[type="number"]{
  width:100%;
  padding:10px;
  border-radius:8px;
  border:1px solid rgba(255,255,255,0.04);
  background:#0b0e12;
  color:inherit;
}

/* layout for main control area */
.controls{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:14px}
.controls .left{flex:1}

/* lists */
.list{
  margin-top:12px;
  max-height:360px;
  overflow:auto;
  border-radius:8px;
  border:1px solid rgba(255,255,255,0.03);
}
.list-item{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  padding:12px;
  border-bottom:1px solid rgba(255,255,255,0.02);
}
.list-item:last-child{border-bottom:0}
.small{color:var(--muted);font-size:13px;margin-top:6px}

/* footer */
footer{margin-top:14px;text-align:center;color:var(--muted);font-size:13px}

/* Modal styles */
.modal{
  position:fixed;
  left:0;top:0;right:0;bottom:0;
  display:flex;
  align-items:center;
  justify-content:center;
  background:rgba(1,3,6,0.6);
  opacity:0;
  pointer-events:none;
  transition:opacity .18s;
}
.modal.open{opacity:1;pointer-events:all}
.modal .modal-card{
  width:100%;
  max-width:520px;
  background:var(--card);
  border-radius:12px;
  padding:18px;
}

/* utility */
.row{display:flex;gap:10px}
.row .col{flex:1}
.centered{text-align:center}

/* Bemerkungen-Button */
.notes-btn {
  background: #3b82f6;
  color: #fff;
  border: none;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-weight:600;
}

/* ========== Bemerkungen / Modal Tidy-ups & Animation ========== */

/* Textarea gleiche Schrift / kein Resize */
textarea {
  font-family: inherit;
  font-size: 14px;
  color: inherit;
  background: #0b0e12;
  border: 1px solid rgba(255,255,255,0.04);
  padding: 10px;
  border-radius: 8px;
  width: 100%;
  resize: none;        /* verhindert Vergrößern via Ziehen */
}

/* Nutze bereits vorhandene .list / .list-item für Bemerkungs-Einträge.
   Für Kompatibilität falls .note-item noch benutzt wird: */
.note-item { /* fallback mapping */
  padding: 12px;
}
.note-meta { color: var(--muted); font-size: 12px; margin-top:6px; }

/* Modal card animation: fade + subtle scale */
.modal .modal-card {
  transform: translateY(-8px) scale(0.985);
  transition: transform .18s ease, opacity .18s ease;
}
.modal.open .modal-card {
  transform: translateY(0) scale(1);
}

/* Stelle sicher dass die Suche in Modal nicht zu breit wird */
#bemerkungen-search {
  min-width: 160px;
  max-width: 320px;
}

/* Kleiner Stil für die + Button (falls not) — nutzt bereits deine button-Styles */
.notes-btn {
  padding: 6px 10px;
  border-radius: 8px;
  font-weight: 700;
}

/* Animation für Bemerkungen hinzufügen */
#bemerkungen-add-area {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.25s ease, opacity 0.25s ease, padding 0.25s ease;
  padding: 0;              
  width: 100%;
  margin-top: 8px;         /* Abstand über Buttons */
  box-sizing: border-box;
}

#bemerkungen-add-area.show {
  max-height: 200px;       
  opacity: 1;
  padding: 8px;   /* gleiche Innenabstände wie textarea */
}


/* Textarea wie die Suche */
#bemerkungen-text {
  font-family: inherit;
  font-size: 14px;
  resize: none;
  width: 100%;
  padding: 8px;                    /* gleiche Innenabstände wie Suche */
  border-radius: 8px;              /* wie andere Inputs */
  border: 1px solid rgba(255,255,255,0.2); /* ähnlich wie Suche */
  background: #0b0e12;             
  color: inherit;
  box-sizing: border-box;
  display: block;
  margin: 0 auto;
  line-height: 1.4;
}
