:root {
  --bg: #0a0a0c;
  --panel: #12141a;
  --card: #161922;
  --line: #2a2f3a;
  --gold: #c9a227;
  --gold2: #e8c547;
  --text: #f0f2f5;
  --muted: #9ca3af;
  --ok: #34d399;
  --bad: #f87171;
  --side: 240px;
  --nav-h: 64px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
}
a { color: var(--gold2); }
.app { display: flex; min-height: 100%; }
.sidebar {
  width: var(--side);
  background: linear-gradient(180deg, #0f1117, #0a0a0c);
  border-right: 1px solid var(--line);
  padding: 16px 12px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: none;
  flex-direction: column;
  gap: 6px;
}
.sidebar .brand {
  font-weight: 800;
  font-size: 15px;
  color: var(--gold);
  padding: 8px 10px 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
}
.sidebar .brand small { display: block; color: var(--muted); font-weight: 500; font-size: 11px; margin-top: 4px; }
.sidebar button {
  background: transparent;
  border: 0;
  color: var(--text);
  text-align: left;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
}
.sidebar button.on, .sidebar button:hover { background: #1c2030; color: var(--gold2); }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(10,10,12,.92);
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar h1 { font-size: 16px; font-weight: 700; }
.topbar .tag { font-size: 11px; color: var(--muted); }
.content { padding: 16px; padding-bottom: calc(var(--nav-h) + 24px); max-width: 1100px; width: 100%; margin: 0 auto; }
.bottom-nav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: var(--nav-h);
  background: #0f1117;
  border-top: 1px solid var(--line);
  display: flex;
  z-index: 30;
}
.bottom-nav button {
  flex: 1;
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
}
.bottom-nav button.on { color: var(--gold); }
.bottom-nav .ico { font-size: 18px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 12px;
}
.card h2 { font-size: 15px; margin-bottom: 8px; color: var(--gold2); }
.hint { color: var(--muted); font-size: 13px; margin-bottom: 10px; }
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}
@media (min-width: 700px) {
  .kpi-grid { grid-template-columns: repeat(4, 1fr); }
}
.kpi {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
}
.kpi b { display: block; font-size: 18px; color: var(--gold2); }
.kpi span { font-size: 11px; color: var(--muted); }
.btn {
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 600;
  cursor: pointer;
  font-size: 13px;
}
.btn-primary { background: var(--gold); color: #111; }
.btn-outline { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn-block { width: 100%; margin-top: 8px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.tool {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  cursor: pointer;
  margin-bottom: 8px;
  text-align: left;
  color: inherit;
  width: 100%;
}
.tool strong { color: var(--gold2); font-size: 13px; }
.tool span { color: var(--muted); font-size: 12px; }
input, select, textarea {
  width: 100%;
  background: #0c0e14;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  padding: 10px 12px;
  margin: 6px 0 10px;
  font-size: 14px;
}
label { font-size: 12px; color: var(--muted); }
.list-item {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 8px;
  background: var(--panel);
  cursor: pointer;
}
.list-item small { color: var(--muted); display: block; margin-top: 4px; }
#toast {
  position: fixed;
  bottom: calc(var(--nav-h) + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1c2030;
  border: 1px solid var(--gold);
  color: var(--text);
  padding: 10px 16px;
  border-radius: 10px;
  opacity: 0;
  pointer-events: none;
  transition: .25s;
  z-index: 50;
  font-size: 13px;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.check-row { display: flex; gap: 8px; align-items: flex-start; margin: 8px 0; font-size: 13px; }
.step-group { color: var(--gold); font-size: 11px; text-transform: uppercase; margin-top: 12px; margin-bottom: 4px; }

@media (min-width: 900px) {
  .sidebar { display: flex; }
  .bottom-nav { display: none; }
  .content { padding-bottom: 32px; }
  #toast { bottom: 24px; }
}
