*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
.hidden { display:none !important; }
html, body { height:100%; background:#1e1e1c; color:rgba(255,255,255,0.85); font-family:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif; font-size:13px; line-height:20px; letter-spacing:0.13px; overflow:hidden; }
body { display:flex; }

::-webkit-scrollbar { width:8px; height:8px; }
::-webkit-scrollbar-track { background:rgba(255,255,255,0.02); }
::-webkit-scrollbar-thumb { background:rgba(255,255,255,0.14); border-radius:4px; transition:background 0.2s ease; }
::-webkit-scrollbar-thumb:hover { background:rgba(255,255,255,0.28); }

/* Sidebar */
.sidebar {
  width:200px; min-width:200px; height:100vh;
  background:#222222; border-right:1px solid rgba(255,255,255,0.08);
  display:flex; flex-direction:column; flex-shrink:0;
  position:relative;
}
.sidebar::before {
  content:''; position:absolute; top:0; left:0; right:0; height:2px;
  background:linear-gradient(90deg, #38bdf8 0%, transparent 100%);
}
.sidebar-brand {
  padding:24px 20px 8px; font-size:11px; font-weight:500;
  letter-spacing:0.5px; text-transform:uppercase;
  color:rgba(255,255,255,0.3); display:flex; align-items:center; gap:7px;
}
.sidebar-brand::before {
  content:''; display:inline-block; width:14px; height:14px;
  background:#38bdf8; border-radius:3px; opacity:0.7;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Crect x='2' y='2' width='5' height='12' rx='1'/%3E%3Crect x='9' y='2' width='5' height='12' rx='1'/%3E%3Crect x='5' y='6' width='6' height='3' rx='1'/%3E%3C/svg%3E") center/contain no-repeat;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Crect x='2' y='2' width='5' height='12' rx='1'/%3E%3Crect x='9' y='2' width='5' height='12' rx='1'/%3E%3Crect x='5' y='6' width='6' height='3' rx='1'/%3E%3C/svg%3E") center/contain no-repeat;
}
.sidebar-title {
  padding:4px 20px 28px; font-size:15px; font-weight:600;
  color:rgba(255,255,255,0.85);
}
.sidebar-nav { display:flex; flex-direction:column; gap:2px; padding:0 8px; }
.nav-item {
  padding:8px 12px; border-radius:6px; font-size:13px; font-weight:400;
  color:rgba(255,255,255,0.35); cursor:pointer; transition:all 0.15s ease;
  border:none; background:none; text-align:left; font-family:inherit;
  letter-spacing:0.13px; line-height:20px;
}
.nav-item:hover { color:rgba(255,255,255,0.6); background:rgba(255,255,255,0.03); transform:translateX(2px); }
.nav-item.active { color:rgba(255,255,255,0.85); background:rgba(255,255,255,0.06); font-weight:500; border-left:2px solid #38bdf8; padding-left:10px; }
.nav-group-label {
  font-size:10px; font-weight:600; letter-spacing:0.5px; text-transform:uppercase;
  color:rgba(255,255,255,0.2); padding:16px 12px 4px; margin-top:4px;
}
.sidebar-stats {
  margin-top:auto; padding:20px;
  border-top:1px solid rgba(255,255,255,0.06);
}
.sidebar-stat {
  font-size:11px; color:rgba(255,255,255,0.3); margin-bottom:4px;
  font-family:ui-monospace,Menlo,Monaco,monospace;
}
.sidebar-stat span { color:rgba(255,255,255,0.5); }

/* Sidebar toggle */
.sidebar-toggle {
  position:absolute; top:50%; right:-12px; transform:translateY(-50%);
  width:24px; height:48px; border-radius:0 6px 6px 0;
  background:#333; border:1px solid rgba(255,255,255,0.1); border-left:none;
  color:rgba(255,255,255,0.5); cursor:pointer; font-size:12px;
  display:flex; align-items:center; justify-content:center;
  transition:all 0.2s ease; z-index:10;
}
.sidebar-toggle:hover { background:#444; color:rgba(255,255,255,0.8); }
.sidebar.collapsed { width:0; min-width:0; overflow:hidden; padding:0; }
.sidebar.collapsed .sidebar-brand,
.sidebar.collapsed .sidebar-title,
.sidebar.collapsed .sidebar-nav,
.sidebar.collapsed .sidebar-stats { display:none; }
.sidebar.collapsed .sidebar-toggle { position:fixed; left:0; top:50%; right:auto; transform:translateY(-50%); border-radius:0 6px 6px 0; z-index:100; }

/* Main */
.main-wrap { flex:1; height:100vh; overflow-y:auto; overflow-x:hidden; }
.main { max-width:1200px; padding:32px 32px 64px; transition:max-width 0.2s ease; }
.sidebar.collapsed ~ .main-wrap .main { max-width:100%; }
.view { display:none; opacity:0; }
.view.active { display:block; animation:fadeInView 0.25s ease forwards; }
@keyframes fadeInView { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:translateY(0); } }
.page-title { font-size:21px; font-weight:600; margin-bottom:8px; color:rgba(255,255,255,0.85); }
.page-subtitle { font-size:13px; color:rgba(255,255,255,0.35); margin-bottom:32px; line-height:20px; }

/* Stat cards row */
.stat-row { display:flex; gap:16px; margin-bottom:32px; flex-wrap:wrap; }
.stat-card {
  background:linear-gradient(135deg, #222222 0%, #252524 100%); border:1px solid rgba(255,255,255,0.06);
  border-radius:12px; padding:20px; flex:1; min-width:140px;
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.03);
  border-top:2px solid rgba(255,255,255,0.06);
}
.stat-card-label {
  font-size:11px; font-weight:500; letter-spacing:0.5px;
  text-transform:uppercase; color:rgba(255,255,255,0.3); margin-bottom:8px;
}
.stat-card-value {
  font-size:28px; font-weight:600;
  font-family:ui-monospace,Menlo,Monaco,monospace;
  color:rgba(255,255,255,0.85);
}
.stat-card-value.accent { color:#3a86ff; }

/* Section blocks */
.section { margin-bottom:32px; }
.section-header {
  display:flex; align-items:center; gap:10px; margin-bottom:14px;
}
.section-accent {
  width:4px; height:16px; border-radius:2px; flex-shrink:0;
  filter:drop-shadow(0 0 6px);
}
.section-title {
  font-size:15px; font-weight:600; color:rgba(255,255,255,0.85);
}
.section-desc {
  color:rgba(255,255,255,0.4); font-size:12px; margin:-8px 0 16px 15px; line-height:18px;
}

/* Pattern cards */
.pattern-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(340px,1fr)); gap:16px; margin-top:24px; }
.pattern-card {
  background:#222; border:1px solid rgba(255,255,255,0.06); border-radius:12px;
  padding:20px; cursor:pointer; transition:all 0.15s ease;
}
.pattern-card:hover { border-color:rgba(255,255,255,0.15); background:#2a2a28; }
.pattern-card-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:8px; }
.pattern-card-name { font-size:15px; font-weight:600; color:rgba(255,255,255,0.85); }
.pattern-card-count { font-size:11px; color:rgba(255,255,255,0.3); font-family:ui-monospace,Menlo,monospace; }
.pattern-card-desc { font-size:12px; color:rgba(255,255,255,0.45); line-height:18px; margin-bottom:10px; }

/* Pattern gene breakdown */
.pattern-genes-list { display:flex; flex-direction:column; gap:4px; margin:14px 0; }
.pattern-gene-row {
  display:flex; align-items:flex-start; gap:10px; padding:8px 12px;
  background:rgba(255,255,255,0.02); border-radius:8px; border:1px solid rgba(255,255,255,0.04);
}
.pattern-gene-row .pgr-dim {
  font-size:10px; font-weight:600; letter-spacing:0.4px; text-transform:uppercase;
  min-width:52px; padding-top:2px; flex-shrink:0;
}
.pattern-gene-row .pgr-val { font-size:13px; color:rgba(255,255,255,0.7); font-weight:500; }
.pattern-gene-row .pgr-desc { font-size:11px; color:rgba(255,255,255,0.35); margin-top:1px; }
.pattern-card-metrics { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; margin-top:14px; padding-top:14px; border-top:1px solid rgba(255,255,255,0.06); font-size:12px; }

/* Cards */
.card {
  background:#222222; border:1px solid rgba(255,255,255,0.06);
  border-radius:14px; padding:20px;
  box-shadow:0 2px 8px rgba(0,0,0,0.15);
}

/* Tables */
.table-wrap { overflow-x:auto; border-radius:10px; border:1px solid rgba(255,255,255,0.06); background:#222222; }
table { table-layout:auto; width:100%; border-collapse:separate; border-spacing:0; }
thead th {
  padding:10px 14px; text-align:left; font-size:11px; font-weight:500;
  letter-spacing:0.5px; text-transform:uppercase; color:rgba(255,255,255,0.5);
  border-bottom:1px solid rgba(255,255,255,0.06); white-space:nowrap;
  background:#222222; position:sticky; top:0; z-index:2;
}
thead th.sortable { cursor:pointer; user-select:none; transition:color 0.15s ease, background 0.15s ease; }
thead th.sortable:hover { color:rgba(255,255,255,0.85); background:rgba(255,255,255,0.04); }
thead th.sort-active { color:rgba(255,255,255,0.85); }
thead th .sort-arrow { font-size:9px; margin-left:3px; opacity:0.4; }
thead th.sort-active .sort-arrow { opacity:1; }
tbody tr { transition:background 0.15s ease; }
tbody tr:nth-child(even) { background:rgba(255,255,255,0.02); }
tbody tr:hover { background:rgba(255,255,255,0.06); }
tbody td { padding:10px 14px; color:rgba(255,255,255,0.5); white-space:nowrap; font-size:13px; }
tbody td.text-primary { color:rgba(255,255,255,0.85); }
tbody td.mono { font-family:ui-monospace,Menlo,Monaco,monospace; }
.title-cell { white-space:normal !important; max-width:240px; overflow:hidden; text-overflow:ellipsis; color:rgba(255,255,255,0.85) !important; font-weight:500; }

/* Gene Tag component */
.gene-tag {
  display:inline-flex; align-items:center; gap:5px;
  padding:3px 10px; border-radius:6px; font-size:12px; font-weight:500;
  border:0.5px solid rgba(255,255,255,0.08); background:rgba(255,255,255,0.03);
  cursor:default; position:relative; transition:all 0.15s ease;
  max-width:100%; line-height:18px;
}
.gene-tag:hover { background:rgba(255,255,255,0.06); border-color:rgba(255,255,255,0.15); box-shadow:0 0 6px rgba(255,255,255,0.05); }
.gene-tag.gt-I:hover { box-shadow:0 0 8px rgba(56,189,248,0.15); border-color:rgba(56,189,248,0.25); }
.gene-tag.gt-W:hover { box-shadow:0 0 8px rgba(167,139,250,0.15); border-color:rgba(167,139,250,0.25); }
.gene-tag.gt-C:hover { box-shadow:0 0 8px rgba(251,146,60,0.15); border-color:rgba(251,146,60,0.25); }
.gene-tag.gt-R:hover { box-shadow:0 0 8px rgba(74,222,128,0.15); border-color:rgba(74,222,128,0.25); }
.gene-tag.gt-U:hover { box-shadow:0 0 8px rgba(244,114,182,0.15); border-color:rgba(244,114,182,0.25); }
.gene-tag.gt-T:hover { box-shadow:0 0 8px rgba(248,113,113,0.15); border-color:rgba(248,113,113,0.25); }
.gene-tag.gt-E:hover { box-shadow:0 0 8px rgba(251,191,36,0.15); border-color:rgba(251,191,36,0.25); }
.gene-tag .gt-code { opacity:0.45; font-family:ui-monospace,Menlo,monospace; font-size:10px; flex-shrink:0; }
.gene-tag .gt-label { color:rgba(255,255,255,0.75); }
.gene-tag.gt-I .gt-code { color:#38bdf8; }
.gene-tag.gt-W .gt-code { color:#a78bfa; }
.gene-tag.gt-C .gt-code { color:#fb923c; }
.gene-tag.gt-R .gt-code { color:#4ade80; }
.gene-tag.gt-U .gt-code { color:#f472b6; }
.gene-tag.gt-T .gt-code { color:#f87171; }
.gene-tag.gt-E .gt-code { color:#fbbf24; }
.gene-tag.compact { padding:2px 8px; }
.gene-tag[data-tip]:not([data-tip=""]):hover::after {
  content:attr(data-tip);
  position:absolute; bottom:calc(100% + 8px); left:0;
  background:#2a2a28; color:rgba(255,255,255,0.8); font-size:12px; line-height:18px;
  padding:10px 14px; border-radius:10px; white-space:normal; max-width:320px; min-width:160px;
  border:1px solid rgba(255,255,255,0.1); z-index:1000; pointer-events:none;
  font-family:Inter,-apple-system,sans-serif; font-weight:400; letter-spacing:0.1px;
  box-shadow:0 8px 24px rgba(0,0,0,0.4);
}

/* Format badge */
.format-badge {
  display:inline-flex; align-items:center; height:22px; padding:0 10px;
  border-radius:6px; font-size:11px; font-weight:600;
  border:1px solid; white-space:nowrap; letter-spacing:0.2px;
}

/* Prompt text */
.prompt-text {
  font-family:ui-monospace,Menlo,Monaco,monospace;
  font-size:12px; line-height:20px; color:rgba(255,255,255,0.6);
  white-space:pre-wrap; word-break:break-word;
  max-height:400px; overflow-y:auto;
  margin:0; padding:0;
}

/* Vs column */
.vs-pos { color:#4ade80; font-family:ui-monospace,Menlo,Monaco,monospace; font-weight:500; }
.vs-neg { color:#f87171; font-family:ui-monospace,Menlo,Monaco,monospace; font-weight:500; }
.mono-val { font-family:ui-monospace,Menlo,Monaco,monospace; }

/* Bar chart */
.bar-row { display:flex; align-items:center; gap:12px; margin:8px 0; }
.bar-label {
  width:140px; text-align:right; font-size:12px; color:rgba(255,255,255,0.5);
  flex-shrink:0;
}
.bar-track { flex:1; height:28px; background:rgba(255,255,255,0.03); border-radius:6px; overflow:hidden; }
.bar-fill {
  height:100%; border-radius:6px; display:flex; align-items:center;
  justify-content:flex-end; padding-right:10px;
  font-size:11px; font-family:ui-monospace,Menlo,Monaco,monospace;
  color:rgba(255,255,255,0.85); font-weight:500; transition:width 0.4s ease;
}

/* Buttons */
.btn {
  background:rgba(255,255,255,0.06); border:none; border-radius:8px;
  padding:6px 12px; color:rgba(255,255,255,0.85); font-size:13px;
  font-family:inherit; cursor:pointer; transition:all 0.15s ease;
  display:inline-flex; align-items:center; gap:6px;
}
.btn:hover { background:rgba(255,255,255,0.1); }

/* Search */
.search-input {
  background:transparent; border:none; border-bottom:1px solid rgba(255,255,255,0.1);
  padding:8px 0; color:rgba(255,255,255,0.85); font-size:13px; font-family:inherit;
  outline:none; width:240px; transition:border-color 0.15s ease;
}
.search-input:focus { border-bottom-color:rgba(255,255,255,0.3); }
.search-input::placeholder { color:rgba(255,255,255,0.2); }

/* Filter bar */
.filter-bar { display:flex; gap:12px; margin-bottom:20px; flex-wrap:wrap; align-items:center; }
.filter-select {
  background:rgba(255,255,255,0.04); border:1px solid rgba(255,255,255,0.08);
  border-radius:8px; padding:6px 10px; color:rgba(255,255,255,0.6);
  font-size:12px; font-family:inherit; outline:none; cursor:pointer;
  transition:all 0.15s ease; -webkit-appearance:none; appearance:none;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.3)' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat:no-repeat; background-position:right 8px center;
  padding-right:26px;
}
.filter-select:hover { border-color:rgba(255,255,255,0.15); }
.filter-select:focus { border-color:rgba(255,255,255,0.2); }
.filter-select option { background:#222; color:rgba(255,255,255,0.85); }

/* Pagination */
.pagination { display:flex; gap:4px; margin-top:16px; align-items:center; justify-content:center; }
.page-btn {
  background:transparent; border:1px solid transparent; border-radius:6px;
  padding:5px 10px; color:rgba(255,255,255,0.35); font-size:12px;
  font-family:ui-monospace,Menlo,Monaco,monospace; cursor:pointer;
  transition:all 0.15s ease;
}
.page-btn:hover { color:rgba(255,255,255,0.6); background:rgba(255,255,255,0.04); }
.page-btn.active { color:rgba(255,255,255,0.85); background:rgba(255,255,255,0.08); }
.page-btn:disabled { opacity:0.2; cursor:default; }
.page-info { font-size:11px; color:rgba(255,255,255,0.25); font-family:ui-monospace,Menlo,Monaco,monospace; margin-left:12px; }

/* Clickable row */
.clickable-row { cursor:pointer; }
.clickable-row:hover td { color:rgba(255,255,255,0.85) !important; }

/* Detail view */
.detail-header { margin-bottom:24px; }
.detail-title { font-size:21px; font-weight:600; margin-bottom:8px; }
.detail-desc { font-size:13px; color:rgba(255,255,255,0.4); line-height:22px; margin-bottom:8px; }
.detail-link { font-size:12px; color:#3a86ff; text-decoration:none; }
.detail-link:hover { text-decoration:underline; }

.metric-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(150px, 1fr)); gap:12px; margin-bottom:32px; }
.metric-card {
  background:#222; border:1px solid rgba(255,255,255,0.06);
  border-radius:10px; padding:16px;
}
.metric-label { font-size:11px; font-weight:500; letter-spacing:0.5px; text-transform:uppercase; color:rgba(255,255,255,0.3); margin-bottom:6px; }
.metric-value { font-size:20px; font-weight:600; font-family:ui-monospace,Menlo,Monaco,monospace; color:rgba(255,255,255,0.85); }

.gene-profile { margin-bottom:32px; }
.gene-row {
  display:flex; align-items:center; padding:10px 0;
  border-bottom:1px solid rgba(255,255,255,0.04);
}
.gene-row:last-child { border-bottom:none; }
.gene-dim-label {
  width:100px; font-size:11px; font-weight:500; letter-spacing:0.5px;
  text-transform:uppercase; color:rgba(255,255,255,0.3); flex-shrink:0;
}
.gene-dim-value { flex:1; }

.cast-grid { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:32px; }
.cast-item {
  background:#222; border:1px solid rgba(255,255,255,0.06);
  border-radius:10px; padding:12px 16px;
  display:flex; align-items:center; gap:8px;
}
.cast-name { font-size:13px; font-weight:500; color:rgba(255,255,255,0.85); }

/* Two col */
.two-col { display:grid; grid-template-columns:1fr 1fr; gap:20px; }
@media (max-width:900px) { .two-col { grid-template-columns:1fr; } }

/* Loading */
.loading { text-align:center; padding:80px 20px; color:rgba(255,255,255,0.25); }
.spinner {
  display:inline-block; width:20px; height:20px;
  border:2px solid rgba(255,255,255,0.06);
  border-top-color:rgba(255,255,255,0.3);
  border-radius:50%; animation:spin 0.7s linear infinite; margin-bottom:12px;
}
@keyframes spin { to { transform:rotate(360deg); } }

/* Back button area */
.back-area { margin-bottom:24px; }

/* Mini bot list */
.mini-bot { display:flex; align-items:center; gap:8px; padding:6px 0; border-bottom:1px solid rgba(255,255,255,0.04); }
.mini-bot:last-child { border-bottom:none; }
.mini-bot img { width:28px; height:28px; border-radius:6px; object-fit:cover; background:#2a2a28; flex-shrink:0; }
.mini-bot-title { font-size:12px; color:rgba(255,255,255,0.7); flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.mini-bot-ci { font-size:11px; font-family:ui-monospace,Menlo,Monaco,monospace; color:#3a86ff; font-weight:500; }

/* Pivot table */
.pivot-controls { display:flex; gap:12px; align-items:center; margin-bottom:20px; flex-wrap:wrap; }
.pivot-select { background:#222; border:1px solid rgba(255,255,255,0.1); border-radius:8px; padding:6px 12px; color:rgba(255,255,255,0.7); font-size:13px; font-family:inherit; outline:none; cursor:pointer; -webkit-appearance:none; appearance:none; background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.3)' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat:no-repeat; background-position:right 8px center; padding-right:28px; }
.pivot-select:hover { border-color:rgba(255,255,255,0.2); }
.pivot-select option { background:#222; color:rgba(255,255,255,0.85); }
.pivot-table { border-collapse:separate; border-spacing:1px; }
.pivot-table th { padding:8px 10px; font-size:11px; font-weight:500; color:rgba(255,255,255,0.4); text-transform:uppercase; letter-spacing:0.3px; white-space:nowrap; }
.pivot-cell { padding:8px 10px; text-align:center; font-family:ui-monospace,Menlo; font-size:12px; border-radius:4px; cursor:pointer; transition:all 0.15s; min-width:60px; }
.pivot-cell:hover { outline:1px solid rgba(255,255,255,0.3); }
.pivot-cell.empty { color:rgba(255,255,255,0.15); border:1px dashed rgba(255,255,255,0.08); }
.pivot-cell.hot { background:rgba(74,222,128,0.15); color:#4ade80; }
.pivot-cell.warm { background:rgba(251,191,36,0.1); color:#fbbf24; }
.pivot-cell.cold { background:rgba(248,113,113,0.08); color:#f87171; }

/* Sub-tabs within a page */
.sub-tabs { display:flex; gap:4px; margin-bottom:24px; }
.sub-tab { padding:6px 16px; border-radius:6px; font-size:13px; color:rgba(255,255,255,0.35); cursor:pointer; transition:all 0.15s; background:none; border:none; font-family:inherit; }
.sub-tab:hover { color:rgba(255,255,255,0.6); }
.sub-tab.active { color:rgba(255,255,255,0.85); background:rgba(255,255,255,0.06); }

/* Opportunity cards */
.opp-card { background:rgba(74,222,128,0.05); border:1px solid rgba(74,222,128,0.15); border-radius:10px; padding:14px 18px; }
.opp-card-title { font-size:13px; font-weight:600; color:rgba(255,255,255,0.8); margin-bottom:4px; }
.opp-card-desc { font-size:12px; color:rgba(255,255,255,0.4); }

/* Collapsible */
.collapsible-toggle { background:rgba(255,255,255,0.04); border:1px solid rgba(255,255,255,0.08); border-radius:8px; padding:8px 16px; color:rgba(255,255,255,0.5); font-size:12px; cursor:pointer; width:100%; text-align:left; font-family:inherit; transition:all 0.15s; }
.collapsible-toggle:hover { background:rgba(255,255,255,0.06); color:rgba(255,255,255,0.7); }
.collapsible-content { display:none; }
.collapsible-content.open { display:block; }

/* IP card grid */
.ip-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(260px, 1fr)); gap:12px; }
.ip-card { background:#222; border:1px solid rgba(255,255,255,0.06); border-radius:10px; padding:16px; cursor:pointer; transition:all 0.15s; }
.ip-card:hover { border-color:rgba(255,255,255,0.15); }
.ip-card-name { font-size:14px; font-weight:600; margin-bottom:8px; }
.ip-card-stats { display:flex; gap:16px; font-size:12px; color:rgba(255,255,255,0.4); }
.ip-card-stat strong { color:rgba(255,255,255,0.7); }

/* Distribution bars (compact) */
.dist-section { margin-bottom:24px; }
.dist-title { font-size:13px; font-weight:600; margin-bottom:10px; color:rgba(255,255,255,0.7); }
.dist-row { display:flex; align-items:center; gap:8px; margin:3px 0; font-size:12px; }
.dist-label { width:140px; text-align:right; color:rgba(255,255,255,0.5); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; flex-shrink:0; }
.dist-bar-wrap { flex:1; height:18px; background:rgba(255,255,255,0.03); border-radius:3px; overflow:hidden; }
.dist-bar { height:100%; border-radius:3px; display:flex; align-items:center; padding:0 8px; font-size:10px; font-family:ui-monospace,Menlo; color:rgba(255,255,255,0.6); min-width:fit-content; }
.dist-val { width:70px; text-align:right; color:rgba(255,255,255,0.35); font-family:ui-monospace,Menlo; font-size:11px; flex-shrink:0; }

/* Two-layer architecture card */
.arch-card { border-radius:12px; overflow:hidden; border:1px solid rgba(255,255,255,0.06); }
.arch-top { background:rgba(58,134,255,0.08); padding:24px 28px; border-bottom:1px solid rgba(255,255,255,0.06); }
.arch-bottom { background:rgba(251,191,36,0.06); padding:24px 28px; }
.arch-layer-title { font-size:14px; font-weight:700; margin-bottom:6px; }
.arch-formula { font-size:12px; color:rgba(255,255,255,0.5); margin-bottom:10px; font-family:ui-monospace,Menlo,Monaco,monospace; }
.arch-example { font-size:12px; color:rgba(255,255,255,0.45); line-height:20px; padding:10px 14px; background:rgba(255,255,255,0.03); border-radius:8px; margin-top:8px; }

/* Pivot detail expand */
.pivot-detail-expand { background:rgba(255,255,255,0.02); border:1px solid rgba(255,255,255,0.06); border-radius:10px; padding:16px; margin-top:16px; }

/* Alert cards */
.alert-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(300px,1fr)); gap:12px; }
.alert-card { background:#222; border:1px solid rgba(255,255,255,0.06); border-radius:10px; padding:16px; }
.alert-card-label { font-size:10px; font-weight:600; letter-spacing:0.4px; text-transform:uppercase; margin-bottom:6px; }
.alert-card-title { font-size:14px; font-weight:600; color:rgba(255,255,255,0.85); margin-bottom:4px; }
.alert-card-desc { font-size:12px; color:rgba(255,255,255,0.4); line-height:18px; }

/* Bot production card hover enhancements */
.clickable-row[data-prod-bot] {
  transition:all 0.2s ease !important;
  box-shadow:0 2px 6px rgba(0,0,0,0.1);
}
.clickable-row[data-prod-bot]:hover {
  box-shadow:0 8px 24px rgba(0,0,0,0.3) !important;
}

/* Pattern card border-radius */
.pattern-card { border-radius:14px; box-shadow:0 2px 8px rgba(0,0,0,0.12); }
.ip-card { border-radius:14px; box-shadow:0 2px 8px rgba(0,0,0,0.12); }
/* ═══ INTRO ANIMATION ═══ */
.intro-overlay {
  position:fixed; inset:0; z-index:9999;
  background:#0a0a09;
  display:flex; align-items:center; justify-content:center; flex-direction:column;
  transition:opacity 0.8s ease, visibility 0.8s ease;
}
.intro-overlay.fade-out { opacity:0; visibility:hidden; pointer-events:none; }

.intro-molecule {
  position:relative; width:300px; height:300px;
}
.intro-atom {
  position:absolute; border-radius:50%;
  animation:atomPulse 2s ease-in-out infinite;
}
.intro-atom.nitrogen {
  width:80px; height:80px; background:radial-gradient(circle at 35% 35%, #38bdf8, #0c4a6e);
  top:30px; left:110px; box-shadow:0 0 40px rgba(56,189,248,0.4);
  animation-delay:0s;
}
.intro-atom.hydrogen1 {
  width:50px; height:50px; background:radial-gradient(circle at 35% 35%, #fbbf24, #78350f);
  top:160px; left:40px; box-shadow:0 0 30px rgba(251,191,36,0.3);
  animation-delay:0.3s;
}
.intro-atom.hydrogen2 {
  width:50px; height:50px; background:radial-gradient(circle at 35% 35%, #fbbf24, #78350f);
  top:160px; left:200px; box-shadow:0 0 30px rgba(251,191,36,0.3);
  animation-delay:0.6s;
}
.intro-atom.hydrogen3 {
  width:50px; height:50px; background:radial-gradient(circle at 35% 35%, #fbbf24, #78350f);
  top:80px; left:220px; box-shadow:0 0 30px rgba(251,191,36,0.3);
  animation-delay:0.9s;
}

/* Bonds — lines connecting atoms */
.intro-bond {
  position:absolute; height:2px; transform-origin:left center;
  background:linear-gradient(90deg, rgba(56,189,248,0.6), rgba(251,191,36,0.6));
  animation:bondGlow 2s ease-in-out infinite alternate;
}
.intro-bond.b1 { top:85px; left:145px; width:90px; transform:rotate(58deg); animation-delay:0.2s; }
.intro-bond.b2 { top:90px; left:155px; width:110px; transform:rotate(125deg); animation-delay:0.5s; }
.intro-bond.b3 { top:75px; left:165px; width:75px; transform:rotate(15deg); animation-delay:0.8s; }

@keyframes atomPulse {
  0%, 100% { transform:scale(1); }
  50% { transform:scale(1.08); }
}
@keyframes bondGlow {
  0% { opacity:0.3; filter:blur(0px); }
  100% { opacity:0.8; filter:blur(1px); }
}

/* Text reveal */
.intro-text {
  margin-top:40px; text-align:center;
  opacity:0; animation:introTextIn 1s ease forwards 0.5s;
}
.intro-title {
  font-size:42px; font-weight:900; letter-spacing:0.05em;
  background:linear-gradient(135deg, #38bdf8 0%, #fbbf24 50%, #f472b6 100%);
  -webkit-background-clip:text; -webkit-text-fill-color:transparent;
  background-clip:text;
}
.intro-subtitle {
  font-size:15px; color:rgba(255,255,255,0.35); margin-top:10px; font-weight:300;
}
.intro-tagline {
  font-size:12px; color:rgba(255,255,255,0.2); margin-top:16px;
  font-family:ui-monospace,Menlo,Monaco,monospace; letter-spacing:0.1em;
}

/* Particle background */
.intro-particles {
  position:absolute; inset:0; overflow:hidden; pointer-events:none;
}
.intro-particle {
  position:absolute; width:2px; height:2px; background:rgba(56,189,248,0.3);
  border-radius:50%; animation:particleDrift linear infinite;
}
@keyframes particleDrift {
  0% { transform:translateY(0) translateX(0); opacity:0; }
  10% { opacity:1; }
  90% { opacity:1; }
  100% { transform:translateY(-100vh) translateX(50px); opacity:0; }
}

@keyframes introTextIn {
  0% { opacity:0; transform:translateY(20px); }
  100% { opacity:1; transform:translateY(0); }
}

/* Progress bar at bottom */
.intro-progress {
  position:absolute; bottom:60px; left:50%; transform:translateX(-50%);
  width:200px; height:2px; background:rgba(255,255,255,0.06); border-radius:1px;
  overflow:hidden;
}
.intro-progress-bar {
  height:100%; width:0; background:linear-gradient(90deg, #38bdf8, #fbbf24);
  border-radius:1px; animation:progressFill 2.5s ease-in-out forwards;
}
@keyframes progressFill {
  0% { width:0; }
  60% { width:70%; }
  100% { width:100%; }
}

/* ═══ RESPONSIVE MOBILE ═══ */
.mobile-menu-btn { display:none; }

@media (max-width:768px) {
  html, body { overflow:auto; height:auto; }
  body { flex-direction:column; }

  /* Sidebar becomes fixed top bar */
  .sidebar {
    width:100%; min-width:unset; height:56px;
    flex-direction:row; align-items:center;
    position:fixed; top:0; left:0; right:0; z-index:200;
    overflow:visible;
  }
  .sidebar::before {
    width:100%; height:2px; top:0; left:0; right:0;
    background:linear-gradient(90deg, #38bdf8 0%, transparent 100%);
  }
  .sidebar-brand { padding:0 12px 0 16px; font-size:10px; flex-shrink:0; }
  .sidebar-title { padding:0; font-size:13px; font-weight:600; color:rgba(255,255,255,0.85); flex-shrink:0; }
  .sidebar-nav {
    display:none; position:fixed; top:56px; left:0; right:0;
    background:#222222; z-index:199; overflow-y:auto;
    padding:8px; border-bottom:1px solid rgba(255,255,255,0.08);
    max-height:calc(100vh - 56px); flex-direction:column;
    box-shadow:0 8px 32px rgba(0,0,0,0.5);
  }
  .sidebar-nav.mobile-open { display:flex; }
  .sidebar-stats { display:none; }

  .mobile-menu-btn {
    display:flex; align-items:center; justify-content:center;
    width:44px; height:44px; min-height:44px; min-width:44px;
    background:none; border:none; color:rgba(255,255,255,0.6);
    cursor:pointer; margin-left:auto; font-size:20px; flex-shrink:0;
  }

  /* Main content */
  .main-wrap { height:auto; overflow:visible; padding-top:56px; }
  .main { padding:16px 16px 48px; max-width:100%; }

  /* Typography */
  .page-title { font-size:17px; }
  .page-subtitle { margin-bottom:20px; }

  /* Stat cards */
  .stat-row { gap:8px; }
  .stat-card { min-width:100px; padding:12px 14px; }
  .stat-card-value { font-size:20px; }

  /* Filter bar stacks vertically */
  .filter-bar { flex-direction:column; align-items:stretch; gap:8px; }
  .filter-bar .filter-select,
  .filter-bar .search-input,
  .filter-bar input,
  .filter-bar select { width:100%; box-sizing:border-box; }
  .filter-select { min-height:44px; padding:10px 28px 10px 10px; }
  .search-input { width:100% !important; min-height:44px; }

  /* Tables - touch scrolling */
  .table-wrap { -webkit-overflow-scrolling:touch; }

  /* Pivot controls */
  .pivot-controls { flex-direction:column; align-items:stretch; gap:8px; }
  .pivot-select { width:100%; min-height:44px; }

  /* Grid layouts */
  .pattern-grid { grid-template-columns:1fr; }
  .ip-grid { grid-template-columns:1fr; }
  .alert-grid { grid-template-columns:1fr; }
  .metric-grid { grid-template-columns:repeat(2,1fr); }

  /* Bar chart */
  .bar-label { width:80px; font-size:11px; }

  /* Touch-friendly tap targets (min 44px) */
  .nav-item { min-height:44px; display:flex; align-items:center; }
  .btn { min-height:44px; padding:0 16px; }
  .page-btn { min-height:44px; padding:0 10px; }
  .sub-tab { min-height:44px; display:flex; align-items:center; }
  .collapsible-toggle { min-height:44px; }

  /* Pagination */
  .pagination { flex-wrap:wrap; }
  .page-info { margin-left:4px; }

  /* Section spacing */
  .section { margin-bottom:20px; }
  .detail-header { flex-direction:column; }
}

/* ══════════════════════════════════════ */
/* Workbench (生产线) — 5-step pipeline  */
/* ══════════════════════════════════════ */
.wb-steps {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 24px;
  padding: 16px 20px;
  background: rgba(255,255,255,0.03);
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.06);
  overflow-x: auto;
}
.wb-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
  min-width: 90px;
  text-align: center;
}
.wb-step:hover { background: rgba(255,255,255,0.04); }
.wb-step.active {
  background: rgba(56,189,248,0.08);
  border: 1px solid rgba(56,189,248,0.2);
}
.wb-step.done { opacity: 0.5; }
.wb-step-icon { font-size: 24px; line-height: 1; }
.wb-step-label {
  font-size: 12px;
  font-weight: 500;
  color: rgba(255,255,255,0.7);
  white-space: nowrap;
}
.wb-step.active .wb-step-label { color: #38bdf8; }
.wb-step-count {
  font-size: 10px;
  color: rgba(255,255,255,0.35);
  font-family: ui-monospace, Menlo, monospace;
}
.wb-step.active .wb-step-count { color: rgba(56,189,248,0.7); }
.wb-step-arrow {
  color: rgba(255,255,255,0.15);
  font-size: 16px;
  padding: 0 8px;
  flex-shrink: 0;
}
.wb-content {
  min-height: 300px;
}

@media (max-width: 768px) {
  .wb-steps { flex-wrap: wrap; gap: 4px; padding: 12px; }
  .wb-step { min-width: 70px; padding: 8px 10px; }
  .wb-step-arrow { display: none; }
}