:root {
    --map-bg: #eef3f6;
    --map-surface: #ffffff;
    --map-text: #17313a;
    --map-muted: #69818a;
    --map-border: #dbe5ea;
    --map-accent: #0d6677;
    --map-ok: #0b8a4b;
    --map-warn: #b7791f;
    --map-bad: #bf2f45;
}
* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: Inter, Arial, sans-serif;
    color: var(--map-text);
    background: linear-gradient(180deg, #f8fbfc 0%, var(--map-bg) 100%);
}
.map-shell {
    max-width: 1480px;
    margin: 0 auto;
    padding: 28px;
}
.map-header,
.map-panel {
    background: var(--map-surface);
    border: 1px solid var(--map-border);
    border-radius: 22px;
    box-shadow: 0 10px 26px rgba(10, 39, 48, 0.06);
}
.map-header {
    padding: 28px;
    margin-bottom: 18px;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
}
.map-header h1 { margin: 0; font-size: 36px; }
.map-header p { margin: 8px 0 0; color: var(--map-muted); max-width: 720px; }
.map-badge {
    border: 1px solid var(--map-border);
    background: #f2fafb;
    color: var(--map-accent);
    border-radius: 999px;
    padding: 10px 14px;
    font-size: 12px;
    font-weight: 700;
}
.map-panel { padding: 22px; }
.map-panel h2 { margin: 0 0 16px; font-size: 20px; }
.map-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 18px;
    margin-top: 18px;
}
.rule-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}
.rule-card,
.page-card {
    border: 1px solid var(--map-border);
    border-radius: 16px;
    padding: 16px;
    background: #fbfdfe;
}
.rule-card { display: flex; flex-direction: column; gap: 8px; }
.rule-card strong { font-size: 14px; }
.rule-card span { color: var(--map-muted); font-size: 13px; }
.tree-view {
    margin: 0;
    padding: 16px;
    border-radius: 16px;
    border: 1px solid var(--map-border);
    background: #0f2026;
    color: #dbe8ed;
    font: 13px/1.45 "SFMono-Regular", Consolas, monospace;
    overflow: auto;
    min-height: 420px;
}
.page-list { display: grid; gap: 12px; }
.page-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-bottom: 10px;
}
.page-card ul,
.plain-list { margin: 0; padding-left: 18px; }
.page-card li,
.plain-list li { color: var(--map-muted); line-height: 1.5; }
.status {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 11px;
    font-weight: 700;
}
.status-ok { background: #e8f8ef; color: var(--map-ok); }
.status-partial { background: #fff5e5; color: var(--map-warn); }
.status-missing { background: #ffe8ed; color: var(--map-bad); }
@media (max-width: 1100px) {
    .map-grid,
    .rule-grid { grid-template-columns: 1fr; }
}

.file-link { color: var(--map-accent); font-weight: 700; text-decoration: none; }
.file-link:hover { text-decoration: underline; }

.tag-row { display:flex; flex-wrap:wrap; gap:8px; }
.tag { display:inline-flex; align-items:center; border-radius:999px; padding:4px 10px; font-size:11px; font-weight:800; letter-spacing:.02em; margin-left:6px; }
.tag-old { background:#eef2ff; color:#4338ca; }
.tag-active { background:#e8f8ef; color:#0b8a4b; }
.tag-new { background:#e0f7fa; color:#0d6677; }
.tag-target { background:#fff5e5; color:#b7791f; }
.tag-backup { background:#ffe8ed; color:#bf2f45; }
.legacy-list { max-height: 420px; overflow:auto; }

.tab-row { display:flex; gap:10px; }
.tab-link { text-decoration:none; border:1px solid var(--map-border); color:var(--map-accent); background:#f2fafb; border-radius:999px; padding:10px 14px; font-size:12px; font-weight:700; }
.tab-link.is-active { background:var(--map-accent); color:#fff; border-color:var(--map-accent); }
.single-col { grid-template-columns: 1fr; }
.bug-form { display:grid; gap:12px; }
.bug-form input, .bug-form textarea { width:100%; border:1px solid var(--map-border); border-radius:14px; padding:14px; font:14px/1.5 Inter,Arial,sans-serif; }
.bug-form textarea { min-height:120px; }
.bug-form button { width:max-content; border:none; background:var(--map-accent); color:#fff; border-radius:999px; padding:12px 18px; font-weight:700; cursor:pointer; }
.bug-list { display:grid; gap:12px; }
.bug-card { border:1px solid var(--map-border); border-radius:16px; padding:16px; background:#fbfdfe; }
.bug-card strong { display:block; margin-bottom:8px; }
.bug-card p { margin:0; color:var(--map-muted); line-height:1.5; }
.task-snippet { margin-top:6px; color:var(--map-accent); font-size:12px; line-height:1.4; }

.bug-images { display:grid; grid-template-columns:repeat(auto-fill,minmax(160px,1fr)); gap:10px; margin-top:14px; }
.bug-images a { display:block; }
.bug-images img { width:100%; display:block; border-radius:12px; border:1px solid var(--map-border); background:#f8fbfc; }

.file-code { display:inline-flex; align-items:center; border-radius:999px; padding:4px 10px; background:#0f2026; color:#dbe8ed; font-size:11px; font-weight:800; letter-spacing:.04em; margin-left:6px; }

.target-note { margin-top:6px; color:var(--map-muted); font-size:12px; line-height:1.45; }

.report-head { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:8px; }
.status-chip { display:inline-flex; align-items:center; border-radius:999px; padding:5px 10px; font-size:11px; font-weight:800; }
.status-open { background:#e8f1ff; color:#2457c5; }
.status-in-progress { background:#fff5e5; color:#b7791f; }
.status-done { background:#e8f8ef; color:#0b8a4b; }
.status-form { display:flex; flex-wrap:wrap; gap:8px; margin-top:12px; }
.status-form button { border:1px solid var(--map-border); background:#fff; color:var(--map-text); border-radius:999px; padding:8px 12px; font-size:12px; font-weight:700; cursor:pointer; }
.status-form button:hover { background:#f2fafb; color:var(--map-accent); }

.filter-row { display:flex; gap:10px; flex-wrap:wrap; margin-bottom:16px; }
.filter-chip { display:inline-flex; align-items:center; gap:8px; text-decoration:none; border:1px solid var(--map-border); color:var(--map-accent); background:#f2fafb; border-radius:999px; padding:10px 14px; font-size:12px; font-weight:700; }
.filter-chip span { display:inline-flex; align-items:center; justify-content:center; min-width:22px; height:22px; border-radius:999px; background:#fff; color:var(--map-text); font-size:11px; padding:0 6px; }
.filter-chip.is-active { background:var(--map-accent); color:#fff; border-color:var(--map-accent); }
.filter-chip.is-active span { background:rgba(255,255,255,.18); color:#fff; }
