html, body {
  height: 100%;
}

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

.toolbar {
  margin-bottom: 16px;
}

.toolbar h2 {
  margin: 0 0 12px;
}

.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 {
  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 {
  padding: 6px 8px;
  border: 1px solid #ccc;
  border-radius: 6px;
}

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

.add-service-row, .add-field-row {
  display: flex;
  gap: 8px;
  margin: 10px 0;
  align-items: center;
}

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;
}

.state-message {
  color: #888;
  font-size: 14px;
}

.error {
  color: #c0392b;
}

.archive-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.archive-filters input,
.archive-filters select {
  flex: 1 1 160px;
  min-width: 140px;
}

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

.searchable-select {
  position: relative;
  display: inline-block;
  width: 100%;
  max-width: 420px;
}

.searchable-select-input {
  width: 100%;
  box-sizing: border-box;
}

.searchable-select-list {
  display: none;
  position: absolute;
  z-index: 20;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #ccc;
  border-top: none;
  max-height: 220px;
  overflow-y: auto;
  box-shadow: 0 4px 8px rgba(0,0,0,0.08);
}

.searchable-select-item {
  padding: 6px 10px;
  cursor: pointer;
  font-size: 13px;
}

.searchable-select-item:hover {
  background: #f0f4ff;
}

.searchable-select-empty {
  padding: 6px 10px;
  font-size: 13px;
  color: #888;
}
