:root {
  --bg: #f4f7fb;
  --card: #ffffff;
  --text: #172033;
  --muted: #6b7280;
  --primary: #1f6feb;
  --primary-dark: #1858bd;
  --danger: #c0392b;
  --success: #198754;
  --border: #dbe3ef;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}

.container {
  width: min(920px, calc(100% - 32px));
  margin: 48px auto;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 10px 30px rgba(21, 31, 50, 0.08);
}

h1, h2 {
  margin-top: 0;
}

.subtitle {
  color: var(--muted);
  line-height: 1.6;
}

label {
  display: block;
  margin: 18px 0 8px;
  font-weight: 700;
}

input, textarea {
  width: 100%;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font: inherit;
  background: #fff;
}

textarea {
  min-height: 130px;
  resize: vertical;
}

button, .button {
  margin-top: 20px;
  border: 0;
  border-radius: 12px;
  padding: 13px 18px;
  font-weight: 700;
  cursor: pointer;
  background: var(--primary);
  color: white;
  text-decoration: none;
  display: inline-block;
}

button:hover, .button:hover {
  background: var(--primary-dark);
}

button.secondary {
  background: #64748b;
}

button.danger {
  background: var(--danger);
}

.notice {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 12px;
  display: none;
}

.notice.show {
  display: block;
}

.notice.error {
  background: #fdecec;
  color: #8a1c12;
}

.notice.success {
  background: #e9f7ef;
  color: #126b3a;
}

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

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
}

th, td {
  text-align: left;
  padding: 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

th {
  background: #f8fafc;
}

.small {
  font-size: 13px;
  color: var(--muted);
}

.counter {
  font-weight: 700;
  color: var(--primary);
}