/* MarsBlog AI Console — scoped so the shared site navigation stays intact. */
body.console-page {
  --c-bg: #080808;
  --c-bg-2: #0d0d0d;
  --c-panel: #101010;
  --c-panel-2: #151515;
  --c-panel-hover: #191919;
  --c-border: #2a2a2a;
  --c-border-soft: #202020;
  --c-text: #f2f2ef;
  --c-text-2: #a5a5a0;
  --c-text-3: #686865;
  --c-brand: #e4795b;
  --c-brand-2: #ef9479;
  --c-brand-soft: rgba(228, 121, 91, .11);
  --c-green: #6fbf8b;
  --c-green-soft: rgba(111, 191, 139, .1);
  --c-red: #e17676;
  --c-red-soft: rgba(225, 118, 118, .1);
  --c-amber: #d7a85d;
  --c-amber-soft: rgba(215, 168, 93, .1);
  --c-cyan: #7cabb7;
  --c-purple: #8d82a8;
  --sidebar-w: 220px;
  --radius: 10px;
  --radius-sm: 6px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}
.console-shell,
.console-shell * { box-sizing: border-box; }
body.console-page {
  min-height: 100vh;
  margin: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
.console-shell a { color: inherit; text-decoration: none; }
.console-shell button,
.console-shell input,
.console-shell select,
.console-shell textarea { font: inherit; }
.console-shell button,
.console-shell a { -webkit-tap-highlight-color: transparent; }
.console-shell button:focus-visible,
.console-shell a:focus-visible,
.console-shell input:focus-visible,
.console-shell select:focus-visible,
.console-shell textarea:focus-visible {
  outline: 2px solid var(--c-brand-2);
  outline-offset: 2px;
}
.console-shell .console-root { display: flex; min-height: 100vh; }
.console-shell .sidebar {
  position: sticky;
  top: 0;
  width: var(--sidebar-w);
  height: 100vh;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  background: #0b0b0b;
  border-right: 1px solid var(--c-border-soft);
}
.console-shell .sidebar-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 76px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--c-border-soft);
}
.console-shell .sidebar-brand .logo {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid #3a3a38;
  border-radius: 50%;
  color: var(--c-text);
  font-size: 12px;
  font-weight: 700;
}
.console-shell .sidebar-brand b { display: block; font-size: 13px; font-weight: 650; letter-spacing: .02em; }
.console-shell .sidebar-brand small { display: block; margin-top: 1px; color: var(--c-text-3); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.console-shell .nav-section-label {
  padding: 22px 20px 7px;
  color: #555552;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.console-shell .nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  margin: 1px 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  color: #8c8c88;
  font-size: 12.5px;
  font-weight: 520;
  transition: color .15s ease, background .15s ease;
}
.console-shell .nav-item:hover { background: #131313; color: var(--c-text); }
.console-shell .nav-item.active { background: #171717; color: var(--c-text); }
.console-shell .nav-item.active::before {
  content: "";
  position: absolute;
  left: -10px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: var(--c-brand);
}
.console-shell .nav-item .ico { width: 16px; color: #6e6e6a; text-align: center; }
.console-shell .nav-item.active .ico { color: var(--c-brand-2); }
.console-shell .sidebar-footer {
  display: grid;
  gap: 7px;
  margin-top: auto;
  padding: 16px 20px;
  border-top: 1px solid var(--c-border-soft);
  color: var(--c-text-3);
  font-size: 11px;
}
.console-shell .sidebar-footer span { color: var(--c-text-2); }
.console-shell .sidebar-footer a { transition: color .15s ease; }
.console-shell .sidebar-footer a:hover { color: var(--c-text); }
.console-shell .main {
  width: calc(100% - var(--sidebar-w));
  min-width: 0;
  padding: 34px clamp(24px, 4vw, 64px) 72px;
}
.console-shell .main > * { width: min(100%, 1420px); margin-inline: auto; }
.console-shell .mobile-menu-btn,
.console-shell .sidebar-backdrop { display: none; }
.console-shell .topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--c-border-soft);
}
.console-shell .topbar h1 { margin: 0; font-size: clamp(24px, 3vw, 34px); font-weight: 560; letter-spacing: -.04em; }
.console-shell .topbar h1 i { display: none; }
.console-shell .topbar .sub { max-width: 680px; margin-top: 7px; color: var(--c-text-3); font-size: 12px; }
.console-shell .section-kicker,
.console-shell .eyebrow {
  color: var(--c-brand-2);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
}
.console-shell .gateway-hero {
  position: relative;
  min-height: 430px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr);
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--c-border-soft);
}
.console-shell .gateway-hero-copy { position: relative; z-index: 2; padding: 34px 40px 44px 0; }
.console-shell .gateway-hero h1 {
  max-width: 700px;
  margin: 18px 0 20px;
  color: #f5f5f2;
  font-size: clamp(48px, 6.8vw, 94px);
  font-weight: 540;
  line-height: .88;
  letter-spacing: -.075em;
}
.console-shell .gateway-hero h1 span { color: #777772; }
.console-shell .gateway-hero-copy > p { max-width: 560px; margin: 0; color: var(--c-text-2); font-size: 14px; line-height: 1.75; }
.console-shell .gateway-hero-copy > p b { color: var(--c-text); font-weight: 560; }
.console-shell .hero-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.console-shell .hero-account {
  display: flex;
  gap: 34px;
  margin-top: 44px;
  padding-top: 18px;
  border-top: 1px solid var(--c-border-soft);
}
.console-shell .hero-account div { display: grid; gap: 3px; }
.console-shell .hero-account span { color: var(--c-text-3); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.console-shell .hero-account strong { font-family: var(--mono); font-size: 17px; font-weight: 500; }
.console-shell .ai-mark-stage {
  --ai-logo: clamp(210px, 25vw, 340px);
  position: relative;
  align-self: stretch;
  min-height: 430px;
  overflow: hidden;
  background: #080808;
  isolation: isolate;
}
.console-shell .ai-mark-stage::before {
  content: "";
  position: absolute;
  inset: 12% 12%;
  border: 1px solid #181818;
  border-radius: 50%;
  opacity: .75;
}
.console-shell .ai-mark-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(90deg, #080808 0%, transparent 24%, transparent 76%, #080808 100%);
}
.console-shell .ai-mark-world { position: absolute; inset: 0; display: grid; place-items: center; }
.console-shell .ai-mark-track { position: relative; width: var(--ai-logo); height: var(--ai-logo); }
.console-shell .ai-mark-card { position: absolute; inset: 0; will-change: transform; }
.console-shell .ai-mark-stack { position: absolute; inset: 0; transform-style: preserve-3d; will-change: transform; }
.console-shell .ai-mark-lyr { position: absolute; inset: 0; width: 100%; height: 100%; backface-visibility: hidden; }
.console-shell .ai-mark-defs { position: absolute; width: 0; height: 0; }
.console-shell .ai-mark-measure { position: fixed; left: -9999px; top: 0; opacity: 0; pointer-events: none; }
.console-shell .ai-mark-controls {
  position: absolute;
  left: 50%;
  bottom: 24px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 5px;
  opacity: .18;
  transform: translateX(-50%);
  transition: opacity .2s ease;
}
.console-shell .ai-mark-stage:hover .ai-mark-controls,
.console-shell .ai-mark-controls:focus-within { opacity: .8; }
.console-shell .ai-mark-controls button {
  height: 28px;
  min-width: 30px;
  padding: 0 9px;
  border: 1px solid #282828;
  border-radius: 5px;
  background: rgba(8,8,8,.72);
  color: #878782;
  font-size: 9px;
  letter-spacing: .12em;
  cursor: pointer;
}
.console-shell .ai-mark-controls button:hover { color: var(--c-text); border-color: #444; }
.console-shell .ai-mark-caption {
  position: absolute;
  right: 0;
  top: 24px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--c-text-3);
  font-size: 9px;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.console-shell .ai-mark-caption span { width: 18px; height: 1px; background: var(--c-brand); }
.console-shell .metric-strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  margin-bottom: 24px;
  border-bottom: 1px solid var(--c-border-soft);
}
.console-shell .metric { min-width: 0; padding: 18px 16px 18px 0; }
.console-shell .metric + .metric { padding-left: 16px; border-left: 1px solid var(--c-border-soft); }
.console-shell .metric span { display: block; margin-bottom: 7px; color: var(--c-text-3); font-size: 9px; letter-spacing: .12em; text-transform: uppercase; }
.console-shell .metric strong { display: block; overflow: hidden; font-family: var(--mono); font-size: clamp(14px, 1.5vw, 19px); font-weight: 500; text-overflow: ellipsis; }
.console-shell .dashboard-grid { align-items: stretch; }
.console-shell .grid { display: grid; gap: 14px; }
.console-shell .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.console-shell .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.console-shell .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.console-shell .card {
  min-width: 0;
  overflow-x: auto;
  padding: 20px;
  background: var(--c-panel);
  color: var(--c-text);
  border: 1px solid var(--c-border-soft);
  border-radius: var(--radius);
  box-shadow: none;
  --bs-card-bg: var(--c-panel);
  --bs-card-color: var(--c-text);
  --bs-card-border-color: var(--c-border-soft);
}
.console-shell .card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 17px;
  color: var(--c-text-3);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.console-shell .card-title { margin: 5px 0 0; font-size: 19px; font-weight: 560; letter-spacing: -.025em; }
.console-shell .card-sub { margin: 7px 0 20px; color: var(--c-text-3); font-size: 11px; }
.console-shell .section-title { margin: 0 0 16px; font-size: 15px; font-weight: 600; }
.console-shell .section-title i { color: var(--c-text-3); }
.console-shell .stat-row { display: flex; align-items: center; gap: 12px; }
.console-shell .stat-row + .stat-row { margin-top: 15px; }
.console-shell .stat-ico { width: 32px; height: 32px; display: grid; place-items: center; flex-shrink: 0; border-radius: 50%; background: #191919 !important; color: var(--c-text-2) !important; font-size: 13px; }
.console-shell .stat-label { color: var(--c-text-3); font-size: 10px; }
.console-shell .stat-value { margin-top: 2px; font-family: var(--mono); font-size: 18px; font-weight: 500; }
.console-shell .btn {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 13px;
  border: 1px solid #303030;
  border-radius: var(--radius-sm);
  background: #131313;
  color: #cececa;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: color .15s ease, background .15s ease, border-color .15s ease;
}
.console-shell .btn:hover { background: #191919; border-color: #424242; color: #fff; }
.console-shell .btn:active { transform: translateY(1px); }
.console-shell .btn.primary { background: #ecece8; border-color: #ecece8; color: #0b0b0b; }
.console-shell .btn.primary:hover { background: #fff; border-color: #fff; color: #000; }
.console-shell .btn.danger { color: #df8989; }
.console-shell .btn.danger:hover { background: var(--c-red-soft); border-color: rgba(225,118,118,.25); }
.console-shell .btn.sm { min-height: 29px; padding: 5px 9px; font-size: 10px; }
.console-shell .btn:disabled { opacity: .36; cursor: not-allowed; }
.console-shell .btn-icon { width: 36px; padding: 0; }
.console-shell .field { margin-bottom: 16px; }
.console-shell .field label,
.console-shell .endpoint-row label { display: block; margin-bottom: 7px; color: var(--c-text-3); font-size: 10px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; }
.console-shell .field .hint,
.console-shell .hint { margin-top: 6px; color: var(--c-text-3); font-size: 10px; }
.console-shell .input,
.console-shell .select {
  width: 100%;
  min-height: 38px;
  padding: 9px 11px;
  outline: none;
  border: 1px solid #2d2d2d;
  border-radius: var(--radius-sm);
  background: #0b0b0b;
  color: var(--c-text);
  font-size: 12px;
  transition: border-color .15s ease, background .15s ease;
}
.console-shell .input:hover,
.console-shell .select:hover { border-color: #3b3b3b; }
.console-shell .input:focus,
.console-shell .select:focus { background: #0e0e0e; border-color: #5b5b58; }
.console-shell .input::placeholder { color: #51514e; }
.console-shell .mono { font-family: var(--mono); }
.console-shell code.inline { padding: 3px 6px; border: 1px solid var(--c-border-soft); border-radius: 4px; background: #0a0a0a; color: #c6c6c1; font-family: var(--mono); font-size: 11px; }
.console-shell .endpoint-list { display: grid; gap: 15px; }
.console-shell .endpoint-row > div { display: grid; grid-template-columns: minmax(0, 1fr) 36px; gap: 6px; }
.console-shell .endpoint-auth { display: flex; align-items: center; gap: 9px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--c-border-soft); color: var(--c-text-3); font-size: 10px; }
.console-shell .switch { position: relative; display: inline-block; width: 36px; height: 20px; }
.console-shell .switch input { width: 0; height: 0; opacity: 0; }
.console-shell .switch .track { position: absolute; inset: 0; border: 1px solid #343434; border-radius: 999px; background: #151515; cursor: pointer; transition: .2s; }
.console-shell .switch .track::before { content: ""; position: absolute; width: 14px; height: 14px; left: 2px; top: 2px; border-radius: 50%; background: #73736f; transition: .2s; }
.console-shell .switch input:checked + .track { border-color: var(--c-brand); background: var(--c-brand-soft); }
.console-shell .switch input:checked + .track::before { background: var(--c-brand-2); transform: translateX(16px); }
.console-shell .switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; }
.console-shell .switch-row .desc { margin-top: 2px; color: var(--c-text-3); font-size: 10px; }
.console-shell .table {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
  background: var(--c-panel);
  color: var(--c-text-2);
  font-size: 11.5px;
  vertical-align: middle;
  --bs-table-color: var(--c-text-2);
  --bs-table-bg: var(--c-panel);
  --bs-table-border-color: var(--c-border-soft);
  --bs-table-striped-color: var(--c-text-2);
  --bs-table-striped-bg: var(--c-panel-2);
  --bs-table-hover-color: var(--c-text);
  --bs-table-hover-bg: var(--c-panel-hover);
}
.console-shell .table > :not(caption) > * > * {
  background-color: var(--c-panel);
  color: inherit;
  border-color: var(--c-border-soft);
  box-shadow: none;
}
.console-shell .table th {
  padding: 11px 12px;
  border-bottom: 1px solid var(--c-border);
  background: #0d0d0d;
  color: #5f5f5b;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .1em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}
.console-shell .table td { padding: 12px; border-bottom: 1px solid var(--c-border-soft); background: var(--c-panel); color: #c4c4c0; vertical-align: middle; }
.console-shell .table tr:last-child td { border-bottom: 0; }
.console-shell .table tbody tr:hover td { background: var(--c-panel-hover); color: var(--c-text); }
.console-shell .table-sm td,
.console-shell .table-sm th { padding: 8px 10px; }
.console-shell .pill,
.console-shell .tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border: 1px solid #2b2b2b;
  border-radius: 4px;
  background: #141414;
  color: var(--c-text-2);
  font-size: 9.5px;
  font-weight: 600;
  white-space: nowrap;
}
.console-shell .pill.green { color: #82c99a; border-color: rgba(111,191,139,.22); background: var(--c-green-soft); }
.console-shell .pill.red { color: #df8989; border-color: rgba(225,118,118,.22); background: var(--c-red-soft); }
.console-shell .pill.amber { color: #dcb56f; border-color: rgba(215,168,93,.22); background: var(--c-amber-soft); }
.console-shell .pill.brand { color: var(--c-brand-2); border-color: rgba(228,121,91,.22); background: var(--c-brand-soft); }
.console-shell .pill.gray { color: var(--c-text-2); }
.console-shell .filter-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.console-shell .search-box { position: relative; min-width: 240px; flex: 1; }
.console-shell .search-box .input { padding-left: 34px; }
.console-shell .search-box .ico { position: absolute; left: 11px; top: 50%; color: var(--c-text-3); transform: translateY(-50%); }
.console-shell .chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.console-shell .chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 9px;
  border: 1px solid #292929;
  border-radius: 5px;
  background: #101010;
  color: #8f8f8b;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: .15s ease;
}
.console-shell .chip:hover { color: var(--c-text); border-color: #404040; }
.console-shell .chip.active { color: #f0f0ed; border-color: #4b4b48; background: #1a1a1a; }
.console-shell .chip .cnt { color: #646460; font-family: var(--mono); font-size: 9px; }
.console-shell .chip.active .cnt { color: var(--c-brand-2); }
.console-shell .models-hero {
  margin-bottom: 24px;
  padding: 16px 0 24px;
  border-bottom: 1px solid var(--c-border-soft);
  background: transparent;
}
.console-shell .models-hero h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; font-size: clamp(28px, 4vw, 44px); font-weight: 560; letter-spacing: -.05em; }
.console-shell .models-hero h2 > i { display: none; }
.console-shell .models-hero p { max-width: 720px; margin: 0; color: var(--c-text-3); font-size: 12px; }
.console-shell .models-hero .count-badge { padding: 3px 8px; border: 1px solid #303030; border-radius: 4px; background: #121212; color: var(--c-text-2); font-family: var(--mono); font-size: 9px; font-weight: 500; letter-spacing: 0; }
.console-shell .models-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.console-shell .model-card { padding: 16px; border: 1px solid var(--c-border-soft); border-radius: 7px; background: #0f0f0f; transition: border-color .15s ease, background .15s ease; }
.console-shell .model-card:hover { border-color: #3b3b3b; background: #121212; }
.console-shell .model-card .mc-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.console-shell .model-avatar,
.console-shell .dist-avatar { display: grid; place-items: center; flex-shrink: 0; overflow: hidden; color: #fff; font-weight: 700; }
.console-shell .model-avatar { width: 38px; height: 38px; border-radius: 7px; font-size: 12px; }
.console-shell .dist-avatar { width: 26px; height: 26px; border-radius: 5px; font-size: 9px; }
.console-shell .model-avatar img,
.console-shell .dist-avatar img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.console-shell .mc-name { overflow: hidden; font-family: var(--mono); font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.console-shell .mc-brand { margin-top: 3px; color: var(--c-text-3); font-size: 9.5px; }
.console-shell .mc-copy { margin-left: auto; padding: 4px; color: var(--c-text-3); cursor: pointer; }
.console-shell .mc-copy:hover { color: var(--c-text); }
.console-shell .price-row { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; font-size: 10.5px; }
.console-shell .price-row .k { color: var(--c-text-3); }
.console-shell .price-row .v { font-family: var(--mono); font-weight: 500; }
.console-shell .mc-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 13px; padding-top: 12px; border-top: 1px solid var(--c-border-soft); }
.console-shell .status-dot { width: 6px; height: 6px; display: inline-block; border-radius: 50%; }
.console-shell .status-dot.unknown { background: var(--c-text-3); }
.console-shell .status-rate { display: inline-block; padding: 1px 5px; border-radius: 3px; font-family: var(--mono); font-size: 9px; font-weight: 600; }
.console-shell .status-rate.ok { color: #82c99a; background: var(--c-green-soft); }
.console-shell .status-rate.warn { color: #dcb56f; background: var(--c-amber-soft); }
.console-shell .status-rate.error { color: #df8989; background: var(--c-red-soft); }
.console-shell .dist-row { display: flex; align-items: center; gap: 10px; margin-bottom: 13px; }
.console-shell .dist-row:last-child { margin-bottom: 0; }
.console-shell .dist-info { min-width: 0; flex: 1; }
.console-shell .dist-name { overflow: hidden; color: #c9c9c5; font-size: 10.5px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.console-shell .dist-bar-bg { height: 2px; overflow: hidden; margin-top: 6px; background: #222; }
.console-shell .dist-bar-fill { height: 100%; background: var(--c-brand); }
.console-shell .dist-cost { flex-shrink: 0; font-family: var(--mono); font-size: 10.5px; }
.console-shell .empty { padding: 44px 18px; color: var(--c-text-3); text-align: center; }
.console-shell .empty .ico { font-size: 24px; opacity: .4; }
.console-shell .empty p { margin: 9px 0 0; font-size: 11px; }
.console-shell .spinner { width: 18px; height: 18px; margin: 36px auto; border: 1px solid #2f2f2f; border-top-color: var(--c-text-2); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.console-shell .toast-wrap { position: fixed; right: 18px; top: 18px; z-index: 2000; display: flex; flex-direction: column; gap: 7px; }
.console-shell .toast { min-width: 190px; padding: 10px 12px; border: 1px solid var(--c-border); border-radius: 6px; background: #181818; color: var(--c-text); box-shadow: 0 16px 40px rgba(0,0,0,.35); font-size: 11px; animation: toastIn .2s ease; }
.console-shell .toast.ok { border-left: 2px solid var(--c-green); }
.console-shell .toast.err { border-left: 2px solid var(--c-red); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-5px); } }
.console-shell .modal-mask { position: fixed; inset: 0; z-index: 1500; display: none; align-items: center; justify-content: center; padding: 16px; background: rgba(0,0,0,.72); backdrop-filter: blur(4px); }
.console-shell .modal-mask.open { display: flex; }
.console-shell .modal {
  position: relative;
  inset: auto;
  z-index: auto;
  display: block;
  width: 440px;
  max-width: 100%;
  height: auto;
  margin: 0;
  padding: 22px;
  overflow: visible;
  border: 1px solid #303030;
  border-radius: 9px;
  background: #101010;
  color: var(--c-text);
  outline: 0;
}
.console-shell .modal h3 { margin: 0 0 18px; font-size: 17px; font-weight: 560; }
.console-shell .modal-actions { display: flex; justify-content: flex-end; gap: 7px; margin-top: 20px; }
.console-shell .log-err-btn { padding: 2px 4px; border: 0; background: none; color: #df8989; cursor: pointer; }
.console-shell .log-detail-box { max-height: 240px; overflow: auto; margin: 0; padding: 11px; border: 1px solid var(--c-border); border-radius: 5px; background: #0b0b0b; color: var(--c-text-2); font-family: var(--mono); font-size: 10px; line-height: 1.6; white-space: pre-wrap; word-break: break-all; }
.console-shell .checkin-card { background: #111; border-color: #32322f; }
.console-shell .balance-big { font-family: var(--mono); font-size: 36px; font-weight: 500; letter-spacing: -.05em; }
.console-shell .copy-flash { color: var(--c-green) !important; }
.console-shell .hidden { display: none !important; }
@media (max-width: 1120px) {
.console-shell .gateway-hero { grid-template-columns: minmax(0, 1fr) 380px; }
.console-shell .metric-strip { grid-template-columns: repeat(3, 1fr); }
.console-shell .metric:nth-child(4) { padding-left: 0; border-left: 0; border-top: 1px solid var(--c-border-soft); }
.console-shell .metric:nth-child(n+5) { border-top: 1px solid var(--c-border-soft); }
.console-shell .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.console-shell .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

}
@media (max-width: 820px) {
body.console-page.nav-open { overflow: hidden; }
.console-shell .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1100;
    width: min(280px, 82vw);
    transform: translateX(-101%);
    transition: transform .22s ease;
  }
body.console-page.nav-open .console-shell .sidebar { transform: translateX(0); }
.console-shell .sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1050;
    border: 0;
    background: rgba(0,0,0,.62);
  }
body.console-page.nav-open .console-shell .sidebar-backdrop { display: block; }
.console-shell .mobile-menu-btn {
    position: fixed;
    right: 14px;
    top: 14px;
    z-index: 1200;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 1px solid #303030;
    border-radius: 50%;
    background: rgba(14,14,14,.9);
    color: var(--c-text);
    backdrop-filter: blur(8px);
  }
.console-shell .main { width: 100%; padding: 68px 16px 56px; }
.console-shell .gateway-hero { min-height: 0; grid-template-columns: 1fr; }
.console-shell .gateway-hero-copy { padding: 24px 0 34px; }
.console-shell .gateway-hero h1 { font-size: clamp(48px, 15vw, 76px); }
.console-shell .ai-mark-stage { min-height: 340px; border-top: 1px solid var(--c-border-soft); }
.console-shell .ai-mark-caption { right: 12px; }
.console-shell .dashboard-grid,
.console-shell .grid-2,
.console-shell .grid-3,
.console-shell .grid-4 { grid-template-columns: 1fr; }
.console-shell .topbar { align-items: flex-start; padding-right: 44px; }

}
@media (max-width: 520px) {
.console-shell .hero-actions { display: grid; grid-template-columns: 1fr; }
.console-shell .hero-account { gap: 20px; justify-content: space-between; }
.console-shell .metric-strip { grid-template-columns: repeat(2, 1fr); }
.console-shell .metric:nth-child(3),
.console-shell .metric:nth-child(5) { padding-left: 0; border-left: 0; border-top: 1px solid var(--c-border-soft); }
.console-shell .metric:nth-child(4) { padding-left: 16px; border-left: 1px solid var(--c-border-soft); }
.console-shell .metric:nth-child(n+3) { border-top: 1px solid var(--c-border-soft); }
.console-shell .models-grid { grid-template-columns: 1fr; }
.console-shell .models-hero h2 { align-items: flex-start; flex-direction: column; }
.console-shell .topbar { flex-direction: column; align-items: stretch; }
.console-shell .topbar > .btn { align-self: flex-start; }
.console-shell .modal-actions { flex-wrap: wrap; }

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

}


/* Integration with the shared MarsBlog base layout. */
body.console-page {
  background: var(--c-bg);
}
body.console-page .top-spacer,
body.console-page #app-footer {
  display: none !important;
}
body.console-page #app-main.console-page-main {
  width: 100%;
  max-width: none;
  min-height: calc(100vh - var(--nav-h));
  margin: 0;
  padding: 0 !important;
  background: var(--c-bg);
}
.console-shell {
  min-height: calc(100vh - var(--nav-h));
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
.console-shell .console-root {
  min-height: calc(100vh - var(--nav-h));
}
.console-shell .sidebar {
  top: var(--nav-h);
  height: calc(100vh - var(--nav-h));
}

@media (max-width: 820px) {
  .console-shell .sidebar {
    top: var(--nav-h);
    height: calc(100vh - var(--nav-h));
  }
  .console-shell .sidebar-backdrop {
    top: var(--nav-h);
  }
  .console-shell .mobile-menu-btn {
    top: calc(var(--nav-h) + 14px);
  }
}

@media (max-width: 768px) {
  .console-shell .main {
    padding-bottom: calc(78px + env(safe-area-inset-bottom));
  }
}
