:root {
  --bg: #090d14;
  --bg-2: #0d121b;
  --panel: #111722;
  --panel-2: #161d2a;
  --border: #1f2836;
  --border-2: #2a3546;
  --text: #e8edf5;
  --text-2: #a3aec0;
  --text-3: #6b778a;
  --accent: #bedeff;
  --accent-2: #bedeff;
  --accent-soft: rgba(190,222,255,0.12);
  --danger: #ef4444;
  --danger-soft: rgba(239, 68, 68, 0.14);
  --warn-cell: rgba(250, 204, 21, 0.10);
  --link: #bedeff;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --radius: 12px;
  --sidebar-w: 230px;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f4f6fa;
  --bg-2: #eef1f6;
  --panel: #ffffff;
  --panel-2: #f7f9fc;
  --border: #e3e8ef;
  --border-2: #d3dae5;
  --text: #0f172a;
  --text-2: #475569;
  --text-3: #8a96a8;
  --accent: #bedeff;
  --accent-2: #1a5fa8;
  --accent-soft: rgba(190,222,255,0.45);
  --warn-cell: rgba(234, 179, 8, 0.16);
  --link: #1a5fa8;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.1);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
svg { flex-shrink: 0; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.hidden { display: none !important; }

/* ---------- Buttons & inputs ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  height: 36px; padding: 0 14px; border-radius: 9px;
  border: 1px solid var(--border-2); background: var(--panel-2);
  font-weight: 600; font-size: 13px; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, opacity .15s;
}
.btn:hover { border-color: var(--text-3); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: #bedeff; border-color: transparent; color: #0b1a2e; }
.btn-primary:hover { filter: brightness(.94); border-color: transparent; }
.btn-danger { background: var(--danger-soft); border-color: rgba(239,68,68,.35); color: #fca5a5; }
:root[data-theme="light"] .btn-danger { color: #b91c1c; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--panel-2); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12px; }
.icon-btn {
  width: 36px; height: 36px; display: inline-grid; place-items: center;
  border-radius: 9px; border: 1px solid var(--border-2); background: var(--panel-2); cursor: pointer; position: relative;
}
.icon-btn:hover { border-color: var(--text-3); }

.input, .select, .textarea {
  width: 100%; height: 38px; padding: 0 12px; border-radius: 9px;
  border: 1px solid var(--border-2); background: var(--bg-2); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.textarea { height: auto; min-height: 80px; padding: 10px 12px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field label { display: block; font-size: 12px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.field .hint { font-size: 11px; color: var(--text-3); margin-top: 4px; }
.req { color: var(--danger); }

/* ---------- Login ---------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; position: relative;
  background: radial-gradient(1000px 500px at 85% 110%, rgba(190,222,255,.08), transparent), var(--bg); }
.login-card { width: 100%; max-width: 1040px; display: grid; grid-template-columns: 1fr 1fr;
  border: 1px solid var(--border); border-radius: 18px; overflow: hidden; background: var(--panel); box-shadow: var(--shadow); }
.login-hero { position: relative; padding: 40px 36px; min-height: 480px; display: flex; flex-direction: column; justify-content: space-between;
  background: radial-gradient(600px 400px at 0% 100%, rgba(190,222,255,.18), transparent), linear-gradient(160deg, #08101c, #0c1626 60%, #070e18); color: #e8edf5; overflow: hidden; }
.login-hero svg.swirl { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .55; pointer-events: none; }
.login-hero h2 { font-size: 26px; margin: 0 0 6px; font-weight: 800; letter-spacing: -.01em; }
.login-hero h2 span { color: #bedeff; }
.hero-preview { margin-top: 18px; border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.03); border-radius: 12px; padding: 14px; }
.hero-bars { display: flex; align-items: flex-end; gap: 6px; height: 46px; margin-top: 12px; }
.hero-bars i { flex: 1; background: linear-gradient(180deg, #bedeff, #3b6ea8); border-radius: 4px 4px 0 0; opacity: .85; }
.login-form { padding: 44px 36px; display: flex; flex-direction: column; justify-content: center; }
.login-form h1 { font-size: 24px; margin: 0 0 4px; }
.login-form form { display: grid; gap: 16px; margin-top: 26px; }
.input-icon { position: relative; }
.input-icon svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--accent); }
.input-icon .input { padding-left: 38px; height: 44px; }
.login-note { font-size: 12px; color: var(--text-3); text-align: center; margin-top: 18px; line-height: 1.5; }
.theme-float { position: absolute; top: 16px; right: 16px; }

/* ---------- Brand ---------- */
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 34px; height: 34px; }
.brand-name { font-weight: 800; font-size: 17px; line-height: 1; letter-spacing: -.01em; }
.brand-name span { color: var(--accent-2); }
.brand-sub { font-size: 8.5px; font-weight: 700; letter-spacing: .14em; color: var(--text-3); margin-top: 3px; }

/* ---------- Shell ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }
.shell.collapsed { --sidebar-w: 72px; }
.sidebar { position: sticky; top: 0; height: 100vh; background: var(--bg-2); border-right: 1px solid var(--border); display: flex; flex-direction: column; }
.sidebar-head { height: 60px; display: flex; align-items: center; padding: 0 16px; border-bottom: 1px solid var(--border); }
.company-chip { display: flex; align-items: center; gap: 9px; padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: 12px; font-weight: 600; }
.company-chip .logo { width: 26px; height: 26px; border-radius: 6px; background: #fff; display: grid; place-items: center; overflow: hidden; color: #111; font-size: 8px; font-weight: 800; }
.company-chip .logo img { width: 100%; height: 100%; object-fit: contain; }
.nav { flex: 1; overflow-y: auto; padding: 10px; }
.nav-label { font-size: 10.5px; font-weight: 700; letter-spacing: .1em; color: var(--text-3); padding: 12px 10px 6px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 9px; color: var(--text-2); font-weight: 500; margin-bottom: 2px; position: relative; }
.nav a:hover { background: var(--panel); color: var(--text); }
.nav a.active { background: var(--accent-soft); color: var(--accent-2); font-weight: 600; }
.nav a.active::before { content: ""; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: var(--accent-2); }
.nav .count { margin-left: auto; font-size: 11px; color: var(--text-3); }
.sidebar-foot { border-top: 1px solid var(--border); padding: 10px; }
.shell.collapsed .nav-text, .shell.collapsed .nav-label, .shell.collapsed .brand-text, .shell.collapsed .company-chip span, .shell.collapsed .nav .count { display: none; }
.shell.collapsed .nav a { justify-content: center; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; height: 60px; display: flex; align-items: center; gap: 12px; padding: 0 20px;
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.global-search { position: relative; width: 100%; max-width: 380px; }
.global-search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--text-3); }
.global-search .input { padding-left: 34px; height: 36px; background: var(--panel); }
.global-search kbd { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); font-size: 10px; border: 1px solid var(--border-2); border-radius: 5px; padding: 1px 5px; color: var(--text-3); }
.search-pop { position: absolute; top: 42px; left: 0; right: 0; background: var(--panel); border: 1px solid var(--border-2); border-radius: 10px; box-shadow: var(--shadow); max-height: 360px; overflow: auto; padding: 6px; }
.search-pop button { display: flex; width: 100%; text-align: left; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 8px; border: 0; background: none; cursor: pointer; }
.search-pop button:hover, .search-pop button.kb { background: var(--panel-2); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.welcome { font-size: 13px; color: var(--text-2); }
.welcome b { color: var(--text); }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, #bedeff, #6fa6e0 55%, #2f5f96); }
.user-btn { display: flex; align-items: center; gap: 9px; background: none; border: 0; cursor: pointer; padding: 4px; border-radius: 10px; position: relative; }
.user-btn .meta { text-align: left; line-height: 1.2; }
.user-btn .meta b { display: block; font-size: 13px; }
.user-btn .meta small { font-size: 10px; color: var(--text-3); letter-spacing: .05em; }
.menu { position: absolute; right: 0; top: 48px; min-width: 190px; background: var(--panel); border: 1px solid var(--border-2); border-radius: 10px; box-shadow: var(--shadow); padding: 6px; z-index: 40; }
.menu a, .menu button { display: flex; gap: 9px; align-items: center; width: 100%; padding: 8px 10px; border-radius: 7px; background: none; border: 0; cursor: pointer; text-align: left; }
.menu a:hover, .menu button:hover { background: var(--panel-2); }
.dot-badge { position: absolute; top: -4px; right: -4px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--danger); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; }

.content { padding: 24px; flex: 1; min-width: 0; }
.footer { text-align: center; font-size: 12px; color: var(--text-3); padding: 18px; border-top: 1px solid var(--border); }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -.015em; }
.page-head p { margin: 4px 0 0; color: var(--text-2); }

.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); }
.card-pad { padding: 20px 22px; }
.card h3 { margin: 0 0 4px; font-size: 15px; font-weight: 700; }
.card .sub { font-size: 12px; color: var(--text-3); margin: 0 0 14px; }

/* ---------- Bottom nav (mobile) ---------- */
.bottom-nav { display: none; }

/* ---------- Dashboard ---------- */
.grid { display: grid; gap: 16px; }
.leaders { grid-template-columns: 1fr 1fr; }
.leader { display: flex; gap: 16px; padding: 18px 20px; }
.trophy { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; border: 1px solid rgba(190,222,255,.4); background: var(--accent-soft); color: var(--accent-2); box-shadow: 0 0 22px rgba(190,222,255,.25); }
.leader h4 { margin: 0 0 8px; font-size: 11px; letter-spacing: .1em; color: var(--accent-2); font-weight: 700; }
.leader ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; flex: 1; }
.leader li { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-2); }
.leader li:first-child { color: var(--text); font-weight: 700; font-size: 15px; }
.leader .rank { width: 18px; height: 18px; border-radius: 50%; background: var(--panel-2); border: 1px solid var(--border-2); display: grid; place-items: center; font-size: 10px; font-weight: 700; }
.leader .val { white-space: nowrap; margin-left: auto; color: var(--accent-2); font-weight: 600; font-size: 12px; }
.chips { display: flex; gap: 4px; padding: 6px; flex-wrap: wrap; }
.chip { height: 30px; padding: 0 12px; border-radius: 8px; border: 1px solid transparent; background: none; cursor: pointer; font-size: 12.5px; font-weight: 500; color: var(--text-2); white-space: nowrap; }
.chip:hover { color: var(--text); background: var(--panel-2); }
.chip.active { background: var(--accent-soft); color: var(--accent-2); border-color: rgba(190,222,255,.35); font-weight: 600; }
.chip small { color: var(--text-3); margin-left: 4px; font-size: 10.5px; }
.kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.kpi { padding: 16px; border-radius: var(--radius); border: 1px solid var(--border); position: relative; overflow: hidden; }
.kpi .ic { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; color: #fff; }
.kpi .top { display: flex; gap: 10px; align-items: center; font-size: 12.5px; color: var(--text-2); font-weight: 500; }
.kpi .num { font-size: 22px; font-weight: 800; margin-top: 12px; letter-spacing: -.01em; }
.kpi .delta { font-size: 11px; color: var(--text-3); margin-top: 4px; }
.kpi svg.spark { position: absolute; right: 14px; top: 58px; }
.two-col { grid-template-columns: 1fr 1fr; }
.donut-wrap { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.legend { display: grid; gap: 8px; flex: 1; min-width: 200px; }
.legend-row { display: flex; align-items: center; gap: 9px; font-size: 13px; }
.legend-row i { width: 10px; height: 10px; border-radius: 3px; }
.legend-row b { margin-left: auto; font-weight: 600; }
.legend-row small { color: var(--text-3); width: 52px; text-align: right; }
.bar-row { display: grid; grid-template-columns: 120px 1fr 56px; gap: 10px; align-items: center; font-size: 12.5px; margin-bottom: 9px; }
.bar-track { height: 9px; background: var(--panel-2); border-radius: 6px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.bar-row b { text-align: right; font-weight: 600; }
.insight { font-size: 12px; color: var(--text-3); margin-top: 12px; }
.stack { display: flex; height: 9px; border-radius: 6px; overflow: hidden; background: var(--panel-2); min-width: 120px; }
.stack i { height: 100%; }
.col-chart { display: flex; align-items: flex-end; gap: 6px; height: 170px; padding-top: 10px; }
.col-chart .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; min-width: 0; }
.col-chart .col i { width: 100%; max-width: 34px; border-radius: 5px 5px 0 0; background: linear-gradient(180deg, var(--accent-2), var(--accent)); min-height: 2px; }
.col-chart .col span { font-size: 10px; color: var(--text-3); white-space: nowrap; }
.col-chart .col em { font-style: normal; font-size: 10.5px; font-weight: 600; color: var(--text-2); }

/* ---------- Table / grid ---------- */
.toolbar { display: flex; gap: 8px; align-items: center; padding: 12px 0; flex-wrap: wrap; }
.toolbar .grow { flex: 1; }
.toolbar .input { max-width: 280px; height: 34px; background: var(--panel); }
.toolbar .btn { height: 34px; }
.table-card { overflow: hidden; }
.table-scroll { overflow: auto; max-height: calc(100vh - 300px); min-height: 300px; }
table.grid-table { border-collapse: separate; border-spacing: 0; width: max-content; min-width: 100%; font-size: 13px; }
.grid-table th, .grid-table td { border-bottom: 1px solid var(--border); border-right: 1px solid var(--border); padding: 0 12px; height: 40px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; }
.grid-table th { position: sticky; top: 0; z-index: 3; background: var(--panel-2); font-weight: 600; color: var(--text-2); font-size: 12px; cursor: pointer; user-select: none; }
.grid-table th:hover { color: var(--text); }
.grid-table th .sort { opacity: .6; margin-left: 4px; font-size: 10px; }
.grid-table td.num, .grid-table th.num { text-align: right; }
.grid-table tr:hover td { background: color-mix(in srgb, var(--panel-2) 70%, transparent); }
.grid-table tr.selected td { background: var(--accent-soft); }
.grid-table td.missing { background: var(--warn-cell); }
.grid-table td.check, .grid-table th.check { width: 40px; min-width: 40px; text-align: center; padding: 0; position: sticky; left: 0; z-index: 2; background: var(--panel); }
.grid-table th.check { z-index: 4; background: var(--panel-2); }
.grid-table td.namecell { position: sticky; left: 40px; z-index: 2; background: var(--panel); }
.grid-table th.namecell { position: sticky; left: 40px; z-index: 4; }
.grid-table tr:hover td.namecell, .grid-table tr:hover td.check { background: var(--panel-2); }
.grid-table td.editing { padding: 0; box-shadow: inset 0 0 0 2px var(--accent); }
.grid-table td.editing input, .grid-table td.editing select { width: 100%; height: 38px; border: 0; outline: none; background: var(--bg-2); padding: 0 10px; }
.name-link { color: var(--link); font-weight: 500; cursor: pointer; background: none; border: 0; padding: 0; }
.name-link:hover { text-decoration: underline; }
.plat { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; }
.plat.ig { background: rgba(236, 72, 153, .15); color: #f472b6; border: 1px solid rgba(236,72,153,.35); }
.plat.yt { background: rgba(239, 68, 68, .15); color: #f87171; border: 1px solid rgba(239,68,68,.35); }
.plat.snap { background: rgba(250, 204, 21, .15); color: #facc15; border: 1px solid rgba(250,204,21,.35); }
.plat.link { background: var(--accent-soft); color: var(--accent-2); border: 1px solid rgba(190,222,255,.35); }
.badge { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 20px; font-size: 11.5px; font-weight: 600; border: 1px solid; }
.badge i { width: 6px; height: 6px; border-radius: 50%; }
.score { display: inline-flex; align-items: center; gap: 8px; }
.score .mini { width: 46px; height: 5px; border-radius: 4px; background: var(--panel-2); overflow: hidden; }
.score .mini i { display: block; height: 100%; }
input[type="checkbox"] { accent-color: var(--accent); width: 15px; height: 15px; cursor: pointer; }
.pager { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--text-2); flex-wrap: wrap; }
.pager .grow { flex: 1; }
.empty { padding: 50px 20px; text-align: center; color: var(--text-3); }

/* ---------- Modal / drawer ---------- */
.overlay { position: fixed; inset: 0; background: rgba(2, 6, 12, .62); z-index: 60; display: flex; justify-content: flex-end; animation: fade .15s; }
.overlay.center { justify-content: center; align-items: center; padding: 16px; }
@keyframes fade { from { opacity: 0; } }
@keyframes slide { from { transform: translateX(30px); opacity: 0; } }
.drawer { width: min(720px, 100%); height: 100%; background: var(--panel); border-left: 1px solid var(--border); display: flex; flex-direction: column; animation: slide .2s; }
.drawer-head { padding: 18px 22px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; }
.drawer-head h2 { margin: 0; font-size: 18px; }
.drawer-body { flex: 1; overflow: auto; padding: 18px 22px; }
.drawer-foot { padding: 14px 22px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; }
.form-group { margin-bottom: 22px; }
.form-group h4 { margin: 0 0 12px; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-2); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.dialog { width: min(460px, 100%); background: var(--panel); border: 1px solid var(--border-2); border-radius: 14px; box-shadow: var(--shadow); animation: fade .15s; }
.dialog-body { padding: 22px; }
.dialog-body h3 { margin: 0 0 6px; }
.dialog-foot { padding: 0 22px 20px; display: flex; gap: 10px; justify-content: flex-end; }
.col-list { max-height: 50vh; overflow: auto; display: grid; gap: 2px; margin-top: 12px; }
.col-list label { display: flex; gap: 10px; align-items: center; padding: 7px 8px; border-radius: 7px; cursor: pointer; }
.col-list label:hover { background: var(--panel-2); }

/* ---------- Toast ---------- */
#toast-root { position: fixed; bottom: 20px; right: 20px; z-index: 90; display: grid; gap: 8px; }
.toast { background: var(--panel); border: 1px solid var(--border-2); border-left: 3px solid var(--accent); padding: 11px 16px; border-radius: 9px; box-shadow: var(--shadow); font-size: 13px; animation: slide .2s; max-width: 340px; }
.toast.err { border-left-color: var(--danger); }

/* ---------- Search page ---------- */
.search-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 16px; }
.seg { display: inline-flex; padding: 3px; border: 1px solid var(--border-2); border-radius: 10px; background: var(--bg-2); gap: 2px; }
.seg button { height: 30px; padding: 0 14px; border-radius: 7px; border: 0; background: none; cursor: pointer; font-weight: 600; font-size: 12.5px; color: var(--text-2); }
.seg button.active { background: var(--accent-soft); color: var(--accent-2); }
.saved-list { display: flex; flex-wrap: wrap; gap: 8px; }
.saved-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 6px 5px 12px; border: 1px solid var(--border-2); border-radius: 20px; font-size: 12px; background: var(--panel-2); }
.saved-pill button { border: 0; background: none; cursor: pointer; color: var(--text-3); padding: 0 4px; }
.saved-pill .apply { color: var(--text); font-weight: 600; padding: 0; }

/* ---------- POCs ---------- */
.poc-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.poc-card { padding: 18px; }
.poc-card .head { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.poc-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.poc-stats div { background: var(--panel-2); border-radius: 9px; padding: 9px 10px; }
.poc-stats b { display: block; font-size: 17px; }
.poc-stats small { font-size: 10.5px; color: var(--text-3); }

/* ---------- Settings ---------- */
.settings { max-width: 760px; display: grid; gap: 18px; }
.kv { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; color: var(--text-2); gap: 12px; }
.kv b { color: var(--text); text-align: right; }
.role-pill { font-size: 11px; font-weight: 700; letter-spacing: .05em; padding: 5px 12px; border-radius: 20px; background: var(--panel-2); border: 1px solid var(--border-2); color: var(--text-2); }
.logo-row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.logo-box { width: 70px; height: 70px; border-radius: 12px; background: #fff; display: grid; place-items: center; overflow: hidden; color: #111; font-weight: 800; font-size: 13px; border: 1px solid var(--border-2); }
.logo-box img { width: 100%; height: 100%; object-fit: contain; }

/* ---------- Responsive ---------- */
@media (max-width: 1200px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } .search-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .content { padding: 16px 16px 90px; }
  .topbar { padding: 0 16px; }
  .global-search, .welcome, .user-btn .meta { display: none; }
  .topbar .mobile-brand { display: flex !important; }
  .leaders, .two-col { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .search-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .login-card { grid-template-columns: 1fr; }
  .login-hero { min-height: auto; padding: 28px 22px; }
  .login-hero .hero-preview, .login-hero .hero-tag { display: none; }
  .login-form { padding: 28px 22px; }
  .bottom-nav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; background: var(--bg-2); border-top: 1px solid var(--border); padding: 8px 4px calc(8px + env(safe-area-inset-bottom)); }
  .bottom-nav a { display: grid; justify-items: center; gap: 4px; font-size: 11px; color: var(--text-2); }
  .bottom-nav a.active { color: var(--accent-2); }
  .table-scroll { max-height: none; }
  .footer { display: none; }
}
@media (max-width: 560px) {
  .form-grid, .search-grid { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpi .num { font-size: 18px; }
  .kpi svg.spark { display: none; }
  .bar-row { grid-template-columns: 90px 1fr 44px; }
  .toolbar .input { max-width: none; flex-basis: 100%; }
}

/* ---------- Team: avatars, tasks, projects ---------- */
.mini-av { display: inline-grid; place-items: center; border-radius: 50%; color: #fff; font-weight: 700; flex-shrink: 0; border: 2px solid var(--panel); }
.av-stack { display: flex; align-items: center; }
.av-stack .mini-av + .mini-av { margin-left: -7px; }
.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
.board-col { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; display: grid; gap: 10px; min-height: 120px; }
.board-head { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13px; padding: 4px 4px 2px; }
.board-head i { width: 9px; height: 9px; border-radius: 50%; }
.board-head .faint { margin-left: auto; font-weight: 600; }
.board-empty { font-size: 12.5px; color: var(--text-3); text-align: center; padding: 18px 0; border: 1px dashed var(--border-2); border-radius: 10px; }
.task-card { background: var(--panel); border: 1px solid var(--border); border-radius: 11px; padding: 12px; cursor: pointer; display: grid; gap: 7px; transition: border-color .15s, transform .15s; outline: none; }
.task-card:hover, .task-card:focus-visible { border-color: var(--accent-2); transform: translateY(-1px); }
.task-top { display: flex; align-items: center; gap: 6px; }
.task-title { font-weight: 600; line-height: 1.35; }
.task-meta { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); }
.task-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 2px; }
.tag-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-opt { display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px 5px 6px; border: 1px solid var(--border-2); border-radius: 20px; cursor: pointer; font-size: 12.5px; background: var(--panel-2); }
.tag-opt:has(input:checked) { border-color: var(--accent-2); background: var(--accent-soft); }
.tag-opt input { width: 14px; height: 14px; }
.comments { display: grid; gap: 12px; }
.comment { display: flex; gap: 10px; font-size: 13px; }
.task-list { display: grid; gap: 6px; }
.task-row { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 1px solid var(--border); border-radius: 9px; background: var(--panel-2); cursor: pointer; }
.task-row:hover { border-color: var(--accent-2); }
.proj-card { cursor: pointer; outline: none; transition: border-color .15s; }
.proj-card:hover, .proj-card:focus-visible { border-color: var(--accent-2); }
@media (max-width: 900px) { .board { grid-template-columns: 1fr; } }
