:root {
  --bg: #f3f6ef;
  --panel: #fffdf7;
  --panel-strong: #fbf4e8;
  --text: #1d2a21;
  --muted: #5f6f62;
  --line: #d6dece;
  --accent: #355e3b;
  --accent-soft: #e1ecdf;
  --danger: #8b2e2e;
  --danger-soft: #f8e4e0;
  --success: #2f6b3b;
  --success-soft: #e2f2e5;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(53, 94, 59, 0.1), transparent 34%),
    linear-gradient(180deg, #eef3e7 0%, var(--bg) 100%);
  color: var(--text);
}

.page {
  min-height: 100vh;
  padding: 32px 16px;
}

.shell {
  width: min(1080px, 100%);
  margin: 0 auto;
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  margin-bottom: 20px;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(32px, 6vw, 52px);
  line-height: 1;
}

.lede {
  margin-top: 10px;
  max-width: 640px;
  color: var(--muted);
}

.link-home {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}

.card {
  padding: 24px;
  background: rgba(255, 253, 247, 0.92);
  border: 1px solid rgba(214, 222, 206, 0.95);
  border-radius: 22px;
  box-shadow: 0 24px 70px rgba(34, 48, 31, 0.08);
}

.hidden {
  display: none;
}

.muted {
  margin-top: 6px;
  color: var(--muted);
}

.login-form {
  display: grid;
  gap: 14px;
  max-width: 360px;
  margin-top: 18px;
}

.login-form label,
.table-input-wrap {
  display: grid;
  gap: 6px;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
}

.toolbar-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.badge {
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}

input,
button {
  font: inherit;
}

input {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  color: var(--text);
}

button {
  min-height: 46px;
  padding: 0 16px;
  border: 0;
  border-radius: 14px;
  background: var(--accent);
  color: white;
  cursor: pointer;
  font-weight: 700;
}

button.secondary {
  background: #dde5d6;
  color: var(--text);
}

button:disabled {
  opacity: 0.6;
  cursor: wait;
}

.notice,
.error {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 14px;
}

.notice {
  background: var(--success-soft);
  color: var(--success);
}

.error {
  background: var(--danger-soft);
  color: var(--danger);
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 16px;
  text-align: left;
  vertical-align: top;
}

thead th {
  background: var(--panel-strong);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

tbody tr + tr td {
  border-top: 1px solid var(--line);
}

.contract-id {
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
}

.contract-meta {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.table-input-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.table-input-row input {
  min-width: 240px;
}

.empty {
  padding: 28px 16px;
  text-align: center;
  color: var(--muted);
}

@media (max-width: 760px) {
  .hero,
  .toolbar,
  .table-input-row {
    flex-direction: column;
    align-items: stretch;
  }

  .table-input-row input {
    min-width: 0;
  }

  th,
  td {
    padding: 14px;
  }
}
