/* ===== Seitenpanel: Einträge, Vorlagen, Verlauf, Optionen ===== */
.panel { display: grid; gap: 14px; min-width: 0; transition: opacity 0.2s; }
body.is-spinning .panel { opacity: 0.55; pointer-events: none; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.card h2 { font-size: 1rem; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.card h2 small { font-size: 0.75rem; background: var(--surface-2); padding: 2px 8px; border-radius: 6px; color: var(--muted); font-weight: 600; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card > h2 { margin-bottom: 12px; }
.mini-actions { display: flex; gap: 6px; }

.add-form { display: flex; gap: 8px; margin-bottom: 12px; }
.add-form input {
  flex: 1; min-width: 0; font-size: 16px; /* 16px verhindert Zoom auf iPhones */
  padding: 11px 14px; border-radius: 10px;
  background: var(--bg); border: 1px solid var(--line);
  transition: border-color 0.15s;
}
.add-form input::placeholder { color: #6b7180; }
.add-form input:focus { outline: none; border-color: var(--accent); }
.add-btn {
  width: 46px; flex: none; border: 0; border-radius: 10px; font-size: 1.5rem; font-weight: 700; line-height: 1;
  background: var(--accent); color: var(--accent-ink);
  transition: filter 0.15s, transform 0.1s;
}
.add-btn:hover { filter: brightness(1.08); }
.add-btn:active { transform: scale(0.95); }

.entries { list-style: none; padding: 0 4px 0 0; display: grid; gap: 4px; max-height: 300px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #3a404d transparent; }
.entries li { display: flex; align-items: center; gap: 10px; padding: 7px 8px 7px 12px; border-radius: 8px; background: var(--surface-2); }
.dot { width: 12px; height: 12px; border-radius: 3px; flex: none; }
.entry-text { flex: 1; min-width: 0; overflow-wrap: anywhere; font-weight: 500; }
.remove { flex: none; width: 30px; height: 30px; border-radius: 6px; border: 0; background: transparent; color: var(--muted); font-size: 1.25rem; line-height: 1; transition: background 0.15s, color 0.15s; }
.remove:hover { background: rgba(255, 107, 107, 0.15); color: var(--danger); }

.note { color: var(--muted); font-size: 0.85rem; margin-top: 10px; }
.note.warn { color: var(--accent); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line); background: var(--surface-2); border-radius: 8px; padding: 7px 12px; font-size: 0.88rem; font-weight: 500; transition: border-color 0.15s, background 0.15s; }
.chip:hover { border-color: var(--accent); background: #2b2a20; }

.history { list-style: none; padding: 0; display: grid; gap: 4px; }
.history li { display: flex; justify-content: space-between; gap: 10px; padding: 7px 12px; border-radius: 8px; background: var(--surface-2); font-weight: 500; }
.history li span:first-child { overflow-wrap: anywhere; }
.history time { color: var(--muted); font-size: 0.8rem; flex: none; }

.switch { display: flex; align-items: center; gap: 12px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.track { width: 44px; height: 26px; border-radius: 999px; background: #3a404d; position: relative; transition: background 0.2s; flex: none; }
.thumb { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform 0.2s; }
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track .thumb { transform: translateX(18px); background: var(--accent-ink); }
.switch input:focus-visible + .track { outline: 2px solid var(--accent); outline-offset: 2px; }
.switch-text { font-weight: 500; }

@media (max-width: 520px) { .entries { max-height: 240px; } }
