:root {
  --bg: #f3f7f4;
  --panel: #ffffff;
  --text: #1f2c25;
  --muted: #596b5f;
  --line: #d6e2d8;
  --primary: #2e6e4c;
  --primary-strong: #21573b;
  --accent: #e7f0e8;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 0%, #dcebdd 0, transparent 30%),
    radial-gradient(circle at 90% 20%, #d3e7dc 0, transparent 25%),
    var(--bg);
  min-height: 100vh;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: min(980px, 94vw);
  margin: 1.2rem auto 2rem;
}

.topbar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  padding: 0.85rem 1rem;
}

.brand {
  font-weight: 700;
  letter-spacing: 0.02em;
}

.topnav {
  display: flex;
  gap: 0.8rem;
}

.userbadge {
  font-size: 0.9rem;
  color: var(--muted);
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.1rem;
  box-shadow: 0 8px 24px rgba(18, 35, 24, 0.06);
}

.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.login-card {
  width: min(460px, 95vw);
}

h1, h2, h3 {
  margin-top: 0;
}

.subtitle {
  color: var(--muted);
  margin-top: -0.4rem;
  margin-bottom: 1rem;
}

label {
  display: block;
  margin-bottom: 0.25rem;
  font-weight: 600;
}

input {
  width: 100%;
  padding: 0.62rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 0.85rem;
  background: #fcfffc;
}

select,
textarea {
  width: 100%;
  padding: 0.62rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 0.85rem;
  background: #fcfffc;
  font-family: inherit;
}

textarea {
  resize: vertical;
}

button {
  background: var(--primary);
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 0.7rem 1rem;
  font-weight: 600;
  cursor: pointer;
}

button:hover {
  background: var(--primary-strong);
}

.alert {
  background: #fbeaea;
  color: #8a2828;
  border: 1px solid #ebc1c1;
  padding: 0.6rem 0.7rem;
  border-radius: 8px;
  margin-bottom: 0.75rem;
}

.success {
  background: #e7f7ed;
  color: #1f6b37;
  border: 1px solid #bce4c9;
  padding: 0.6rem 0.7rem;
  border-radius: 8px;
  margin-bottom: 0.75rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.section-card {
  display: block;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--accent);
}

.meta {
  color: var(--muted);
  font-size: 0.92rem;
}

.users-table {
  width: 100%;
  border-collapse: collapse;
}

.users-table th,
.users-table td {
  border-bottom: 1px solid var(--line);
  text-align: left;
  padding: 0.55rem 0.45rem;
}

.users-table th {
  background: #f5faf6;
}

.users-table button {
  margin-right: 0.4rem;
  margin-bottom: 0.2rem;
}

.item-list {
  margin: 0;
  padding-left: 1.15rem;
}

.item-list li {
  margin-bottom: 0.42rem;
}

@media (max-width: 640px) {
  .topbar {
    align-items: flex-start;
  }

  .topnav {
    width: 100%;
    flex-wrap: wrap;
  }
}
