/* ── Objekt-Tagebuch (Logbuch) Styles ────────────────────────── */

.app-container {
  width: 100%;
  max-width: 540px;
  margin: 0 auto;
  box-sizing: border-box;
  padding: 16px;
  flex: 1;
}

/* Tab Bar (Segmented Control) */
.tab-pill-bar {
  display: flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 4px;
  margin-bottom: 20px;
  gap: 4px;
}

.tab-pill {
  flex: 1;
  background: transparent;
  border: none;
  border-radius: calc(var(--r-md) - 4px);
  padding: 8px 14px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}

.tab-pill:hover {
  color: var(--text);
}

.tab-pill.is-active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

/* Card Container */
.logbuch-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 20px;
  box-sizing: border-box;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.field-hint {
  font-size: 0.76rem;
  color: var(--muted);
  margin-top: 2px;
}

/* Type Pills / Radio Selector */
.type-pill-grid {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.type-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border: 1px solid var(--border-2);
  border-radius: var(--r-sm);
  background: var(--surface-2);
  color: var(--text);
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.type-pill:hover {
  border-color: var(--accent);
}

.type-pill.is-selected {
  background: var(--sel-bg);
  border-color: var(--sel-border);
  color: var(--sel-color);
  font-weight: 600;
}

/* History Filters */
.history-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

/* Entries List */
.entries-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.entry-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-sizing: border-box;
}

.entry-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.entry-date {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}

.entry-tags {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.entry-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
}

.entry-badge-type {
  background: var(--sel-bg);
  color: var(--sel-color);
  border-color: var(--sel-border);
}

.entry-text {
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}

.entry-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.74rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  padding-top: 8px;
  margin-top: 2px;
}

.entry-author {
  color: var(--muted);
}

.empty-state {
  text-align: center;
  padding: 40px 16px;
  color: var(--muted);
  font-size: 0.9rem;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--r-md);
}

.history-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.filter-status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 6px;
  border-top: 1px solid var(--border);
}

.btn-reset-link {
  background: none;
  border: none;
  padding: 0;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: underline;
  font-family: inherit;
}

.btn-reset-link:hover {
  color: var(--accent-d);
}

.entry-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 1000;
}

.modal-overlay[hidden] {
  display: none !important;
}

.modal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 24px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
