:root {
  --bg: #f4f6f8;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #e5e7eb;
  --brand: #a9dc23;
  --brand-dark: #8fc41e;
  --danger: #dc2626;
  --shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }

.shell {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 16px 40px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
}

.brand {
  font-size: 1.25rem;
  font-weight: 700;
}

.brand span { color: var(--brand-dark); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.btn:hover { opacity: 0.9; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-primary { background: var(--brand); color: #1f2937; }
.btn-secondary { background: #fff; color: var(--text); border: 1px solid var(--border); }
.btn-danger { background: #fee2e2; color: var(--danger); }
.btn-small { padding: 8px 14px; font-size: 0.85rem; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 20px;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.stat-card h3 {
  margin: 0 0 8px;
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 600;
}

.stat-card .value {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.stat-card .sub {
  font-size: 0.85rem;
  color: var(--muted);
}

.section {
  margin-top: 28px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.section-head h2 {
  margin: 0;
  font-size: 1.15rem;
}

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.login-card {
  width: 100%;
  max-width: 420px;
}

.login-card h1 {
  margin: 0 0 8px;
  font-size: 1.6rem;
}

.login-card p {
  margin: 0 0 24px;
  color: var(--muted);
}

.field { margin-bottom: 16px; }

.field label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.9rem;
  font-weight: 600;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 1rem;
  background: #fff;
  color: var(--text);
}

.field textarea { min-height: 88px; resize: vertical; }

.error {
  color: var(--danger);
  font-size: 0.9rem;
  margin-top: 12px;
}

.policy-list { display: grid; gap: 14px; }

.policy-row {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr auto;
  align-items: start;
}

.policy-meta {
  display: grid;
  gap: 6px;
}

.policy-meta strong { font-size: 1rem; }

.policy-meta span { color: var(--muted); font-size: 0.9rem; }

.policy-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.form-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid .full { grid-column: 1 / -1; }

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

@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .grid-2,
  .grid-4,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .policy-row {
    grid-template-columns: 1fr;
  }

  .policy-actions {
    justify-content: flex-start;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }
}
