/* ============================================================
   Portal Design System  (사용자 포털 · gateway/app/static/)
   소유: 포털팀 (Claude). 전 페이지 공통 토큰·컴포넌트.
   페이지별 인라인 :root/body 중복 제거 → 여기 하나로 통일.
   ============================================================ */

:root {
  /* surfaces */
  --bg: #0a0d12;
  --panel: #12161f;
  --panel-2: #1a2030;
  --panel-3: #222a3d;
  --bd: #29344a;
  --bd-soft: #1e2636;

  /* text */
  --fg: #e9edf5;
  --mut: #8a95a9;
  --mut-2: #5f6a80;

  /* brand + semantic */
  --acc: #76b900;          /* NVIDIA green */
  --acc-ink: #0a0d12;
  --acc-2: #5b9dff;        /* link/info blue */
  --ok: #34d399;
  --warn: #f5b544;
  --bad: #f0596a;

  /* modality accents */
  --t-chat: #5b9dff;
  --t-reason: #b98bff;
  --t-code: #34d399;
  --t-vision: #ff9d5b;
  --t-embed: #22c9c9;
  --t-rerank: #f5b544;

  /* shape / motion */
  --r-sm: 8px; --r: 12px; --r-lg: 16px; --r-pill: 999px;
  --sp: 16px;
  --shadow: 0 6px 24px rgba(0,0,0,.35);
  --shadow-hi: 0 10px 40px rgba(0,0,0,.5);
  --tr: .16s cubic-bezier(.4,0,.2,1);
  --maxw: 1280px;
  --portal-content-max: 1280px;
  --portal-content-wide: 1340px;
  --portal-gutter: clamp(20px, 2.5vw, 48px);
  --portal-nav-h: 52px;
}

html[data-theme="light"] {
  --bg: #eef1f6;
  --panel: #ffffff;
  --panel-2: #f3f5f9;
  --panel-3: #e6eaf2;
  --bd: #d5dbe8;
  --bd-soft: #e8ecf4;
  --fg: #141a24;
  --mut: #5a6578;
  --mut-2: #8a95a9;
  --acc-ink: #fff;
  --shadow: 0 6px 24px rgba(20, 30, 50, .08);
  --shadow-hi: 0 10px 40px rgba(20, 30, 50, .12);
}
html[data-theme="light"] body {
  background: radial-gradient(1200px 600px at 50% -10%, #f8fafc 0%, var(--bg) 55%) fixed;
}
html[data-theme="light"] .portal-top {
  background: rgba(255, 255, 255, .92);
  border-bottom-color: rgba(0, 0, 0, .08);
}
html[data-theme="light"] .portal-brand { color: #141a24; }
html[data-theme="light"] .portal-nav-main a { color: #5a6578; }
html[data-theme="light"] .portal-nav-main a:hover,
html[data-theme="light"] .portal-nav-main a.active { color: #141a24; background: rgba(0,0,0,.04); }
html[data-theme="light"] .card { background: var(--panel); }
html[data-theme="light"] .code-toolbar .tabs button.on,
html[data-theme="light"] .code-body { background: #1a2030; color: #e9edf5; }

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font: 15px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Malgun Gothic", sans-serif;
  background: radial-gradient(1200px 600px at 50% -10%, #131a26 0%, var(--bg) 55%) fixed;
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--acc-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; }
::selection { background: rgba(118,185,0,.3); }

/* scrollbar */
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: var(--panel-3); border-radius: 8px; }
*::-webkit-scrollbar-thumb:hover { background: #2e3a54; }

/* ---------- shell / layout ----------
   상단 바: 배경만 전체 너비(full-bleed)
   네비·본문: 동일한 콘텐츠 컬럼(max-width) 안에서 정렬 — 읽기 편한 폭 유지
   ---------- */
.portal-shell { display: flex; flex-direction: column; min-height: 100vh; }
.portal-main {
  flex: 1; width: 100%; max-width: var(--portal-content-max);
  margin: 0 auto; padding: 28px var(--portal-gutter) 56px;
}
.portal-main.wide { max-width: var(--portal-content-wide); }

/* ---------- top nav — NVIDIA Build 정제 ---------- */
.portal-top {
  position: sticky; top: 0; z-index: 50;
  background: rgba(0, 0, 0, .82);
  backdrop-filter: blur(18px) saturate(1.2);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  padding: 0;
}
.portal-top-inner {
  width: 100%; max-width: var(--portal-content-wide); margin: 0 auto;
  display: flex; align-items: center;
  padding: 0 var(--portal-gutter); min-height: var(--portal-nav-h); gap: 0;
}
.portal-brand {
  font-weight: 700; font-size: 14px; letter-spacing: -.01em;
  display: flex; align-items: center; gap: 10px;
  color: #f5f5f5; flex-shrink: 0; margin-right: clamp(12px, 2vw, 24px);
  white-space: nowrap;
}
.portal-brand:hover { text-decoration: none; opacity: .92; }
.portal-brand span { color: var(--acc); font-weight: 800; }
.portal-brand .brand-mark {
  width: 22px; height: 22px; border-radius: 4px;
  background: linear-gradient(135deg, #76b900 0%, #5a9400 100%);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; color: #000; font-weight: 900;
}

.portal-nav {
  display: flex; align-items: center; flex: 1; min-width: 0;
  justify-content: space-between;
}
.portal-nav-main {
  display: flex; align-items: center; gap: 0;
}
.portal-nav-actions {
  display: flex; align-items: center; gap: 14px; flex-shrink: 0;
}
.portal-nav-main a,
.nav-action-muted,
.nav-login {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  height: 36px; padding: 0 12px; box-sizing: border-box;
  font-size: 13px; font-weight: 500; line-height: 1;
  border: 0; border-radius: 6px;
  text-decoration: none; white-space: nowrap;
  transition: color .15s, background .15s;
}
.portal-nav-main a {
  color: #9aa3b2;
}
.portal-nav-main a:hover {
  color: #fff; background: rgba(255, 255, 255, .06); text-decoration: none;
}
.portal-nav-main a.active,
.nav-action-muted.active {
  color: #fff; background: rgba(255, 255, 255, .08);
}
.portal-nav-main a.active::after,
.nav-action-muted.active::after {
  content: "";
  position: absolute; left: 10px; right: 10px; bottom: 4px;
  height: 2px; border-radius: 1px; background: var(--acc);
  pointer-events: none;
}
.nav-action-muted {
  color: #9aa3b2;
}
.nav-action-muted:hover { color: #fff; text-decoration: none; }
.nav-login.active { color: #fff; }
.nav-login {
  font: inherit; color: #d0d5de;
  background: none; cursor: pointer;
}
.nav-login:hover { color: #fff; text-decoration: none; }
.nav-theme {
  font: inherit; font-size: 15px; line-height: 1;
  width: 36px; height: 36px; padding: 0;
  border: 0; border-radius: 6px;
  background: rgba(255,255,255,.06); color: #c8ced8;
  cursor: pointer; flex-shrink: 0;
}
.nav-theme:hover { background: rgba(255,255,255,.12); color: #fff; }
html[data-theme="light"] .nav-theme { background: rgba(0,0,0,.05); color: #5a6578; }
html[data-theme="light"] .nav-theme:hover { background: rgba(0,0,0,.08); color: #141a24; }
.nav-user-pill {
  display: inline-flex; align-items: center; max-width: 140px;
  padding: 5px 12px; border-radius: var(--r-pill);
  border: 1px solid rgba(255, 255, 255, .1);
  background: rgba(255, 255, 255, .04);
  color: #eee !important; overflow: hidden; text-overflow: ellipsis;
}
.nav-user-pill:hover {
  border-color: rgba(118, 185, 0, .35);
  background: rgba(118, 185, 0, .08);
}
.nav-logout { color: #7a8494 !important; }
.nav-logout:hover { color: #f0596a !important; }

.portal-banner {
  display: none; text-align: center; font-size: 13px;
  padding: 9px 20px; color: var(--warn);
  background: rgba(245,181,68,.1); border-bottom: 1px solid rgba(245,181,68,.3);
}
/* iframe embed 모드: nav/banner 숨김 */
.embed .portal-top, .embed .portal-banner { display: none; }

/* ---------- hero ---------- */
.hero { padding: 20px 0 26px; }
.hero.center { text-align: center; }
.hero h1 { font-size: clamp(24px, 4vw, 34px); margin: 0 0 12px; font-weight: 780; letter-spacing: -.02em; }
.hero .lead { color: var(--mut); font-size: 16px; max-width: 620px; margin: 0 0 22px; }
.hero.center .lead { margin-inline: auto; }
.eyebrow { color: var(--acc); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  font: 600 14px/1 inherit; padding: 11px 18px; border-radius: var(--r-sm);
  border: 1px solid var(--bd); background: var(--panel-2); color: var(--fg);
  transition: var(--tr); text-decoration: none;
}
.btn:hover { border-color: var(--mut-2); text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--acc); color: var(--acc-ink); border-color: var(--acc); }
.btn-primary:hover { background: #86cf05; box-shadow: 0 6px 20px rgba(118,185,0,.3); }
.btn-sm { padding: 7px 12px; font-size: 13px; }
.btn-ghost { background: transparent; }

/* ---------- section heading ---------- */
.sec-h { font-size: 13px; margin: 34px 0 14px; color: var(--mut); text-transform: uppercase; letter-spacing: .07em; font-weight: 700; }
.sec-h:first-child { margin-top: 0; }

/* ---------- cards / grid ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 16px;
}

/* ---------- catalog (모델·스킬 등 목록 페이지) ---------- */
.portal-catalog-head { padding: 18px 0 16px; }
.portal-catalog-head h1 { font-size: 24px; margin: 0 0 6px; font-weight: 780; }
.portal-catalog-head p { color: var(--mut); margin: 0 0 14px; }
.portal-catalog-layout {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 20px;
  align-items: start;
}
.portal-catalog-filters {
  background: var(--panel); border: 1px solid var(--bd); border-radius: var(--r);
  padding: 14px; position: sticky; top: calc(var(--portal-nav-h) + 16px);
}
.portal-catalog-filters h4 {
  font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--mut-2); margin: 14px 0 6px;
}
.portal-catalog-filters h4:first-child { margin-top: 0; }
.portal-model-detail { max-width: 860px; }

/* ---------- 모델 상세 (NVIDIA Build 스타일) ---------- */
.md-page { width: 100%; }
.md-crumb { font-size: 13px; color: var(--mut); margin: 0 0 12px; }
.md-title-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.md-title-row h1 { font-size: clamp(22px, 2.5vw, 28px); margin: 0; font-weight: 780; }
.md-prov { color: var(--acc); font-weight: 650; font-size: 14px; }
.md-subnav {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  margin: 18px 0 0; padding-bottom: 0; border-bottom: 1px solid var(--bd-soft);
}
.md-subnav button {
  position: relative; display: inline-flex; align-items: center; gap: 6px;
  height: 40px; padding: 0 16px; border: 0; border-radius: 8px 8px 0 0;
  background: transparent; color: var(--mut); font: inherit; font-size: 13.5px;
  font-weight: 600; cursor: pointer; transition: color .15s, background .15s;
}
.md-subnav button:hover { color: var(--fg); background: rgba(255,255,255,.04); }
.md-subnav button.on {
  color: var(--fg); background: rgba(255,255,255,.08);
}
.md-subnav button.on::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 0;
  height: 2px; background: var(--acc); border-radius: 1px;
}
.md-subnav button:disabled { opacity: .45; cursor: not-allowed; }
.md-api-ref {
  margin-left: auto; font-size: 13px; color: var(--mut); padding: 8px 12px;
  border: 1px solid var(--bd); border-radius: var(--r-sm); white-space: nowrap;
}
.md-api-ref:hover { color: var(--fg); border-color: var(--mut-2); text-decoration: none; }
.md-body {
  display: grid; grid-template-columns: 1fr 280px; gap: 24px;
  align-items: start; margin-top: 0; padding-top: 20px;
}
.md-panel { min-width: 0; }
.md-aside { position: sticky; top: calc(var(--portal-nav-h) + 16px); display: flex; flex-direction: column; gap: 14px; }
.md-spec-card {
  background: var(--panel); border: 1px solid var(--bd); border-radius: var(--r);
  padding: 16px 18px;
}
.md-spec-card h3 { font-size: 13px; color: var(--mut); margin: 0 0 10px; text-transform: uppercase; letter-spacing: .05em; }
.md-spec-card p { font-size: 13.5px; line-height: 1.55; color: var(--mut); margin: 0 0 12px; }
.md-spec-row { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; padding: 7px 0; border-top: 1px solid var(--bd-soft); }
.md-spec-row span { color: var(--mut-2); }
.md-spec-row b { color: var(--fg); font-weight: 600; text-align: right; }
.md-avail { display: flex; flex-direction: column; gap: 8px; }
.md-avail-item { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.md-avail-item .ok { color: var(--ok); }
.md-avail-item .wait { color: var(--warn); }

/* 인라인 Playground */
.md-pg {
  display: grid; grid-template-columns: 1fr 240px; gap: 0;
  border: 1px solid var(--bd); border-radius: var(--r); overflow: hidden;
  min-height: 480px; background: #0c1017;
}
.md-pg-main { display: flex; flex-direction: column; min-height: 480px; }
.md-pg-welcome { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 20px; text-align: center; }
.md-pg-hint { color: var(--mut); font-size: 14px; margin: 0 0 16px; }
.md-pg-chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; max-width: 520px; }
.md-pg-chip {
  background: var(--panel); border: 1px solid var(--bd); color: var(--fg);
  border-radius: var(--r-pill); padding: 10px 16px; font: inherit; font-size: 13px;
  cursor: pointer; transition: var(--tr); max-width: 280px; text-align: left;
}
.md-pg-chip:hover { border-color: var(--acc); background: rgba(118,185,0,.08); }
.md-pg-msgs { flex: 1; overflow-y: auto; padding: 16px 18px; max-height: 360px; }
.md-pg-msg { display: flex; gap: 10px; margin-bottom: 14px; }
.md-pg-who { font-size: 11px; color: var(--mut-2); width: 48px; flex-shrink: 0; padding-top: 8px; text-align: right; word-break: break-all; }
.md-pg-bubble {
  background: var(--panel); border: 1px solid var(--bd); border-radius: var(--r);
  padding: 10px 14px; white-space: pre-wrap; word-break: break-word; font-size: 14px; line-height: 1.55;
}
.md-pg-bubble.user { background: rgba(91,157,255,.1); border-color: rgba(91,157,255,.28); }
.md-pg-bubble.err { border-color: var(--bad); color: #ffb3b3; }
.md-pg-bubble img { max-width: 220px; border-radius: 8px; margin-bottom: 8px; display: block; }
.md-pg-meta { font-size: 11px; color: var(--mut-2); margin-top: 6px; }
.md-pg-foot { border-top: 1px solid var(--bd-soft); padding: 12px 14px; background: var(--panel); }
.md-pg-inputrow { display: flex; gap: 8px; align-items: flex-end; }
.md-pg-inputrow textarea { resize: none; min-height: 44px; max-height: 120px; flex: 1; font-size: 14px; }
.md-pg-attach { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--mut); margin-bottom: 8px; }
.md-pg-attach img { height: 32px; border-radius: 6px; border: 1px solid var(--bd); }
.md-pg-attach button { width: auto; background: none; border: 0; color: var(--bad); cursor: pointer; font-size: 16px; }
.md-pg-status { font-size: 11.5px; color: var(--mut-2); margin-top: 6px; min-height: 16px; }
.md-pg-params {
  border-left: 1px solid var(--bd-soft); background: var(--panel);
  padding: 14px 16px; overflow-y: auto;
}
.md-pg-params-head { font-size: 13px; font-weight: 700; margin-bottom: 14px; color: var(--fg); }
.md-pg-field { display: block; margin-bottom: 14px; font-size: 12.5px; }
.md-pg-field > span { display: flex; justify-content: space-between; color: var(--mut); margin-bottom: 6px; }
.md-pg-field input[type=number] { width: 100%; padding: 7px 10px; font-size: 13px; }
.md-pg-field input[type=checkbox] { width: auto; accent-color: var(--acc); }
.md-pg-range { display: flex; gap: 8px; align-items: center; }
.md-pg-range input[type=range] { flex: 1; accent-color: var(--acc); }
.md-pg-range input[type=number] { width: 56px; flex-shrink: 0; }
.md-pg-key { margin: 16px 0 10px; }
.md-pg-key span { display: block; font-size: 12px; color: var(--mut); margin-bottom: 6px; }
.md-pg-key input { width: 100%; margin-bottom: 6px; font-size: 13px; }
.md-pg-clear { width: 100%; }
.md-pg-tip { font-style: normal; opacity: .5; cursor: help; }
.md-pg-empty { padding: 40px 20px; text-align: center; color: var(--mut); border: 1px dashed var(--bd); border-radius: var(--r); }

/* Model Card 탭 */
.md-card-section { margin-bottom: 22px; }
.md-card-section h3 { font-size: 14px; margin: 0 0 8px; color: var(--fg); }
.md-card-section p, .md-card-section li { font-size: 14px; color: var(--mut); line-height: 1.6; }
.md-use-list { margin: 0; padding-left: 18px; }

@media (max-width: 900px) {
  .md-body { grid-template-columns: 1fr; }
  .md-aside { position: static; }
  .md-pg { grid-template-columns: 1fr; }
  .md-pg-params { border-left: 0; border-top: 1px solid var(--bd-soft); }
}
.card {
  background: linear-gradient(180deg, var(--panel), #0f131b);
  border: 1px solid var(--bd); border-radius: var(--r-lg);
  padding: 18px; display: flex; flex-direction: column; gap: 9px;
  transition: var(--tr); color: inherit; position: relative; overflow: hidden;
}
a.card:hover, .card.link:hover { border-color: var(--acc); transform: translateY(-2px); box-shadow: var(--shadow); text-decoration: none; }
.card.dashed { border-style: dashed; opacity: .9; }
.card .prov { font-size: 12px; color: var(--acc); font-weight: 650; letter-spacing: .01em; }
.card h3 { margin: 0; font-size: 17px; font-weight: 680; letter-spacing: -.01em; }
.card .desc {
  color: var(--mut); font-size: 13.5px; line-height: 1.5; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.card-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 4px; }

/* ---------- badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 650; padding: 3px 9px; border-radius: var(--r-pill);
  border: 1px solid transparent; white-space: nowrap;
}
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.available { color: var(--ok); background: rgba(52,211,153,.12); }
.badge.unavailable { color: var(--warn); background: rgba(245,181,68,.12); }
.badge.disabled, .badge.unregistered { color: var(--mut); background: var(--panel-2); }

/* type badge (모달리티 — portal.js Portal.modelType) */
.tbadge {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 650;
  padding: 3px 9px; border-radius: var(--r-sm); border: 1px solid;
}
.tbadge.chat   { color: var(--t-chat);   border-color: rgba(91,157,255,.4);  background: rgba(91,157,255,.1); }
.tbadge.reason { color: var(--t-reason); border-color: rgba(185,139,255,.4); background: rgba(185,139,255,.1); }
.tbadge.code   { color: var(--t-code);   border-color: rgba(52,211,153,.4);  background: rgba(52,211,153,.1); }
.tbadge.vision { color: var(--t-vision); border-color: rgba(255,157,91,.4);  background: rgba(255,157,91,.1); }
.tbadge.embed  { color: var(--t-embed);  border-color: rgba(34,201,201,.4);  background: rgba(34,201,201,.1); }
.tbadge.rerank { color: var(--t-rerank); border-color: rgba(245,181,68,.4);  background: rgba(245,181,68,.1); }

.params-badge { font-size: 10.5px; padding: 2px 8px; border-radius: var(--r-sm); background: var(--panel-2); color: var(--mut); border: 1px solid var(--bd); }
.tag { font-size: 11px; color: var(--mut); background: var(--panel-2); border: 1px solid var(--bd-soft); padding: 2px 9px; border-radius: var(--r-pill); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- stat tiles ---------- */
.stat-row { display: flex; gap: 12px; flex-wrap: wrap; }
.stat { background: var(--panel); border: 1px solid var(--bd); border-radius: var(--r); padding: 14px 18px; min-width: 120px; }
.stat .v { font-size: 22px; font-weight: 750; letter-spacing: -.02em; }
.stat .v.sm { font-size: 14px; font-weight: 600; }
.stat .l { font-size: 12px; color: var(--mut); margin-top: 2px; }

/* ---------- forms ---------- */
input, select, textarea {
  background: var(--panel-2); border: 1px solid var(--bd); border-radius: var(--r-sm);
  color: var(--fg); padding: 10px 13px; font: inherit; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--acc); box-shadow: 0 0 0 3px rgba(118,185,0,.14); }
label { font-size: 12px; color: var(--mut); font-weight: 600; }

/* filter chips */
.chip {
  display: flex; align-items: center; justify-content: space-between; width: 100%; text-align: left;
  background: none; border: 0; color: var(--mut); padding: 8px 11px; border-radius: var(--r-sm);
  font: inherit; cursor: pointer; transition: var(--tr);
}
.chip:hover { background: var(--panel-2); color: var(--fg); }
.chip.on { background: rgba(118,185,0,.14); color: var(--acc); font-weight: 650; }
.chip .cnt { font-size: 11px; opacity: .65; }

/* code */
pre, code { font-family: "SF Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
pre { background: #0c1017; border: 1px solid var(--bd); border-radius: var(--r); padding: 14px 16px; overflow-x: auto; font-size: 13px; line-height: 1.55; }
code { font-size: .92em; }
:not(pre) > code { background: var(--panel-2); border: 1px solid var(--bd-soft); border-radius: 5px; padding: 1px 6px; }
/* 구문강조 토큰 (Portal.highlight) */
.tok-kw { color: #c792ea; } .tok-str { color: #9ece6a; } .tok-num { color: #f5b544; }
.tok-com { color: #6a7488; font-style: italic; } .tok-fn { color: #82aaff; }

/* ---------- footer ---------- */
.portal-foot {
  border-top: 1px solid var(--bd-soft); color: var(--mut-2); font-size: 12.5px;
  width: 100%; max-width: var(--portal-content-wide); margin: 0 auto;
  padding: 22px var(--portal-gutter); text-align: center;
}
.portal-foot a { color: var(--mut); }

/* ---------- utilities ---------- */
.muted { color: var(--mut); }
.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid var(--panel-3); border-top-color: var(--acc); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty { color: var(--mut); text-align: center; padding: 40px 0; }

.portal-auth-card {
  max-width: 440px; margin: 0 auto;
  background: var(--panel); border: 1px solid var(--bd); border-radius: var(--r-lg);
  padding: 28px 26px; box-shadow: var(--shadow);
}
.auth-layout { max-width: 520px; margin: 0 auto; }
.auth-layout.wide { max-width: 640px; }
.auth-head { text-align: center; margin-bottom: 22px; }
.auth-head h1 { font-size: 26px; margin: 0 0 8px; }
.auth-head p { margin: 0; color: var(--mut); font-size: 14px; }
.auth-field { margin-bottom: 14px; }
.auth-field label { display: block; margin-bottom: 6px; }
.auth-field .hint { font-size: 11.5px; color: var(--mut-2); margin-top: 4px; }
.auth-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.auth-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.auth-actions .btn { justify-content: center; width: 100%; }
.auth-divider { display: flex; align-items: center; gap: 12px; color: var(--mut-2); font-size: 12px; margin: 18px 0; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--bd-soft); }
.auth-foot { text-align: center; margin-top: 18px; font-size: 13px; color: var(--mut); }
.auth-alert { padding: 10px 12px; border-radius: var(--r-sm); font-size: 13px; margin-bottom: 14px; display: none; }
.auth-alert.err { display: block; background: rgba(240,89,106,.12); border: 1px solid rgba(240,89,106,.35); color: #ffb4bc; }
.auth-alert.ok { display: block; background: rgba(52,211,153,.1); border: 1px solid rgba(52,211,153,.3); color: var(--ok); }
.type-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 8px; }
.type-card {
  background: var(--panel); border: 1px solid var(--bd); border-radius: var(--r-lg);
  padding: 22px 18px; text-align: center; transition: var(--tr); color: inherit; text-decoration: none;
}
.type-card:hover:not(.disabled) { border-color: var(--acc); transform: translateY(-2px); text-decoration: none; }
.type-card.disabled { opacity: .55; cursor: not-allowed; pointer-events: none; }
.type-card .ic { font-size: 32px; margin-bottom: 10px; }
.type-card h3 { margin: 0 0 6px; font-size: 16px; }
.type-card p { margin: 0; font-size: 12.5px; color: var(--mut); line-height: 1.5; }
.badge-soon { display: inline-block; font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: var(--r-pill);
  background: var(--panel-2); color: var(--mut); border: 1px solid var(--bd); margin-top: 8px; }

/* ---------- NVIDIA Build home (nim-*) ---------- */
.nim-home {
  background: #000;
  color: #fff;
  --nim-api: #5b9dff;
  --nim-api-soft: #8ec0ff;
  --nim-api-dim: rgba(91,157,255,.1);
  --nim-api-border: rgba(91,157,255,.32);
  --nim-api-glow: rgba(91,157,255,.18);
  --nim-skill: #f06b6b;
  --nim-skill-soft: #ff9a9a;
  --nim-skill-dim: rgba(240,107,107,.1);
  --nim-skill-border: rgba(240,107,107,.32);
  --nim-skill-glow: rgba(240,107,107,.16);
}
.nim-home .portal-top {
  background: rgba(0,0,0,.92);
  backdrop-filter: blur(12px);
  border-bottom-color: rgba(255,255,255,.06);
}
.nim-home .portal-brand span { color: var(--acc); }
.nim-home .portal-foot {
  position: relative;
  z-index: 1;
  background: #000;
  border-top-color: rgba(255,255,255,.06);
}
.nim-main {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 var(--portal-gutter) 64px;
}

.nim-bg-mesh {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 70% 45% at 50% 0%, rgba(118,185,0,.14) 0%, transparent 55%),
    radial-gradient(circle at 20% 30%, rgba(118,185,0,.04) 0%, transparent 40%),
    radial-gradient(circle at 80% 20%, rgba(91,157,255,.03) 0%, transparent 35%);
}
.nim-bg-mesh::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .35;
  background-image: radial-gradient(rgba(118,185,0,.35) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 20%, #000 20%, transparent 75%);
}

.nim-hero {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 72px 0 48px;
}
.nim-hero-eyebrow {
  margin: 0 0 16px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--acc);
}
.nim-hero-glow {
  position: absolute;
  inset: -30% -10% auto;
  height: 480px;
  background: radial-gradient(ellipse 55% 45% at 50% 0%, rgba(118,185,0,.22) 0%, transparent 68%);
  pointer-events: none;
}
.nim-hero h1 {
  position: relative;
  margin: 0 0 20px;
  font-size: clamp(36px, 5.5vw, 56px);
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: 1.08;
  color: #fff;
}
.nim-hero-message {
  position: relative;
  max-width: min(1080px, 96vw);
  margin: 0 auto 36px;
  padding: 0 8px;
  font-size: clamp(15px, 1.75vw, 18px);
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: -.01em;
  color: #d4d4d4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.nim-hero-line {
  display: block;
  text-align: center;
}
@media (min-width: 900px) {
  .nim-hero-line { white-space: nowrap; }
}
.nim-kw-models,
.nim-kw-skills {
  font-weight: 700;
  white-space: nowrap;
}
.nim-kw-models {
  color: var(--nim-api-soft);
  text-shadow: 0 0 28px var(--nim-api-glow);
}
.nim-kw-skills {
  color: var(--nim-skill-soft);
  text-shadow: 0 0 28px var(--nim-skill-glow);
}
.nim-search {
  position: relative;
  display: flex;
  align-items: center;
  max-width: 640px;
  margin: 0 auto;
  background: rgba(18,18,18,.95);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--r-pill);
  padding: 4px 4px 4px 22px;
  box-shadow: 0 8px 32px rgba(0,0,0,.45);
}
.nim-search input {
  flex: 1;
  background: transparent;
  border: 0;
  color: #fff;
  padding: 14px 10px 14px 0;
  font-size: 16px;
}
.nim-search input::placeholder { color: #666; }
.nim-search input:focus { outline: none; box-shadow: none; }
.nim-search button {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 0;
  background: var(--acc);
  color: #000;
  font-size: 22px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  transition: var(--tr);
}
.nim-search button:hover { background: #8ed100; transform: scale(1.03); }

.nim-dual {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 8px;
}
.nim-panel {
  border-radius: 14px;
  padding: 20px 18px 16px;
  display: flex;
  flex-direction: column;
  min-height: 420px;
}
.nim-panel-models {
  background: linear-gradient(165deg, rgba(91,157,255,.08) 0%, rgba(10,12,18,.98) 38%, rgba(8,8,10,.98) 100%);
  border: 1px solid var(--nim-api-border);
  box-shadow: 0 4px 28px rgba(0,0,0,.4), inset 0 1px 0 rgba(91,157,255,.2);
}
.nim-panel-skills {
  background: linear-gradient(165deg, rgba(240,107,107,.08) 0%, rgba(14,10,10,.98) 38%, rgba(8,8,10,.98) 100%);
  border: 1px solid var(--nim-skill-border);
  box-shadow: 0 4px 28px rgba(0,0,0,.4), inset 0 1px 0 rgba(240,107,107,.18);
}
.nim-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
  padding-bottom: 14px;
}
.nim-panel-models .nim-panel-head {
  border-bottom: 1px solid rgba(91,157,255,.15);
}
.nim-panel-skills .nim-panel-head {
  border-bottom: 1px solid rgba(240,107,107,.15);
}
.nim-panel-head h2 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -.02em;
}
.nim-panel-models .nim-panel-head h2 { color: var(--nim-api-soft); }
.nim-panel-skills .nim-panel-head h2 { color: var(--nim-skill-soft); }
.nim-panel-head p {
  margin: 0;
  font-size: 13px;
  color: #888;
  line-height: 1.4;
}
.nim-panel-ic {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px;
  color: #666;
  background: rgba(255,255,255,.02);
}
.nim-ic-api {
  color: var(--nim-api);
  border-color: var(--nim-api-border);
  background: var(--nim-api-dim);
}
.nim-ic-skill {
  color: var(--nim-skill);
  border-color: var(--nim-skill-border);
  background: var(--nim-skill-dim);
}

.nim-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.nim-list-page { max-width: 720px; }
.nim-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(255,255,255,.025);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
  transition: var(--tr);
}
.nim-row:hover { text-decoration: none; }
.nim-panel-models .nim-row:hover {
  border-color: var(--nim-api-border);
  background: var(--nim-api-dim);
}
.nim-panel-skills .nim-row:hover {
  border-color: var(--nim-skill-border);
  background: var(--nim-skill-dim);
}
.nim-panel-models .nim-row-logo { color: var(--nim-api); opacity: .85; }
.nim-row-logo {
  flex-shrink: 0;
  width: 48px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .02em;
  color: #888;
  text-align: center;
  line-height: 1.2;
}
.nim-row-body { flex: 1; min-width: 0; }
.nim-row-title {
  font-size: 14px;
  font-weight: 600;
  color: #f0f0f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nim-row-sub { font-size: 12px; color: #777; margin-top: 2px; }
.nim-row-tags {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.nim-tag {
  font-size: 10px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  border: 1px solid rgba(255,255,255,.12);
  color: #aaa;
  background: rgba(0,0,0,.4);
  white-space: nowrap;
}
.nim-tag-default { border-color: rgba(118,185,0,.35); color: #9ccc3a; }
.nim-panel-models .nim-tag-default {
  border-color: var(--nim-api-border);
  color: var(--nim-api-soft);
  background: rgba(91,157,255,.06);
}
.nim-tag-vision { border-color: rgba(255,157,91,.4); color: #ff9d5b; }
.nim-tag-embed { border-color: rgba(34,201,201,.4); color: #22c9c9; }
.nim-tag-reason { border-color: rgba(185,139,255,.4); color: #b98bff; }
.nim-tag-code { border-color: rgba(52,211,153,.4); color: #34d399; }
.nim-avail { color: var(--ok); font-size: 10px; }
.nim-skill-ic {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: var(--nim-skill-dim);
  border: 1px solid var(--nim-skill-border);
  border-radius: 8px;
}
.nim-skill-cnt {
  font-size: 12px;
  font-weight: 500;
  color: #888;
  white-space: nowrap;
}
.nim-panel-skills .nim-row-skill:hover .nim-skill-cnt { color: var(--nim-skill-soft); }
.nim-more {
  display: block;
  text-align: center;
  margin-top: 14px;
  padding: 12px 16px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px;
  color: #e0e0e0;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: var(--tr);
}
.nim-panel-models .nim-more:hover {
  border-color: var(--nim-api-border);
  color: var(--nim-api-soft);
  background: var(--nim-api-dim);
  text-decoration: none;
}
.nim-panel-skills .nim-more:hover {
  border-color: var(--nim-skill-border);
  color: var(--nim-skill-soft);
  background: var(--nim-skill-dim);
  text-decoration: none;
}
.nim-loading, .nim-empty {
  color: #666;
  text-align: center;
  padding: 32px 16px;
  font-size: 13px;
}

.nim-bp-banner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin-top: 24px;
  padding: 28px 32px;
  background: linear-gradient(135deg, #0c0f0a 0%, #0a0d14 45%, #0d1018 100%);
  border: 1px solid rgba(118,185,0,.15);
  border-radius: 16px;
  overflow: hidden;
}
.nim-bp-deco {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 45%;
  background: linear-gradient(90deg, transparent, rgba(118,185,0,.04));
  pointer-events: none;
}
.nim-bp-text {
  position: relative;
  flex: 1;
  min-width: 0;
}
.nim-bp-text h2 {
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.02em;
}
.nim-bp-text p {
  margin: 0 0 18px;
  color: #888;
  font-size: 14px;
  max-width: 520px;
  line-height: 1.55;
}
.nim-bp-cta {
  display: inline-block;
  padding: 10px 20px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 8px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: var(--tr);
}
.nim-bp-cta:hover {
  border-color: var(--acc);
  color: var(--acc);
  text-decoration: none;
}
.nim-bp-tiles {
  position: relative;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  flex-shrink: 0;
}
.nim-bp-tile {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 12px;
  font-size: 24px;
  text-decoration: none;
  transition: var(--tr);
}
.nim-bp-tile:hover {
  border-color: var(--acc);
  transform: translateY(-2px);
  text-decoration: none;
}

.nim-page-head { padding: 12px 0 24px; }
.nim-page-head h1 { margin: 8px 0 8px; font-size: 28px; }

.nim-cats { margin: 0 0 28px; }
.nim-cats-inner {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
}
.nim-cat-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: var(--r-pill);
  border: 1px solid var(--bd); background: var(--panel);
  color: var(--fg); font-size: 13px; font-weight: 600;
  text-decoration: none; transition: var(--tr);
}
.nim-cat-chip b {
  font-size: 11px; font-weight: 700; color: var(--mut);
  background: var(--panel-2); padding: 2px 7px; border-radius: var(--r-pill);
}
.nim-cat-chip:hover { border-color: var(--acc); text-decoration: none; transform: translateY(-1px); }
.nim-cat-all { margin-left: auto; color: var(--acc-2); border-style: dashed; }

@media (max-width: 860px) {
  .nim-dual { grid-template-columns: 1fr; }
  .nim-bp-banner { flex-direction: column; align-items: flex-start; }
  .nim-row-tags { display: none; }
}

@media (max-width: 900px) {
  .portal-brand { margin-right: 12px; }
  .portal-nav-main a,
  .nav-action-muted,
  .nav-login { padding: 0 8px; font-size: 12.5px; }
  .nav-action-muted { display: none; }
  .portal-catalog-layout { grid-template-columns: 1fr; }
  .portal-catalog-filters { position: static !important; }
}

@media (max-width: 640px) {
  .portal-main { padding: 20px var(--portal-gutter) 40px; }
  .portal-nav { gap: 2px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .portal-nav-main { flex-wrap: nowrap; }
  .portal-brand span:not(.brand-mark) { display: none; }
  .nim-cat-all { margin-left: 0; width: 100%; justify-content: center; }
  .auth-row2, .type-grid { grid-template-columns: 1fr; }
  .portal-auth-card { padding: 22px 18px; }
  .acct-layout { grid-template-columns: 1fr; }
  .acct-sidebar { position: static; }
}

/* ---------- 내 계정 (/account/*) ---------- */
.acct-layout {
  display: grid; grid-template-columns: 220px 1fr; gap: 28px; align-items: start;
}
.acct-sidebar { position: sticky; top: 72px; }
.acct-user-card {
  background: var(--panel); border: 1px solid var(--bd); border-radius: var(--r);
  padding: 16px; margin-bottom: 12px;
}
.acct-user-name { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.acct-user-org { font-size: 12.5px; color: var(--mut); margin-bottom: 6px; line-height: 1.35; }
.acct-user-email { font-size: 12px; color: var(--mut); word-break: break-all; }
.acct-user-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.acct-nav { display: flex; flex-direction: column; gap: 2px; }
.acct-nav a {
  display: block; padding: 10px 14px; border-radius: var(--r-sm);
  color: var(--mut); font-size: 14px; text-decoration: none;
  border: 1px solid transparent;
}
.acct-nav a:hover { color: var(--fg); background: var(--panel); text-decoration: none; }
.acct-nav a.active {
  color: var(--fg); background: var(--panel); border-color: var(--bd);
  box-shadow: inset 3px 0 0 var(--acc);
}
.acct-side-foot { margin-top: 16px; font-size: 12px; }
.acct-main.loading { opacity: .5; pointer-events: none; }
.acct-panel {
  background: var(--panel); border: 1px solid var(--bd); border-radius: var(--r);
  padding: 20px 22px; margin-bottom: 16px;
}
.acct-panel h2 { font-size: 17px; margin: 0 0 14px; }
.acct-panel h3 { font-size: 14px; margin: 18px 0 8px; color: var(--mut); }
.acct-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.acct-field { margin-bottom: 12px; }
.acct-field label { display: block; font-size: 12.5px; color: var(--mut); margin-bottom: 5px; }
.acct-field input, .acct-field textarea, .acct-field select {
  width: 100%; background: var(--panel-2); border: 1px solid var(--bd);
  border-radius: var(--r-sm); color: var(--fg); padding: 10px 12px; font: inherit;
}
.acct-field input:focus, .acct-field textarea:focus { outline: none; border-color: var(--acc); }
.acct-field .ro { color: var(--mut); font-size: 14px; padding: 8px 0; }
.acct-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.acct-pill {
  display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 9px;
  border-radius: var(--r-pill); border: 1px solid var(--bd);
}
.acct-pill.ok { background: rgba(52,211,153,.12); color: var(--ok); border-color: rgba(52,211,153,.3); }
.acct-pill.bad { background: rgba(240,89,106,.12); color: var(--bad); border-color: rgba(240,89,106,.3); }
.acct-pill.warn { background: rgba(245,181,68,.12); color: var(--warn); border-color: rgba(245,181,68,.3); }
.acct-pill.muted { background: var(--panel-2); color: var(--mut); }
.acct-pill.pill-dev { background: rgba(91,157,255,.12); color: var(--t-chat); border-color: rgba(91,157,255,.3); }
.acct-pill.pill-prod { background: rgba(52,211,153,.12); color: var(--ok); border-color: rgba(52,211,153,.3); }
.acct-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.acct-table th, .acct-table td { border-bottom: 1px solid var(--bd-soft); padding: 10px 8px; text-align: left; vertical-align: top; }
.acct-table th { color: var(--mut); font-weight: 600; font-size: 12px; }
.acct-table tr:last-child td { border-bottom: 0; }
.acct-table code { font-size: 12px; }
.acct-alert {
  padding: 10px 14px; border-radius: var(--r-sm); font-size: 13px; margin-bottom: 14px;
}
.acct-alert.ok { background: rgba(52,211,153,.1); border: 1px solid rgba(52,211,153,.3); color: var(--ok); }
.acct-alert.err { background: rgba(240,89,106,.1); border: 1px solid rgba(240,89,106,.3); color: #ffb4bc; }
.acct-empty { text-align: center; color: var(--mut); padding: 28px 12px; font-size: 14px; }
.acct-callout {
  background: rgba(118,185,0,.06); border: 1px solid rgba(118,185,0,.2);
  border-radius: var(--r-sm); padding: 12px 14px; font-size: 13px; color: var(--mut); margin-bottom: 14px;
}
.acct-callout b { color: var(--fg); }

/* key table + popup */
.key-detail-table td { vertical-align: middle; }
.key-toggle-btn {
  display: inline;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: var(--fg);
  max-width: 100%;
}
.key-toggle-btn code {
  font-size: 12px;
  word-break: break-all;
  white-space: normal;
}
.key-toggle-btn:hover code { color: var(--acc-2); text-decoration: underline; }
.key-toggle-btn.key-revealed code { color: var(--ok); text-decoration: none; }
.key-toggle-btn.key-copied-flash code::after {
  content: ' · 복사됨';
  color: var(--ok);
  font-size: 11px;
  text-decoration: none;
}
.th-copy-hint {
  display: inline-flex;
  align-items: center;
  margin-left: 4px;
  color: var(--mut);
  vertical-align: middle;
  opacity: 0.75;
}
.model-link-btn {
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  color: var(--acc-2);
  text-align: left;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.model-link-btn:hover { text-decoration: underline; }
.acct-actions-cell { white-space: nowrap; }
.acct-actions-col { width: 120px; }
.acct-row-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.acct-form-actions { align-items: center; }

.portal-popup-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,.55); display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.portal-popup {
  background: var(--panel); border: 1px solid var(--bd); border-radius: var(--r);
  width: min(480px, 100%); max-height: 80vh; overflow: auto; box-shadow: var(--shadow-hi);
}
.portal-popup-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid var(--bd-soft);
}
.portal-popup-body { padding: 14px 16px 18px; }
.portal-popup-section { margin-bottom: 16px; }
.portal-popup-section:last-child { margin-bottom: 0; }
.portal-popup-label { font-size: 12px; font-weight: 700; margin-bottom: 6px; }
.portal-popup-label.ok { color: var(--ok); }
.portal-popup-label.prod { color: var(--warn); }
.portal-popup-models { font-size: 12px; line-height: 1.5; word-break: break-word; }
.portal-popup-models.ok { color: var(--fg); }
.portal-popup-models.prod { color: var(--mut); }

.acct-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.acct-tabs button {
  background: var(--panel); border: 1px solid var(--bd); color: var(--mut);
  border-radius: var(--r-sm); padding: 8px 14px; font-size: 13px; cursor: pointer;
}
.acct-tabs button.on { color: var(--fg); border-color: var(--acc); background: rgba(91,157,255,.08); }
.btn-sm { padding: 4px 10px; font-size: 12px; }

