:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --border: #e2e4e9;
  --text: #1f2430;
  --text-muted: #6b7280;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --danger: #dc2626;
  --radius: 8px;
}

* { box-sizing: border-box; }

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

.container {
  max-width: 860px;
  margin: 2rem auto;
  padding: 0 1.25rem 3rem;
}

h1 {
  font-size: 1.4rem;
  font-weight: 600;
  margin: 0 0 1.25rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.topnav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.85rem 1.25rem;
  flex-wrap: wrap;
}

.topnav-brand {
  font-weight: 700;
  color: var(--text);
  margin-right: auto;
  font-size: 0.95rem;
}

.topnav-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.topnav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
}

.topnav a:hover {
  color: var(--primary);
}

.topnav form { margin: 0; }

.topnav button {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.topnav button:hover {
  background: #f3f4f6;
  color: var(--text);
}

table {
  border-collapse: collapse;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

th, td {
  padding: 0.65rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
}

th {
  background: #f9fafb;
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #fafbfc; }

table a {
  color: var(--primary);
  text-decoration: none;
  font-size: 0.85rem;
  margin-right: 0.5rem;
}

table a:hover { text-decoration: underline; }

table button {
  background: transparent;
  color: var(--danger);
  padding: 0.3rem 0.6rem;
  font-size: 0.85rem;
  border: none;
}

table button:hover { background: #fef2f2; }

.error {
  color: var(--danger);
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--radius);
  padding: 0.6rem 0.85rem;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

label {
  display: block;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

input, textarea {
  display: block;
  margin-top: 0.35rem;
  padding: 0.55rem 0.7rem;
  width: 100%;
  max-width: 340px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.95rem;
  color: var(--text);
  font-family: inherit;
}

textarea {
  resize: vertical;
  max-width: 420px;
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

button {
  padding: 0.55rem 1.1rem;
  border: none;
  border-radius: 6px;
  background: var(--primary);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
}

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

.muted {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-card {
  width: 320px;
}

.login-card h1 {
  text-align: center;
}
