:root {
  --bg: #f4f1ea;
  --bg-accent: #f9f6f0;
  --panel: #ffffff;
  --panel-border: #e3ddd3;
  --text: #1c1b1a;
  --muted: #5e5a55;
  --accent: #1d7c6f;
  --accent-strong: #0e5a50;
  --danger: #b63e3e;
  --ok: #1f7a40;
  --shadow: 0 10px 30px rgba(27, 23, 19, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  color: var(--text);
}

.nav-bar {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 0;
  padding: 10px 24px;
  box-shadow: var(--shadow);
  border-bottom: 2px solid rgba(29, 124, 111, 0.35);
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 10px;
}

.top-link {
  font-size: 12px;
  color: var(--accent-strong);
  text-decoration: none;
  border: 1px solid rgba(29, 124, 111, 0.25);
  padding: 4px 10px;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease;
}

.top-link:hover {
  background: rgba(29, 124, 111, 0.12);
}

.nav-bar .field {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.nav-bar .field span {
  white-space: nowrap;
}

.nav-bar .field input {
  padding: 6px 10px;
  font-size: 12px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}

.field input,
.field textarea,
.field select,
.body-input {
  font-family: "Space Grotesk", sans-serif;
  font-size: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #c8bfb3;
  background: #ffffff;
  color: var(--text);
  box-shadow: inset 0 1px 2px rgba(28, 27, 26, 0.08);
}

.field input:focus,
.field textarea:focus,
.field select:focus,
.body-input:focus {
  outline: 2px solid rgba(29, 124, 111, 0.2);
  border-color: var(--accent);
  background: #fff;
}

.field input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.field input::placeholder,
.field textarea::placeholder {
  color: #8a8278;
}

.field.inline {
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.button-row {
  display: flex;
  gap: 12px;
  align-items: center;
}

button {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 500;
  font-size: 14px;
  padding: 10px 14px;
  border-radius: 12px;
  border: none;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 8px 18px rgba(29, 124, 111, 0.2);
}

button:hover {
  transform: translateY(-1px);
}

button.ghost {
  background: transparent;
  color: var(--accent-strong);
  border: 1px solid rgba(29, 124, 111, 0.3);
  box-shadow: none;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(24, 22, 19, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 100;
  backdrop-filter: blur(4px);
}

.modal-overlay.open {
  display: flex;
}

.modal {
  background: var(--panel);
  border-radius: 18px;
  border: 1px solid var(--panel-border);
  box-shadow: 0 20px 50px rgba(27, 23, 19, 0.2);
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
}

.modal-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.modal-title {
  font-size: 18px;
  font-weight: 600;
}

.modal-subtitle {
  font-size: 12px;
  color: var(--muted);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}
