:root {
  --bg: #f4f6fa; --bg2: #ffffff; --panel: #ffffff; --panel2: #f1f4f9; --line: #e3e8f0; --line2: #cfd7e3;
  --text: #0f172a; --muted: #5b6578; --dim: #8a94a6; --accent: #2563eb; --accent2: #7c3aed;
  --ok: #22c55e; --warn: #f59e0b; --bad: #ef4444; --radius: 12px;
  --shadow: 0 10px 30px rgba(15, 23, 42, .10);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 14px/1.5 'Be Vietnam Pro', system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
::-webkit-scrollbar { width: 8px; height: 8px; } ::-webkit-scrollbar-thumb { background: var(--line2); border-radius: 8px; }
.hidden { display: none !important; }

/* ---------- top bar ---------- */
.topbar { position: fixed; inset: 0 0 auto 0; height: 58px; z-index: 50; display: flex; align-items: center; gap: 18px; padding: 0 18px;
  background: rgba(255, 255, 255, .9); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .2px; white-space: nowrap; color: var(--text); }
.brand .logo { width: 30px; height: 30px; border-radius: 9px; background: conic-gradient(from 200deg, #22c55e, #3b82f6, #a855f7, #22c55e); display: grid; place-items: center; }
.brand .logo::after { content: ''; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); }
.brand small { display: block; font-weight: 500; font-size: 11px; color: var(--muted); }
.nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; flex: 1; }
.nav a { padding: 8px 12px; border-radius: 8px; color: var(--muted); white-space: nowrap; font-weight: 500; font-size: 13.5px; }
.nav a:hover { color: var(--text); background: var(--panel); }
.nav a.active { color: var(--accent); background: linear-gradient(135deg, rgba(37,99,235,.22), rgba(124,58,237,.22)); box-shadow: inset 0 0 0 1px rgba(37,99,235,.35); }
.nav .sep { width: 1px; background: var(--line); margin: 6px 6px; }
.demo-badge { font-size: 11px; color: var(--warn); border: 1px solid rgba(245,158,11,.4); padding: 3px 8px; border-radius: 99px; white-space: nowrap; }

main { padding-top: 58px; min-height: 100%; }
.page { max-width: 1320px; margin: 0 auto; padding: 28px 24px 60px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1 { margin: 0; font-size: 26px; letter-spacing: -.3px; }
.page-head p { margin: 4px 0 0; color: var(--muted); }

/* ---------- common ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 9px; border: 1px solid var(--line2); background: var(--panel2); cursor: pointer; font-weight: 500; font-size: 13px; white-space: nowrap; }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: linear-gradient(135deg, var(--accent), var(--accent2)); border-color: transparent; color: #fff; }
.btn.ghost { background: transparent; }
.btn.sm { padding: 5px 10px; font-size: 12px; }
.btn.danger { color: #dc2626; border-color: rgba(239,68,68,.4); }
.input, select.input, textarea.input { width: 100%; padding: 9px 12px; border-radius: 9px; border: 1px solid var(--line2); background: var(--bg2); outline: none; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37,99,235,.15); }
label.lbl { display: block; font-size: 12px; color: var(--muted); margin: 0 0 6px; font-weight: 500; text-transform: uppercase; letter-spacing: .5px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; font-size: 12px; border: 1px solid var(--line2); background: var(--bg2); color: var(--muted); cursor: pointer; user-select: none; white-space: nowrap; }
.chip.on { color: var(--accent); border-color: var(--accent); background: rgba(37,99,235,.16); }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 6px; font-size: 11.5px; background: var(--panel2); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.tag .dot { width: 7px; height: 7px; border-radius: 50%; }
.muted { color: var(--muted); } .dim { color: var(--dim); }
.grid { display: grid; gap: 16px; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { padding: 14px 16px; }
.stat b { display: block; font-size: 24px; letter-spacing: -.5px; }
.stat span { color: var(--muted); font-size: 12.5px; }
.empty { padding: 50px 20px; text-align: center; color: var(--muted); }
.avatar { border-radius: 50%; display: block; object-fit: cover; flex: none; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px); opacity: 0; transition: .3s; z-index: 200;
  background: var(--panel2); border: 1px solid var(--accent); padding: 12px 18px; border-radius: 10px; box-shadow: var(--shadow); }
.toast.show { opacity: 1; transform: translateX(-50%); }

/* ---------- map ---------- */
.map-wrap { position: fixed; inset: 58px 0 0 0; overflow: hidden;
  background: radial-gradient(ellipse at 50% 40%, #ffffff 0%, #eef2f8 70%); }
.map-wrap::before { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .7;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%); }
#graph { width: 100%; height: 100%; display: block; cursor: grab; }
#graph:active { cursor: grabbing; }
.map-panel { position: absolute; z-index: 5; background: rgba(255, 255, 255, .94); backdrop-filter: blur(12px); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.map-left { top: 14px; left: 14px; width: 290px; max-height: calc(100% - 28px); overflow: auto; padding: 14px; }
.map-left h3 { margin: 0 0 2px; font-size: 15px; }
.map-left .sec { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }
.map-right { top: 14px; right: 14px; width: 370px; max-height: calc(100% - 28px); overflow: auto; transform: translateX(calc(100% + 30px)); transition: transform .35s cubic-bezier(.2,.8,.2,1); }
.map-right.open { transform: none; }
.map-stats { position: absolute; z-index: 5; left: 50%; transform: translateX(-50%); top: 14px; display: flex; gap: 2px; padding: 4px; }
.map-stats div { padding: 6px 14px; text-align: center; }
.map-stats b { display: block; font-size: 17px; } .map-stats span { font-size: 11px; color: var(--muted); }
.map-zoom { position: absolute; z-index: 5; right: 14px; bottom: 14px; display: flex; flex-direction: column; padding: 4px; gap: 4px; }
.map-zoom button { width: 34px; height: 34px; border-radius: 8px; border: 0; background: transparent; cursor: pointer; font-size: 17px; }
.map-zoom button:hover { background: var(--panel2); }
.map-legend { position: absolute; z-index: 4; right: 14px; top: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 7px; font-size: 12px; color: var(--muted); }
.map-legend span { display: inline-flex; align-items: center; gap: 6px; }
.map-legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.timebar { position: absolute; z-index: 5; left: 50%; transform: translateX(-50%); bottom: 14px; width: min(560px, calc(100% - 700px)); min-width: 320px; padding: 10px 14px; display: flex; align-items: center; gap: 12px; }
.timebar input[type=range] { flex: 1; accent-color: var(--accent); }
.timebar b { min-width: 74px; font-size: 13px; text-align: right; }
.play { width: 32px; height: 32px; border-radius: 50%; border: 0; cursor: pointer; background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; flex: none; }

.tooltip { position: absolute; z-index: 20; pointer-events: none; width: 270px; padding: 14px; opacity: 0; transition: opacity .15s; }
.tooltip.show { opacity: 1; }
.tt-head { display: flex; gap: 12px; align-items: center; }
.tt-head .avatar { width: 52px; height: 52px; border: 2px solid; }
.tt-head b { font-size: 14.5px; display: block; line-height: 1.3; }
.tt-nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 12px; text-align: center; }
.tt-nums div { background: var(--bg2); border-radius: 8px; padding: 6px 4px; }
.tt-nums b { display: block; font-size: 16px; } .tt-nums span { font-size: 10.5px; color: var(--muted); }

.node { cursor: pointer; }
.node text { fill: #1e293b; font-size: 11px; font-weight: 500; paint-order: stroke; stroke: #f4f6fa; stroke-width: 3.5px; pointer-events: none; }
.node .badge text { font-size: 9.5px; fill: #fff; stroke: none; font-weight: 700; }
.ev-node text { font-size: 9.5px; fill: #475569; }
.faded { opacity: .08; transition: opacity .2s; }
.link { transition: opacity .2s; }
.link.hl { animation: flow 1.2s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -24; } }
.pulse { animation: pulse 1.6s ease-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes pulse { 0% { opacity: .8; transform: scale(1); } 100% { opacity: 0; transform: scale(1.9); } }

/* profile panel */
.pf-cover { height: 74px; border-radius: 14px 14px 0 0; }
.pf-body { padding: 0 18px 18px; }
.pf-ava { width: 84px; height: 84px; margin-top: -42px; border: 3px solid; background: #fff; }
.pf-close { position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(0,0,0,.35); cursor: pointer; color: #fff; }
.pf-name { font-size: 18px; font-weight: 700; margin: 8px 0 0; }
.pf-nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0; }
.pf-nums div { background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 8px; text-align: center; }
.pf-nums b { display: block; font-size: 18px; } .pf-nums span { font-size: 11px; color: var(--muted); }
.sec-title { font-size: 11.5px; text-transform: uppercase; letter-spacing: .7px; color: var(--muted); margin: 16px 0 8px; font-weight: 600; display: flex; justify-content: space-between; }
.conn { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 9px; cursor: pointer; }
.conn:hover { background: var(--panel2); }
.conn .avatar { width: 32px; height: 32px; border: 2px solid; background: #fff; }
.conn .bar { height: 4px; border-radius: 4px; background: var(--line); margin-top: 4px; overflow: hidden; }
.conn .bar i { display: block; height: 100%; border-radius: 4px; }
.conn .w { margin-left: auto; font-weight: 700; font-size: 13px; }
.tl { position: relative; padding-left: 18px; }
.tl::before { content: ''; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.tl-item { position: relative; padding: 0 0 12px; cursor: pointer; }
.tl-item::before { content: ''; position: absolute; left: -17px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--accent)); box-shadow: 0 0 0 3px var(--bg2); }
.tl-item .d { font-size: 11.5px; color: var(--muted); }
.tl-item .t { font-weight: 500; font-size: 13px; line-height: 1.35; }
.tl-item:hover .t { color: var(--accent); }
.tl-year { font-weight: 700; font-size: 12px; color: var(--dim); margin: 4px 0 8px -18px; }

.search-res { position: absolute; left: 14px; right: 14px; background: var(--panel2); border: 1px solid var(--line2); border-radius: 10px; margin-top: 4px; max-height: 260px; overflow: auto; z-index: 3; box-shadow: var(--shadow); }
.search-res div { padding: 8px 10px; display: flex; gap: 8px; align-items: center; cursor: pointer; font-size: 13px; }
.search-res div:hover { background: var(--panel); }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 5px 0; font-size: 13px; cursor: pointer; }
.switch input { accent-color: var(--accent); width: 16px; height: 16px; }
.path-res { margin-top: 8px; font-size: 12.5px; }

/* ---------- experts / events lists ---------- */
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.filters .input { width: auto; min-width: 160px; }
.filters .input.grow { flex: 1; min-width: 220px; }
.ex-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.ex-card { padding: 18px; cursor: pointer; transition: .2s; position: relative; overflow: hidden; }
.ex-card:hover { border-color: var(--line2); transform: translateY(-2px); }
.ex-card::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--c); }
.ex-card .top { display: flex; gap: 12px; align-items: center; }
.ex-card .avatar { width: 56px; height: 56px; border: 2px solid var(--c); background: #fff; }
.ex-card .nm { font-weight: 700; font-size: 15px; line-height: 1.3; }
.ex-card .meta { display: flex; gap: 14px; margin-top: 12px; font-size: 12.5px; color: var(--muted); }
.ex-card .meta b { color: var(--text); }
.ev-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.ev-card { overflow: hidden; cursor: pointer; transition: .2s; display: flex; flex-direction: column; }
.ev-card:hover { transform: translateY(-2px); border-color: var(--line2); }
.ev-card .img { aspect-ratio: 16/9; background-size: cover; background-position: center; position: relative; }
.ev-card .img .st { position: absolute; top: 10px; left: 10px; }
.ev-card .img .ty { position: absolute; bottom: 10px; left: 10px; }
.ev-card .bd { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.ev-card .tt { font-weight: 600; font-size: 15px; line-height: 1.35; }
.ev-card .row { display: flex; gap: 6px; align-items: center; font-size: 12.5px; color: var(--muted); }
.ava-stack { display: flex; margin-top: auto; padding-top: 6px; }
.ava-stack img { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--panel); margin-left: -8px; background: #fff; }
.ava-stack img:first-child { margin-left: 0; }
.ava-stack span { font-size: 12px; color: var(--muted); margin-left: 8px; align-self: center; }
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 99px; backdrop-filter: blur(6px); }
.pill.done { background: rgba(100,116,139,.55); color: #e2e8f0; }
.pill.upcoming { background: rgba(34,197,94,.85); color: #fff; }
.pill.ongoing { background: rgba(245,158,11,.9); color: #fff; }
.pill.dark { background: rgba(7,11,20,.7); color: #fff; }

/* detail pages */
.hero { position: relative; border-radius: 16px; overflow: hidden; min-height: 300px; background-size: cover; background-position: center; display: flex; align-items: flex-end; margin-bottom: 22px; }
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7,11,20,.1) 0%, rgba(7,11,20,.95) 100%); }
.hero > div { position: relative; z-index: 1; padding: 28px; color: #fff; }
.hero h1 { margin: 10px 0 6px; font-size: 30px; line-height: 1.2; max-width: 900px; }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.box { padding: 20px; }
.box h3 { margin: 0 0 12px; font-size: 16px; }
.info-list { display: grid; gap: 12px; }
.info-list div { display: flex; gap: 10px; }
.info-list .k { width: 22px; text-align: center; flex: none; }
.agenda li { margin-bottom: 6px; }
.person { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 10px; cursor: pointer; }
.person:hover { background: var(--panel2); }
.person .avatar { width: 44px; height: 44px; border: 2px solid; background: #fff; }
.prof-head { display: flex; gap: 22px; align-items: center; padding: 24px; position: relative; overflow: hidden; }
.prof-head::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 0% 0%, var(--c) 0%, transparent 55%); opacity: .25; }
.prof-head > * { position: relative; }
.prof-head .avatar { width: 112px; height: 112px; border: 3px solid var(--c); background: #fff; }
.prof-head h1 { margin: 4px 0; font-size: 26px; }
#ego { width: 100%; height: 320px; display: block; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th, .tbl td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; }
.tbl th { color: var(--muted); font-weight: 600; font-size: 12px; }
.tbl tr.click { cursor: pointer; } .tbl tr.click:hover td { background: var(--panel2); }

/* ---------- admin ---------- */
.adm-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; align-items: start; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.img-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.img-pick img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 6px; cursor: pointer; border: 2px solid transparent; opacity: .7; }
.img-pick img.on { border-color: var(--accent); opacity: 1; }
.ppl-pick { max-height: 300px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.ppl-pick label { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-bottom: 1px solid var(--line); cursor: pointer; font-size: 13px; }
.ppl-pick label:hover { background: var(--panel2); }
.ppl-pick img { width: 28px; height: 28px; border-radius: 50%; background: #fff; }
.ppl-pick select { margin-left: auto; width: 150px; padding: 4px 6px; font-size: 12px; }
.log-item { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.log-item:last-child { border: 0; }

/* ---------- policies ---------- */
.pol-layout { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 22px; align-items: start; }
.pol-side { padding: 16px; position: sticky; top: 76px; max-height: calc(100vh - 92px); overflow: auto; }
.pol-side .grp { margin-bottom: 16px; }
.pol-side .grp:last-child { margin-bottom: 0; }
.chk { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 13px; cursor: pointer; color: var(--text); }
.chk input { accent-color: var(--accent); }
.chk .n { margin-left: auto; font-size: 11.5px; color: var(--dim); }
.pol-card { padding: 18px 20px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 18px; transition: .2s; }
.pol-card:hover { border-color: var(--line2); }
.pol-card .code { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12px; }
.pol-card h3 { margin: 2px 0 0; font-size: 16px; line-height: 1.4; cursor: pointer; }
.pol-card h3:hover { color: var(--accent); }
.pol-card p { margin: 0; color: var(--muted); font-size: 13.5px; }
.pol-card .side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; grid-row: 1 / span 4; grid-column: 2; }
.pol-card .tags { display: flex; gap: 6px; flex-wrap: wrap; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 99px; white-space: nowrap; }
.status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status.active { color: #16a34a; background: rgba(34,197,94,.12); }
.status.soon { color: #b45309; background: rgba(245,158,11,.14); }
.status.expired { color: #dc2626; background: rgba(239,68,68,.12); }
.code-b { font-weight: 700; color: #1d4ed8; background: rgba(37,99,235,.14); padding: 2px 8px; border-radius: 6px; }
.hot { color: #ea580c; font-weight: 600; font-size: 11.5px; }
.bm { background: none; border: 0; cursor: pointer; font-size: 18px; color: var(--dim); padding: 2px; }
.bm.on { color: var(--warn); }
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar .count { color: var(--muted); margin-right: auto; }
.seg { display: inline-flex; border: 1px solid var(--line2); border-radius: 9px; overflow: hidden; }
.seg button { padding: 7px 12px; border: 0; background: var(--panel); cursor: pointer; font-size: 12.5px; color: var(--muted); }
.seg button.on { background: rgba(37,99,235,.1); color: var(--accent); font-weight: 600; }
.drawer-bg { position: fixed; inset: 0; background: rgba(15,23,42,.35); z-index: 90; opacity: 0; pointer-events: none; transition: .25s; }
.drawer-bg.show { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(640px, 100%); z-index: 100; background: var(--bg2); border-left: 1px solid var(--line); overflow: auto; transform: translateX(100%); transition: transform .3s cubic-bezier(.2,.8,.2,1); }
.drawer.show { transform: none; }
.drawer .dh { padding: 24px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--bg2); z-index: 2; }
.drawer .db { padding: 20px 24px 40px; }
.drawer h2 { margin: 10px 0 6px; font-size: 21px; line-height: 1.35; }
.drawer ul { padding-left: 20px; margin: 6px 0; } .drawer li { margin-bottom: 6px; }
.lifeline { position: relative; height: 54px; margin: 10px 0 4px; }
.lifeline .track { position: absolute; left: 0; right: 0; top: 22px; height: 6px; border-radius: 6px; background: var(--line); }
.lifeline .fill { position: absolute; top: 22px; height: 6px; border-radius: 6px; }
.lifeline .mk { position: absolute; top: 0; transform: translateX(-50%); font-size: 11px; color: var(--muted); text-align: center; white-space: nowrap; }
.lifeline .mk::after { content: ''; display: block; width: 2px; height: 14px; background: currentColor; margin: 2px auto 0; }
.lifeline .mk.today { color: var(--accent); top: 30px; }
.lifeline .mk.today::after { order: -1; margin: 0 auto 2px; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 8px 14px; font-size: 13.5px; }
.kv .k { color: var(--muted); }
.cmp-bar { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 80; padding: 10px 14px; display: flex; gap: 12px; align-items: center; box-shadow: var(--shadow); }
.cmp-table td, .cmp-table th { vertical-align: top; }
.exp-list .row { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.exp-list .row:last-child { border: 0; }
.exp-list .days { width: 64px; text-align: center; font-weight: 700; font-size: 18px; line-height: 1.1; flex: none; }
.exp-list .days span { display: block; font-size: 10.5px; font-weight: 500; color: var(--muted); }

/* finder */
.finder { display: grid; grid-template-columns: 400px minmax(0, 1fr); gap: 22px; align-items: start; }
.finder-form { padding: 20px; position: sticky; top: 76px; }
.finder-form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.finder-form .f { margin-bottom: 14px; }
.size-badge { padding: 14px 16px; border-radius: 12px; background: linear-gradient(135deg, rgba(37,99,235,.15), rgba(124,58,237,.15)); border: 1px solid rgba(37,99,235,.35); margin-bottom: 16px; display: flex; gap: 14px; align-items: center; }
.size-badge b { font-size: 18px; }
.match { padding: 18px 20px; display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 16px; }
.ring { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 16px; }
.ring span { width: 52px; height: 52px; border-radius: 50%; background: var(--panel); display: grid; place-items: center; }
.why { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.why span { font-size: 12px; padding: 3px 8px; border-radius: 6px; background: rgba(34,197,94,.1); color: #15803d; }
.why span.w { background: rgba(245,158,11,.1); color: #b45309; }

.pol-layout > *, .finder > *, .two-col > *, .adm-grid > * { min-width: 0; }
.ml-toggle { display: none; float: right; }
@media (max-width: 1100px) {
  .two-col, .adm-grid, .finder, .pol-layout { grid-template-columns: 1fr; }
  .pol-side, .finder-form { position: static; max-height: none; }
  .map-legend { display: none; }
  .timebar { width: calc(100% - 28px); left: 14px; transform: none; min-width: 0; }
}
@media (max-width: 760px) {
  .page { padding: 18px 16px 50px; }
  .topbar { gap: 10px; padding: 0 12px; }
  .brand small, .demo-badge { display: none; }
  .map-left { width: calc(100% - 28px); max-height: 46%; }
  .map-left.collapsed .body, .map-left.collapsed .intro { display: none; }
  .ml-toggle { display: inline-flex; }
  .map-right { width: calc(100% - 28px); top: auto; bottom: 70px; max-height: 60%; }
  .map-stats { display: none; }
  .map-zoom { bottom: 80px; }
  .form-grid, .finder-form .row2 { grid-template-columns: 1fr; }
  .pol-card { grid-template-columns: minmax(0, 1fr); } .pol-card .side { grid-row: auto; grid-column: auto; flex-direction: row; align-items: center; flex-wrap: wrap; }
  .tag { white-space: normal; }
  .prof-head { flex-direction: column; text-align: center; }
  .hero h1 { font-size: 22px; }
  .kv { grid-template-columns: 1fr; }
}
@media print { .topbar, .finder-form, .btn { display: none !important; } body { background: #fff; color: #000; } .card { border-color: #ccc; background: #fff; } }

.drawer .pf-close { color: var(--text); }
.map-panel { box-shadow: 0 6px 24px rgba(15, 23, 42, .08); }
.card { box-shadow: 0 1px 3px rgba(15, 23, 42, .04); }
.pill.dark { background: rgba(15,23,42,.65); }
