* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Arial, sans-serif;
  background: #fafafa;
  color: #18181b;
}
a { color: inherit; }
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: #fff;
  border-bottom: 1px solid #e4e4e7;
}
.header .brand { font-weight: 700; font-size: 18px; }
.header nav { display: flex; gap: 18px; margin-left: 24px; }
.header nav a { font-size: 14px; color: #52525b; text-decoration: none; }
.header nav a:hover { color: #18181b; }
.header-left { display: flex; align-items: center; }
.header-right { display: flex; align-items: center; gap: 12px; font-size: 14px; color: #71717a; }
.header-right form { display: inline; }
.header-right button.link {
  background: none; border: none; padding: 0; font: inherit; color: #71717a; cursor: pointer;
}
.header-right button.link:hover { color: #18181b; }

main.container { max-width: 1100px; margin: 0 auto; padding: 24px 20px; }

h1 { font-size: 22px; margin: 0 0 12px; }
h2 { font-size: 17px; margin: 0 0 10px; }

.card {
  border: 1px solid #e4e4e7;
  background: #fff;
  border-radius: 8px;
  padding: 16px;
}
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 24px; }
.stat-card { border: 1px solid #e4e4e7; background: #fff; border-radius: 8px; padding: 14px 16px; }
.stat-card .label { font-size: 13px; color: #71717a; }
.stat-card .value { font-size: 20px; font-weight: 600; margin-top: 4px; }

.section { margin-bottom: 28px; }

.muted { color: #71717a; font-size: 14px; }

table.list { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid #e4e4e7; border-radius: 8px; overflow: hidden; font-size: 14px; }
table.list th { text-align: left; background: #fafafa; border-bottom: 1px solid #e4e4e7; padding: 8px 12px; color: #71717a; font-weight: 500; }
table.list td { border-bottom: 1px solid #f4f4f5; padding: 8px 12px; }
table.list tr:last-child td { border-bottom: none; }

form.form { max-width: 480px; display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field label { font-size: 13px; font-weight: 500; color: #3f3f46; }
.field input, .field select, .field textarea {
  border: 1px solid #d4d4d8;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 14px;
  font-family: inherit;
}
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }

.btn {
  display: inline-block;
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
}
.btn-primary { background: #18181b; color: #fff; }
.btn-primary:hover { background: #27272a; }
.btn-secondary { background: #fff; border-color: #d4d4d8; color: #3f3f46; }
.btn-secondary:hover { background: #fafafa; }
.btn-danger { background: #fff; border-color: #fecaca; color: #dc2626; }
.btn-danger:hover { background: #fef2f2; }

.badge { display: inline-block; border-radius: 999px; padding: 2px 9px; font-size: 12px; font-weight: 500; }
.badge-gray { background: #f4f4f5; color: #52525b; }
.badge-blue { background: #dbeafe; color: #1d4ed8; }
.badge-green { background: #dcfce7; color: #15803d; }
.badge-amber { background: #fef3c7; color: #92400e; }
.badge-red { background: #fee2e2; color: #b91c1c; }

.flash { padding: 10px 14px; border-radius: 6px; font-size: 14px; margin-bottom: 16px; }
.flash-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.flash-success { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }

.actions { display: flex; gap: 10px; align-items: center; }
.login-wrap { max-width: 360px; margin: 90px auto; background: #fff; border: 1px solid #e4e4e7; border-radius: 10px; padding: 28px; }
