
:root{
  --navy:#173556;
  --navy-2:#2A5FA4;
  --blue:#2F6FE6;
  --blue-soft:#EAF2FF;
  --bg:#F4F7FC;
  --card:#FFFFFF;
  --text:#17253A;
  --muted:#6C7990;
  --line:#D9E2EE;
  --green:#1FA66E;
  --green-soft:#EAF8F2;
  --orange:#D98D18;
  --orange-soft:#FFF5E7;
  --purple:#6E62E8;
  --purple-soft:#F0EDFF;
  --red:#E05B5B;
  --red-soft:#FFECEC;
  --shadow:0 10px 24px rgba(12,24,48,.08);
  --sidebar-w:152px;
  --screen-w:920px;
  --screen-h:620px;
}
*{box-sizing:border-box}
html,body{margin:0;padding:0;background:#fff;color:var(--text);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
body{padding:20px}
.page-shell{
  width:min(1980px,calc(100% - 20px));
  margin:0 auto;
  background:#f7faff;
  border-radius:36px;
  padding:28px 28px 44px;
}
.page-header h1{margin:0 0 14px;font-size:40px;line-height:1.04;font-weight:800}
.page-header p{margin:0;max-width:1280px;font-size:18px;line-height:1.45;color:var(--muted)}
.accent-bars{display:flex;gap:12px;margin:22px 0 24px}
.accent-bars span:first-child{width:190px;height:12px;border-radius:999px;background:var(--blue)}
.accent-bars span:last-child{width:78px;height:12px;border-radius:999px;background:#F1BF4A}

.screen-picker{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:20px}
.picker{
  border:2px solid var(--line);
  background:#fff;
  color:var(--text);
  min-height:42px;
  padding:0 14px;
  border-radius:999px;
  font-weight:700;
  font-size:14px;
}
.picker.active{
  background:var(--navy);
  color:#fff;
  border-color:var(--navy);
}

.screen{display:none}
.screen.screen-active{display:block}
.screen-block h2{margin:0 0 12px;font-size:18px;line-height:1.2;font-weight:800}

.window{
  width:var(--screen-w);
  min-width:var(--screen-w);
  height:var(--screen-h);
  background:#f7faff;
  border:2px solid #d7e0ec;
  border-radius:28px;
  box-shadow:0 18px 40px rgba(10,22,40,.12);
  overflow:hidden;
  position:relative;
}
.window-top{
  height:46px;
  border-bottom:2px solid #d7e0ec;
  background:#eef4fb;
  display:flex;
  align-items:center;
  padding:0 18px;
  gap:14px;
}
.traffic{display:flex;gap:8px}
.traffic span{width:12px;height:12px;border-radius:50%}
.traffic span:nth-child(1){background:#ff5f57}
.traffic span:nth-child(2){background:#ffbd2e}
.traffic span:nth-child(3){background:#28c840}
.window-pill{margin-left:auto;width:140px;height:18px;border-radius:999px;background:#dfe8f5}

.app{
  height:calc(var(--screen-h) - 46px);
  background:linear-gradient(180deg,#eef5ff 0%,#f8fbff 100%);
  display:grid;
  grid-template-columns:var(--sidebar-w) 1fr;
  gap:18px;
  padding:18px;
}
.sidebar{
  background:var(--navy);
  border-radius:24px;
  color:#fff;
  padding:20px 14px;
  display:flex;
  flex-direction:column;
  min-width:0;
}
.brand{font-size:24px;font-weight:800;line-height:1;margin-bottom:24px;letter-spacing:-.01em}
.nav{display:grid;gap:8px}
.nav-btn{
  display:flex;
  align-items:center;
  gap:12px;
  min-height:46px;
  padding:10px 14px;
  border-radius:16px;
  color:#c8d9f5;
  font-size:14px;
  line-height:1.2;
  white-space:nowrap;
}
.nav-btn img{
  width:22px;height:22px;
  filter:brightness(0) invert(1);
  opacity:.95;
}
.nav-btn.active{
  background:var(--blue);
  color:#fff;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.06);
}

.main{min-width:0;display:grid;gap:16px;align-content:start}
.topbar{
  background:var(--card);
  border:2px solid var(--line);
  border-radius:20px;
  box-shadow:var(--shadow);
  min-height:58px;
  padding:12px 18px;
  display:flex;
  align-items:center;
  gap:14px;
  flex-wrap:wrap;
}
.topbar h3{margin:0;font-size:20px;line-height:1.2;font-weight:800}
.topbar .chip-strong{margin-right:auto}
.quick-search{
  min-width:188px;
  height:40px;
  border:2px solid var(--line);
  border-radius:18px;
  display:flex;
  align-items:center;
  gap:10px;
  padding:0 12px;
  background:#fff;
  color:var(--muted);
  font-size:12px;
}
.quick-search img{width:18px;height:18px;opacity:.7}

.search-hero{
  background:var(--card);
  border:2px solid var(--line);
  border-radius:22px;
  box-shadow:var(--shadow);
  min-height:74px;
  padding:14px;
  display:grid;
  grid-template-columns:44px 1fr auto;
  gap:14px;
  align-items:center;
}
.search-copy{min-width:0}
.search-copy strong,
.search-copy div{
  display:block;
  font-size:14px;
  line-height:1.25;
  color:var(--text);
  font-weight:700;
  overflow-wrap:anywhere;
}
.search-copy .muted-line{
  color:var(--muted);
  font-weight:400;
}
.search-copy small{
  display:block;
  margin-top:4px;
  color:var(--muted);
  font-size:12px;
  line-height:1.25;
  overflow-wrap:anywhere;
}

.btn{
  border:none;
  background:var(--blue);
  color:#fff;
  min-width:92px;
  height:42px;
  border-radius:18px;
  font-size:12px;
  font-weight:700;
  padding:0 16px;
  white-space:nowrap;
}

.icon-circle{
  width:40px;height:40px;border-radius:50%;
  display:grid;place-items:center;
  background:var(--blue-soft);
  flex:0 0 auto;
}
.icon-circle img{width:22px;height:22px}
.soft-blue{background:var(--blue-soft)}
.soft-green{background:var(--green-soft)}
.soft-orange{background:var(--orange-soft)}
.soft-purple{background:var(--purple-soft)}
.soft-red{background:var(--red-soft)}

.chip{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:24px;
  padding:0 10px;
  border-radius:999px;
  background:var(--blue-soft);
  color:var(--blue);
  font-size:11px;
  line-height:1;
  white-space:nowrap;
}
.chip-strong{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:26px;
  padding:0 12px;
  border-radius:999px;
  background:var(--navy);
  color:#fff;
  font-size:11px;
  line-height:1;
  white-space:nowrap;
}
.chip-green{background:var(--green);color:#fff;display:inline-flex;align-items:center;justify-content:center;min-height:24px;padding:0 10px;border-radius:999px;font-size:11px;line-height:1;white-space:nowrap}
.chip-orange{background:var(--orange);color:#fff;display:inline-flex;align-items:center;justify-content:center;min-height:24px;padding:0 10px;border-radius:999px;font-size:11px;line-height:1;white-space:nowrap}
.chip-purple{background:var(--purple);color:#fff;display:inline-flex;align-items:center;justify-content:center;min-height:24px;padding:0 10px;border-radius:999px;font-size:11px;line-height:1;white-space:nowrap}

.kpi-row{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
}
.kpi{
  background:var(--card);
  border:2px solid var(--line);
  border-radius:18px;
  box-shadow:var(--shadow);
  min-height:84px;
  padding:14px;
  display:flex;
  gap:12px;
  align-items:center;
  min-width:0;
}
.kpi-meta{min-width:0}
.kpi-meta small{display:block;color:var(--muted);font-size:12px;line-height:1.2}
.kpi-meta strong{display:block;margin-top:4px;font-size:24px;line-height:1;font-weight:800}

.two-col{display:grid;grid-template-columns:290px 1fr;gap:16px;min-width:0}
.three-col{display:grid;grid-template-columns:150px 248px 1fr;gap:16px;min-width:0}
.folder-grid{grid-template-columns:180px 1fr}

.panel{
  background:var(--card);
  border:2px solid var(--line);
  border-radius:20px;
  box-shadow:var(--shadow);
  padding:18px;
  min-width:0;
  overflow:hidden;
}
.panel h4{margin:0 0 14px;font-size:18px;line-height:1.15;font-weight:800}
.panel p{margin:0;color:var(--muted);font-size:12px;line-height:1.4;overflow-wrap:anywhere}

.module-list,.action-list,.type-list,.result-list,.timeline,.stack{
  display:grid;
  gap:12px;
  min-width:0;
}
.module-item,.action-item,.type-item{
  display:flex;
  align-items:center;
  gap:12px;
  min-height:40px;
  font-size:14px;
  line-height:1.2;
  min-width:0;
}

.result-card{
  background:#fff;
  border:2px solid var(--line);
  border-radius:18px;
  box-shadow:var(--shadow);
  min-height:88px;
  padding:12px 14px;
  display:grid;
  grid-template-columns:44px 1fr;
  gap:12px;
  align-items:start;
  min-width:0;
}
.result-card.active{background:#f7fbff}
.result-copy{min-width:0}
.result-copy strong{
  display:block;
  font-size:15px;
  line-height:1.2;
  margin-bottom:4px;
  overflow-wrap:anywhere;
}
.result-copy small{
  display:block;
  font-size:12px;
  line-height:1.25;
  color:var(--muted);
  margin-bottom:10px;
  overflow-wrap:anywhere;
}
.tag-row{display:flex;gap:8px;flex-wrap:wrap;align-items:center}

.preview-header strong{
  display:block;
  font-size:24px;
  line-height:1.1;
  color:var(--text);
  margin-bottom:6px;
}
.preview-header span{
  display:block;
  font-size:13px;
  line-height:1.3;
  color:var(--muted);
}
.preview-chip{margin-bottom:14px}

.timeline-card{
  position:relative;
  background:#fff;
  border:2px solid var(--line);
  border-radius:18px;
  box-shadow:var(--shadow);
  min-height:94px;
  padding:12px 14px 12px 42px;
  overflow:hidden;
}
.timeline-card::before{
  content:"";
  position:absolute;
  left:20px;top:14px;bottom:14px;
  width:3px;background:#cbd7e8;border-radius:999px;
}
.dot{
  position:absolute;
  left:9px;top:9px;
  width:22px;height:22px;border-radius:50%;
  z-index:1;
}
.dot.green{background:var(--green)}
.dot.orange{background:var(--orange)}
.timeline-meta{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:6px;
}
.timeline-meta span:first-child{
  color:var(--muted);
  font-size:11px;
  line-height:1.2;
  white-space:nowrap;
}
.timeline-title{
  font-size:15px;
  line-height:1.2;
  font-weight:800;
  margin:0 0 6px;
  overflow-wrap:anywhere;
}
.timeline-sub{
  font-size:12px;
  line-height:1.28;
  color:var(--muted);
  margin:0;
  overflow-wrap:anywhere;
}

.footer-note{
  margin-top:18px;
  color:var(--muted);
  font-size:14px;
  line-height:1.4;
  max-width:980px;
}
.screen-block{overflow-x:auto;padding-bottom:8px}

@media (max-width: 1100px){
  .window{width:100%;min-width:920px}
}
