* { box-sizing: border-box; }
body { margin: 0; font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: #1f2933; background: #f5f6f8; }
.hidden { display: none !important; }
button { font: inherit; cursor: pointer; border: 0; border-radius: 6px; padding: 7px 14px; background: #2563eb; color: #fff; }
button.ghost { background: #e5e7eb; color: #1f2933; }
button.danger { background: #dc2626; }
button.link { background: none; color: #2563eb; padding: 0; }
input, select, textarea { font: inherit; width: 100%; padding: 7px 9px; border: 1px solid #cbd2d9; border-radius: 6px; background: #fff; }
textarea { min-height: 70px; }
label { display: block; margin: 0 0 10px; font-weight: 500; }
label input, label select, label textarea { margin-top: 4px; font-weight: 400; }
.card { background: #fff; border-radius: 10px; padding: 20px; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.login { min-height: 100vh; display: grid; place-items: center; }
.login form { width: min(360px, 92vw); }
.err { color: #dc2626; min-height: 1em; }
.shell { display: grid; grid-template-columns: 230px 1fr; min-height: 100vh; }
aside { background: #111827; color: #d1d5db; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.brand { font-weight: 700; color: #fff; font-size: 16px; }
nav { flex: 1; overflow: auto; }
nav h4 { margin: 14px 0 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: #9ca3af; }
nav a { display: block; padding: 6px 8px; border-radius: 6px; color: #e5e7eb; text-decoration: none; }
nav a.on, nav a:hover { background: #1f2937; }
.me { font-size: 12px; }
main { padding: 18px; overflow: auto; }
.bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; margin-bottom: 12px; }
.bar h2 { margin: 0 auto 0 0; font-size: 18px; }
.bar input, .bar select { width: auto; }
.bar label { margin: 0; font-size: 12px; }
.desc { color: #52606d; margin: -6px 0 10px; }
.tbl { overflow: auto; background: #fff; border-radius: 10px; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
table { border-collapse: collapse; width: 100%; }
th, td { padding: 7px 10px; border-bottom: 1px solid #eef0f3; text-align: left; white-space: nowrap; }
td.wrap { white-space: normal; min-width: 220px; }
th { background: #f9fafb; font-weight: 600; position: sticky; top: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.click:hover { background: #f0f5ff; cursor: pointer; }
.count { color: #52606d; font-size: 12px; margin: 6px 2px; }
dialog { border: 0; border-radius: 10px; padding: 0; width: min(560px, 94vw); }
dialog form { padding: 18px; max-height: 86vh; overflow: auto; }
dialog .actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; }
.menu-toggle { display: none; margin-bottom: 10px; }
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  aside { display: none; }
  aside.open { display: flex; position: fixed; inset: 0; z-index: 10; }
  .menu-toggle { display: inline-block; }
}
