:root {
    color-scheme: dark;
    --bg: #05070b;
    --panel: #0d1118;
    --panel-2: #121821;
    --line: rgba(148, 163, 184, 0.22);
    --line-strong: rgba(148, 163, 184, 0.34);
    --text: #e5eef8;
    --muted: #8fa0b4;
    --soft: #c6d3e1;
    --cyan: #67e8f9;
    --green: #6ee7b7;
    --yellow: #fbbf24;
    --orange: #fb923c;
    --blue: #93c5fd;
    --radius: 8px;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif; }
button, input, select { font: inherit; }
.app-header { position: sticky; top: 0; z-index: 20; min-height: 68px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 12px 22px; border-bottom: 1px solid var(--line); background: rgba(5, 7, 11, 0.94); backdrop-filter: blur(12px); }
.back-link { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 7px; color: var(--soft); text-decoration: none; font-size: 13px; font-weight: 650; }
.back-link:hover { color: #fff; border-color: var(--line-strong); background: rgba(255,255,255,0.04); }
.title-block { min-width: 0; }
.eyebrow, .summary-label { display: block; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
h1 { margin: 2px 0 0; font-size: 24px; line-height: 1.1; letter-spacing: 0; }
.header-stats { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.stat-pill, .chip, .tag, .status-pill { display: inline-flex; align-items: center; gap: 6px; min-height: 26px; border: 1px solid var(--line); border-radius: 999px; padding: 0 9px; color: var(--soft); background: rgba(255,255,255,0.035); font-size: 12px; font-weight: 650; white-space: nowrap; }
.stat-pill strong { color: #fff; }
.page-shell { width: min(1680px, 100%); margin: 0 auto; padding: 18px 22px 30px; }
.summary-band { display: grid; grid-template-columns: minmax(180px, 0.65fr) minmax(260px, 1.2fr) minmax(160px, 0.5fr); gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--line); }
.summary-band > div { min-width: 0; padding: 14px 16px; background: linear-gradient(180deg, rgba(18,24,33,0.96), rgba(13,17,24,0.96)); }
.summary-band strong { display: block; margin-top: 5px; color: #f8fafc; font-size: 14px; overflow-wrap: anywhere; }
.controls { margin-top: 16px; display: grid; grid-template-columns: minmax(260px, 1fr) auto; gap: 12px; align-items: start; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(13,17,24,0.86); }
.search-wrap { display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 7px; background: #070a10; color: var(--muted); }
.search-wrap input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); }
.search-wrap input::placeholder { color: #69768a; }
.sort-wrap { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding-left: 10px; border: 1px solid var(--line); border-radius: 7px; background: #070a10; color: var(--muted); font-size: 12px; font-weight: 700; }
.sort-wrap select { height: 36px; min-width: 130px; border: 0; border-left: 1px solid var(--line); padding: 0 30px 0 10px; background: transparent; color: var(--text); outline: 0; }
.filter-set { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.chip { cursor: pointer; border-radius: 7px; background: rgba(18,24,33,0.8); }
.chip:hover { border-color: var(--line-strong); color: #fff; }
.chip.active { color: #071014; border-color: rgba(103,232,249,0.8); background: var(--cyan); }
.inventory-layout { display: grid; grid-template-columns: minmax(340px, 430px) minmax(0, 1fr); gap: 16px; margin-top: 16px; align-items: start; }
.list-panel, .detail-panel { border: 1px solid var(--line); border-radius: var(--radius); background: rgba(13,17,24,0.92); }
.list-panel { min-width: 0; overflow: hidden; }
.list-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 46px; padding: 0 12px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px; font-weight: 700; }
.list-heading button, .copy-path { min-height: 28px; padding: 0 9px; border: 1px solid var(--line); border-radius: 6px; background: rgba(255,255,255,0.04); color: var(--soft); cursor: pointer; font-size: 12px; font-weight: 700; }
.list-heading button:hover, .copy-path:hover { color: #fff; border-color: var(--line-strong); background: rgba(255,255,255,0.08); }
.automation-list { display: grid; gap: 1px; background: rgba(148,163,184,0.12); }
.automation-card { width: 100%; min-width: 0; display: grid; gap: 8px; padding: 13px 14px; border: 0; border-left: 3px solid transparent; background: var(--panel); color: inherit; text-align: left; cursor: pointer; }
.automation-card:hover, .automation-card.active { background: var(--panel-2); }
.automation-card.active { border-left-color: var(--cyan); }
.card-top { display: flex; gap: 8px; align-items: start; justify-content: space-between; }
.card-title { min-width: 0; font-size: 14px; line-height: 1.25; font-weight: 750; color: #f8fafc; }
.card-meta { color: var(--muted); font-size: 12px; line-height: 1.4; }
.card-purpose { color: #b7c6d8; font-size: 12px; line-height: 1.45; }
.status-pill { min-height: 23px; flex: 0 0 auto; padding: 0 8px; border-radius: 6px; font-size: 11px; }
.status-active, .status-monitored { color: var(--green); border-color: rgba(110,231,183,0.32); background: rgba(16,185,129,0.09); }
.status-delegated, .status-topology { color: var(--blue); border-color: rgba(147,197,253,0.32); background: rgba(59,130,246,0.09); }
.status-watch { color: var(--yellow); border-color: rgba(251,191,36,0.32); background: rgba(245,158,11,0.1); }
.status-disabled, .status-retired { color: #fca5a5; border-color: rgba(248,113,113,0.32); background: rgba(239,68,68,0.09); }
.status-verify { color: var(--orange); border-color: rgba(251,146,60,0.34); background: rgba(249,115,22,0.1); }
.detail-panel { position: sticky; top: 86px; min-height: 560px; padding: 18px; }
.detail-header { display: flex; gap: 16px; align-items: start; justify-content: space-between; border-bottom: 1px solid var(--line); padding-bottom: 16px; }
.detail-title { margin: 0; font-size: 24px; line-height: 1.15; }
.detail-meta-grid { display: grid; grid-template-columns: repeat(4, minmax(120px, 1fr)); gap: 1px; margin: 16px 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--line); }
.detail-meta-grid > div { min-width: 0; padding: 12px; background: rgba(18,24,33,0.96); }
.detail-meta-grid span { display: block; color: var(--muted); font-size: 11px; font-weight: 750; text-transform: uppercase; letter-spacing: 0.06em; }
.detail-meta-grid strong { display: block; margin-top: 5px; color: #f8fafc; font-size: 13px; line-height: 1.35; overflow-wrap: anywhere; }
.section-title { margin: 18px 0 8px; color: #f8fafc; font-size: 13px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.detail-purpose { margin: 0; color: #c8d5e4; font-size: 14px; line-height: 1.55; }
.tag-row { display: flex; flex-wrap: wrap; gap: 7px; }
.tag { min-height: 24px; border-radius: 6px; color: #b9c8d9; font-size: 11px; }
.file-list, .signal-list { display: grid; gap: 8px; }
.file-row, .signal-row { display: grid; grid-template-columns: minmax(110px, 0.32fr) minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 11px; border: 1px solid rgba(148,163,184,0.16); border-radius: 7px; background: rgba(255,255,255,0.025); }
.signal-row { grid-template-columns: minmax(0, 1fr); color: #9caec2; font-size: 12px; line-height: 1.4; }
.file-role { color: var(--muted); font-size: 12px; font-weight: 750; }
.file-path { min-width: 0; color: #e2e8f0; font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: 12px; line-height: 1.35; overflow-wrap: anywhere; }
.file-detail { grid-column: 2 / 4; margin-top: -4px; color: #9caec2; font-size: 12px; line-height: 1.4; }
.copy-path.copied { color: #06110d; border-color: rgba(110,231,183,0.8); background: var(--green); }
.empty-state { padding: 28px 18px; color: var(--muted); font-size: 13px; }
@media (max-width: 1180px) { .app-header { grid-template-columns: auto minmax(0, 1fr); } .header-stats { grid-column: 1 / -1; justify-content: flex-start; } .inventory-layout { grid-template-columns: 1fr; } .detail-panel { position: static; min-height: 0; } }
@media (max-width: 780px) { .app-header { padding: 10px 12px; gap: 10px; } .back-link span { display: none; } h1, .detail-title { font-size: 20px; } .page-shell { padding: 12px; } .summary-band, .controls, .detail-meta-grid { grid-template-columns: 1fr; } .sort-wrap, .sort-wrap select { width: 100%; } .file-row { grid-template-columns: 1fr auto; } .file-role, .file-path, .file-detail { grid-column: 1 / 2; } .copy-path { grid-column: 2 / 3; grid-row: 1 / 3; } }
