:root {
  --bg: #f3f6f8;
  --panel: #ffffff;
  --text: #15232d;
  --muted: #61717f;
  --border: #d6e0e6;
  --brand: #0c6d74;
  --brand-2: #2d7f5e;
  --danger: #b42318;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(12, 109, 116, .14), transparent 45%),
    linear-gradient(315deg, rgba(45, 127, 94, .12), transparent 40%),
    var(--bg);
}
.login-box {
  width: min(420px, calc(100vw - 32px));
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 16px 40px rgba(20, 35, 45, .12);
}
.login-box h1 { margin: 16px 0 4px; font-size: 24px; }
.login-box p { margin: 0 0 22px; color: var(--muted); }
.mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  background: var(--brand);
  color: white;
  border-radius: 8px;
  font-weight: 800;
}
.mark.small { width: 36px; height: 36px; font-size: 13px; }

.app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
}
.sidebar {
  background: #10262d;
  color: #e7f3f4;
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255,255,255,.14);
}
.brand strong { display: block; }
.brand span { color: #9eb9bd; font-size: 12px; }
nav { display: grid; gap: 6px; }
nav button {
  border: 0;
  background: transparent;
  color: #c9dcdf;
  padding: 10px 12px;
  text-align: left;
  border-radius: 6px;
}
nav button.active, nav button:hover { background: rgba(255,255,255,.11); color: white; }
.ghost {
  margin-top: auto;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14);
  color: white;
  border-radius: 6px;
  padding: 9px;
}

main { min-width: 0; padding: 24px; }
.topbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  margin-bottom: 20px;
}
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 4px; font-size: 24px; }
h2 { font-size: 16px; }
.topbar p, .panel p { color: var(--muted); }
.icon {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  background: white;
  border-radius: 6px;
}

.tab { display: none; }
.tab.active { display: block; }
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.stat, .panel, .asset {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.stat { padding: 16px; }
.stat span { color: var(--muted); }
.stat strong { display: block; font-size: 28px; line-height: 1.25; }
.panel { padding: 18px; margin-bottom: 18px; }
.form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  margin-bottom: 12px;
}
input, select, textarea {
  width: 100%;
  border: 1px solid var(--border);
  background: #fbfcfd;
  border-radius: 6px;
  padding: 9px 10px;
  color: var(--text);
}
button[type=submit], .primary {
  border: 0;
  border-radius: 6px;
  background: var(--brand);
  color: white;
  padding: 9px 13px;
}
.secondary {
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #f1f5f7;
  padding: 9px 13px;
}
.danger { color: var(--danger); }
.grid.two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.toolbar { display: flex; gap: 10px; margin-bottom: 14px; }
.list { display: grid; gap: 12px; }
.asset {
  padding: 15px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}
.asset h3 { margin: 0 0 5px; font-size: 15px; }
.asset p { margin: 0; color: var(--muted); word-break: break-all; }
.asset-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.badge {
  display: inline-block;
  padding: 2px 7px;
  background: #e8f3f4;
  color: #0b6269;
  border-radius: 999px;
  font-size: 12px;
  margin-left: 6px;
}
.output {
  white-space: pre-wrap;
  overflow: auto;
  max-height: 360px;
  min-height: 110px;
  background: #101820;
  color: #d7e4eb;
  border-radius: 6px;
  padding: 12px;
  font: 12px/1.55 Consolas, "Cascadia Mono", monospace;
}
.error { color: var(--danger); min-height: 20px; }
code {
  background: #edf3f5;
  padding: 2px 5px;
  border-radius: 4px;
}

@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats, .grid.two { grid-template-columns: 1fr; }
  .asset { grid-template-columns: 1fr; }
  .asset-actions { justify-content: flex-start; }
  main { padding: 18px; }
}

