* { box-sizing: border-box; border-radius: 0 !important; }
html, body { margin: 0; min-height: 100%; }
html { background: #d7e3ee; }
html[data-theme="dark"] { background: #0e1720; }
body {
  font-family: Inter, "Noto Sans SC", sans-serif;
  color: #142433;
  background: #d7e3ee;
}
html[data-theme="dark"] body { color: #e7eef5; background: #0e1720; }
a { color: #1a77a3; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }

#shell { min-height: 100vh; display: flex; flex-direction: column; }
.top {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 20px;
  min-height: 58px;
  background: linear-gradient(90deg, #1a77a3, #0f3d5c);
  color: #fff;
}
.brand { color: #fff; font-weight: 600; letter-spacing: 0.02em; }
.nav { display: flex; gap: 16px; flex: 1; flex-wrap: wrap; }
.nav a { color: #fff; }
.nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; }
.tools { display: flex; gap: 8px; align-items: center; }
.tool, .menu button, .primary, .ghost {
  border: 1px solid transparent;
  background: transparent;
  color: #fff;
  padding: 6px 10px;
}
.account { position: relative; }
.menu {
  position: absolute;
  right: 0;
  top: 100%;
  min-width: 180px;
  background: #ffffff;
  color: #142433;
  border: 1px solid #e5eaf0;
  display: flex;
  flex-direction: column;
  z-index: 5;
}
html[data-theme="dark"] .menu { background: #142433; color: #e7eef5; border-color: #2c4258; }
.menu a, .menu button {
  text-align: left;
  padding: 10px 12px;
  color: inherit;
  background: transparent;
  border: 0;
}
.menu a:hover, .menu button:hover { background: #d7e3ee; }
html[data-theme="dark"] .menu a:hover,
html[data-theme="dark"] .menu button:hover { background: #0e1720; }
#main { flex: 1; width: min(960px, calc(100% - 32px)); margin: 24px auto; }
.foot {
  padding: 16px 20px 22px;
  color: #3e5366;
  font-size: 13px;
}
html[data-theme="dark"] .foot { color: #9eb0c2; }
.card {
  background: #ffffff;
  border: 1px solid #e5eaf0;
  padding: 18px 20px;
  margin: 0 0 14px;
}
html[data-theme="dark"] .card { background: #142433; border-color: #2c4258; }
h1 { font-size: 28px; font-weight: 600; margin: 0 0 8px; }
.lead { margin: 0 0 16px; line-height: 1.5; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.stat { font-size: 32px; font-weight: 600; margin: 6px 0; }
.row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid #e5eaf0; }
html[data-theme="dark"] .row { border-bottom-color: #2c4258; }
.row:last-child { border-bottom: 0; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid #e5eaf0; }
html[data-theme="dark"] th,
html[data-theme="dark"] td { border-bottom-color: #2c4258; }
th { font-weight: 600; font-size: 13px; }
.primary {
  display: inline-block;
  background: linear-gradient(90deg, #1a77a3, #0f3d5c);
  color: #fff;
  border: 0;
  padding: 8px 14px;
}
label { display: block; margin: 12px 0 4px; }
input[type="email"], input[type="password"] {
  width: 100%;
  max-width: 360px;
  padding: 8px 10px;
  border: 1px solid #e5eaf0;
  background: #fff;
}
html[data-theme="dark"] input[type="email"],
html[data-theme="dark"] input[type="password"] {
  background: #0e1720;
  border-color: #2c4258;
}
.err { color: #9b2c2c; }
html[data-theme="dark"] .err { color: #ffb4b4; }
.muted { color: #3e5366; font-size: 14px; }
html[data-theme="dark"] .muted { color: #9eb0c2; }
@media (max-width: 800px) {
  .top { flex-wrap: wrap; padding: 12px 14px; }
  .grid { grid-template-columns: 1fr; }
  .nav { order: 3; width: 100%; }
}
