/* Roadmap Groomer — Dark theme, accessible */
:root {
  --bg: #0f1218;
  --panel: #151a22;
  --muted: #9aa6b2;
  --text: #e6eef6;
  --border: #233042;
  --accent: #3ea0ff;
  --accent-2: #6bc1ff;
  --error: #ff5a7a;
  --warn: #ffb454;
  --info: #58d3ff;
  --radius: 12px;
  --shadow: 0 10px 30px rgba(0,0,0,0.35);
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  background: linear-gradient(180deg, #0c1016, #0f1218);
  color: var(--text);
}

.app-header { display:flex; align-items:center; justify-content:space-between; padding: 14px 18px; border-bottom: 1px solid var(--border); background: rgba(10,14,20,0.7); backdrop-filter: blur(6px); position: sticky; top: 0; z-index: 20; }
.brand { display:flex; gap:10px; align-items:center; font-weight:700; letter-spacing:.2px; }
.brand img { display:block; }
.app-title { font-size: 16px; }
.header-actions .link { color: var(--muted); text-decoration: none; font-size: 14px; }
.header-actions .link:hover { color: var(--text); }

.container { max-width: 1100px; margin: 24px auto; padding: 0 16px; display: grid; gap: 18px; }
.panel { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.panel.muted { color: var(--muted); }
.panel h2 { margin: 0 0 12px 0; font-size: 18px; }

.form .field { margin-bottom: 12px; }
.form .field-grid { display: grid; gap: 12px; grid-template-columns: repeat(3, 1fr); }
@media (max-width: 800px) { .form .field-grid { grid-template-columns: 1fr; } }
.form .field-row { display:flex; gap: 16px; align-items:center; margin: 10px 0; flex-wrap: wrap; }
label { display:block; font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.req { color: var(--error); margin-left: 4px; }
input[type="text"], input[type="url"], input[type="number"], select, textarea, input[type="file"] {
  width: 100%; background: #0c1118; color: var(--text); border: 1px solid #243247; border-radius: 10px; padding: 10px 12px; outline: none; transition: border-color .15s ease;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(62,160,255,0.15); }

.checkbox { display:flex; align-items:center; gap: 10px; font-size: 14px; color: var(--text); }

.actions { display:flex; gap: 10px; align-items:center; flex-wrap: wrap; margin-top: 8px; }
.btn { background: linear-gradient(180deg, var(--accent), var(--accent-2)); color: #001020; border: none; padding: 10px 14px; border-radius: 10px; font-weight: 700; cursor: pointer; box-shadow: 0 6px 18px rgba(62,160,255,0.35); }
.btn:hover { filter: brightness(1.05); }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--border); box-shadow: none; }
.btn.ghost:hover { border-color: var(--accent); color: var(--accent); }

.alert { padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); }
.alert.info { background: rgba(88,211,255,0.08); border-color: #2a5561; }
.alert.warn { background: rgba(255,180,84,0.08); border-color: #5e4a2b; }
.alert.error { background: rgba(255,90,122,0.08); border-color: #6b2d3a; }

.results { display: grid; gap: 18px; }
.matrix { display: grid; grid-template-columns: 160px 1fr 1fr; gap: 8px; border: 1px dashed var(--border); border-radius: 10px; padding: 10px; }
.matrix-header { display: contents; }
.matrix-header span { font-size: 12px; color: var(--muted); text-align: center; }
.matrix-row { display: contents; }
.axis { display:flex; align-items:center; justify-content:center; font-size: 12px; color: var(--muted); }
.cell { background: #0e151e; border: 1px solid #1d2a3b; border-radius: 8px; padding: 10px; min-height: 90px; }
.cell h3 { margin: 0 0 6px; font-size: 14px; color: var(--text); }
.cell ul { margin: 0; padding-left: 16px; }
.cell li { margin: 4px 0; }
.tag { display:inline-block; font-size: 11px; padding: 2px 6px; border-radius: 999px; background: #162233; color: var(--muted); margin-right: 6px; border: 1px solid #203047; }
.tag-moscow-must { background: #102b1d; color: #64ffb4; border-color: #1c3f2b; }
.tag-moscow-should { background: #162433; color: #79c7ff; border-color: #203449; }
.tag-moscow-could { background: #231a33; color: #c29dff; border-color: #352a49; }
.tag-moscow-wont { background: #2a1a1a; color: #ff7f7f; border-color: #3d2929; }

.summary { display: grid; grid-template-columns: 1fr 2fr; gap: 14px; }
@media (max-width: 900px) { .summary { grid-template-columns: 1fr; } }
.counts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.count { background:#0e151e; border:1px solid #1d2a3b; border-radius: 8px; padding: 12px; text-align: center; }
.count .label { display:block; color: var(--muted); font-size:12px; }
.count .value { font-size:18px; font-weight:800; }

.details .table { display: grid; gap: 0; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.details .t-head, .details .t-row { display: grid; grid-template-columns: 3fr 0.7fr 0.7fr 1.2fr 1fr 3fr; gap: 0; }
.details .t-head { background: #0e151e; color: var(--muted); font-size: 12px; border-bottom: 1px solid var(--border); }
.details .t-head span { padding: 10px; border-right: 1px solid var(--border); }
.details .t-row span { padding: 10px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.details .t-row:nth-child(odd) { background: #0c131b; }
.details .t-row:last-child span { border-bottom: none; }
.details .t-row span:last-child, .details .t-head span:last-child { border-right: none; }

.json-out pre { background: #0c1118; border: 1px solid #1d2a3b; border-radius: 8px; padding: 12px; white-space: pre-wrap; overflow: auto; }

.history { list-style: none; margin: 0; padding: 0; }
.history li { display:flex; justify-content: space-between; border-bottom: 1px dashed var(--border); padding: 8px 4px; }
.history li .when { color: var(--muted); font-size: 12px; }
.history li .meta { color: var(--text); font-weight: 600; font-size: 12px; }

.app-footer { text-align: center; padding: 24px; color: var(--muted); font-size: 12px; }
