body.app { background: var(--bg-2); font-size: 14px; }
.demo-banner { background: #fef3c7; color: var(--accent-ink); text-align: center; font-size: 13px; padding: 7px 12px; border-bottom: 1px solid #fde68a; }
.demo-banner a { color: var(--accent-ink); font-weight: 700; }
.shell { display: grid; grid-template-columns: 228px 1fr; min-height: calc(100vh - 34px); }
.side { background: var(--navy); color: #cbd5e1; padding: 18px 14px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side .logo { font-size: 18px; margin: 0 6px 6px; }
.side .co { font-size: 12px; color: #94a3b8; margin: 0 6px 18px; line-height: 1.35; }
.side a.navi { display: flex; align-items: center; gap: 10px; color: #cbd5e1; text-decoration: none; padding: 9px 10px; border-radius: 8px; font-weight: 550; }
.side a.navi:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.side a.navi.active { background: rgba(245, 158, 11, .16); color: #fff; box-shadow: inset 3px 0 0 var(--accent); }
.side a.navi svg { width: 18px; height: 18px; flex: none; }
.side .spacer { flex: 1; }
.side .viewas { font-size: 12px; color: #94a3b8; padding: 0 6px; }
.side .viewas select { width: 100%; margin-top: 6px; background: var(--navy-2); color: #fff; border: 1px solid #2b4a6b; border-radius: 6px; padding: 7px; font: inherit; font-size: 13px; }
.side .cta { margin-top: 14px; }

.main { min-width: 0; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 14px 28px; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.search { position: relative; flex: 1; max-width: 560px; }
.search input { width: 100%; padding: 10px 12px 10px 38px; border: 1px solid #cbd5e1; border-radius: 8px; font: inherit; font-size: 14px; background: var(--bg-2); }
.search input:focus { outline: 2px solid var(--accent); border-color: var(--accent); background: #fff; }
.search svg { position: absolute; left: 12px; top: 11px; width: 17px; height: 17px; color: var(--muted); }
.search .hint { position: absolute; right: 10px; top: 9px; font-size: 12px; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; pointer-events: none; }
.results { position: absolute; top: 44px; left: 0; right: 0; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); overflow: hidden; display: none; }
.results.open { display: block; }
.results a { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 14px; text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--line); }
.results a:last-child { border-bottom: 0; }
.results a:hover, .results a.sel { background: #fffbeb; }
.results .why { font-size: 12px; color: var(--muted); }
.results .empty { padding: 12px 14px; color: var(--muted); }
.topbar .btn { padding: 9px 14px; font-size: 14px; }

.page { padding: 26px 28px 60px; max-width: 1280px; }
.page h1 { font-size: 24px; letter-spacing: -.02em; margin: 0 0 4px; }
.page .subtitle { color: var(--muted); margin: 0 0 22px; }
.crumb { font-size: 13px; margin-bottom: 8px; }
.crumb a { color: var(--muted); text-decoration: none; }
.crumb a:hover { color: var(--ink); }

.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.metric { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.metric .k { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.metric .v { font-size: 30px; font-weight: 750; letter-spacing: -.02em; margin-top: 2px; }
.metric .v.red { color: var(--red); }
.metric .v.orange { color: var(--orange); }
.metric .d { font-size: 12px; color: var(--muted); }

.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 20px; overflow: hidden; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.panel-head h2 { font-size: 15px; margin: 0; letter-spacing: -.01em; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid2 > .panel { margin-bottom: 0; }

table.t { width: 100%; border-collapse: collapse; }
.t th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 10px 18px; background: var(--bg-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
.t td { padding: 11px 18px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.t tr:last-child td { border-bottom: 0; }
.t tr.click { cursor: pointer; }
.t tr.click:hover td { background: #fffdf5; }
.t .pname { font-weight: 650; color: var(--ink); text-decoration: none; }
.t .pname:hover { text-decoration: underline; }
.overflow { overflow-x: auto; }

.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chip { display: inline-flex; align-items: center; gap: 5px; font-family: var(--mono); font-size: 12px; padding: 2px 7px 2px 6px; border-radius: 6px; background: var(--bg-2); border: 1px solid var(--line); white-space: nowrap; }
.chip i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.chip.hit { background: #fef3c7; border-color: var(--accent); }
.tradename { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.tradename i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

.filters { display: flex; flex-wrap: wrap; gap: 6px; }
.fbtn { font: inherit; font-size: 13px; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 4px 11px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.fbtn i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.fbtn.on { background: var(--navy); color: #fff; border-color: var(--navy); }

.due.red { color: var(--red); font-weight: 650; }
.due.orange { color: var(--orange); font-weight: 650; }
.due.ok { color: var(--ink-2); }
.done { color: var(--green); }

.ph-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.ph-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.summary { color: var(--ink-2); max-width: 760px; margin: 0 0 20px; }
.list { padding: 4px 0; }
.list .item { padding: 11px 18px; border-bottom: 1px solid var(--line); }
.list .item:last-child { border-bottom: 0; }
.list .item .top { display: flex; justify-content: space-between; gap: 10px; }
.list .item .sub { color: var(--muted); font-size: 13px; }

.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--navy); color: #fff; padding: 12px 18px; border-radius: 10px; box-shadow: var(--shadow); opacity: 0; transition: all .2s; font-size: 14px; z-index: 50; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast a { color: #fbbf24; font-weight: 700; }

.callout { background: #fffbeb; border: 1px solid #fde68a; border-radius: var(--radius); padding: 12px 16px; margin-bottom: 20px; color: var(--accent-ink); font-size: 14px; }

@media (max-width: 1000px) {
  .shell { grid-template-columns: 1fr; }
  .side { flex-direction: row; flex-wrap: wrap; align-items: center; padding: 10px 14px; gap: 2px; position: static; height: auto; }
  .side .co, .side .spacer, .side .viewas, .side .cta { display: none; }
  .side .logo { margin: 0 12px 0 0; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .grid2 { grid-template-columns: 1fr; }
  .topbar { padding: 12px 16px; }
  .topbar .btn { display: none; }
  .page { padding: 20px 16px 50px; }
  .t th, .t td { padding: 9px 12px; }
}
