:root {
  --bg: #0c1014;
  --panel: #121820;
  --border: #2a3544;
  --text: #e8edf2;
  --muted: #8b9aab;
  --accent: #6ec9a8;
  --nav-w: 240px;
  --danger: #c44c55;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
}
.topbar {
  height: 52px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem 0 1.1rem;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
  z-index: 20;
}
.brand-wrap { display: flex; align-items: baseline; gap: 0.65rem; }
.brand { font-weight: 700; font-size: 1rem; letter-spacing: 0.02em; }
.version { font-size: 0.75rem; color: var(--muted); }
.user-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: var(--muted);
}
.user-meta button {
  background: #1a2330;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 6px;
  padding: 0.3rem 0.7rem;
  cursor: pointer;
  font-size: 0.85rem;
}
.user-meta button:hover { border-color: var(--accent); }
.shell { flex: 1; display: flex; min-height: 0; }
.sidebar {
  width: var(--nav-w);
  flex-shrink: 0;
  background: var(--panel);
  border-right: 1px solid var(--border);
  padding: 1rem 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.nav-label {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.35rem 0.7rem 0.55rem;
}
.nav-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
}
.nav-item:hover { background: #1a2330; }
.nav-item.active {
  background: #16352c;
  border-color: #2d5c4a;
  color: var(--accent);
  font-weight: 600;
}
.main { flex: 1; min-width: 0; position: relative; display: flex; flex-direction: column; }

.import-main { overflow: auto; }
.import-wrap {
  max-width: 920px;
  padding: 1.5rem 1.75rem 2.5rem;
}
.import-wrap h1 { margin: 0 0 0.35rem; font-size: 1.35rem; }
.import-wrap h2 { margin: 1.5rem 0 0.5rem; font-size: 0.95rem; color: var(--muted); font-weight: 600; }
.lead { color: var(--muted); margin: 0 0 1.25rem; font-size: 0.95rem; line-height: 1.45; }
.lead code { color: var(--accent); font-size: 0.85em; }
.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.65rem;
  margin-bottom: 1rem;
}
.stat {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
}
.stat-label { font-size: 0.7rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.stat-value { font-size: 1.15rem; font-weight: 650; margin-top: 0.2rem; }
.progress-track {
  height: 10px;
  background: #1a2330;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #1f6b4e, var(--accent));
  transition: width 0.25s ease;
}
.current-line {
  margin: 0.75rem 0 1.1rem;
  font-size: 0.9rem;
  color: #c5d0db;
  min-height: 1.3em;
}
.actions { display: flex; flex-wrap: wrap; gap: 0.55rem; margin-bottom: 0.5rem; }
.btn {
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #1a2330;
  color: var(--text);
  padding: 0.55rem 0.9rem;
  font-size: 0.9rem;
  cursor: pointer;
}
.btn:hover:not(:disabled) { border-color: var(--accent); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn.primary {
  background: #1f6b4e;
  border-color: #2d8a66;
  font-weight: 600;
}
.btn.danger {
  background: #3a1a1e;
  border-color: #6b2a32;
  color: #f0b4b8;
}
.hint { font-size: 0.8rem; color: var(--muted); margin: 0 0 0.5rem; }
.err { color: #f07178; font-size: 0.85rem; min-height: 1.2em; margin: 0 0 0.5rem; }
.log {
  background: #0a0e12;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  font-size: 0.78rem;
  line-height: 1.45;
  max-height: 320px;
  overflow: auto;
  white-space: pre-wrap;
  color: #a8b4c0;
  margin: 0;
}
