:root {
  --bg: #f3f0ea;
  --surface: #fffdf8;
  --ink: #1c2a2e;
  --muted: #5c6b70;
  --line: #d7d0c4;
  --accent: #0f6e56;
  --accent-ink: #ffffff;
  --danger: #9b2c2c;
  --warn: #9a6700;
  --chip: #e8f3ef;
  --shadow: 0 10px 30px rgba(28, 42, 46, 0.08);
  --font: "Segoe UI", "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(circle at top left, #dff3ea 0, transparent 40%),
    linear-gradient(180deg, #f7f4ee, var(--bg));
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.9);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-size: 1.15rem;
  text-decoration: none;
}

.nav { display: flex; gap: 0.85rem; align-items: center; flex-wrap: wrap; }
.nav span { color: var(--muted); font-size: 0.9rem; }

.app {
  width: min(960px, calc(100% - 2rem));
  margin: 1.5rem auto 3rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 1.25rem;
}

.stack { display: grid; gap: 1rem; }
.row { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; }
.space-between { justify-content: space-between; }

h1, h2, h3 { margin: 0 0 0.5rem; letter-spacing: -0.02em; }
p { margin: 0 0 0.75rem; color: var(--muted); line-height: 1.5; }

.muted { color: var(--muted); }
.small { font-size: 0.9rem; }

.btn {
  appearance: none;
  border: 1px solid transparent;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 10px;
  padding: 0.55rem 0.9rem;
  font: inherit;
  cursor: pointer;
}
.btn:hover { filter: brightness(0.96); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn.secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn.danger { background: var(--danger); }

.input, .select, .textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.6rem 0.75rem;
  font: inherit;
  background: #fff;
}
.textarea { min-height: 90px; resize: vertical; }
.label { display: grid; gap: 0.35rem; font-size: 0.92rem; font-weight: 600; }
.field-hint { font-weight: 400; color: var(--muted); font-size: 0.85rem; }

.job {
  display: grid;
  gap: 0.35rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}
.job:last-child { border-bottom: 0; }
.chip {
  display: inline-block;
  background: var(--chip);
  color: var(--accent);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  font-size: 0.78rem;
  font-weight: 600;
}
.chip.closed { background: #f6e7e7; color: var(--danger); }
.chip.warn { background: #fff4d6; color: var(--warn); }

.filters {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.6rem;
}
@media (max-width: 700px) {
  .filters { grid-template-columns: 1fr; }
}

.table {
  width: 100%;
  border-collapse: collapse;
}
.table th, .table td {
  text-align: left;
  padding: 0.7rem 0.4rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.table th { font-size: 0.85rem; color: var(--muted); font-weight: 600; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(16, 24, 28, 0.4);
  display: grid;
  place-items: center;
  padding: 1rem;
  z-index: 20;
}
.modal {
  width: min(420px, 100%);
  background: var(--surface);
  border-radius: 14px;
  border: 1px solid var(--line);
  padding: 1.1rem;
  box-shadow: var(--shadow);
}

.toast {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  background: var(--ink);
  color: #fff;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  max-width: min(360px, calc(100% - 2rem));
  z-index: 30;
}

.footer {
  width: min(960px, calc(100% - 2rem));
  margin: 0 auto 2rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.85rem;
}
.linkish {
  appearance: none;
  border: 0;
  background: none;
  color: var(--accent);
  cursor: pointer;
  font: inherit;
  padding: 0;
}
.linkish:hover { text-decoration: underline; }

.login-box { max-width: 420px; margin: 2rem auto; }
.error { color: var(--danger); font-size: 0.9rem; }
.brief {
  border-left: 3px solid var(--accent);
  padding-left: 0.85rem;
  margin-bottom: 1rem;
}
