:root {
  --bg: #f5f6f8;
  --panel: #ffffff;
  --ink: #1d2430;
  --muted: #6b7280;
  --line: #e3e6eb;
  --accent: #2563eb;
  --ok: #16a34a;
  --warn: #b45309;
  --danger: #dc2626;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.5 "Segoe UI", system-ui, sans-serif;
}
.layout { display: flex; min-height: 100vh; }

nav {
  width: 210px; flex: none; background: #1c2532; color: #dbe2ec;
  padding: 18px 12px; display: flex; flex-direction: column; gap: 2px;
}
.brand { font-size: 19px; font-weight: 700; color: #fff; margin: 0 8px 18px; }
.navlink {
  color: #cdd6e4; text-decoration: none; padding: 8px 10px;
  border-radius: 8px; font-weight: 500;
}
.navlink:hover { background: #27334a; }
.navlink.active { background: var(--accent); color: #fff; }
.navfoot { margin-top: auto; padding: 10px; font-size: 12px; }
.navfoot a { color: #9fb0c8; }

main { flex: 1; padding: 26px 32px 60px; max-width: 1150px; }
h1 { margin: 0 0 18px; font-size: 24px; }
h2 { margin: 0 0 12px; font-size: 17px; }
.muted { color: var(--muted); font-size: 13px; }
.mono, .mono small { font-family: Consolas, "Courier New", monospace; }
.small { font-size: 13px; }

.banner { padding: 10px 14px; border-radius: 10px; margin: 0 0 16px; font-size: 14px; }
.banner.ok { background: #e7f6ec; color: #14683a; border: 1px solid #bfe6cd; }
.banner.warn { background: #fdf3e3; color: var(--warn); border: 1px solid #f3ddb0; }

.box {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 18px 20px; margin-bottom: 18px;
}
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 18px; }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 16px; text-decoration: none; color: var(--ink);
}
.card:hover { border-color: var(--accent); }
.card .num { font-size: 26px; font-weight: 700; }
.card.attention { border-color: #f0c36d; background: #fffaf0; }

.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th, .tbl td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { color: var(--muted); font-weight: 600; font-size: 12.5px; text-transform: uppercase; letter-spacing: .03em; }
.tbl tr:hover td { background: #f8fafc; }

.badge {
  display: inline-block; padding: 2px 9px; border-radius: 99px;
  font-size: 12px; font-weight: 600; background: #e8ebf0; color: #4b5563;
}
.st-running { background: #dbeafe; color: #1d4ed8; }
.st-done { background: #e7f6ec; color: var(--ok); }
.st-failed { background: #fde8e8; color: var(--danger); }
.cls-new { background: #e7f6ec; color: var(--ok); }
.cls-changed { background: #fdf3e3; color: var(--warn); }
.cls-unknown { background: #fdf3e3; color: var(--warn); }
.cls-synced { background: #e8ebf0; color: #4b5563; }

.tree { font-size: 14px; }
.tree-dir > summary {
  cursor: pointer; padding: 4px 6px; font-weight: 600; border-radius: 6px;
  user-select: none;
}
.tree-dir > summary::marker { color: var(--muted); }
.tree-dir > summary:hover { background: #f8fafc; }
.tree-body { margin: 2px 0 6px; }
.tree-body .tree-dir { border-left: 1px solid var(--line); margin-left: 5px; padding-left: 12px; }
.tree-file {
  display: flex; align-items: center; gap: 10px; padding: 3px 6px; border-radius: 6px;
}
.tree-file:hover { background: #f8fafc; }
.tree-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.tree-size { white-space: nowrap; }
.tree-del { display: flex; margin: 0; }

button {
  background: var(--accent); color: #fff; border: 0; border-radius: 9px;
  padding: 9px 16px; font-size: 14px; font-weight: 600; cursor: pointer;
}
button:hover { filter: brightness(1.07); }
button.danger { background: var(--danger); }
button.small { padding: 5px 11px; font-size: 13px; }
input[type="text"], input:not([type]), input[type="password"], input[type="file"], select, textarea {
  font: inherit; padding: 8px 10px; border: 1px solid var(--line);
  border-radius: 8px; background: #fff; color: var(--ink);
}
textarea { width: 100%; font-family: Consolas, monospace; font-size: 13px; }
.stack { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.inline { display: flex; gap: 10px; align-items: center; margin: 8px 0; }

pre.log, pre.result {
  background: #10141b; color: #d7e0ec; padding: 14px; border-radius: 10px;
  overflow: auto; max-height: 480px; font-size: 12.5px; line-height: 1.45;
  white-space: pre-wrap; word-break: break-word;
}
pre { background: #eef1f5; padding: 12px; border-radius: 10px; overflow: auto; }
code { background: #eef1f5; padding: 1px 5px; border-radius: 5px; font-size: 13px; }

.login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 34px 38px; display: flex; flex-direction: column; gap: 12px; min-width: 320px;
}
.login-card h1 { margin: 0; font-size: 22px; }
.login-card button { width: 100%; }

@media (max-width: 900px) {
  .layout { flex-direction: column; }
  nav { width: auto; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .brand { margin: 0 12px 0 0; }
  .navfoot { margin: 0 0 0 auto; }
  .grid2 { grid-template-columns: 1fr; }
}
