body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  margin: 0;
  padding: 16px;
  color: #222;
}

h2 { margin: 0 0 16px; }
h4 { margin-top: 28px; margin-bottom: 8px; }

.toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.tabs {
  display: flex;
  gap: 8px;
}

.tab-btn {
  font-family: inherit;
  font-size: 13px;
  padding: 6px 14px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
}
.tab-btn.active {
  background: #222;
  color: #fff;
  border-color: #222;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: 13px;
}

button {
  padding: 6px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
}
button:hover { background: #f5f5f5; }

input, select, textarea {
  padding: 6px 8px;
  border: 1px solid #ccc;
  border-radius: 6px;
}

.form-row {
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 460px;
}

table.grid {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin: 12px 0;
}
table.grid th, table.grid td {
  padding: 8px 10px;
  border-bottom: 1px solid #eee;
  text-align: left;
}
table.grid th { background: #fafafa; font-weight: 600; }

.badge-overdue {
  color: #c0392b;
  font-weight: 600;
}
.badge-active { color: #1a7f37; }
.badge-deleted { color: #888; }

.state-message { color: #888; font-size: 14px; }
.error { color: #c0392b; }
.hint { color: #888; font-size: 12px; margin: 4px 0 8px; }

.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.4);
  display: flex; align-items: center; justify-content: center;
  z-index: 100;
}
.modal-box {
  background: #fff; padding: 16px; border-radius: 8px;
  max-width: 90vw; max-height: 90vh; overflow: auto;
}
.modal-box img { max-width: 100%; display: block; }
