/* ClickDialog Reputation OS — Client Portal (Visual Direction Lock) */
:root {
  --cd-blue: #1557ff;
  --cd-blue-dark: #0c3dcc;
  --cd-blue-soft: #eef4ff;
  --cd-indigo: #6b38d7;
  --cd-indigo-dark: #4c1fb0;
  --cd-green: #149946;
  --cd-green-soft: #e9f9ee;
  --cd-orange: #f07a18;
  --cd-orange-soft: #fff3e5;
  --cd-red: #ef2f24;
  --cd-red-soft: #fff0ef;
  --cd-purple-soft: #f0e7ff;
  --cd-ink: #11182f;
  --cd-muted: #59647d;
  --cd-soft: #f6f8fc;
  --cd-line: #dfe5ef;
  --cd-surface: #ffffff;
  --cd-shadow: 0 18px 60px rgba(18, 31, 62, .06);
  --cd-radius: 10px;
  --cd-radius-sm: 8px;
  --cd-font: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: #fbfcff;
  color: var(--cd-ink);
  font-family: var(--cd-font);
  font-size: 14px;
  line-height: 1.45;
}
button, input, select, textarea { font: inherit; }
button, a, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
a { color: var(--cd-blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; }
ul, ol { margin: 0; padding-left: 1.2rem; }

/* ---------- Shell ---------- */
.portal-shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }

.portal-sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  border-right: 1px solid var(--cd-line); background: #ffffff;
  display: flex; flex-direction: column; padding: 26px 14px 20px;
}
.brand { display: grid; grid-template-columns: 36px 1fr; align-items: center; gap: 12px; padding: 0 10px 34px; }
.brand-mark {
  position: relative; width: 36px; height: 36px; border-radius: 9px;
  background: linear-gradient(140deg, #1b6dff, #6735df);
}
.brand-mark::before { content: ""; position: absolute; inset: 9px 8px 11px 8px; border-radius: 4px; background: #ffffff; }
.brand-mark::after { content: ""; position: absolute; left: 8px; bottom: -4px; border-top: 9px solid #1b6dff; border-right: 9px solid transparent; }
.brand-name { font-size: 18px; font-weight: 760; line-height: 1.1; }
.brand-sub { color: #6a748c; font-size: 12px; line-height: 1.2; margin-top: 1px; }

.portal-nav { display: grid; gap: 4px; }
.portal-nav a {
  min-height: 44px; border: 0; border-radius: var(--cd-radius-sm); background: transparent;
  color: #34405b; display: grid; grid-template-columns: 24px 1fr; align-items: center;
  gap: 11px; padding: 0 12px; text-align: left; font-size: 15px; font-weight: 560;
}
.portal-nav a:hover { background: #f4f7fe; text-decoration: none; }
.portal-nav a.active { background: var(--cd-blue-soft); color: var(--cd-blue); font-weight: 720; }
.nav-icon, .icon { display: inline-flex; align-items: center; justify-content: center; }
.nav-icon { width: 22px; height: 22px; }
.icon { width: 16px; height: 16px; vertical-align: -3px; }
.nav-icon svg, .icon svg { width: 100%; height: 100%; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }

.sidebar-help { margin-top: auto; padding: 14px 12px 0; color: #6a748c; font-size: 12.5px; border-top: 1px solid var(--cd-line); }
.sidebar-help a { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; color: #34405b; font-weight: 600; }

.portal-main { min-width: 0; padding: 0 26px 40px; }

/* ---------- Top strip (persistent: business, Google, sync, bell, avatar) ---------- */
.topstrip {
  position: sticky; top: 0; z-index: 15; background: #fbfcffee; backdrop-filter: blur(6px);
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 16px 0 12px; margin-bottom: 14px; border-bottom: 1px solid var(--cd-line);
}
.biz-switch {
  min-height: 38px; border: 1px solid var(--cd-line); border-radius: 999px; background: #fff;
  display: inline-flex; align-items: center; gap: 8px; padding: 0 14px 0 6px; font-weight: 700; color: var(--cd-ink);
}
.biz-switch .biz-dot {
  width: 26px; height: 26px; border-radius: 999px; background: linear-gradient(140deg, #1557ff, #7597ff);
  color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800;
}
.status-pill { min-height: 32px; border-radius: 999px; display: inline-flex; align-items: center; gap: 7px; padding: 0 12px; font-size: 12.5px; font-weight: 650; white-space: nowrap; }
.status-pill.ok { background: var(--cd-green-soft); color: var(--cd-green); }
.status-pill.warn { background: var(--cd-orange-soft); color: #a24d00; }
.status-pill.gray { background: #eef1f6; color: #59647d; }
.status-pill .dot { width: 7px; height: 7px; border-radius: 999px; background: currentColor; }
.spacer { flex: 1; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 999px; border: 1px solid var(--cd-line); background: #fff;
  display: inline-flex; align-items: center; justify-content: center; position: relative; color: #34405b;
}
.icon-btn .dot-badge { position: absolute; top: 4px; right: 5px; width: 8px; height: 8px; border-radius: 999px; background: var(--cd-red); border: 2px solid #fff; }
.avatar-btn {
  min-height: 38px; border: 1px solid var(--cd-line); border-radius: 999px; background: #fff;
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 3px;
}
.avatar {
  width: 32px; height: 32px; border-radius: 999px; background: linear-gradient(140deg, #1557ff, #7597ff);
  color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 780; font-size: 12.5px;
}
.dropdown-wrap { position: relative; }
.dropdown-menu {
  position: absolute; right: 0; top: calc(100% + 8px); background: #fff; border: 1px solid var(--cd-line);
  border-radius: var(--cd-radius-sm); box-shadow: var(--cd-shadow); min-width: 220px; padding: 8px; z-index: 30;
}
.dropdown-menu a, .dropdown-menu button {
  display: flex; width: 100%; text-align: left; border: 0; background: transparent; padding: 9px 10px;
  border-radius: 7px; color: var(--cd-ink); font-size: 13.5px; font-weight: 600;
}
.dropdown-menu a:hover, .dropdown-menu button:hover { background: #f4f7fe; text-decoration: none; }
.dropdown-menu hr { border: none; border-top: 1px solid var(--cd-line); margin: 6px 4px; }

/* ---------- Page head ---------- */
.page-head { margin-bottom: 18px; }
.page-head h1 { margin: 0 0 4px; font-size: 26px; font-weight: 780; }
.page-head p { margin: 0; color: #4b5670; font-size: 15px; }

.screen { display: grid; gap: 18px; }
.grid { display: grid; gap: 16px; }
.kpi-grid { grid-template-columns: repeat(4, minmax(150px, 1fr)); }
.kpi-grid.kpi-5 { grid-template-columns: repeat(5, minmax(150px, 1fr)); }
.two-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.main-grid { grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr); }
.lower-home { grid-template-columns: 1fr 1fr; }

/* ---------- Cards / primitives ---------- */
.card { background: var(--cd-surface); border: 1px solid var(--cd-line); border-radius: var(--cd-radius); box-shadow: var(--cd-shadow); }
.card-pad { padding: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card h2, .card h3 { margin: 0; font-size: 16px; line-height: 1.25; }
.muted { color: var(--cd-muted); }
.tiny { color: var(--cd-muted); font-size: 12px; }
.section-gap { margin-top: 4px; }
.empty { color: var(--cd-muted); text-align: center; padding: 30px 10px; font-size: 14px; }

.kpi-card { min-height: 118px; padding: 18px; display: grid; grid-template-columns: 52px 1fr; align-items: center; gap: 14px; }
.kpi-title { color: #35405b; font-weight: 620; font-size: 13.5px; }
.kpi-value { margin-top: 4px; font-size: 24px; line-height: 1; font-weight: 800; }
.delta { margin-top: 8px; color: var(--cd-green); font-size: 12px; }
.delta.bad { color: var(--cd-orange); }

.bubble { width: 50px; height: 50px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.bubble.blue { color: var(--cd-blue); background: #e8f0ff; }
.bubble.green { color: var(--cd-green); background: #dff7e7; }
.bubble.orange { color: var(--cd-orange); background: #fff0dc; }
.bubble.red { color: var(--cd-red); background: var(--cd-red-soft); }
.bubble.purple { color: var(--cd-indigo); background: var(--cd-purple-soft); }
.bubble svg { width: 22px; height: 22px; stroke: currentColor; stroke-width: 2; fill: none; }

.badge { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 22px; border-radius: 999px; padding: 3px 10px; font-size: 11.5px; font-weight: 680; white-space: nowrap; }
.badge.blue { background: var(--cd-blue-soft); color: var(--cd-blue); }
.badge.green { background: var(--cd-green-soft); color: var(--cd-green); }
.badge.orange { background: var(--cd-orange-soft); color: #bd5a08; }
.badge.red { background: var(--cd-red-soft); color: var(--cd-red); }
.badge.purple { background: var(--cd-purple-soft); color: var(--cd-indigo); }
.badge.gray { background: #eef1f6; color: #59647d; }

.btn { min-height: 40px; border: 1px solid var(--cd-line); border-radius: var(--cd-radius-sm); background: #fff; color: #1b2742; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 16px; font-weight: 700; font-size: 13.5px; }
.btn:hover { border-color: #c8d2e2; text-decoration: none; }
.btn.primary { border-color: var(--cd-blue); background: var(--cd-blue); color: #fff; }
.btn.primary:hover { background: var(--cd-blue-dark); }
.btn.success { border-color: #29b65b; color: var(--cd-green); }
.btn.danger { border-color: #ffbab4; color: var(--cd-red); }
.btn.disabled, .btn:disabled { background: #f5f6f9; color: #a3abb9; pointer-events: none; }
.btn.small { min-height: 34px; padding: 0 12px; font-size: 12.5px; }
.btn.icon-only { width: 40px; padding: 0; }
.btn.block { width: 100%; }

.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ---------- Tabs ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; border-bottom: 1px solid var(--cd-line); }
.tab { border: 0; background: transparent; color: #303a54; padding: 0 0 12px; font-weight: 650; font-size: 14px; position: relative; }
.tab.active { color: var(--cd-blue); }
.tab.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--cd-blue); border-radius: 3px 3px 0 0; }
.pill-count { display: inline-flex; margin-left: 5px; min-width: 22px; height: 20px; align-items: center; justify-content: center; border-radius: 999px; background: #edf2ff; color: var(--cd-blue); font-size: 11.5px; padding: 0 5px; }
.tab.active .pill-count { background: var(--cd-blue); color: #fff; }

.select-like { min-height: 36px; border: 1px solid var(--cd-line); border-radius: var(--cd-radius-sm); background: #fff; display: inline-flex; align-items: center; gap: 8px; padding: 0 12px; color: #303a54; font-weight: 600; font-size: 13px; }

/* ---------- Hero next action ---------- */
.hero-action {
  border-radius: var(--cd-radius); padding: 26px; color: #fff;
  background: linear-gradient(135deg, #5b3df0, #6f4dff 55%, #8a5bff);
  display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center;
  box-shadow: 0 20px 50px rgba(90, 50, 230, .25);
}
.hero-action .eyebrow { text-transform: uppercase; letter-spacing: .06em; font-size: 11.5px; font-weight: 750; opacity: .85; margin-bottom: 8px; }
.hero-action h2 { margin: 0 0 6px; font-size: 21px; font-weight: 800; }
.hero-action p { margin: 0; opacity: .92; font-size: 14px; max-width: 60ch; }
.hero-action .btn { margin-top: 14px; background: #fff; color: #5b3df0; border-color: #fff; }
.hero-action .btn:hover { background: #f2eeff; }
.hero-icon { width: 78px; height: 78px; border-radius: 999px; background: rgba(255,255,255,.16); display: inline-flex; align-items: center; justify-content: center; }
.hero-icon svg { width: 36px; height: 36px; stroke: #fff; stroke-width: 1.8; fill: none; }
.hero-action.calm { background: linear-gradient(135deg, #0f9d58, #17b56b 60%, #38cf8a); box-shadow: 0 20px 50px rgba(15, 157, 88, .22); }
.hero-action.calm .btn { color: #0f9d58; }

/* ---------- Work list / pending ---------- */
.work-list { display: grid; }
.work-item { display: grid; grid-template-columns: 26px 1fr auto; gap: 12px; align-items: start; padding: 14px 0; border-bottom: 1px solid var(--cd-line); }
.work-item:last-child { border-bottom: 0; }
.work-num { width: 26px; height: 26px; border-radius: 999px; background: var(--cd-blue-soft); color: var(--cd-blue); font-weight: 800; font-size: 12.5px; display: inline-flex; align-items: center; justify-content: center; }
.work-item strong { display: block; }
.work-item .tiny { margin-top: 2px; }

.health-good { color: var(--cd-green); font-weight: 800; font-size: 17px; }
.trend-mini { width: 100%; height: 46px; display: block; margin: 10px 0; }

/* ---------- Review / Case workspace (shared pattern) ---------- */
.split-workspace { grid-template-columns: minmax(380px, .85fr) minmax(420px, 1fr); align-items: start; }
.list-panel { overflow: hidden; }
.list-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--cd-line); }
.search-mini { flex: 1; min-width: 0; border: 1px solid var(--cd-line); border-radius: var(--cd-radius-sm); background: #fff; padding: 0 10px; height: 36px; }
.search-mini input { width: 100%; height: 100%; border: 0; outline: 0; font-size: 13px; }

.entry-row { display: grid; grid-template-columns: 48px 1fr; gap: 12px; padding: 16px; border-bottom: 1px solid var(--cd-line); cursor: pointer; }
.entry-row:last-child { border-bottom: 0; }
.entry-row.active { background: var(--cd-blue-soft); }
.entry-row:hover { background: #fbfdff; }
.person { width: 44px; height: 44px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; font-weight: 780; font-size: 13px; color: #1548d7; background: #e1ebff; flex-shrink: 0; }
.person.purple { color: #6b38d7; background: #eadcff; }
.person.green { color: #124b28; background: #dff5e5; }
.person.orange { color: #a14b00; background: #ffe4d4; }
.person.red { color: #a3231c; background: #ffe1df; }
.entry-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.entry-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 3px; color: #59647d; font-size: 12.5px; }
.entry-copy { margin: 8px 0 0; color: #33405b; font-size: 13.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.review-stars { color: #f6b512; font-size: 15px; white-space: nowrap; }

.detail-panel { overflow: hidden; }
.detail-block { padding: 20px; border-bottom: 1px solid var(--cd-line); }
.detail-block:last-child { border-bottom: 0; }
.detail-title-row { display: grid; grid-template-columns: 48px 1fr auto; gap: 12px; align-items: center; }
.quote-box, .reply-box, .warning-box, .note-box { border: 1px solid var(--cd-line); border-radius: var(--cd-radius-sm); padding: 14px; background: #fff; font-size: 13.5px; }
.reply-box { min-height: 100px; resize: vertical; width: 100%; color: var(--cd-ink); font-family: inherit; }
.warning-box { display: flex; gap: 10px; background: var(--cd-orange-soft); border-color: #ffd29a; color: #a24d00; }
.note-box { background: var(--cd-soft); }
.char-row { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; }

/* ---------- Casos specific ---------- */
.priority-dot { width: 8px; height: 8px; border-radius: 999px; display: inline-block; }
.priority-dot.urgent { background: var(--cd-red); }
.priority-dot.high { background: var(--cd-orange); }
.priority-dot.medium { background: var(--cd-blue); }
.priority-dot.low { background: #9aa4ba; }
.classification-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.classification-grid .field { display: grid; gap: 4px; }
.classification-grid .field label { color: var(--cd-muted); font-size: 12px; font-weight: 650; }

/* ---------- QR / Captación ---------- */
.qr-grid { grid-template-columns: 1fr 1fr 1fr; }
.copy-block { background: #f6f8fc; border: 1px solid var(--cd-line); border-radius: var(--cd-radius-sm); padding: 12px 14px; font-size: 13px; word-break: break-word; }
.qr-preview-wrap { grid-template-columns: minmax(260px, .8fr) 1fr; }
.phone-frame {
  width: 240px; margin: 0 auto; border: 10px solid #16192a; border-radius: 34px; overflow: hidden;
  box-shadow: 0 20px 45px rgba(15, 23, 55, .25); background: #fff;
}
.phone-screen { padding: 26px 18px; text-align: center; background: linear-gradient(180deg, #f7f9ff, #fff); min-height: 380px; display: flex; flex-direction: column; gap: 14px; align-items: center; }
.phone-logo { width: 44px; height: 44px; border-radius: 999px; background: linear-gradient(135deg, #c9853c, #5c2b15); }
.phone-screen h4 { margin: 4px 0 0; font-size: 15px; }
.phone-screen p { margin: 0; font-size: 12px; color: #59647d; }
.metric-tile { text-align: center; padding: 16px; }
.metric-tile .kpi-value { font-size: 22px; }

/* ---------- Configuración ---------- */
.config-layout { grid-template-columns: 220px minmax(0, 1fr); align-items: start; }
.config-nav { display: grid; gap: 4px; position: sticky; top: 90px; }
.config-nav button { text-align: left; border: 0; background: transparent; padding: 10px 12px; border-radius: var(--cd-radius-sm); color: #34405b; font-weight: 600; font-size: 13.5px; }
.config-nav button:hover { background: #f4f7fe; }
.config-nav button.active { background: var(--cd-blue-soft); color: var(--cd-blue); }
.config-section { display: none; display: grid; gap: 16px; }
.config-section.active { display: grid; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: grid; gap: 5px; }
.field label { color: var(--cd-muted); font-size: 12.5px; font-weight: 650; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--cd-line); }
.toggle-row:last-child { border-bottom: 0; }
.switch { position: relative; width: 42px; height: 24px; flex-shrink: 0; }
.switch input { opacity: 0; width: 100%; height: 100%; margin: 0; position: absolute; z-index: 1; cursor: pointer; }
.switch .track { position: absolute; inset: 0; background: #d7dce6; border-radius: 999px; transition: background .15s; }
.switch .thumb { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; background: #fff; border-radius: 999px; transition: left .15s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.switch input:checked + .track { background: var(--cd-green); }
.switch input:checked + .track + .thumb { left: 21px; }

/* ---------- Reports charts ---------- */
.chart-card { min-height: 340px; }
.chart { width: 100%; height: 240px; display: block; }
.bar-list { display: grid; gap: 18px; }
.rating-bar { display: grid; grid-template-columns: 74px 1fr 44px; gap: 14px; align-items: center; font-size: 13px; }
.bar-track { height: 9px; border-radius: 999px; background: #edf0f5; overflow: hidden; }
.bar-track > span { display: block; height: 100%; border-radius: inherit; background: var(--cd-blue); }
.topic-bar { display: grid; grid-template-columns: 130px 1fr 40px; gap: 14px; align-items: center; font-size: 13px; margin-bottom: 14px; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { border-bottom: 1px solid var(--cd-line); padding: 11px 8px; text-align: left; vertical-align: middle; font-size: 13px; }
.data-table th { color: #59647d; font-size: 11.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .3px; }
.recommend-card { background: linear-gradient(135deg, #fff8e8, #fff); border-color: #f4dfa0; }

/* ---------- Forms ---------- */
input, select, textarea {
  font-family: var(--cd-font); font-size: 13.5px; padding: 9px 11px; border: 1px solid var(--cd-line);
  border-radius: var(--cd-radius-sm); background: #fff; color: var(--cd-ink); width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(21, 87, 255, .3); border-color: var(--cd-blue); }
label { font-size: 12.5px; font-weight: 650; color: var(--cd-muted); display: block; margin: 10px 0 4px; }
textarea { min-height: 90px; resize: vertical; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.filters select, .filters input { width: auto; min-width: 140px; }

/* ---------- Modal / toast ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(15, 23, 42, .5); display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px; z-index: 60; overflow-y: auto; }
.modal { background: #fff; border-radius: 14px; padding: 22px 24px; width: 100%; max-width: 640px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal h2 { margin-top: 0; font-size: 18px; }
.toast { position: fixed; bottom: 22px; right: 22px; background: #10214d; color: #fff; padding: 12px 18px; border-radius: 10px; box-shadow: var(--cd-shadow); z-index: 99; font-size: 14px; max-width: 380px; }
.toast.error { background: var(--cd-red); }
.risk-note { background: var(--cd-red-soft); border: 1px solid #f3c1c1; border-radius: var(--cd-radius-sm); padding: 12px 14px; margin: 8px 0; font-size: 13.5px; color: var(--cd-red); }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }

/* ---------- Login (kept for auth flows, not in visual lock scope) ---------- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(160deg, #10214d 0%, #1557ff 100%); padding: 20px; }
.login-card { background: #fff; border-radius: 16px; padding: 34px 34px 28px; width: 100%; max-width: 400px; box-shadow: 0 24px 80px rgba(0,0,0,.35); }
.login-card h1 { margin: 0 0 4px; font-size: 21px; }
.login-card p.hint, .hint { color: var(--cd-muted); font-size: 13px; margin-top: 0; }
.login-demo { margin-top: 16px; font-size: 12.5px; color: var(--cd-muted); background: var(--cd-soft); border-radius: 8px; padding: 10px 12px; }

/* ---------- Responsive ---------- */
.mobile-topnav { display: none; }

@media (max-width: 1180px) {
  .kpi-grid, .kpi-grid.kpi-5, .lower-home, .qr-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .main-grid, .two-grid, .split-workspace, .qr-preview-wrap, .config-layout { grid-template-columns: 1fr; }
  .config-nav { position: static; display: flex; flex-wrap: wrap; }
}

@media (max-width: 760px) {
  .portal-shell { grid-template-columns: 1fr; }
  .portal-sidebar { display: none; }
  .mobile-topnav {
    display: grid; grid-template-columns: repeat(6, 1fr); gap: 2px; position: sticky; top: 0; z-index: 20;
    background: #fff; border-bottom: 1px solid var(--cd-line); padding: 6px 4px;
  }
  .mobile-topnav a { display: grid; justify-items: center; gap: 2px; padding: 6px 2px; font-size: 10px; color: #34405b; border-radius: 8px; }
  .mobile-topnav a.active { color: var(--cd-blue); background: var(--cd-blue-soft); }
  .mobile-topnav .nav-icon svg { width: 18px; height: 18px; }
  .portal-main { padding: 0 12px 30px; }
  .topstrip { padding: 10px 0; }
  .biz-switch .profile-email, .avatar-btn span:not(.avatar) { display: none; }
  .kpi-grid, .kpi-grid.kpi-5, .lower-home, .qr-grid, .field-grid, .classification-grid { grid-template-columns: 1fr; }
  .hero-action { grid-template-columns: 1fr; text-align: left; }
  .hero-icon { display: none; }
  .page-head h1 { font-size: 22px; }
}
