@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;700&family=IBM+Plex+Mono:wght@400;600&display=swap');

:root {
  --bg: #f4f7f1;
  --ink: #152319;
  --muted: #4a5b4c;
  --line: #c9d4c8;
  --surface: rgba(255, 255, 255, 0.82);
  --accent: #0f8c6d;
  --accent-2: #f4a016;
  --danger: #bf2f2f;
  --success: #1f7d31;
  --shadow: 0 14px 40px rgba(16, 27, 18, 0.13);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Space Grotesk', 'Segoe UI', sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 18%, #dff4df 0%, rgba(223, 244, 223, 0) 38%),
    radial-gradient(circle at 88% 5%, #ffe7bf 0%, rgba(255, 231, 191, 0) 40%),
    linear-gradient(160deg, #f6f8ef 0%, #eef5ea 38%, #e7f3ef 100%);
}

.bg-orb {
  position: fixed;
  border-radius: 999px;
  filter: blur(38px);
  pointer-events: none;
  opacity: 0.45;
}

.orb-a {
  width: 320px;
  height: 320px;
  left: -80px;
  top: 18vh;
  background: #9de5d0;
}

.orb-b {
  width: 280px;
  height: 280px;
  right: -60px;
  bottom: 10vh;
  background: #ffd697;
}

.app-shell {
  width: min(1180px, 94vw);
  margin: 28px auto 40px;
  position: relative;
  z-index: 2;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.kicker {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  color: #266154;
}

h1 {
  margin: 6px 0 0;
  font-size: clamp(1.25rem, 2vw, 2rem);
}

h2 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
}

.card {
  background: var(--surface);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(162, 177, 161, 0.58);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 16px;
  margin-bottom: 14px;
}

.login-card {
  max-width: 420px;
  margin: 46px auto 0;
}

.grid-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.grid-form {
  display: grid;
  gap: 10px;
}

.grid-form.two-cols {
  grid-template-columns: 1fr 1fr;
}

.grid-form .full {
  grid-column: 1 / -1;
}

label {
  display: grid;
  gap: 6px;
  font-size: 0.9rem;
}

label > span {
  color: #2d3f31;
}

input {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  border-radius: 10px;
  padding: 9px 10px;
  font: inherit;
}

input:focus {
  outline: 2px solid #7fd4bb;
  border-color: #4cad8f;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
}

th,
td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid #dde7dc;
  font-size: 0.9rem;
}

thead th {
  position: sticky;
  top: 0;
  background: #f0f6ef;
  z-index: 1;
}

tbody tr {
  cursor: pointer;
}

tbody tr:hover {
  background: rgba(179, 230, 213, 0.22);
}

tbody tr.selected {
  background: rgba(110, 214, 183, 0.28);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
}

.inline-input {
  display: grid;
  gap: 4px;
}

.inline-input input {
  min-width: 220px;
}

.check-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.action-row {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.btn {
  border: none;
  border-radius: 11px;
  padding: 9px 13px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn.primary {
  background: linear-gradient(130deg, #0f8c6d, #1aa07f);
  color: #fff;
}

.btn.secondary {
  background: linear-gradient(130deg, #f0a422, #f4b340);
  color: #1f1a09;
}

.btn.ghost {
  background: #e7efea;
  color: #1f3b2a;
}

.btn.success {
  background: var(--success);
  color: #fff;
}

.btn.danger {
  background: var(--danger);
  color: #fff;
}

.pill {
  padding: 6px 10px;
  border-radius: 999px;
  background: #e3efe7;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.82rem;
}

.muted {
  color: var(--muted);
  margin-top: 0;
}

.alert {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 11px;
  border: 1px solid;
}

.alert.ok {
  background: #e8f9f0;
  border-color: #93dfb6;
  color: #175026;
}

.alert.err {
  background: #ffe9e9;
  border-color: #f0aaaa;
  color: #7d1f1f;
}

.hidden {
  display: none !important;
}

@media (max-width: 980px) {
  .grid-two {
    grid-template-columns: 1fr;
  }

  .grid-form.two-cols {
    grid-template-columns: 1fr;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }
}
