:root {
  --bg: #f6f7f8;
  --panel: rgba(255, 255, 255, 0.92);
  --border: rgba(15, 23, 42, 0.08);
  --text: #0f172a;
  --muted: #6b7280;
  --brand: #eb0a1e;
  --success: #059669;
  --warning: #d97706;
  --shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(235, 10, 30, 0.05), transparent 26%),
    linear-gradient(180deg, #fbfcfd 0%, #f6f7f8 42%, #f1f4f6 100%);
}

a { color: inherit; text-decoration: none; }
button { font: inherit; }

.portal-shell {
  display: flex;
  min-height: 100vh;
}

.portal-sidebar {
  display: flex;
  flex-direction: column;
  width: 248px;
  height: 100vh;
  padding: 18px 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.96));
  border-right: 1px solid rgba(226, 232, 240, 0.92);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.82);
  transition: width 0.2s ease, padding 0.2s ease;
  position: sticky;
  top: 0;
  align-self: flex-start;
}

.brand-card, .portal-nav, .portal-bottom, .module-switcher {
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.brand-card {
  border-radius: 20px;
  padding: 14px;
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #ffffff, #ffe3e6);
  color: #eb0a1e;
  font-weight: 700;
}

.brand-mark svg {
  width: 28px;
  height: 18px;
  display: block;
}

.brand-logo-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.brand-title { font-size: 15px; font-weight: 700; line-height: 1.3; color: #111827; }
.brand-subtitle { margin-top: 4px; font-size: 11px; color: var(--muted); }

.module-switcher {
  border-radius: 22px;
  padding: 14px;
  margin-bottom: 14px;
}

.switcher-label {
  font-size: 11px;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 8px;
}

.switcher-button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(235, 10, 30, 0.14);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 245, 246, 0.96));
  color: #991b1b;
  cursor: pointer;
  font-weight: 700;
}

.switcher-hint {
  margin-top: 8px;
  font-size: 11px;
  color: var(--muted);
}

.portal-nav {
  border-radius: 22px;
  padding: 10px;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 16px;
  border: 0;
  background: transparent;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.nav-icon {
  width: 18px;
  flex: 0 0 auto;
  text-align: center;
  color: #eb0a1e;
  font-size: 14px;
}

.nav-label {
  min-width: 0;
  white-space: nowrap;
}

.nav-item + .nav-item { margin-top: 6px; }
.nav-item::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, #eb0a1e, #b91c1c);
  opacity: 0;
  transition: opacity 0.18s ease;
}
.nav-item.active {
  color: #991b1b;
  background: linear-gradient(180deg, rgba(235, 10, 30, 0.12), rgba(235, 10, 30, 0.08));
  box-shadow: inset 0 0 0 1px rgba(235, 10, 30, 0.08);
}
.nav-item.active::before,
.nav-item:hover::before {
  opacity: 1;
}
.nav-item:hover {
  color: #991b1b;
  background: rgba(235, 10, 30, 0.08);
}
.nav-item[aria-current="page"] {
  cursor: default;
}

.portal-actions {
  margin-top: auto;
  padding-top: 14px;
  display: grid;
  gap: 10px;
}

.portal-action-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.92);
  color: #475569;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.portal-action-icon {
  width: 20px;
  text-align: center;
  color: #eb0a1e;
}

.portal-action-short {
  display: none;
  white-space: nowrap;
}

.portal-shell.sidebar-collapsed .portal-sidebar {
  width: 136px;
  padding-left: 10px;
  padding-right: 10px;
}

.portal-shell.sidebar-collapsed .brand-subtitle,
.portal-shell.sidebar-collapsed .switcher-hint,
.portal-shell.sidebar-collapsed .portal-action-text {
  display: none;
}

.portal-shell.sidebar-collapsed .switcher-button {
  min-height: 40px;
  justify-content: center;
  padding-left: 8px;
  padding-right: 8px;
  text-align: center;
}

.portal-shell.sidebar-collapsed .switcher-button .switcher-arrow {
  display: none;
}

.portal-shell.sidebar-collapsed .portal-action-short {
  display: inline;
}

.portal-shell.sidebar-collapsed .nav-item {
  justify-content: center;
  gap: 8px;
  padding-left: 10px;
  padding-right: 10px;
}

.portal-shell.sidebar-collapsed .nav-item::before {
  left: 10px;
}

.portal-main {
  flex: 1;
  padding: 16px 16px 18px 14px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  width: 100%;
}

.topbar-title { font-size: 20px; font-weight: 700; }
.topbar-subtitle { margin-top: 4px; font-size: 12px; color: var(--muted); }
.topbar-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-left: auto; justify-content: flex-end; }

.topbar-switch-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 9px 12px;
  border-radius: 16px;
  border: 1px solid rgba(235, 10, 30, 0.14);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 245, 246, 0.94));
  color: var(--text);
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.topbar-switch-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}

.topbar-switch-name {
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
}

.topbar-switch-arrow {
  font-size: 12px;
  color: #64748b;
}

.portal-user-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 7px 10px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
  margin-left: auto;
}

.portal-user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f172a, #475569);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.portal-user-meta {
  min-width: 0;
}

.portal-user-name {
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
}

.portal-user-role {
  margin-top: 2px;
  font-size: 11px;
  color: var(--muted);
}

.portal-user-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e11d48;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
}

.pill, .action-btn, .tag {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.8);
  color: #334155;
}

.pill {
  padding: 9px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.pill strong { color: var(--text); }

.hero {
  margin-top: 16px;
  display: block;
  width: 100%;
}

.module-card,
.module-card,
.module-pick-card,
.module-preview {
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(248,250,252,0.94));
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 18px;
}

.hero-board {
  width: 100%;
}

.risk-board {
  min-height: 100%;
  display: grid;
  gap: 14px;
  padding: 20px;
  border-radius: 28px;
  background:
    radial-gradient(circle at top left, rgba(235, 10, 30, 0.06), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 248, 250, 0.94));
  border: 1px solid rgba(226, 232, 240, 0.92);
  box-shadow: 0 20px 44px rgba(15, 23, 42, 0.08);
}

.risk-board-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.risk-board-kicker {
  font-size: 11px;
  color: var(--brand);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.risk-board-title {
  margin-top: 6px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #0f172a;
}

.risk-board-summary {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
  max-width: 560px;
}

.risk-board-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(235, 10, 30, 0.08);
  color: #b91c1c;
  font-size: 12px;
  font-weight: 700;
}

.risk-overview-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.6fr) minmax(0, 1.4fr);
  gap: 16px;
  align-items: stretch;
}

.risk-overview-main {
  display: grid;
  align-content: center;
}

.risk-overview-total {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 216px;
  padding: 24px;
  border-radius: 28px;
  background:
    radial-gradient(circle at center, rgba(235, 10, 30, 0.12), transparent 48%),
    radial-gradient(circle at 50% 50%, rgba(248, 113, 113, 0.08), transparent 58%),
    linear-gradient(180deg, rgba(255,255,255,0.96), rgba(245,247,249,0.94));
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.88),
    0 16px 34px rgba(235, 10, 30, 0.08);
  position: relative;
  overflow: hidden;
  text-align: center;
}

.risk-overview-label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  position: relative;
  z-index: 1;
}

.risk-overview-total strong {
  font-size: 68px;
  line-height: 1;
  letter-spacing: -0.05em;
  color: #0f172a;
  position: relative;
  z-index: 1;
}

.risk-overview-total small {
  font-size: 12px;
  line-height: 1.6;
  color: #64748b;
  position: relative;
  z-index: 1;
}

.risk-overview-glow {
  position: absolute;
  width: 146px;
  height: 146px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(191, 219, 254, 0.9), rgba(125, 211, 252, 0.18) 58%, rgba(255,255,255,0) 76%);
  filter: blur(8px);
  animation: riskGlowPulse 2.8s ease-in-out infinite;
}

.risk-overview-orbit {
  position: absolute;
  border-radius: 999px;
  border: 1px solid rgba(96, 165, 250, 0.2);
  box-shadow: inset 0 0 22px rgba(191, 219, 254, 0.22);
}

.risk-overview-orbit::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  margin-top: calc(-50% - 5px);
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255,255,255,0.98), rgba(96,165,250,0.72));
  box-shadow: 0 0 12px rgba(125, 211, 252, 0.58);
}

.orbit-a {
  width: 150px;
  height: 150px;
  animation: riskOrbitSpin 10s linear infinite;
}

.orbit-b {
  width: 184px;
  height: 184px;
  border-color: rgba(34, 211, 238, 0.16);
  animation: riskOrbitSpinReverse 14s linear infinite;
}

.orbit-c {
  width: 214px;
  height: 214px;
  border-color: rgba(186, 230, 253, 0.22);
  animation: riskOrbitPulse 4.2s ease-in-out infinite;
}

@keyframes riskGlowPulse {
  0%, 100% {
    transform: scale(0.96);
    opacity: 0.72;
  }
  50% {
    transform: scale(1.04);
    opacity: 0.96;
  }
}

@keyframes riskOrbitSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes riskOrbitSpinReverse {
  from {
    transform: rotate(360deg);
  }
  to {
    transform: rotate(0deg);
  }
}

@keyframes riskOrbitPulse {
  0%, 100% {
    transform: scale(0.98);
    opacity: 0.52;
  }
  50% {
    transform: scale(1.03);
    opacity: 0.88;
  }
}

.risk-topology-notes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.risk-topology-notes span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(255, 255, 255, 0.88);
  color: #334155;
  font-size: 11px;
  font-weight: 700;
}

.risk-module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(195px, 1fr));
  gap: 12px;
  align-content: center;
}

.risk-module-card {
  min-height: 148px;
  padding: 16px;
  border-radius: 22px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  background: linear-gradient(180deg, rgba(255,255,255,0.97), rgba(248,250,252,0.94));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.86);
  display: grid;
  align-content: center;
}

.risk-module-card.danger {
  background: linear-gradient(180deg, rgba(255,245,245,0.96), rgba(255,255,255,0.96));
}

.risk-module-card.warning {
  background: linear-gradient(180deg, rgba(255,251,235,0.96), rgba(255,255,255,0.96));
}

.risk-module-card.success {
  background: linear-gradient(180deg, rgba(240,253,244,0.96), rgba(255,255,255,0.96));
}

.risk-module-card.brand {
  background: linear-gradient(180deg, rgba(239,246,255,0.96), rgba(255,255,255,0.96));
}

.risk-module-card.neutral {
  background: linear-gradient(180deg, rgba(248,250,252,0.96), rgba(255,255,255,0.96));
}

.risk-module-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.risk-module-head span {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}

.risk-module-head strong {
  font-size: 30px;
  line-height: 1;
  letter-spacing: -0.04em;
  color: #0f172a;
}

.risk-module-card p {
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: #475569;
  max-width: none;
}

.risk-module-links {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.risk-module-links span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.86);
  border: 1px solid rgba(226, 232, 240, 0.92);
  color: #334155;
  font-size: 11px;
  font-weight: 700;
}

.risk-route-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.risk-flow-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(255, 255, 255, 0.84);
  color: #475569;
  font-size: 11px;
  font-weight: 700;
}

.module-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  width: 100%;
}

.module-card {
  padding: 14px;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.06);
}
.module-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.module-title { font-size: 16px; font-weight: 700; }
.module-subtitle { margin-top: 4px; font-size: 12px; color: var(--muted); line-height: 1.6; }
.module-body {
  margin-top: 14px;
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 14px;
}

.module-copy-block {
  display: grid;
  gap: 12px;
  flex: 1;
  align-content: start;
}

.module-copy-text {
  margin: 0;
  min-height: 72px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(248, 250, 252, 0.92);
  border: 1px solid rgba(226, 232, 240, 0.86);
  font-size: 12px;
  line-height: 1.7;
  color: #334155;
}

.module-copy-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  min-height: 44px;
  align-items: flex-start;
}

.module-copy-tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  background: rgba(255, 255, 255, 0.88);
  color: #475569;
  font-size: 11px;
  font-weight: 700;
}

.module-actions {
  margin-top: auto;
  padding-top: 2px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.module-open {
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  border-radius: 16px;
  border: 1px solid rgba(235, 10, 30, 0.14);
  background:
    linear-gradient(135deg, rgba(235, 10, 30, 0.98), rgba(200, 16, 46, 0.94)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0));
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 14px 24px rgba(235, 10, 30, 0.2);
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.module-open:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 28px rgba(235, 10, 30, 0.24);
  filter: saturate(1.05);
}

.module-open-text {
  font-size: 13px;
  letter-spacing: 0.01em;
}

.module-open-arrow {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.18);
  font-size: 13px;
  line-height: 1;
}

.module-hide,
.platform-switcher-btn.secondary,
.platform-module-portal-btn.secondary {
  min-height: 40px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid rgba(235, 10, 30, 0.16);
  background: rgba(255, 245, 246, 0.92);
  color: #b91c1c;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.module-hide:hover,
.platform-switcher-btn.secondary:hover,
.platform-module-portal-btn.secondary:hover {
  background: rgba(255, 241, 242, 0.98);
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}
.tag.success { color: var(--success); background: rgba(5, 150, 105, 0.12); }
.tag.danger { color: #dc2626; background: rgba(220, 38, 38, 0.12); }
.tag.warning { color: var(--warning); background: rgba(217, 119, 6, 0.12); }
.tag.brand { color: #b91c1c; background: rgba(235, 10, 30, 0.1); }

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.32);
  backdrop-filter: blur(4px);
  z-index: 40;
}

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  width: min(560px, calc(100vw - 32px));
  max-height: 85vh;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(226, 232, 240, 0.96);
  border-radius: 28px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
  z-index: 50;
}

.modal[hidden] {
  display: none !important;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 18px 0;
}

.modal-title { font-size: 16px; font-weight: 700; }
.modal-subtitle { margin-top: 4px; font-size: 12px; color: var(--muted); }
.modal-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.module-pick-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

@media (max-width: 520px) {
  .module-pick-list {
    grid-template-columns: 1fr;
  }
}

.module-pick-card {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
}

.module-pick-card.active {
  border-color: rgba(235, 10, 30, 0.22);
  box-shadow: 0 14px 28px rgba(235, 10, 30, 0.08);
}

.module-pick-title { font-size: 14px; font-weight: 700; }
.module-pick-text { margin-top: 6px; font-size: 12px; color: var(--muted); line-height: 1.6; }

.module-pick-actions,
.platform-switcher-card-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 8px;
}

.module-preview {
  display: inline-flex;
  align-items: center;
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  color: #b91c1c;
  background: rgba(235, 10, 30, 0.1);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

.action-btn {
  border-radius: 14px;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.action-btn.primary {
  background: linear-gradient(135deg, #eb0a1e, #c8102e);
  border-color: transparent;
  color: white;
}

.platform-switcher-btn {
  border-radius: 14px;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid rgba(226, 232, 240, 0.92);
  background: #fff;
  color: #0f172a;
  cursor: pointer;
}

.platform-switcher-btn.primary {
  background: linear-gradient(135deg, #eb0a1e, #c8102e);
  border-color: transparent;
  color: #fff;
}

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.84);
  color: #475569;
  font-size: 18px;
  cursor: pointer;
}

.portal-footer {
  margin-top: 14px;
  font-size: 12px;
  color: var(--muted);
}

@media (max-width: 1180px) {
  .module-grid,
  .risk-overview-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 920px) {
  .portal-shell { display: block; }
  .portal-sidebar { width: auto; border-right: 0; border-bottom: 1px solid rgba(226, 232, 240, 0.9); }
  .portal-sidebar { height: auto; position: static; }
  .portal-shell.sidebar-collapsed .portal-sidebar { width: auto; padding-left: 14px; padding-right: 14px; }
  .portal-shell.sidebar-collapsed .brand-subtitle,
  .portal-shell.sidebar-collapsed .switcher-hint,
  .portal-shell.sidebar-collapsed .portal-bottom-text,
  .portal-shell.sidebar-collapsed .portal-action-text { display: block; }
  .topbar-actions { justify-content: flex-start; margin-left: 0; }
  .portal-user-chip { margin-left: 0; }
  .risk-module-grid {
    grid-template-columns: 1fr;
  }
}
