:root {
  --bg: #0f1117;
  --panel: #171a23;
  --panel-2: #1e222e;
  --line: #2a2f3d;
  --text: #e7e9ee;
  --muted: #9aa1b1;
  --accent: #5b8cff;
  --accent-2: #6ee7b7;
  --warn: #f4b860;
  --danger: #f47174;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: radial-gradient(1200px 600px at 80% -10%, #1c2540 0%, var(--bg) 55%);
  color: var(--text);
  min-height: 100vh;
}

/* Topbar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 26px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 14px; }
.logo {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 12px;
  font-weight: 800; font-size: 22px;
  color: #0b1020;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: var(--shadow);
}
.brand h1 { font-size: 20px; margin: 0; letter-spacing: 0.2px; }
.tag { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.privacy {
  font-size: 12.5px;
  color: var(--accent-2);
  background: rgba(110, 231, 183, 0.08);
  border: 1px solid rgba(110, 231, 183, 0.25);
  padding: 7px 12px;
  border-radius: 999px;
}

/* Layout */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
  padding: 22px 26px;
  max-width: 1280px;
  margin: 0 auto;
  align-items: start;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  min-height: 540px;
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.panel-head h2 { font-size: 15px; margin: 0; }

/* Input */
.meta-row {
  display: flex; gap: 12px; padding: 14px 18px 0;
}
.meta-row label {
  flex: 1; display: flex; flex-direction: column;
  font-size: 12px; color: var(--muted); gap: 6px;
}
.meta-row input,
textarea {
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}
.meta-row input:focus, textarea:focus { border-color: var(--accent); }
textarea {
  margin: 14px 18px 0;
  flex: 1;
  min-height: 300px;
  resize: vertical;
  line-height: 1.6;
}
.input-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; gap: 12px; flex-wrap: wrap;
}
.foot-actions { display: flex; gap: 10px; }
.stat { color: var(--muted); font-size: 13px; }

/* Buttons */
.primary-btn {
  background: linear-gradient(135deg, var(--accent), #7aa2ff);
  color: #0b1020; border: none; font-weight: 700;
  padding: 11px 18px; border-radius: 10px; cursor: pointer;
  font-size: 14px; transition: transform 0.08s, filter 0.15s;
}
.primary-btn.small { padding: 8px 14px; font-size: 13px; }
.primary-btn:hover { filter: brightness(1.07); }
.primary-btn:active { transform: translateY(1px); }
.ghost-btn {
  background: transparent; color: var(--muted);
  border: 1px solid var(--line); border-radius: 10px;
  padding: 8px 14px; cursor: pointer; font-size: 13px;
  transition: color 0.15s, border-color 0.15s;
}
.ghost-btn:hover { color: var(--text); border-color: var(--accent); }

/* How */
.how { margin: 4px 18px 18px; color: var(--muted); font-size: 13px; }
.how summary { cursor: pointer; color: var(--accent); }
.how ul { margin: 10px 0 0; padding-left: 18px; line-height: 1.7; }
.how b { color: var(--text); }

/* Tabs */
.tabs { display: flex; gap: 6px; background: var(--panel-2); padding: 4px; border-radius: 10px; }
.tab {
  background: transparent; border: none; color: var(--muted);
  padding: 7px 12px; border-radius: 7px; cursor: pointer; font-size: 13px;
  font-family: inherit; transition: all 0.15s;
}
.tab.active { background: var(--accent); color: #0b1020; font-weight: 700; }

.output-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.view-hint { font-size: 12.5px; color: var(--muted); }

/* Report */
.report {
  padding: 20px 22px; flex: 1; overflow: auto;
  line-height: 1.75; font-size: 14.5px;
  white-space: normal;
}
.report h3 {
  font-size: 16px; margin: 22px 0 10px;
  padding-bottom: 6px; border-bottom: 1px solid var(--line);
}
.report h3:first-child { margin-top: 0; }
.report .rtitle { font-size: 18px; font-weight: 800; margin: 0 0 4px; }
.report .rsub { color: var(--muted); font-size: 13px; margin: 0 0 8px; }
.report ul { margin: 6px 0; padding-left: 20px; }
.report li { margin: 5px 0; }
.report .metric { color: var(--accent-2); font-weight: 700; }
.report .pill {
  display: inline-block; font-size: 11px; padding: 1px 8px; border-radius: 999px;
  margin-left: 6px; vertical-align: middle;
}
.pill.done { background: rgba(110,231,183,.12); color: var(--accent-2); }
.pill.doing { background: rgba(91,140,255,.14); color: #9ab6ff; }
.pill.plan { background: rgba(244,184,96,.12); color: var(--warn); }
.pill.risk { background: rgba(244,113,116,.14); color: var(--danger); }
.report .tip { color: var(--muted); font-style: italic; }
.report .empty {
  height: 100%; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  color: var(--muted); gap: 6px;
}
.empty-emoji { font-size: 40px; }
.muted { color: var(--muted); font-size: 13px; }

/* Footer */
.sitefoot {
  text-align: center; color: var(--muted); font-size: 12.5px;
  padding: 26px 20px 40px;
}

/* Toast */
.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--accent-2); color: #07140d; font-weight: 700;
  padding: 10px 18px; border-radius: 10px; opacity: 0; pointer-events: none;
  transition: all 0.25s; box-shadow: var(--shadow); font-size: 13.5px;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 880px) {
  .layout { grid-template-columns: 1fr; padding: 16px; }
  .panel { min-height: auto; }
  textarea { min-height: 200px; }
  .topbar { padding: 14px 16px; }
}
