:root {
  --bg: #f6f9ff;
  --surface: #ffffff;
  --surface-soft: #f9fbff;
  --surface-blue: #f2f7ff;
  --text: #13243d;
  --muted: #697b94;
  --line: #dfe8f5;
  --line-strong: #c9d8ec;
  --blue: #1769f5;
  --blue-2: #3d8cff;
  --blue-3: #e7f0ff;
  --navy: #092c63;
  --green: #17b56b;
  --green-soft: #e8f8f0;
  --orange: #ff9f1c;
  --orange-soft: #fff4df;
  --red: #f04d4d;
  --red-soft: #ffeded;
  --purple: #7657e8;
  --purple-soft: #f0ebff;
  --teal: #17a7a2;
  --teal-soft: #e5f8f7;
  --shadow: 0 8px 28px rgba(24, 67, 125, .08);
  --shadow-sm: 0 4px 16px rgba(24, 67, 125, .06);
  --radius: 16px;
  --radius-sm: 11px;
  --sidebar-w: 216px;
  --topbar-h: 66px;
  --ease: cubic-bezier(.2,.8,.2,1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: Inter, "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
svg { display: block; }
img { max-width: 100%; }
::selection { color: white; background: var(--blue); }

.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.hidden { display:none !important; }

/* Shared shell */
.app-shell { min-height: 100vh; }
.qentity-shell { padding-left: var(--sidebar-w); padding-top: var(--topbar-h); transition: padding-left .25s var(--ease); }
.qentity-shell.sidebar-collapsed { --sidebar-w: 76px; }
.qentity-shell.sidebar-collapsed .side-label,
.qentity-shell.sidebar-collapsed .side-section-title,
.qentity-shell.sidebar-collapsed .brand-copy,
.qentity-shell.sidebar-collapsed .collapse-copy { display:none; }
.qentity-shell.sidebar-collapsed .sidebar-nav a { justify-content:center; }
.qentity-shell.sidebar-collapsed .sidebar-brand { justify-content:center; }
.qentity-shell.sidebar-collapsed .sidebar-collapse { justify-content:center; }

.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); z-index: 80;
  background: var(--surface); border-right: 1px solid var(--line);
  display:flex; flex-direction:column; transition: width .25s var(--ease), transform .25s var(--ease);
}
.sidebar-brand { height: var(--topbar-h); display:flex; align-items:center; gap:12px; padding: 0 18px; border-bottom:1px solid var(--line); }
.brand-mark {
  width: 38px; height:38px; border-radius:12px; display:grid; place-items:center; flex: 0 0 auto;
  color:white; background: linear-gradient(145deg, var(--blue), #4b94ff);
  box-shadow: 0 7px 18px rgba(23,105,245,.22); font-weight:900; font-size:20px;
}
.brand-name { font-size:20px; font-weight:800; letter-spacing:-.4px; }
.brand-sub { color:var(--muted); font-size:11px; margin-top:-2px; white-space:nowrap; }
.sidebar-scroll { overflow-y:auto; padding:12px 10px 18px; flex:1; scrollbar-width:thin; }
.side-section-title { padding: 14px 12px 7px; color:#8a99ae; font-size:11px; font-weight:700; letter-spacing:.06em; }
.sidebar-nav { display:grid; gap:3px; }
.sidebar-nav a {
  min-height:40px; display:flex; align-items:center; gap:11px; padding: 8px 11px;
  color:#4b617c; border-radius:10px; transition: background .18s, color .18s, transform .18s;
}
.sidebar-nav a:hover { color:var(--blue); background:#f2f6ff; transform: translateX(2px); }
.sidebar-nav a.active { color:var(--blue); background:#eaf2ff; font-weight:700; }
.sidebar-nav a .nav-icon { width:19px; height:19px; flex:0 0 auto; }
.sidebar-nav .subnav { margin-left:17px; padding-left:12px; border-left:1px solid var(--line); }
.sidebar-nav .subnav a { min-height:34px; font-size:13px; }
.sidebar-collapse { min-height:54px; border-top:1px solid var(--line); display:flex; align-items:center; gap:10px; padding:0 18px; cursor:pointer; color:#5d7089; background:white; }
.sidebar-collapse:hover { color:var(--blue); }

.topbar {
  position: fixed; inset: 0 0 auto var(--sidebar-w); height:var(--topbar-h); z-index:70;
  display:flex; align-items:center; gap:18px; padding: 0 20px 0 24px;
  background:rgba(255,255,255,.94); backdrop-filter: blur(14px); border-bottom:1px solid var(--line);
  transition:left .25s var(--ease);
}
.topnav { display:flex; align-items:stretch; gap:2px; min-width:0; overflow:auto; scrollbar-width:none; flex:1; height:100%; }
.topnav::-webkit-scrollbar { display:none; }
.topnav a { position:relative; display:flex; align-items:center; white-space:nowrap; padding:0 14px; color:#53667f; font-weight:650; font-size:13px; }
.topnav a:hover { color:var(--blue); }
.topnav a.active { color:var(--blue); }
.topnav a.active::after { content:""; position:absolute; left:14px; right:14px; bottom:0; height:3px; border-radius:3px 3px 0 0; background:var(--blue); }
.top-actions { display:flex; align-items:center; gap:10px; flex:0 0 auto; }
.date-chip { height:38px; display:flex; align-items:center; gap:8px; padding:0 12px; border:1px solid var(--line-strong); background:white; border-radius:10px; color:#4d6077; font-size:12px; }
.user-chip { display:flex; align-items:center; gap:9px; padding:4px 3px 4px 6px; min-width:112px; }
.user-avatar { width:34px; height:34px; border-radius:50%; display:grid; place-items:center; background:linear-gradient(145deg,#d7e8ff,#a7c9ff); color:var(--navy); font-weight:800; overflow:hidden; }
.user-copy strong { display:block; font-size:13px; }
.user-copy small { display:block; color:var(--muted); font-size:10px; }
.mobile-menu-btn { display:none; }

.main-content { padding: 20px 22px 32px; min-width:0; }
.page-head { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; margin-bottom:16px; }
.page-head h1 { margin:0; font-size:26px; line-height:1.2; letter-spacing:-.5px; color:#102640; }
.page-head p { margin:7px 0 0; color:var(--muted); max-width:820px; }
.page-head-actions { display:flex; gap:9px; align-items:center; }

/* Buttons and controls */
.btn { height:38px; border-radius:10px; border:1px solid var(--line-strong); background:white; display:inline-flex; align-items:center; justify-content:center; gap:8px; padding:0 14px; cursor:pointer; transition:transform .16s, box-shadow .16s, border-color .16s, background .16s; font-weight:700; font-size:13px; }
.btn:hover { transform:translateY(-1px); box-shadow:var(--shadow-sm); border-color:#a9c3e8; }
.btn-primary { color:white; border-color:var(--blue); background:linear-gradient(135deg,var(--blue),#0b59df); box-shadow:0 7px 18px rgba(23,105,245,.2); }
.btn-primary:hover { border-color:#0a58da; box-shadow:0 9px 22px rgba(23,105,245,.28); }
.btn-soft { color:var(--blue); background:#eef4ff; border-color:#d8e7ff; }
.btn-danger { color:white; background:var(--red); border-color:var(--red); }
.btn-icon { width:38px; padding:0; }
.btn-sm { height:32px; border-radius:9px; padding:0 11px; font-size:12px; }
.spin .icon { animation: spin .8s linear infinite; }
@keyframes spin { to { transform:rotate(360deg); } }

.input, .select { height:38px; border:1px solid var(--line-strong); border-radius:10px; background:white; color:var(--text); padding:0 12px; outline:none; min-width:0; transition:border-color .15s, box-shadow .15s; }
.input:focus, .select:focus { border-color:#7fb0ff; box-shadow:0 0 0 3px rgba(23,105,245,.12); }
.search-control { position:relative; min-width:220px; flex:1; }
.search-control .input { width:100%; padding-left:38px; }
.search-control .icon { position:absolute; left:12px; top:50%; transform:translateY(-50%); color:#7d90aa; }
.filter-row { display:flex; align-items:center; gap:9px; flex-wrap:wrap; }
.segmented { display:inline-flex; gap:3px; padding:3px; background:#eff4fb; border-radius:10px; }
.segmented button { border:0; background:transparent; border-radius:8px; padding:7px 11px; cursor:pointer; color:#687b94; font-weight:650; }
.segmented button.active { background:white; color:var(--blue); box-shadow:0 3px 10px rgba(20,64,122,.08); }
.chip { display:inline-flex; align-items:center; gap:6px; min-height:28px; padding:4px 10px; border-radius:999px; background:#f2f6fb; border:1px solid #e1e9f5; color:#536981; font-size:12px; }
.chip.blue { color:var(--blue); background:#edf4ff; border-color:#d7e7ff; }

/* Panels */
.panel { background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); box-shadow:var(--shadow-sm); overflow:hidden; }
.panel.pad { padding:16px; }
.panel-head { min-height:48px; display:flex; align-items:center; justify-content:space-between; gap:12px; padding: 12px 16px; border-bottom:1px solid var(--line); }
.panel-title { display:flex; align-items:center; gap:8px; font-size:15px; font-weight:800; }
.panel-subtitle { color:var(--muted); font-size:12px; margin-top:2px; }
.panel-actions { display:flex; align-items:center; gap:8px; }
.panel-body { padding:16px; }
.panel-grid { display:grid; gap:14px; }
.grid-2,.grid-3,.grid-4,.grid-5 { display:grid; gap:14px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.grid-5 { grid-template-columns: repeat(5, minmax(0,1fr)); }
.content-grid-main { display:grid; grid-template-columns:minmax(0,1fr) 320px; gap:14px; align-items:start; }
.content-grid-3 { display:grid; grid-template-columns:1.05fr 1.05fr .9fr; gap:14px; }
.content-grid-4 { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; }
.stack { display:grid; gap:14px; }

.metric-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; margin-bottom:14px; }
.metric-card { min-height:104px; padding:16px; border:1px solid var(--line); border-radius:var(--radius); background:white; box-shadow:var(--shadow-sm); display:flex; gap:14px; align-items:center; position:relative; overflow:hidden; }
.metric-card::after { content:""; position:absolute; width:90px; height:90px; border-radius:50%; right:-34px; bottom:-40px; background:var(--tone-soft,#edf4ff); opacity:.6; }
.metric-icon { width:50px; height:50px; border-radius:50%; display:grid; place-items:center; flex:0 0 auto; color:white; background:var(--tone,var(--blue)); box-shadow:0 8px 20px color-mix(in srgb, var(--tone,var(--blue)) 25%, transparent); }
.metric-copy { min-width:0; }
.metric-label { color:#62758c; font-weight:700; }
.metric-value { font-size:25px; font-weight:850; line-height:1.2; letter-spacing:-.4px; margin:3px 0; }
.metric-trend { color:var(--muted); font-size:12px; }
.metric-trend.up { color:var(--green); }
.metric-trend.down { color:var(--red); }
.metric-info { position:absolute; top:11px; right:11px; color:#8ba0bc; }

.tone-blue { --tone:var(--blue); --tone-soft:var(--blue-3); }
.tone-green { --tone:var(--green); --tone-soft:var(--green-soft); }
.tone-orange { --tone:var(--orange); --tone-soft:var(--orange-soft); }
.tone-red { --tone:var(--red); --tone-soft:var(--red-soft); }
.tone-purple { --tone:var(--purple); --tone-soft:var(--purple-soft); }
.tone-teal { --tone:var(--teal); --tone-soft:var(--teal-soft); }

.status { display:inline-flex; align-items:center; justify-content:center; min-height:24px; padding:3px 9px; border-radius:999px; font-size:11px; font-weight:800; white-space:nowrap; }
.status.green { background:var(--green-soft); color:#0a9a55; }
.status.blue { background:var(--blue-3); color:var(--blue); }
.status.orange { background:var(--orange-soft); color:#d98600; }
.status.red { background:var(--red-soft); color:var(--red); }
.status.purple { background:var(--purple-soft); color:var(--purple); }
.status.gray { background:#eef2f7; color:#718199; }
.status.teal { background:var(--teal-soft); color:#098b87; }
.dot { width:8px; height:8px; border-radius:50%; display:inline-block; background:currentColor; }

/* Tables */
.table-wrap { width:100%; overflow:auto; scrollbar-width:thin; }
.data-table { width:100%; border-collapse:separate; border-spacing:0; min-width:780px; }
.data-table th { position:sticky; top:0; z-index:1; background:#f7f9fc; color:#53667f; font-size:11px; text-align:left; font-weight:800; padding:10px 12px; border-bottom:1px solid var(--line); white-space:nowrap; }
.data-table td { padding:10px 12px; border-bottom:1px solid #edf2f8; color:#334963; vertical-align:middle; }
.data-table tbody tr { transition:background .15s, transform .15s; }
.data-table tbody tr:hover { background:#f7faff; }
.data-table tbody tr.selected { background:#eef5ff; box-shadow: inset 3px 0 var(--blue); }
.data-table tbody tr:last-child td { border-bottom:0; }
.table-cell-main { font-weight:750; color:#183b6b; }
.table-cell-sub { color:var(--muted); font-size:11px; margin-top:2px; }
.table-toolbar { display:flex; align-items:center; gap:8px; flex-wrap:wrap; padding:12px 16px; border-bottom:1px solid var(--line); }
.table-footer { min-height:48px; display:flex; align-items:center; justify-content:space-between; gap:12px; padding:8px 14px; border-top:1px solid var(--line); color:var(--muted); font-size:12px; }
.pagination { display:flex; align-items:center; gap:4px; }
.pagination button { width:30px; height:30px; border:1px solid transparent; background:transparent; border-radius:8px; cursor:pointer; color:#52657e; }
.pagination button:hover { background:#edf4ff; color:var(--blue); }
.pagination button.active { background:var(--blue); color:white; }

/* Charts */
.chart-card { min-height:260px; }
.chart-svg { width:100%; height:auto; overflow:visible; }
.chart-line { fill:none; stroke:var(--blue); stroke-width:3; stroke-linecap:round; stroke-linejoin:round; stroke-dasharray:900; stroke-dashoffset:900; animation:drawLine 1.25s var(--ease) forwards; }
.chart-area { fill:url(#areaGradient); opacity:.45; }
.chart-dot { fill:white; stroke:var(--blue); stroke-width:2.5; transform-origin:center; animation:pop .4s var(--ease) backwards; }
.chart-grid { stroke:#e6edf7; stroke-width:1; }
.chart-label { fill:#75869c; font-size:11px; }
@keyframes drawLine { to { stroke-dashoffset:0; } }
@keyframes pop { from { transform:scale(0); } }
.donut { width:150px; aspect-ratio:1; border-radius:50%; background:conic-gradient(var(--blue) 0 52%, var(--teal) 52% 74%, var(--orange) 74% 90%, var(--purple) 90% 100%); position:relative; display:grid; place-items:center; }
.donut::after { content:""; width:88px; aspect-ratio:1; border-radius:50%; background:white; position:absolute; }
.donut-center { z-index:1; text-align:center; font-weight:850; font-size:22px; }
.donut-center small { display:block; color:var(--muted); font-size:11px; font-weight:650; }
.chart-legend { display:grid; gap:9px; }
.legend-row { display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:8px; color:#4f6279; font-size:12px; }
.progress { height:8px; border-radius:999px; background:#edf2f8; overflow:hidden; }
.progress > span { display:block; height:100%; border-radius:inherit; background:var(--tone,var(--blue)); transform-origin:left; animation:growX .8s var(--ease) both; }
@keyframes growX { from { transform:scaleX(0); } }
.bar-list { display:grid; gap:11px; }
.bar-row { display:grid; grid-template-columns:120px 1fr 68px; gap:10px; align-items:center; font-size:12px; }
.bar-track { height:9px; background:#edf2f8; border-radius:999px; overflow:hidden; }
.bar-fill { height:100%; border-radius:inherit; background:linear-gradient(90deg,var(--blue),#78adff); transform-origin:left; animation:growX .8s var(--ease) both; }

/* Lists, feeds and graph */
.feed { display:grid; }
.feed-item { display:grid; grid-template-columns:auto 1fr auto; gap:10px; padding:11px 0; border-bottom:1px solid #edf2f8; align-items:start; }
.feed-item:last-child { border-bottom:0; }
.feed-icon { width:28px; height:28px; border-radius:50%; display:grid; place-items:center; background:var(--tone-soft,var(--blue-3)); color:var(--tone,var(--blue)); }
.feed-title { font-weight:750; }
.feed-desc { color:var(--muted); font-size:11px; margin-top:2px; }
.feed-time { color:#8a9ab0; font-size:11px; white-space:nowrap; }
.list-group { display:grid; }
.list-row { min-height:45px; display:flex; align-items:center; justify-content:space-between; gap:12px; border-bottom:1px solid #edf2f8; }
.list-row:last-child { border-bottom:0; }
.list-row:hover { color:var(--blue); }
.network { position:relative; min-height:240px; overflow:hidden; background:radial-gradient(circle at center, #f2f7ff 0 2px, transparent 2px) 0 0/22px 22px; border-radius:14px; }
.network-line { position:absolute; height:2px; background:#a6c5ef; transform-origin:left center; opacity:.85; }
.network-node { position:absolute; min-width:82px; min-height:42px; padding:8px 10px; display:flex; align-items:center; justify-content:center; text-align:center; border-radius:14px; background:white; border:1px solid #bbd2f1; color:#24558d; box-shadow:0 5px 15px rgba(34,85,141,.08); font-size:11px; font-weight:750; z-index:2; transition:transform .2s, box-shadow .2s; }
.network-node:hover { transform:translateY(-3px) scale(1.03); box-shadow:0 10px 22px rgba(34,85,141,.16); }
.network-node.center { left:50%; top:50%; transform:translate(-50%,-50%); min-width:110px; min-height:58px; color:white; background:linear-gradient(135deg,var(--blue),#0b56d9); border:0; box-shadow:0 12px 26px rgba(23,105,245,.25); }
.network-node.center:hover { transform:translate(-50%,-54%) scale(1.03); }

/* Tabs and drawer */
.tabs { display:flex; align-items:center; gap:18px; border-bottom:1px solid var(--line); padding:0 14px; overflow:auto; scrollbar-width:none; }
.tabs button { border:0; background:transparent; padding:13px 2px 11px; color:#5e7189; cursor:pointer; font-weight:750; white-space:nowrap; position:relative; }
.tabs button.active { color:var(--blue); }
.tabs button.active::after { content:""; position:absolute; left:0; right:0; bottom:-1px; height:3px; border-radius:3px 3px 0 0; background:var(--blue); }
.drawer { position:fixed; top:var(--topbar-h); right:0; bottom:0; width:min(390px,94vw); background:white; border-left:1px solid var(--line); z-index:100; box-shadow:-16px 0 32px rgba(19,46,83,.12); transform:translateX(104%); transition:transform .28s var(--ease); overflow:auto; }
.drawer.open { transform:translateX(0); }
.drawer-head { position:sticky; top:0; background:white; z-index:2; display:flex; align-items:center; justify-content:space-between; padding:15px 17px; border-bottom:1px solid var(--line); }
.drawer-body { padding:16px; }
.drawer-backdrop { position:fixed; inset:0; z-index:95; background:rgba(7,27,58,.23); opacity:0; pointer-events:none; transition:opacity .25s; }
.drawer-backdrop.open { opacity:1; pointer-events:auto; }

/* Public QCompany shell */
.public-shell { min-height:100vh; background:#f8fbff; }
.public-header { height:64px; display:flex; align-items:center; gap:28px; padding:0 36px; background:white; border-bottom:1px solid var(--line); position:sticky; top:0; z-index:60; }
.public-brand { display:flex; align-items:center; gap:10px; font-size:22px; font-weight:900; color:#125ccf; white-space:nowrap; }
.public-brand small { color:#6f829a; font-size:12px; font-weight:650; border-left:1px solid var(--line); padding-left:12px; }
.public-nav { display:flex; align-items:stretch; justify-content:center; flex:1; height:100%; gap:6px; }
.public-nav a { display:flex; align-items:center; padding:0 13px; color:#2e4562; font-weight:700; font-size:13px; position:relative; }
.public-nav a.active { color:var(--blue); }
.public-nav a.active::after { content:""; position:absolute; bottom:0; left:13px; right:13px; height:3px; background:var(--blue); border-radius:3px 3px 0 0; }
.public-main { min-height:calc(100vh - 64px); }
.public-container { width:min(1540px, calc(100% - 64px)); margin:0 auto; }
.hero { position:relative; padding:32px 0 14px; overflow:hidden; }
.hero::before { content:""; position:absolute; inset:0; background:radial-gradient(circle at 70% 15%, rgba(72,137,255,.12), transparent 42%), linear-gradient(180deg,#f8fbff 0%,#f4f8ff 100%); z-index:0; }
.hero > * { position:relative; z-index:1; }
.hero-grid { display:grid; grid-template-columns:1.08fr .92fr; gap:34px; align-items:center; }
.hero h1 { margin:0; font-size:42px; line-height:1.15; letter-spacing:-1.2px; color:#102b50; }
.hero p { margin:14px 0 0; color:#556b85; font-size:16px; max-width:720px; }
.search-card { margin-top:20px; background:white; border:1px solid var(--line); border-radius:18px; box-shadow:var(--shadow); padding:14px; }
.search-tabs { display:flex; gap:16px; border-bottom:1px solid var(--line); margin-bottom:12px; }
.search-tabs button { border:0; background:transparent; color:#61748b; padding:8px 3px 10px; font-weight:800; cursor:pointer; position:relative; }
.search-tabs button.active { color:var(--blue); }
.search-tabs button.active::after { content:""; position:absolute; left:0; right:0; bottom:-1px; height:3px; background:var(--blue); }
.search-box-row { display:flex; gap:10px; }
.search-box-row .input { flex:1; height:48px; font-size:14px; }
.search-box-row .btn { height:48px; min-width:130px; }
.hero-visual { min-height:320px; }
.preview-card { background:white; border:1px solid var(--line); border-radius:18px; box-shadow:var(--shadow); padding:16px; }
.public-section { padding:16px 0 26px; }
.section-title { font-size:20px; font-weight:850; margin:0 0 12px; }
.public-metrics { display:grid; grid-template-columns:repeat(4,1fr); gap:14px; }
.public-footer-top { background:#eef5ff; border-top:1px solid #dce9fb; padding:18px 0; }
.trust-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:20px; }
.trust-item { display:flex; gap:11px; align-items:flex-start; }
.trust-item strong { display:block; }
.trust-item small { color:var(--muted); }
.public-footer { background:#062d66; color:#d5e5fb; padding:26px 0 18px; }
.footer-grid { display:grid; grid-template-columns:1.4fr repeat(4,1fr) 1.1fr; gap:28px; }
.footer-col h4 { color:white; margin:0 0 9px; }
.footer-col a { display:block; margin:6px 0; font-size:12px; color:#c5d8ef; }

/* Special dashboard structures */
.filter-sidebar-layout { display:grid; grid-template-columns:220px minmax(0,1fr) 270px; gap:14px; align-items:start; }
.filter-sidebar { padding:12px; }
.filter-block { padding:11px 0; border-bottom:1px solid #edf2f8; }
.filter-block:last-child { border-bottom:0; }
.filter-title { font-weight:800; margin-bottom:8px; display:flex; justify-content:space-between; }
.check-row { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:6px 0; color:#5f728a; font-size:12px; }
.check-row label { display:flex; align-items:center; gap:8px; }
.checkbox { width:16px; height:16px; border:1px solid #b9c9dd; border-radius:4px; display:grid; place-items:center; color:white; background:white; }
.checkbox.checked { background:var(--blue); border-color:var(--blue); }
.result-card { display:grid; grid-template-columns:auto 1.35fr 1fr .9fr .85fr auto; gap:12px; align-items:center; padding:12px 14px; border-bottom:1px solid var(--line); transition:background .15s; }
.result-card:hover { background:#f7faff; }
.result-logo { width:48px; height:48px; border-radius:11px; background:#f1f6ff; display:grid; place-items:center; color:var(--blue); font-weight:900; }
.result-actions { display:grid; gap:5px; }
.result-actions .btn { height:28px; font-size:11px; padding:0 8px; }
.score { font-size:22px; font-weight:850; color:#0e3a72; }
.pipeline { display:flex; overflow:hidden; border-radius:12px; border:1px solid var(--line); }
.pipeline-step { flex:1; padding:12px; text-align:center; background:var(--step-bg,#eef4ff); position:relative; }
.pipeline-step + .pipeline-step::before { content:""; position:absolute; left:-10px; top:50%; width:20px; height:20px; transform:translateY(-50%) rotate(45deg); background:inherit; border-top:1px solid white; border-right:1px solid white; }
.pipeline-step strong { display:block; font-size:18px; }

.funnel { display:grid; grid-template-columns:repeat(4,1fr); gap:20px; align-items:center; }
.funnel-step { min-height:155px; clip-path:polygon(8% 0,92% 0,80% 100%,20% 100%); display:grid; place-items:center; text-align:center; background:#eaf2ff; border:1px solid #b9d1f5; }
.funnel-step:nth-child(2) { background:#ebf9f2; }
.funnel-step:nth-child(3) { background:#fff3df; }
.funnel-step:nth-child(4) { background:#f1ecff; }
.funnel-arrow { position:absolute; }

.matrix-table td, .matrix-table th { text-align:center; }
.matrix-table td:first-child, .matrix-table th:first-child { text-align:left; }
.permission-mark { width:20px; height:20px; display:inline-grid; place-items:center; border-radius:50%; }
.permission-mark.allow { color:var(--green); background:#e8f8f0; }
.permission-mark.partial { color:#8091a8; background:#edf1f6; }
.permission-mark.deny { color:var(--red); background:#ffeded; }
.toggle { width:34px; height:20px; border-radius:999px; background:#d8e1ee; position:relative; cursor:pointer; transition:background .2s; display:inline-block; }
.toggle::after { content:""; position:absolute; top:3px; left:3px; width:14px; height:14px; border-radius:50%; background:white; box-shadow:0 2px 5px rgba(0,0,0,.18); transition:left .2s; }
.toggle.on { background:var(--blue); }
.toggle.on::after { left:17px; }

.api-layout { display:grid; grid-template-columns:260px minmax(0,1fr) 320px; gap:12px; }
.api-list { padding:10px; }
.api-group-title { display:flex; justify-content:space-between; align-items:center; padding:10px; color:#405873; font-weight:800; }
.api-endpoint { display:grid; grid-template-columns:auto 1fr auto; gap:9px; align-items:start; padding:9px 10px 9px 16px; border-radius:9px; cursor:pointer; }
.api-endpoint:hover, .api-endpoint.active { background:#eff5ff; }
.method { font-size:11px; font-weight:900; color:var(--green); }
.code-block { background:#f7f9fc; border:1px solid #e0e7f1; border-radius:10px; padding:13px; overflow:auto; font-family:"SFMono-Regular",Consolas,"Liberation Mono",monospace; font-size:12px; line-height:1.65; color:#334d70; min-height:260px; white-space:pre; }
.code-block.dark { background:#101d2d; color:#dbe8f8; border-color:#1d3148; }

.settings-grid { display:grid; grid-template-columns:250px minmax(0,1fr); gap:14px; }
.settings-nav a { display:flex; align-items:center; gap:9px; min-height:42px; padding:9px 11px; border-radius:10px; color:#61758e; }
.settings-nav a.active { color:var(--blue); background:#edf4ff; font-weight:800; }
.form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.form-group label { display:block; margin-bottom:6px; font-weight:750; color:#4d627d; }
.form-group .input, .form-group .select { width:100%; }
.form-group textarea { width:100%; min-height:92px; border:1px solid var(--line-strong); border-radius:10px; padding:10px 12px; resize:vertical; outline:none; }

/* Hub */
.hub-body { min-height:100vh; background:radial-gradient(circle at 90% 10%,rgba(44,124,255,.15),transparent 35%),#f6f9ff; }
.hub { width:min(1240px,calc(100% - 40px)); margin:0 auto; padding:44px 0 60px; }
.hub-head { display:flex; justify-content:space-between; gap:20px; align-items:flex-end; margin-bottom:28px; }
.hub-head h1 { font-size:40px; margin:0; letter-spacing:-1px; }
.hub-head p { margin:8px 0 0; color:var(--muted); max-width:740px; }
.hub-section { margin-top:26px; }
.hub-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; }
.hub-card { background:white; border:1px solid var(--line); border-radius:16px; padding:16px; box-shadow:var(--shadow-sm); transition:transform .18s,box-shadow .18s; min-height:150px; display:flex; flex-direction:column; }
.hub-card:hover { transform:translateY(-4px); box-shadow:var(--shadow); }
.hub-card .icon-wrap { width:42px; height:42px; border-radius:12px; display:grid; place-items:center; color:white; background:linear-gradient(135deg,var(--blue),#4f93ff); }
.hub-card h3 { margin:13px 0 5px; }
.hub-card p { margin:0; color:var(--muted); font-size:12px; }
.hub-card .go { margin-top:auto; padding-top:12px; color:var(--blue); font-weight:800; font-size:12px; }

/* Effects */
.reveal { opacity:0; transform:translateY(12px); animation:reveal .52s var(--ease) forwards; animation-delay:var(--delay,0s); }
@keyframes reveal { to { opacity:1; transform:none; } }
.pulse-dot { width:8px; height:8px; border-radius:50%; background:var(--green); box-shadow:0 0 0 0 rgba(23,181,107,.45); animation:pulse 1.8s infinite; }
@keyframes pulse { 70% { box-shadow:0 0 0 9px rgba(23,181,107,0); } 100% { box-shadow:0 0 0 0 rgba(23,181,107,0); } }
.toast-stack { position:fixed; right:20px; bottom:20px; z-index:200; display:grid; gap:10px; }
.toast { min-width:270px; max-width:360px; background:#102b50; color:white; border-radius:12px; box-shadow:0 14px 36px rgba(6,25,52,.25); padding:12px 14px; display:flex; gap:10px; align-items:flex-start; animation:toastIn .3s var(--ease); }
@keyframes toastIn { from { opacity:0; transform:translateY(14px) scale(.98); } }
.skeleton { border-radius:8px; background:linear-gradient(90deg,#eef2f7 25%,#f8fafc 37%,#eef2f7 63%); background-size:400% 100%; animation:shimmer 1.2s infinite; }
@keyframes shimmer { 0% { background-position:100% 0; } 100% { background-position:0 0; } }

/* Responsive */
@media (max-width: 1200px) {
  .metric-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .content-grid-main { grid-template-columns:1fr; }
  .content-grid-3 { grid-template-columns:1fr 1fr; }
  .filter-sidebar-layout { grid-template-columns:210px minmax(0,1fr); }
  .filter-sidebar-layout > :last-child { grid-column:1/-1; }
  .api-layout { grid-template-columns:240px minmax(0,1fr); }
  .api-layout > :last-child { grid-column:1/-1; }
  .public-metrics, .trust-grid { grid-template-columns:repeat(2,1fr); }
  .footer-grid { grid-template-columns:repeat(3,1fr); }
  .hub-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media (max-width: 920px) {
  :root { --sidebar-w: 0px; }
  .qentity-shell { padding-left:0; }
  .sidebar { width:260px; transform:translateX(-104%); box-shadow:18px 0 36px rgba(9,44,99,.18); }
  .sidebar.open { transform:translateX(0); }
  .topbar { left:0; padding-left:12px; }
  .mobile-menu-btn { display:inline-flex; }
  .topnav { display:none; }
  .date-chip { display:none; }
  .main-content { padding:16px; }
  .page-head { flex-direction:column; }
  .grid-3,.grid-4,.grid-5,.content-grid-3,.content-grid-4 { grid-template-columns:1fr; }
  .filter-sidebar-layout { grid-template-columns:1fr; }
  .filter-sidebar { display:none; }
  .api-layout,.settings-grid { grid-template-columns:1fr; }
  .hero-grid { grid-template-columns:1fr; }
  .public-header { padding:0 16px; }
  .public-nav { display:none; }
  .public-container { width:min(100% - 28px, 1540px); }
  .hero h1 { font-size:34px; }
  .hub-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width: 620px) {
  body { font-size:13px; }
  .metric-grid { grid-template-columns:1fr; }
  .metric-card { min-height:92px; }
  .public-metrics,.trust-grid,.footer-grid { grid-template-columns:1fr; }
  .search-box-row { flex-direction:column; }
  .search-box-row .btn { width:100%; }
  .hero { padding-top:22px; }
  .hero h1 { font-size:29px; }
  .public-header { gap:12px; }
  .public-brand small { display:none; }
  .page-head h1 { font-size:23px; }
  .hub-grid { grid-template-columns:1fr; }
  .hub-head { align-items:flex-start; flex-direction:column; }
  .hub-head h1 { font-size:32px; }
  .bar-row { grid-template-columns:90px 1fr 58px; }
  .result-card { grid-template-columns:auto 1fr; }
  .result-card > *:nth-child(n+3) { grid-column:2; }
}

@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { animation-duration:.01ms !important; animation-iteration-count:1 !important; scroll-behavior:auto !important; transition-duration:.01ms !important; }
}

/* Prevent data-heavy cards from expanding the viewport on narrow screens */
.panel,.stack,.content-grid-main>*,.content-grid-3>*,.content-grid-4>*,.grid-2>*,.grid-3>*,.grid-4>*,.grid-5>* { min-width:0; }
.table-wrap { max-width:100%; }
@media (max-width: 920px) {
  .panel { width:100%; }
  .main-content { overflow-x:hidden; }
}

/* ========================================================================
   QEntity / QCompany visual-fidelity pass v2.0
   Refined to match the approved ImageGen product concepts more closely.
   ======================================================================== */
:root {
  --bg: #f5f8fd;
  --surface: #ffffff;
  --surface-soft: #fbfdff;
  --surface-blue: #f4f8ff;
  --text: #10233f;
  --muted: #6c7f98;
  --line: #e2eaf5;
  --line-strong: #cfdbeb;
  --blue: #1268f3;
  --blue-2: #3889ff;
  --blue-3: #eaf2ff;
  --navy: #0a2d61;
  --green: #18b56d;
  --green-soft: #eaf8f1;
  --orange: #ff9d1c;
  --orange-soft: #fff4e1;
  --red: #f14d55;
  --red-soft: #fff0f1;
  --purple: #7358e8;
  --purple-soft: #f1edff;
  --teal: #15a5a0;
  --teal-soft: #e8f8f7;
  --shadow: 0 12px 34px rgba(33, 77, 137, .09);
  --shadow-sm: 0 4px 15px rgba(33, 77, 137, .055);
  --radius: 12px;
  --radius-sm: 9px;
  --sidebar-w: 202px;
  --topbar-h: 60px;
  --ease: cubic-bezier(.22,.82,.28,1);
}

body {
  background:
    radial-gradient(circle at 72% -18%, rgba(68,135,255,.085), transparent 31%),
    linear-gradient(180deg,#f8fbff 0,#f4f8fd 100%);
  font-size: 13px;
  letter-spacing: .005em;
}

/* Shell refinement */
.sidebar {
  border-right-color: #e3eaf4;
  box-shadow: 4px 0 18px rgba(31,72,127,.025);
}
.sidebar-brand {
  gap: 10px;
  padding: 0 16px;
  border-bottom-color: #e8eef6;
}
.brand-mark {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(145deg,#1268f3 0%,#4d95ff 100%);
  box-shadow: 0 8px 18px rgba(18,104,243,.22), inset 0 1px 0 rgba(255,255,255,.28);
  font-size: 0;
}
.brand-mark::before {
  content: "";
  width: 16px;
  height: 16px;
  border: 5px solid white;
  border-radius: 7px;
  position: absolute;
  left: 8px;
  top: 7px;
}
.brand-mark::after {
  content: "";
  width: 8px;
  height: 5px;
  border-radius: 2px;
  background: white;
  transform: rotate(38deg);
  position: absolute;
  right: 6px;
  bottom: 7px;
}
.brand-name { font-size: 19px; font-weight: 820; color:#10223c; }
.brand-sub { color:#70829a; font-size:10.5px; }
.sidebar-scroll { padding: 10px 9px 16px; }
.side-section-title {
  padding: 13px 10px 6px;
  color: #8d9bb0;
  font-size: 10px;
  font-weight: 760;
  letter-spacing: .045em;
}
.sidebar-nav { gap: 2px; }
.sidebar-nav a {
  min-height: 38px;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 9px;
  color: #4f647f;
  font-size: 12.5px;
  font-weight: 610;
}
.sidebar-nav a:hover { transform: none; background:#f3f7fd; }
.sidebar-nav a.active {
  background: linear-gradient(90deg,#e8f1ff 0,#edf5ff 100%);
  color: #1268f3;
  box-shadow: inset 0 0 0 1px rgba(18,104,243,.025);
}
.sidebar-nav a.active .nav-icon { filter: drop-shadow(0 2px 4px rgba(18,104,243,.15)); }
.sidebar-nav a .nav-icon { width:18px; height:18px; }
.sidebar-nav .subnav { margin-left: 17px; padding-left: 9px; border-left-color:#dae5f3; }
.sidebar-nav .subnav a { min-height:31px; font-size:12px; }
.sidebar-collapse {
  min-height: 48px;
  padding: 0 16px;
  border-top-color:#e7edf5;
  color:#5b6e87;
  font-size:12px;
}

.topbar {
  gap: 10px;
  padding: 0 16px 0 20px;
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(18px) saturate(120%);
  border-bottom-color: #e5ecf5;
  box-shadow: 0 4px 18px rgba(31,72,127,.025);
}
.topnav { gap:0; }
.topnav a {
  padding:0 13px;
  color:#41536e;
  font-size:12.5px;
  font-weight:690;
}
.topnav a.active::after { left:12px; right:12px; height:3px; }
.top-actions { gap:8px; }
.date-chip {
  height:36px;
  padding:0 11px;
  border-color:#d4dfed;
  border-radius:9px;
  color:#455a75;
  font-size:11.5px;
  box-shadow: 0 2px 8px rgba(28,69,125,.035);
}
.user-chip { min-width:108px; gap:8px; }
.user-avatar {
  width:32px;
  height:32px;
  color:#0d356c;
  background: linear-gradient(145deg,#e5efff,#c8dcff);
  border:1px solid #d7e5f7;
}
.user-avatar svg { width:17px; height:17px; }
.user-copy strong { font-size:12.5px; }
.user-copy small { font-size:9.5px; }

.main-content {
  padding: 17px 20px 26px;
  position: relative;
  background:
    radial-gradient(circle at 72% -10%, rgba(65,132,255,.07), transparent 30%),
    transparent;
}
.page-head { margin-bottom: 14px; align-items:center; }
.page-head > div:first-child { min-width:0; }
.page-head h1 {
  font-size: 25px;
  line-height:1.16;
  letter-spacing:-.55px;
  color:#10223e;
  font-weight:850;
}
.page-head p {
  margin-top:6px;
  color:#60748f;
  font-size:12.5px;
  line-height:1.55;
}
.page-head-actions { gap:8px; }

/* Controls */
.btn {
  height:36px;
  border-radius:9px;
  border-color:#d4dfed;
  padding:0 12px;
  font-size:12px;
  font-weight:720;
  box-shadow: 0 1px 2px rgba(25,67,125,.015);
}
.btn:hover {
  transform: translateY(-1px);
  border-color:#a8c4e9;
  box-shadow:0 7px 18px rgba(29,73,133,.085);
}
.btn-primary {
  background: linear-gradient(135deg,#146cf6 0%,#0757db 100%);
  border-color:#1268f3;
  box-shadow:0 7px 18px rgba(18,104,243,.19), inset 0 1px 0 rgba(255,255,255,.16);
}
.btn-primary:hover { box-shadow:0 9px 24px rgba(18,104,243,.25); }
.btn-soft { background:#edf4ff; border-color:#d4e4ff; }
.btn-sm { height:29px; padding:0 9px; font-size:11px; border-radius:8px; }
.btn-icon { width:36px; }
.input,.select {
  height:36px;
  border-color:#d4dfed;
  border-radius:9px;
  padding:0 11px;
  color:#263c5a;
  font-size:12px;
  box-shadow: inset 0 1px 1px rgba(25,63,112,.018);
}
.search-control { min-width:190px; }
.segmented { padding:2px; border-radius:9px; background:#f0f4fa; }
.segmented button { padding:6px 10px; border-radius:7px; font-size:11px; }
.chip {
  min-height:25px;
  padding:3px 9px;
  border-radius:999px;
  font-size:10.5px;
  background:#f4f7fb;
  border-color:#e2e9f3;
}
.status {
  min-height:21px;
  padding:2px 8px;
  font-size:10px;
  letter-spacing:0;
}

/* Cards and grids */
.panel {
  border-color:#dfe7f2;
  border-radius:12px;
  box-shadow:0 4px 13px rgba(31,73,132,.045);
  background:rgba(255,255,255,.98);
}
.panel:hover { border-color:#d7e3f2; }
.panel.pad { padding:14px; }
.panel-head {
  min-height:44px;
  padding:10px 14px;
  border-bottom-color:#e7edf5;
}
.panel-title { font-size:14px; font-weight:820; color:#18314f; }
.panel-subtitle { font-size:10.5px; }
.panel-body { padding:14px; }
.panel-actions { gap:7px; }
.grid-2,.grid-3,.grid-4,.grid-5,.panel-grid,.stack,.content-grid-main,.content-grid-3,.content-grid-4 { gap:12px; }
.content-grid-main { grid-template-columns:minmax(0,1fr) 302px; }
.content-grid-3 { grid-template-columns:1.08fr 1fr .92fr; }
.metric-grid { gap:12px; margin-bottom:12px; }
.metric-card {
  min-height:92px;
  padding:13px 14px;
  gap:12px;
  border-radius:12px;
  border-color:#dfe7f2;
  box-shadow:0 4px 13px rgba(31,73,132,.045);
}
.metric-card::after {
  width:74px;
  height:74px;
  right:-31px;
  bottom:-37px;
  opacity:.48;
}
.metric-card::before {
  content:"";
  position:absolute;
  left:0;
  right:0;
  top:0;
  height:1px;
  background:linear-gradient(90deg,transparent,rgba(255,255,255,.88),transparent);
}
.metric-card:hover {
  transform: translateY(-2px);
  border-color:#d1def0;
  box-shadow:0 9px 23px rgba(31,73,132,.075);
}
.metric-icon {
  width:46px;
  height:46px;
  box-shadow:0 7px 17px color-mix(in srgb,var(--tone,var(--blue)) 22%,transparent);
}
.metric-icon svg { width:22px; height:22px; }
.metric-label { color:#5a6f89; font-size:11.5px; }
.metric-value { font-size:23px; margin:2px 0; letter-spacing:-.45px; }
.metric-trend { font-size:10.5px; }
.metric-info { top:9px; right:9px; }

/* Tables */
.table-toolbar { padding:10px 14px; gap:7px; border-bottom-color:#e7edf5; }
.data-table { min-width:760px; }
.data-table th {
  background:#f8fafe;
  color:#52657f;
  font-size:10.5px;
  font-weight:800;
  padding:8px 10px;
  border-bottom-color:#e4ebf4;
}
.data-table td {
  padding:8px 10px;
  border-bottom-color:#edf2f7;
  color:#344a65;
  font-size:11.5px;
}
.data-table tbody tr:hover { background:#f7faff; }
.table-cell-main { color:#173f76; font-size:12px; }
.table-cell-sub { font-size:10px; }
.table-footer { min-height:42px; padding:6px 12px; font-size:10.5px; }
.table-footer .select { height:28px!important; }
.pagination { gap:2px; }
.pagination button { width:27px; height:27px; font-size:11px; border-radius:7px; }

/* Charts, feeds, lists */
.chart-svg { min-height:185px; }
.chart-line { stroke-width:2.6; }
.chart-dot { stroke-width:2; }
.chart-grid { stroke:#e8eef6; }
.chart-label { fill:#70839d; font-size:10px; }
.donut::after { box-shadow: inset 0 0 0 1px #eef2f7; }
.donut-center { font-size:20px; }
.chart-legend { gap:8px; }
.legend-row { font-size:11px; }
.bar-list { gap:10px; }
.bar-row { grid-template-columns:110px 1fr 72px; gap:9px; font-size:11px; }
.bar-track { height:7px; }
.feed-item { gap:9px; padding:9px 0; }
.feed-icon { width:27px; height:27px; }
.feed-title { font-size:11.5px; color:#203a5a; }
.feed-desc { font-size:10px; }
.feed-time { font-size:10px; }
.list-row { min-height:40px; font-size:11.5px; }
.network {
  min-height:225px;
  background:
    radial-gradient(circle at center,#eaf2ff 0 1.5px,transparent 1.6px) 0 0/24px 24px,
    linear-gradient(180deg,#fbfdff,#f8fbff);
  border:1px solid #edf2f8;
}
.network-line { height:1.5px; background:linear-gradient(90deg,#9ebfea,#c7daf3); }
.network-node {
  min-width:78px;
  min-height:38px;
  border-radius:12px;
  font-size:10px;
  box-shadow:0 4px 13px rgba(34,85,141,.065);
}
.network-node.center {
  min-width:104px;
  min-height:55px;
  border-radius:14px;
}

/* Footer / drawer */
.tabs { gap:16px; padding:0 12px; }
.tabs button { padding:11px 2px 10px; font-size:11.5px; }
.drawer { width:min(365px,94vw); box-shadow:-14px 0 30px rgba(19,46,83,.105); }
.toast { border-radius:10px; }

/* Admin overview composition closer to the approved concept */
.admin-dashboard-layout {
  display:grid;
  grid-template-columns:minmax(0,1fr) 302px;
  gap:12px;
  align-items:start;
}
.admin-dashboard-main { min-width:0; display:grid; gap:12px; }
.admin-dashboard-side { min-width:0; display:grid; gap:12px; }
.admin-overview-grid {
  display:grid;
  grid-template-columns:1.08fr .76fr .86fr .58fr;
  gap:12px;
}
.admin-overview-grid > .panel { min-height:270px; }
.admin-overview-table .data-table td { padding-top:7px; padding-bottom:7px; }
.quick-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.quick-link {
  min-height:50px;
  display:flex;
  align-items:center;
  gap:9px;
  padding:9px 10px;
  border:1px solid #e0e8f3;
  border-radius:9px;
  background:#fff;
  color:#25415f;
  font-weight:720;
  transition:.18s var(--ease);
}
.quick-link:hover { color:var(--blue); border-color:#bfd4f1; background:#f7faff; transform:translateY(-1px); }

/* Public product shell */
.public-shell { background:#f7faff; }
.public-header {
  height:62px;
  padding:0 38px;
  gap:26px;
  border-bottom-color:#e4ebf4;
  box-shadow:0 4px 18px rgba(28,69,125,.022);
}
.public-brand { font-size:22px; letter-spacing:-.45px; }
.public-brand::before {
  content:"Q";
  display:grid;
  place-items:center;
  width:25px;
  height:25px;
  border-radius:8px;
  color:#1268f3;
  background:#edf4ff;
  font-size:15px;
  font-weight:900;
  box-shadow:inset 0 0 0 1px #dce9fc;
}
.public-brand > span:first-child { margin-left:-4px; }
.public-brand small { font-size:11px; padding-left:11px; }
.public-nav { gap:3px; }
.public-nav a { padding:0 14px; font-size:12.5px; }
.public-container { width:min(1580px,calc(100% - 48px)); }
.hero { padding:25px 0 12px; }
.hero::before {
  background:
    radial-gradient(circle at 68% 15%,rgba(72,137,255,.12),transparent 39%),
    linear-gradient(180deg,#f9fbff 0%,#f5f9ff 100%);
}
.hero-grid { grid-template-columns:1.08fr .92fr; gap:28px; }
.hero h1 { font-size:39px; line-height:1.15; letter-spacing:-1px; }
.hero p { margin-top:11px; font-size:14px; line-height:1.65; }
.search-card {
  margin-top:16px;
  padding:12px 14px 13px;
  border-radius:14px;
  border-color:#dfe7f2;
  box-shadow:0 9px 28px rgba(36,82,145,.075);
}
.search-tabs { gap:18px; margin-bottom:10px; }
.search-tabs button { padding:7px 3px 9px; font-size:12px; }
.search-box-row { gap:9px; }
.search-box-row .input { height:44px; font-size:12.5px; }
.search-box-row .btn { height:44px; min-width:122px; }
.preview-card {
  border-radius:14px;
  border-color:#dfe7f2;
  box-shadow:0 8px 24px rgba(36,82,145,.065);
  padding:13px;
}
.hero-visual { min-height:292px; }
.public-metrics { gap:12px; }
.public-metrics .metric-card { min-height:84px; }
.public-section { padding:12px 0 20px; }
.section-title { font-size:18px; margin-bottom:10px; }
.public-footer-top { padding:14px 0; }
.trust-grid { gap:18px; }
.trust-item strong { font-size:12px; }
.trust-item small { font-size:10px; display:block; margin-top:2px; line-height:1.5; }
.public-footer { padding:20px 0 15px; }
.footer-grid { gap:22px; }

/* Public home structures */
.public-home-feature {
  min-height:100px;
  padding:12px;
  display:grid;
  grid-template-columns:auto 1fr;
  gap:10px;
  align-content:start;
}
.public-home-feature .feed-icon { grid-row:1/4; }
.public-home-feature h3 { margin:0; font-size:13px; }
.public-home-feature p { margin:3px 0 0; font-size:10.5px!important; line-height:1.55; }
.public-home-feature a { justify-self:start; margin-top:3px; }
.home-lower-grid {
  display:grid;
  grid-template-columns:minmax(0,1fr) 330px;
  gap:12px;
  align-items:start;
}
.industry-grid {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px;
}
.industry-tile {
  min-height:64px;
  border:1px solid #e1e9f4;
  border-radius:10px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:5px;
  background:#fff;
  color:#294563;
  font-weight:700;
  font-size:10px;
  transition:.18s var(--ease);
}
.industry-tile:hover { color:var(--blue); background:#f6faff; border-color:#bfd5f2; transform:translateY(-2px); }
.workflow-card { padding:12px 14px; }
.workflow-card .pipeline-step { padding:10px 8px; }
.workflow-card .pipeline-step strong { font-size:16px; }
.workflow-card .pipeline-step b { display:block; font-size:11px; margin-top:2px; }
.workflow-card .pipeline-step small { font-size:9.5px; line-height:1.45; }

/* Public search/results density */
.filter-sidebar-layout { grid-template-columns:205px minmax(0,1fr) 258px; gap:12px; }
.filter-sidebar { padding:10px; }
.filter-block { padding:9px 0; }
.filter-title { margin-bottom:6px; font-size:11.5px; }
.check-row { padding:5px 0; font-size:10.5px; }
.checkbox { width:15px; height:15px; }
.result-card {
  grid-template-columns:auto 1.38fr 1fr .88fr .86fr auto;
  gap:10px;
  padding:10px 12px;
}
.result-logo { width:44px; height:44px; border-radius:9px; }
.result-actions { gap:4px; }
.result-actions .btn { height:26px; font-size:10px; }

/* API and permissions */
.api-layout { grid-template-columns:242px minmax(0,1fr) 305px; gap:10px; }
.api-list { padding:8px; }
.api-group-title { padding:8px; font-size:11.5px; }
.api-endpoint { padding:8px 8px 8px 12px; border-radius:8px; font-size:10.5px; }
.code-block { border-radius:9px; font-size:11px; min-height:235px; }
.matrix-table td,.matrix-table th { padding-top:7px; padding-bottom:7px; }
.permission-mark { width:19px; height:19px; }
.toggle { width:32px; height:18px; }
.toggle::after { width:12px; height:12px; }
.toggle.on::after { left:17px; }

/* Page-specific first-screen fidelity */
body[data-page="qentityOverview"] .main-content { padding-bottom:18px; }
body[data-page="qentityOverview"] .page-head { margin-bottom:12px; }
body[data-page="qentityOverview"] .metric-grid { margin-bottom:0; }
body[data-page="qentityOverview"] .admin-overview-grid .panel-body { padding:12px 14px; }
body[data-page="qentityOverview"] .chart-svg { min-height:175px; }
body[data-page="qcompanyHome"] .hero { padding-bottom:8px; }
body[data-page="qcompanyHome"] .hero .network { min-height:260px; }
body[data-page="qcompanyHome"] .public-section { padding-top:8px; }
body[data-page="qcompanySearch"] .hero,
body[data-page="qcompanyAiSearch"] .hero { padding-top:22px; }
body[data-page="qentityRoleMatrix"] .data-table td,
body[data-page="qentityRoleMatrix"] .data-table th { padding-top:6px; padding-bottom:6px; }
body[data-page="qentityUsers"] .drawer .panel { box-shadow:none; }

/* Refined motion */
.reveal { animation-duration:.46s; transform:translateY(9px); }
.panel,.metric-card,.quick-link,.industry-tile,.result-card { will-change:transform; }
.feed-item { animation:softRise .42s var(--ease) both; }
.feed-item:nth-child(2){animation-delay:.035s}.feed-item:nth-child(3){animation-delay:.07s}.feed-item:nth-child(4){animation-delay:.105s}.feed-item:nth-child(5){animation-delay:.14s}
@keyframes softRise { from { opacity:0; transform:translateY(5px); } to { opacity:1; transform:none; } }

@media (min-width: 1025px) {
  .mobile-menu-btn { display:none!important; }
}

@media (max-width: 1320px) {
  .admin-overview-grid { grid-template-columns:1fr 1fr; }
  .admin-overview-grid > .panel { min-height:245px; }
  .home-lower-grid { grid-template-columns:1fr; }
}

@media (max-width: 1024px) {
  :root { --sidebar-w:0px; }
  .topbar { left:0; }
  .mobile-menu-btn { display:inline-flex; }
  .admin-dashboard-layout { grid-template-columns:1fr; }
  .admin-dashboard-side { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .public-header { padding:0 18px; }
  .public-container { width:min(100% - 28px,1580px); }
}

@media (max-width: 720px) {
  .admin-dashboard-side { grid-template-columns:1fr; }
  .admin-overview-grid { grid-template-columns:1fr; }
  .quick-grid,.industry-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .hero h1 { font-size:30px; }
}

.platform-overview-panel { grid-column:1 / span 3; }
.overview-split-grid {
  display:grid;
  grid-template-columns:1.08fr .72fr .9fr;
  min-height:260px;
}
.overview-split-grid > section { min-width:0; padding:13px 14px; }
.overview-split-grid > section + section { border-left:1px solid #e7edf5; }
.overview-block-title { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:8px; color:#1a3554; font-size:12px; font-weight:820; }
.overview-block-sub { color:var(--muted); font-size:10px; }
.platform-meta { display:grid; gap:10px; }
.platform-meta-row { display:grid; grid-template-columns:1fr auto; align-items:center; gap:10px; color:#5d7089; font-size:11px; }
.platform-meta-row strong { color:#24415f; font-weight:760; }
.platform-load { display:grid; grid-template-columns:auto 1fr; gap:10px; align-items:center; }
.platform-load .progress { min-width:90px; }

@media (max-width:1320px){
  .platform-overview-panel { grid-column:1/-1; }
  .overview-split-grid { grid-template-columns:1fr 1fr; }
  .overview-split-grid > section:last-child { grid-column:1/-1; border-left:0; border-top:1px solid #e7edf5; }
}
@media (max-width:720px){
  .overview-split-grid { grid-template-columns:1fr; }
  .overview-split-grid > section + section { border-left:0; border-top:1px solid #e7edf5; }
  .overview-split-grid > section:last-child { grid-column:auto; }
}

.company-network {
  position:relative;
  min-height:258px;
  border:1px solid #e1e9f4;
  border-radius:12px;
  overflow:hidden;
  background:
    radial-gradient(circle at center,#dfeaff 0 1.3px,transparent 1.4px) 0 0/23px 23px,
    linear-gradient(180deg,#fdfeff,#f8fbff);
}
.company-network::before,
.company-network::after {
  content:"";
  position:absolute;
  left:50%; top:50%;
  width:62%; height:62%;
  transform:translate(-50%,-50%);
  border:1px dashed #d7e4f5;
  border-radius:50%;
}
.company-network::after { width:82%; height:82%; opacity:.65; }
.company-network-line {
  position:absolute;
  left:50%; top:50%;
  height:1.5px;
  background:linear-gradient(90deg,#aac6ec,#d2e1f4);
  transform-origin:left center;
  z-index:1;
}
.company-network-node {
  position:absolute;
  z-index:2;
  transform:translate(-50%,-50%);
  display:grid;
  justify-items:center;
  gap:4px;
  min-width:78px;
  color:#274764;
  font-size:10px;
  font-weight:720;
  text-align:center;
}
.company-network-node .node-badge {
  width:48px;
  height:48px;
  border-radius:50%;
  display:grid;
  place-items:center;
  color:var(--node-color,var(--blue));
  background:#fff;
  border:1px solid color-mix(in srgb,var(--node-color,var(--blue)) 55%,#dbe6f4);
  box-shadow:0 7px 18px rgba(36,80,137,.08);
}
.company-network-node.center .node-badge {
  width:64px;
  height:64px;
  border:0;
  color:#fff;
  background:linear-gradient(145deg,#1770f8,#0656d8);
  box-shadow:0 12px 26px rgba(18,104,243,.28);
}
.company-network-node.center { font-size:11px; color:#15395f; }
.company-network-label {
  position:absolute;
  z-index:3;
  padding:2px 7px;
  border-radius:999px;
  color:var(--label-color,var(--blue));
  background:#fff;
  border:1px solid color-mix(in srgb,var(--label-color,var(--blue)) 32%,#e5ecf5);
  font-size:8.5px;
  white-space:nowrap;
}
.company-preview-grid { display:grid; grid-template-columns:minmax(0,1.35fr) minmax(210px,.65fr); gap:12px; }
.company-summary-card {
  border:1px solid #e0e8f3;
  border-radius:12px;
  padding:13px;
  background:#fff;
  box-shadow:0 4px 14px rgba(31,73,132,.035);
}
.company-summary-head { display:flex; align-items:flex-start; justify-content:space-between; gap:8px; }
.company-summary-head strong { font-size:13px; }
.company-summary-meta { color:var(--muted); font-size:10.5px; line-height:1.65; margin:8px 0; }
.company-summary-title { font-size:11px; font-weight:820; color:#263f5e; padding-top:8px; margin-top:8px; border-top:1px solid #edf2f7; }
.home-capability-layout { display:grid; grid-template-columns:minmax(0,1fr) 330px; gap:12px; align-items:start; }
.home-feature-grid { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:10px; }
.home-section-heading { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:9px; }
.home-section-heading h2 { margin:0; font-size:17px; }
.home-section-heading a { color:var(--blue); font-size:10.5px; font-weight:760; }

@media(max-width:1300px){
  .company-preview-grid { grid-template-columns:1fr; }
  .company-summary-card { display:none; }
  .home-capability-layout { grid-template-columns:1fr; }
}
@media(max-width:900px){
  .home-feature-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .company-network { min-height:230px; }
}

/* =========================================================
   Fidelity & polish pass v2.1
   Calibrated against the approved QEntity / QCompany concepts
   ========================================================= */
:root {
  --bg:#f5f8fd;
  --surface:#fff;
  --text:#132a47;
  --muted:#6d7f96;
  --line:#e1e9f3;
  --line-strong:#cfdbeb;
  --shadow:0 5px 18px rgba(29,72,126,.055);
  --shadow-sm:0 2px 9px rgba(29,72,126,.045);
}
body { letter-spacing:.002em; }
.panel,
.metric-card,
.preview-card { border-color:#dfe8f3; }
.panel { box-shadow:0 3px 13px rgba(34,76,127,.045); }
.panel:hover { border-color:#d5e1ef; }
.main-content { background:radial-gradient(circle at 80% -10%,rgba(80,143,255,.08),transparent 32%),var(--bg); }
.page-head { position:relative; min-height:54px; margin-bottom:11px; }
.page-head-copy { position:relative; z-index:2; }
.page-head h1 { font-size:25px; letter-spacing:-.65px; }
.page-head p { margin-top:5px; font-size:12px; line-height:1.55; }
.page-head-actions { position:relative; z-index:3; }

/* Subtle native illustration that replaces generic empty header space. */
.page-head-art { display:none; position:absolute; right:250px; top:-16px; width:230px; height:82px; opacity:.88; pointer-events:none; }
.qentity-shell .page-head-art::before,
.qentity-shell .page-head-art::after { content:""; position:absolute; left:34px; right:16px; top:48px; height:1px; background:linear-gradient(90deg,transparent,#a8c8f3 20%,#bdd5f4 80%,transparent); transform:rotate(-7deg); }
.qentity-shell .page-head-art::after { transform:rotate(7deg); opacity:.75; }
.head-art-db { position:absolute; left:92px; top:20px; width:55px; height:40px; border-radius:50%/18%; background:linear-gradient(180deg,#cfe2ff,#8bb8f8); box-shadow:0 7px 18px rgba(57,116,198,.13),inset 0 -8px 0 rgba(255,255,255,.22); }
.head-art-db::before,.head-art-db::after { content:""; position:absolute; left:0; right:0; height:9px; border:1px solid rgba(255,255,255,.72); border-radius:50%; }
.head-art-db::before { top:11px; }.head-art-db::after { top:24px; }
.head-art-card { position:absolute; width:44px; height:54px; border-radius:7px; border:1px solid #bfd5f2; background:linear-gradient(180deg,#fff,#eaf3ff); box-shadow:0 6px 16px rgba(45,100,174,.09); }
.head-art-card::before { content:""; position:absolute; left:9px; right:9px; top:13px; height:3px; border-radius:4px; background:#7faef0; box-shadow:0 9px 0 #c4d8f4,0 18px 0 #c4d8f4; }
.head-art-card-a { left:27px; top:15px; transform:rotate(-5deg); }
.head-art-card-b { right:15px; top:9px; transform:rotate(5deg); }
.head-art-node { position:absolute; width:7px; height:7px; border-radius:50%; background:#5c9bf4; box-shadow:0 0 0 5px rgba(92,155,244,.10); }
.head-art-node.n1 { left:6px; top:48px; }.head-art-node.n2 { right:0; top:44px; }.head-art-node.n3 { left:168px; top:68px; }
body[data-page="qentitySources"] .page-head-art,
body[data-page="qentityDedupe"] .page-head-art,
body[data-page="qentityQuality"] .page-head-art,
body[data-page="qentitySync"] .page-head-art,
body[data-page="qentityApi"] .page-head-art,
body[data-page="qentityServices"] .page-head-art { display:block; }

/* More deliberate surface hierarchy */
.metric-card { min-height:88px; padding:12px 14px; border-radius:12px; }
.metric-icon { width:48px; height:48px; border-radius:50%; }
.metric-value { font-size:25px; line-height:1.04; letter-spacing:-.6px; }
.metric-title { font-size:11.5px; }
.metric-trend { margin-top:5px; font-size:10px; }
.metric-card:hover { transform:translateY(-2px); box-shadow:0 9px 23px rgba(36,84,145,.09); }
.panel-head { min-height:43px; padding:9px 13px; }
.panel-title { font-size:13px; }
.panel-body,.panel.pad { padding:12px 13px; }
.table-toolbar { padding:9px 12px; }
.data-table th { padding:7px 9px; font-size:10px; }
.data-table td { padding:7px 9px; font-size:10.8px; }
.table-footer { min-height:36px; }
.status { font-size:9.5px; padding:3px 7px; }
.btn { border-radius:8px; }
.btn-sm { height:29px; }
.select,.input { border-radius:8px; }
.content-grid-3,.content-grid-4 { align-items:start; }
.stack { align-content:start; }

/* User identity treatment */
.user-table-cell { display:inline-flex; align-items:center; gap:8px; min-width:92px; }
.user-table-cell strong { font-weight:760; color:#213c5b; }
.mini-avatar,.profile-avatar { display:grid; place-items:center; flex:0 0 auto; color:#173b66; background:linear-gradient(145deg,#e8f2ff,#bad4f8); border:1px solid rgba(83,133,200,.16); box-shadow:inset 0 0 0 2px rgba(255,255,255,.8); font-weight:820; }
.mini-avatar { width:26px; height:26px; border-radius:50%; font-size:10px; }
.profile-avatar { width:58px; height:58px; border-radius:50%; font-size:20px; background:linear-gradient(145deg,#d9eaff,#93bbea); }
.mini-avatar.tone-purple { background:linear-gradient(145deg,#f0eaff,#c8b9f7); color:#533a9b; }
.mini-avatar.tone-orange { background:linear-gradient(145deg,#fff2df,#f4c884); color:#915c12; }
.mini-avatar.tone-green { background:linear-gradient(145deg,#e5f8ee,#a8dfc5); color:#1d704d; }

/* Completeness page: same four-column composition as the approved concept. */
.completeness-dashboard-grid { display:grid; grid-template-columns:1.04fr 1.04fr 1.18fr .96fr; gap:11px; align-items:start; }
.completeness-high { grid-column:1; min-height:264px; }
.completeness-low { grid-column:2; min-height:264px; }
.completeness-heatmap { grid-column:3; min-height:264px; }
.completeness-suggestions { grid-column:4; min-height:264px; }
.completeness-field-table { grid-column:1 / span 3; min-width:0; }
.completeness-activity { grid-column:4; }
.completeness-heatmap .data-table th,
.completeness-heatmap .data-table td { padding:4px 5px; font-size:9px; height:20px; }
.completeness-heatmap .permission-mark { width:16px; height:16px; }
.completeness-field-table .data-table th,
.completeness-field-table .data-table td { padding:4px 8px; font-size:9.6px; }
.completeness-field-table .panel-head { min-height:39px; }
.completeness-field-table .table-footer { min-height:32px; }
.completeness-high .bar-list,.completeness-low .bar-list { gap:8px; margin-top:10px; }
.completeness-high .bar-row,.completeness-low .bar-row { grid-template-columns:94px 1fr 58px; font-size:10px; }
.insight-card { padding:10px; border-radius:9px; border:1px solid; }
.insight-card strong { font-size:11px; }.insight-card p { margin:6px 0 3px; font-size:10px; }.insight-card small { color:var(--muted); font-size:9px; }
.insight-card.green { color:#16704a; background:#effaf4; border-color:#ccebdc; }
.insight-card.blue { color:#1f5fae; background:#f0f6ff; border-color:#d3e3fa; }
.insight-card.purple { color:#6844b3; background:#f6f1ff; border-color:#e4d9fa; }
.compact-stack { gap:8px; }
.completeness-activity .feed-item { padding:7px 0; }
.home-section-link { color:var(--blue); font-size:10px; font-weight:760; }
body[data-page="qentityCompleteness"] .metric-grid { margin-bottom:11px; }
body[data-page="qentityCompleteness"] .main-content { padding-bottom:14px; }
body[data-page="qentityCompleteness"] .panel.pad { padding:11px 12px; }
body[data-page="qentityCompleteness"] .panel-title { font-size:12px; }
body[data-page="qentityCompleteness"] .panel:last-of-type { }

/* Dense entity-resolution and API workspaces */
body[data-page="qentityDedupe"] .content-grid-main { grid-template-columns:minmax(0,1fr) 308px; gap:10px; }
body[data-page="qentityDedupe"] .content-grid-main > .stack,
body[data-page="qentityDedupe"] .content-grid-main > aside { gap:9px; }
body[data-page="qentityDedupe"] .panel-body.content-grid-3 { grid-template-columns:1.08fr .92fr .84fr; gap:9px; padding:10px; }
body[data-page="qentityDedupe"] .network { min-height:150px; }
body[data-page="qentityDedupe"] .data-table th,
body[data-page="qentityDedupe"] .data-table td { padding:5px 7px; font-size:9.7px; }
body[data-page="qentityDedupe"] .bar-list { gap:7px; }
body[data-page="qentityDedupe"] .footerStrip { display:none; }

body[data-page="qentityApi"] .api-layout { grid-template-columns:226px minmax(0,1fr) 292px; gap:9px; align-items:start; }
body[data-page="qentityApi"] .api-list { max-height:500px; overflow:auto; padding:7px; }
body[data-page="qentityApi"] .api-group-title { padding:6px 7px; }
body[data-page="qentityApi"] .api-endpoint { padding:6px 7px 6px 10px; font-size:9.5px; }
body[data-page="qentityApi"] .code-block { min-height:150px; max-height:180px; padding:9px; font-size:9.5px; line-height:1.48; }
body[data-page="qentityApi"] .panel-body { padding:9px 10px; }
body[data-page="qentityApi"] .tabs button { padding-top:8px; padding-bottom:7px; }
body[data-page="qentityApi"] .data-table td,
body[data-page="qentityApi"] .data-table th { padding:5px 7px; font-size:9.5px; }
body[data-page="qentityApi"] .content-grid-3 { margin-top:10px!important; }
body[data-page="qentityApi"] .content-grid-3 .panel-head { min-height:38px; }

/* User page matches the approved detail-open state on desktop. */
body[data-page="qentityUsers"] .user-drawer-preview { width:320px; top:var(--topbar-h); }
body[data-page="qentityUsers"] .drawer-body { padding:12px; }
body[data-page="qentityUsers"] .drawer-head { padding:11px 13px; }
body[data-page="qentityUsers"] .drawer .panel-head { min-height:38px; }
body[data-page="qentityUsers"] .drawer .panel-body { padding:10px 12px; }
body[data-page="qentityUsers"] .drawer .list-row { min-height:32px; font-size:10px; }
body[data-page="qentityUsers"] .data-table td,
body[data-page="qentityUsers"] .data-table th { padding:5px 8px; }

/* Public QCompany pages: bring the 1672×941 first viewport closer to the concepts. */
.public-header { height:59px; padding-inline:38px; }
.public-brand > span:first-child { font-size:22px; }
.public-container { width:min(1590px,calc(100% - 54px)); }
body[data-page="qcompanyHome"] .hero { padding:20px 0 5px; }
body[data-page="qcompanyHome"] .hero-grid { gap:25px; align-items:start; }
body[data-page="qcompanyHome"] .hero h1 { font-size:37px; margin-top:30px; }
body[data-page="qcompanyHome"] .hero p { font-size:13px; max-width:760px; margin-top:9px; }
body[data-page="qcompanyHome"] .search-panel { margin-top:16px; padding:12px 14px; }
body[data-page="qcompanyHome"] .search-box-row .input,
body[data-page="qcompanyHome"] .search-box-row .btn { height:42px; }
body[data-page="qcompanyHome"] .preview-card { padding:11px; }
body[data-page="qcompanyHome"] .company-network { min-height:218px; }
body[data-page="qcompanyHome"] .company-network-node .node-badge { width:40px; height:40px; }
body[data-page="qcompanyHome"] .company-network-node.center .node-badge { width:55px; height:55px; }
body[data-page="qcompanyHome"] .company-summary-card { padding:10px; }
body[data-page="qcompanyHome"] .company-summary-meta { margin:5px 0; line-height:1.5; }
body[data-page="qcompanyHome"] .company-summary-card .list-row { min-height:29px; }
body[data-page="qcompanyHome"] .metric-card { min-height:75px; padding:9px 12px; }
body[data-page="qcompanyHome"] .metric-icon { width:42px; height:42px; }
body[data-page="qcompanyHome"] .metric-value { font-size:23px; }
body[data-page="qcompanyHome"] .public-section { padding:6px 0 9px; }
body[data-page="qcompanyHome"] .home-section-heading { margin-bottom:6px; }
body[data-page="qcompanyHome"] .home-section-heading h2 { font-size:15px; }
body[data-page="qcompanyHome"] .public-home-feature { min-height:104px; padding:10px; gap:5px 8px; }
body[data-page="qcompanyHome"] .public-home-feature .feed-icon { width:32px; height:32px; }
body[data-page="qcompanyHome"] .public-home-feature h3 { font-size:12px; }
body[data-page="qcompanyHome"] .public-home-feature p { font-size:9px!important; line-height:1.4; }
body[data-page="qcompanyHome"] .public-home-feature .btn { height:25px; font-size:9px; padding-inline:8px; }
body[data-page="qcompanyHome"] .industry-grid { gap:6px; }
body[data-page="qcompanyHome"] .industry-tile { min-height:57px; }
body[data-page="qcompanyHome"] .workflow-card { padding:7px 9px; }
body[data-page="qcompanyHome"] .workflow-card .pipeline-step { padding:7px 5px; }
body[data-page="qcompanyHome"] .workflow-card .pipeline-step strong { font-size:14px; }
body[data-page="qcompanyHome"] .workflow-card .pipeline-step b { font-size:10px; }
body[data-page="qcompanyHome"] .workflow-card .pipeline-step small { font-size:8px; }
body[data-page="qcompanyHome"] .public-footer-top { padding:9px 0; }
body[data-page="qcompanyHome"] .public-footer { padding:12px 0 9px; }
body[data-page="qcompanyHome"] .footer-grid { gap:18px; }
body[data-page="qcompanyHome"] .footer-col a { margin:3px 0; font-size:10px; }
body[data-page="qcompanyHome"] .trust-item small { font-size:9px; }

/* Public data pages are intentionally dense, like the approved product screenshots. */
body[data-page="qcompanySearch"] .hero,
body[data-page="qcompanyAiSearch"] .hero { padding-top:18px; padding-bottom:8px; }
body[data-page="qcompanySearch"] .grid-3 > .panel,
body[data-page="qcompanySearch"] .grid-3 > button { min-height:105px; }
body[data-page="qcompanyResults"] .result-card,
body[data-page="qcompanyResultsAlt"] .result-card { padding-top:8px; padding-bottom:8px; }
body[data-page="qcompanyDetail"] .main-content,
body[data-page="qradar"] .main-content { padding-top:0; }

@media (max-width:1300px){
  .completeness-dashboard-grid { grid-template-columns:1fr 1fr; }
  .completeness-high,.completeness-low,.completeness-heatmap,.completeness-suggestions,.completeness-field-table,.completeness-activity { grid-column:auto; }
  .completeness-field-table { grid-column:1/-1; }
  .page-head-art { display:none!important; }
}
@media (max-width:900px){
  .completeness-dashboard-grid { grid-template-columns:1fr; }
  .completeness-field-table { grid-column:auto; }
  body[data-page="qentityUsers"] .user-drawer-preview { transform:translateX(104%); }
  body[data-page="qentityUsers"] .user-drawer-preview.open { transform:translateX(0); }
}
body[data-page="qcompanyHome"] .search-card { margin-top:15px; padding:11px 13px; }
body[data-page="qcompanyHome"] .search-tabs { margin-bottom:8px; }
body[data-page="qcompanyHome"] .search-card .filter-row { margin-top:7px!important; }
body[data-page="qcompanyHome"] .search-card .chip { min-height:24px; padding:3px 8px; font-size:9.5px; }
@media (min-width:901px){
  body[data-page="qentityUsers"] .main-content { padding-right:335px; }
}
@media (max-width:920px){
  .filter-sidebar-layout { grid-template-columns:minmax(0,1fr); width:100%; }
  .filter-sidebar-layout > aside.stack { grid-column:auto; width:100%; min-width:0; }
}
html[data-api-connected="true"] .brand-sub::after,
html[data-api-connected="true"] .public-brand small::after {
  content: " · API Live";
  color: #17a56b;
  font-weight: 700;
}
html[data-api-connected="false"] .brand-sub::after,
html[data-api-connected="false"] .public-brand small::after {
  content: " · Offline Demo";
  color: #8b9bb0;
  font-weight: 650;
}
