* { box-sizing: border-box; margin: 0; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background: #f2f4f7; color: #1a202c; display: flex; min-height: 100vh; font-size: 16px;
}
.sidebar {
  width: 240px; background: #1f2937; color: #e5e7eb; padding: 20px 0;
  display: flex; flex-direction: column; flex-shrink: 0; min-height: 100vh;
}
.sidebar .logo { padding: 0 20px 20px; font-weight: 700; font-size: 18px; color: #fff; }
.sidebar .logo span { font-weight: 400; font-size: 13px; color: #9ca3af; }
.sidebar a {
  color: #d1d5db; text-decoration: none; padding: 12px 20px; font-size: 15px;
}
.sidebar a:hover { background: #374151; color: #fff; }
.sidebar a.active { background: #2563eb; color: #fff; }
.sidebar .spacer { flex: 1; }
main { flex: 1; padding: 32px; max-width: 1100px; }
h1 { font-size: 24px; margin-bottom: 8px; }
.hint { color: #6b7280; margin-bottom: 24px; font-size: 14px; }
.card {
  background: #fff; border-radius: 12px; padding: 20px; margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid #e5e7eb; vertical-align: top; }
th { font-size: 13px; text-transform: uppercase; color: #6b7280; }
.msg-text { max-width: 420px; word-break: break-word; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: 13px; }
.badge.red { background: #fee2e2; color: #b91c1c; }
.badge.green { background: #d1fae5; color: #047857; }
.badge.gray { background: #e5e7eb; color: #4b5563; }
button, .btn {
  background: #2563eb; color: #fff; border: 0; border-radius: 8px;
  padding: 10px 18px; font-size: 15px; cursor: pointer; text-decoration: none; display: inline-block;
}
button:hover, .btn:hover { background: #1d4ed8; }
button.danger { background: #dc2626; }
button.danger:hover { background: #b91c1c; }
button.small { padding: 6px 12px; font-size: 13px; }
input[type=text], input[type=password], input[type=number], textarea, select {
  width: 100%; padding: 10px 12px; border: 1px solid #d1d5db; border-radius: 8px;
  font-size: 15px; font-family: inherit; background: #fff;
}
textarea { min-height: 60px; resize: vertical; }
label { display: block; margin: 14px 0 6px; font-weight: 600; font-size: 14px; }
.check { display: flex; align-items: center; gap: 10px; margin: 12px 0; font-size: 15px; }
.check input { width: 20px; height: 20px; }
.row { display: flex; gap: 12px; align-items: flex-end; }
.row > * { flex: 1; }
.row > button { flex: 0; }
.ok-banner {
  background: #d1fae5; color: #047857; padding: 12px 16px; border-radius: 8px; margin-bottom: 16px;
}
.login-wrap { margin: auto; width: 360px; }
.login-wrap h1 { text-align: center; margin-bottom: 20px; }
.error { background: #fee2e2; color: #b91c1c; padding: 10px 14px; border-radius: 8px; margin-bottom: 12px; }
.two-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
ul.plain { list-style: none; }
ul.plain li {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0; border-bottom: 1px solid #f3f4f6;
}
.small-note { font-size: 13px; color: #6b7280; margin-top: 4px; }
@media (max-width: 800px) {
  body { flex-direction: column; }
  .sidebar { width: 100%; min-height: auto; }
  .two-cols { grid-template-columns: 1fr; }
  main { padding: 16px; }
}
