* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
  background: linear-gradient(180deg, #f6f7fb 0%, #eef1f8 100%);
  color: #1d2433;
  line-height: 1.4;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 24px;
  background: #ffffff;
  border-bottom: 1px solid #e6e8ef;
  box-shadow: 0 1px 10px rgba(18, 28, 45, 0.04);
  position: sticky;
  top: 0;
  z-index: 5;
  min-height: 52px;
}

.brand {
  flex-shrink: 0;
}

.brand-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.topbar .nav {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 2px;
  -webkit-overflow-scrolling: touch;
}

.nav-btn {
  border: 1px solid #d7dbe7;
  background: #f7f8fb;
  color: #1d2433;
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.topbar .nav-btn,
.topbar .nav-btn:hover {
  background: #f7f8fb;
  color: #1d2433;
  border-color: #d7dbe7;
}
.topbar .nav-btn:hover {
  background: #eef1f8;
  border-color: #c5cad8;
}
.topbar .nav-btn.active {
  background: #2f6fed;
  border-color: #2f6fed;
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(47, 111, 237, 0.25);
}
.topbar a.nav-btn {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.page {
  display: none;
  padding: 20px 24px 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.page.active {
  display: block;
}

.row { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.card {
  background: #ffffff;
  border: 1px solid #e6e8ef;
  border-radius: 14px;
  padding: 18px;
  width: 33%;
  min-width: 320px;
  box-shadow: 0 10px 24px rgba(18, 28, 45, 0.06);
}
input, textarea, select, button {
  width: 100%;
  margin: 6px 0;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #d7dbe7;
  background: #ffffff;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: #2f6fed;
  box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.15);
}
button {
  cursor: pointer;
  background: #2f6fed;
  color: #fff;
  border: 1px solid #2f6fed;
  font-weight: 600;
}
button:hover { background: #2459be; border-color: #2459be; }
button:active { transform: translateY(1px); }
textarea { height: 100px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; }
select[multiple] { min-height: 120px; }
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { border-bottom: 1px solid #eef0f5; padding: 8px; vertical-align: top; font-size: 12px; }
th { text-align: left; background: #fafbff; }
.muted { color: #6b7280; font-size: 12px; }
.pill { display: inline-block; padding: 2px 8px; border: 1px solid #d7dbe7; border-radius: 999px; font-size: 12px; background: #f7f8fb; }
.btnrow { display: flex; gap: 8px; flex-wrap: wrap; }
.btnrow button { width: auto; }
a.button { display: inline-block; padding: 8px 14px; background: #e5e7eb; color: #1d2433; border-radius: 8px; text-decoration: none; font-size: 13px; font-weight: 500; }
a.button:hover { background: #d1d5db; }
button.primary { background: #0d9488; border-color: #0d9488; }
button.primary:hover { background: #0f766e; border-color: #0f766e; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.small { font-size: 12px; }

@media (max-width: 1024px) {
  .card { width: 100%; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
}
