:root {
  --bg: #0f1320;
  --card: #181d2e;
  --line: #2a3146;
  --fg: #e8ecf5;
  --muted: #9aa3bd;
  --accent: #5b8cff;
  --accent2: #3fcf8e;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
header { padding: 32px 20px 8px; text-align: center; }
h1 { margin: 0; font-size: 26px; }
.sub { color: var(--muted); margin: 6px 0 0; }
.tabs {
  display: flex; gap: 4px; justify-content: center; flex-wrap: wrap;
  padding: 16px 12px; max-width: 760px; margin: 0 auto;
}
.tab {
  background: transparent; color: var(--muted); border: 1px solid transparent;
  padding: 8px 16px; border-radius: 999px; cursor: pointer; font-size: 14px;
}
.tab.active { background: var(--card); color: var(--fg); border-color: var(--line); }
main { max-width: 760px; margin: 0 auto; padding: 0 16px 60px; }
.panel { display: none; background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 22px; }
.panel.active { display: block; }
h2 { margin-top: 0; font-size: 19px; }
h3 { margin: 22px 0 8px; font-size: 15px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
label { display: block; margin: 12px 0; }
input[type=text], input[type=password], textarea {
  width: 100%; margin-top: 6px; padding: 10px 12px; border-radius: 9px;
  border: 1px solid var(--line); background: #10141f; color: var(--fg); font: inherit;
}
input[type=file] { display: block; margin: 10px 0; color: var(--muted); }
button {
  background: var(--accent); color: #fff; border: 0; padding: 10px 18px;
  border-radius: 9px; cursor: pointer; font: inherit; font-weight: 600;
}
button:hover { filter: brightness(1.08); }
button.ghost { background: transparent; color: var(--accent); border: 1px solid var(--line); }
button:disabled { opacity: .5; cursor: default; }
.muted { color: var(--muted); }
.msg { min-height: 20px; margin: 12px 0 0; }
.msg.ok { color: var(--accent2); }
.msg.err { color: #ff7a7a; }
.hidden { display: none !important; }
.filelist { list-style: none; padding: 0; margin: 14px 0; }
.filelist li {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; margin-bottom: 8px;
}
.filelist .meta { color: var(--muted); font-size: 13px; }
.links a { display: inline-block; margin: 4px 8px 4px 0; color: var(--accent); }
.progress { height: 8px; background: #10141f; border-radius: 999px; margin: 12px 0; overflow: hidden; }
.progress > div { height: 100%; width: 0; background: var(--accent2); transition: width .15s; }
code { background: #10141f; padding: 1px 5px; border-radius: 5px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
button.danger { background: #3a1d28; color: #ff9aa9; border: 1px solid #5a2a38; }
button.danger:hover { background: #4a2230; }
a.btnlink { background: var(--accent); color: #fff; text-decoration: none;
  padding: 9px 16px; border-radius: 9px; font-weight: 600; font-size: 14px; white-space: nowrap; }
a.btnlink:hover { filter: brightness(1.08); }
.prompt-card { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px;
  margin-bottom: 10px; background: #10141f; }
.prompt-card pre { margin: 0 0 10px; white-space: pre-wrap; word-break: break-word; font: inherit; }
.row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
button.danger { background: #3a1d28; color: #ff9aa9; border: 1px solid #5a2a38; }
button.danger:hover { background: #4a2230; }
a.btnlink { background: var(--accent); color: #fff; text-decoration: none;
  padding: 9px 16px; border-radius: 9px; font-weight: 600; font-size: 14px; white-space: nowrap; }
a.btnlink:hover { filter: brightness(1.08); }
.prompt-card { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px;
  margin-bottom: 10px; background: #10141f; }
.prompt-card pre { margin: 0 0 10px; white-space: pre-wrap; word-break: break-word; font: inherit; }

