:root {
  --bg: #0f1115;
  --panel: #181b22;
  --border: #262a33;
  --text: #e7e9ee;
  --muted: #8b93a7;
  --accent: #6ea8fe;
  --low: #4ade80;
  --medium: #facc15;
  --high: #fb923c;
  --critical: #f87171;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

header.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
}
header.topbar h1 { margin: 0; font-size: 18px; }

.container { max-width: 1100px; margin: 0 auto; padding: 24px; }

.btn {
  display: inline-block;
  padding: 8px 14px;
  background: var(--accent);
  color: #0b0d12;
  border: 0;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  font-size: 14px;
}
.btn.secondary { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn:hover { opacity: 0.9; }

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px;
  margin-bottom: 14px;
}

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.badge.draft    { background: #2a2e37; color: var(--muted); }
.badge.active   { background: #1d3a5b; color: var(--accent); }
.badge.complete { background: #14422a; color: var(--low); }

.risk-pill { padding: 4px 10px; border-radius: 999px; font-weight: 700; font-size: 12px; }
.risk-pill.low      { background: #14422a; color: var(--low); }
.risk-pill.medium   { background: #4a3c0c; color: var(--medium); }
.risk-pill.high     { background: #4a2a0c; color: var(--high); }
.risk-pill.critical { background: #4a1a1a; color: var(--critical); }

.logo-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.logo-pair img { max-width: 100%; max-height: 280px; background: #fff; padding: 10px; border-radius: 8px; }

table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 8px; text-align: left; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; }

input[type="text"], input[type="number"], input[type="file"], select, textarea {
  background: #11141b;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 14px;
  width: 100%;
}

label { display: block; font-size: 13px; color: var(--muted); margin: 6px 0 4px; }

.dropzone {
  border: 2px dashed var(--border);
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  color: var(--muted);
  cursor: pointer;
}
.dropzone.over { border-color: var(--accent); color: var(--accent); }

.tachi-stage {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 420px;
  background: #888; border-radius: 8px;
}
.tachi-stage.flash { background: #fff; }
.tachi-stage.fix::after { content: '+'; font-size: 80px; color: #000; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.tabs a {
  padding: 10px 14px; border-radius: 6px 6px 0 0; color: var(--muted);
}
.tabs a.active { color: var(--text); background: var(--panel); border: 1px solid var(--border); border-bottom-color: var(--panel); }

.score-meter {
  height: 22px; background: linear-gradient(to right, var(--low), var(--medium), var(--high), var(--critical));
  border-radius: 11px; position: relative;
}
.score-meter .marker {
  position: absolute; top: -4px; width: 4px; height: 30px; background: var(--text);
}

.persona-card { border-left: 3px solid var(--accent); padding: 12px 14px; }
.persona-card .quote { color: var(--muted); font-style: italic; margin-top: 6px; }
.bar { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; margin: 4px 0; }
.bar > span { display: block; height: 100%; background: var(--accent); }

.type-badge {
  display: inline-block; padding: 2px 8px; border-radius: 4px;
  background: #374151; color: #f3f4f6; font-size: 11px; font-weight: 500;
}
.color-swatch {
  display: inline-block; width: 28px; height: 28px; border-radius: 4px;
  border: 1px solid var(--border); vertical-align: middle; margin-right: 4px;
}
.filter-bar { display: flex; gap: 8px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.filter-bar select, .filter-bar input { padding: 6px 10px; }
