@font-face {
  font-family: "Space Grotesk Latin";
  src: url("./assets/fonts/SpaceGrotesk-VariableFont_wght.ttf") format("truetype");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
  unicode-range:
    U+0000-007F,
    U+00A0-00FF,
    U+0100-024F,
    U+20A0-20CF;
}

:root {
  color-scheme: light;
  font-family:
    "Space Grotesk Latin", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  --background: #ffffff;
  --foreground: #111111;
  --muted: #f7f7f4;
  --muted-foreground: #6b6b64;
  --card: #ffffff;
  --card-foreground: #111111;
  --popover: #ffffff;
  --primary: #111111;
  --primary-foreground: #ffffff;
  --secondary: #f3f3ef;
  --secondary-foreground: #171717;
  --accent: #10a37f;
  --accent-foreground: #073b31;
  --accent-soft: #e8f6f1;
  --border: #e4e4dc;
  --input: #d9d9d0;
  --ring: rgba(16, 163, 127, 0.22);
  --warning: #a16207;
  --warning-soft: #fef7df;
  --destructive: #b42318;
  --destructive-soft: #fff0ee;
  --success: #087443;
  --success-soft: #eaf8ef;
  --radius: 10px;
  --radius-sm: 7px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #fbfbf8;
  color: var(--foreground);
  font-size: 14px;
  line-height: 1.45;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
  transition:
    background-color 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

button:active {
  transform: translateY(1px) scale(0.99);
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

.app-shell {
  position: relative;
  display: grid;
  grid-template-columns: 304px minmax(0, 1fr);
  min-height: 100vh;
}

.app-loading {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  background: rgba(251, 251, 248, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition:
    opacity 0.22s ease,
    visibility 0.22s ease;
}

.app-loading.done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.app-loading-card {
  display: grid;
  grid-template-columns: 42px minmax(180px, 1fr);
  gap: 14px;
  width: min(460px, calc(100vw - 40px));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  padding: 18px;
  box-shadow: 0 18px 50px rgba(17, 17, 17, 0.12);
}

.loading-copy {
  min-width: 0;
}

.loading-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.app-loading-card strong,
.app-loading-card span,
.app-loading-card b {
  display: block;
}

.app-loading-card strong {
  color: #171717;
  font-size: 15px;
  font-weight: 700;
}

.app-loading-card span {
  margin-top: 3px;
  color: var(--muted-foreground);
  font-size: 12px;
}

.app-loading-card b {
  flex: 0 0 auto;
  color: var(--accent-foreground);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.loading-mark {
  position: relative;
  width: 42px;
  height: 42px;
  border: 1px solid #242424;
  border-radius: var(--radius-sm);
  background: #111;
}

.loading-mark::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 2px solid rgba(255, 255, 255, 0.28);
  border-top-color: #fff;
  border-radius: 999px;
  animation: loading-spin 0.72s linear infinite;
}

.loading-progress {
  --loading-progress: 0%;
  grid-column: 1 / -1;
  display: block;
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #eeeee8;
  box-shadow: inset 0 0 0 1px rgba(17, 17, 17, 0.04);
}

.loading-progress i {
  content: "";
  display: block;
  width: var(--loading-progress);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #ffba68);
  transition: width 0.22s ease;
}

@keyframes loading-spin {
  to {
    transform: rotate(360deg);
  }
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
  border-right: 1px solid var(--border);
  background: rgba(250, 250, 247, 0.92);
  padding: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.brand-logo {
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  padding: 8px;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid #222;
  border-radius: var(--radius-sm);
  background: #111;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
}

.brand h1 {
  color: #151515;
  font-size: 15px;
  font-weight: 650;
}

.brand p {
  margin-top: 2px;
  color: var(--muted-foreground);
  font-size: 12px;
}

.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}

.panel.compact {
  padding-bottom: 12px;
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  color: #2a2a26;
  font-size: 13px;
  font-weight: 650;
}

.source-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.file-drop {
  display: grid;
  min-height: 78px;
  place-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  background: var(--muted);
  margin-bottom: 10px;
  transition:
    border-color 0.16s ease,
    background 0.16s ease,
    transform 0.16s ease;
}

.file-drop:hover {
  border-color: #c6c6bb;
  background: #fbfbf8;
  transform: translateY(-1px);
}

.file-drop.subtle {
  background: #fff;
}

.file-drop input {
  display: none;
}

.file-drop span {
  color: #2a2a26;
  font-size: 12px;
  font-weight: 650;
}

.file-drop svg,
.icon-button svg,
.command-search svg,
.command-button svg,
.tab svg,
.dark-button svg,
.ghost-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.paste-box {
  margin-top: 2px;
}

.paste-box summary {
  cursor: pointer;
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: 650;
  list-style-position: inside;
}

.paste-box textarea {
  margin-top: 10px;
}

textarea,
input,
select {
  width: 100%;
  border: 1px solid var(--input);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--foreground);
  outline: none;
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    background 0.16s ease;
}

textarea {
  resize: vertical;
  padding: 10px 11px;
  min-height: 116px;
}

input,
select {
  height: 38px;
  padding: 0 11px;
}

input::placeholder,
textarea::placeholder {
  color: #9a9a91;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--ring);
}

.primary-button,
.ghost-button,
.dark-button,
.text-button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 600;
  transition:
    background 0.16s ease,
    border-color 0.16s ease,
    color 0.16s ease,
    transform 0.16s ease;
}

.primary-button {
  width: 100%;
  margin-top: 10px;
  background: var(--primary);
  color: var(--primary-foreground);
}

.dark-button {
  background: var(--primary);
  color: var(--primary-foreground);
}

.ghost-button {
  background: #fff;
  border-color: var(--border);
  color: var(--secondary-foreground);
}

.text-button {
  background: transparent;
  color: #0d8066;
  padding: 0;
  min-height: auto;
}

.icon-button {
  width: 36px;
  min-width: 36px;
  padding: 0;
  background: #fff;
  border-color: var(--border);
  color: #262622;
}

.icon-button:hover {
  border-color: #c9c9bf;
  background: var(--secondary);
}

.icon-button:disabled,
.command-button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
  transform: none;
}

.primary-button:hover,
.dark-button:hover {
  background: #252525;
  transform: translateY(-1px);
}

.ghost-button:hover {
  border-color: #c9c9bf;
  background: var(--secondary);
}

.text-button:hover {
  color: #075f4d;
}

.check-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.check-item {
  display: grid;
  position: relative;
  align-items: center;
  justify-items: center;
  gap: 5px;
  min-height: 54px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: #2e2e2a;
  font-size: 13px;
}

.check-item input {
  position: absolute;
  inset: 6px auto auto 6px;
  width: 12px;
  height: 12px;
  accent-color: var(--foreground);
}

.check-item span:not(.app-icon) {
  font-size: 11px;
}

.app-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex: 0 0 auto;
}

.app-icon.fallback {
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--secondary);
  color: #222;
  font-size: 11px;
  font-weight: 700;
}

.workspace {
  min-width: 0;
  padding: 24px 28px 34px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  max-width: 1280px;
  margin: 0 auto 18px;
}

.eyebrow {
  color: #0d8066;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.topbar h2 {
  margin-top: 5px;
  color: #111;
  font-size: 24px;
  line-height: 1.22;
  font-weight: 650;
}

.topbar-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.command-row,
.control-row,
.metrics-grid,
.tabs,
.view,
.empty-state {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
}

.command-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.control-row {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(260px, 3fr);
  gap: 10px;
  margin-bottom: 14px;
}

.command-search {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow-sm);
}

.command-search input {
  height: 50px;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  font-size: 18px;
}

.command-search input:focus {
  box-shadow: none;
}

.period-select,
.command-button {
  min-height: 52px;
  border-radius: var(--radius);
}

.command-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid #111;
  background: #111;
  color: #fff;
  font-weight: 650;
}

.command-button:hover {
  background: #252525;
}

label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: 600;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.metric {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  padding: 13px 14px;
  box-shadow: var(--shadow-sm);
  text-align: left;
}

.metric:not(:disabled) {
  cursor: pointer;
}

.metric.active {
  border-color: #cfcfc7;
  background: #f7f7f4;
}

.metric span {
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: 600;
}

.metric strong {
  display: block;
  margin-top: 7px;
  color: #121212;
  font-size: 22px;
  line-height: 1;
  font-weight: 650;
  letter-spacing: 0;
}

.tabs {
  display: flex;
  width: fit-content;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--secondary);
  padding: 3px;
  margin-bottom: 16px;
}

.tab {
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: calc(var(--radius) - 3px);
  background: transparent;
  color: var(--muted-foreground);
  width: 40px;
  height: 34px;
  padding: 0;
  font-size: 13px;
  font-weight: 600;
}

.tab.active {
  background: #fff;
  color: #111;
  box-shadow: var(--shadow-sm);
}

.view,
.empty-state {
  display: none;
}

.view.active,
.empty-state.active {
  display: block;
}

.view.active {
  position: relative;
  z-index: 5;
}

.empty-state {
  border: 1px dashed #cfcfc4;
  border-radius: var(--radius);
  background: #fff;
  padding: 34px;
  text-align: center;
}

.empty-state h3 {
  margin-bottom: 8px;
  font-size: 16px;
  font-weight: 650;
}

.empty-state p,
.section-head p,
.brand p {
  color: var(--muted-foreground);
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.section-head h3 {
  color: #151515;
  font-size: 17px;
  font-weight: 650;
}

.section-head p {
  margin-top: 4px;
  font-size: 13px;
}

.member-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.member-pill {
  border: 1px solid var(--border);
  border-radius: 999px;
  min-height: 34px;
  padding: 0 12px;
  background: #fff;
  color: #2f2f2a;
  font-size: 13px;
  font-weight: 600;
}

.member-pill:hover {
  border-color: #c9c9bf;
  background: var(--secondary);
}

.member-pill.active {
  border-color: rgba(16, 163, 127, 0.32);
  background: var(--accent-soft);
  color: var(--accent-foreground);
}

.provider-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 12px;
}

.provider-card,
.chart-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-sm);
}

.provider-card {
  padding: 15px;
}

.usage-person-card {
  cursor: pointer;
}

.provider-card:hover {
  border-color: #cecec4;
}

.card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.card-head h4 {
  color: #111;
  font-size: 16px;
  font-weight: 650;
}

.card-head p {
  margin-top: 4px;
  color: var(--muted-foreground);
  font-size: 13px;
}

.app-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
}

.app-row .app-icon {
  width: 18px;
  height: 18px;
}

.status {
  display: inline-flex;
  align-items: center;
  height: 24px;
  border: 1px solid rgba(8, 116, 67, 0.16);
  border-radius: 999px;
  padding: 0 8px;
  background: var(--success-soft);
  color: var(--success);
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

.status.warn {
  border-color: rgba(161, 98, 7, 0.18);
  background: var(--warning-soft);
  color: var(--warning);
}

.status.danger {
  border-color: rgba(180, 35, 24, 0.18);
  background: var(--destructive-soft);
  color: var(--destructive);
}

.meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin-top: 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.meta {
  min-width: 0;
  padding: 10px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: #fff;
}

.meta:nth-child(2n) {
  border-right: 0;
}

.meta:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.meta span {
  display: block;
  color: var(--muted-foreground);
  font-size: 11px;
  font-weight: 600;
}

.meta strong {
  display: block;
  margin-top: 4px;
  color: #151515;
  font-size: 13px;
  font-weight: 600;
  word-break: break-word;
}

.usage-rank {
  color: #111;
  font-size: 20px;
  font-weight: 720;
  white-space: nowrap;
}

.usage-card-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.usage-card-stats div {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px;
  background: #fff;
}

.usage-card-stats span,
.usage-card-line span {
  display: block;
  color: var(--muted-foreground);
  font-size: 11px;
  font-weight: 650;
}

.usage-card-stats strong {
  display: block;
  margin-top: 5px;
  color: #111;
  font-size: 18px;
  font-weight: 720;
}

.usage-card-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}

.card-detail {
  display: none;
  margin-top: 12px;
}

.provider-card.expanded .card-detail {
  display: block;
}

.key-detail {
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.key-detail + .key-detail {
  margin-top: 12px;
}

.key-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.key-detail-head strong {
  color: #111;
  font-size: 14px;
}

.key-detail-head span {
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: 650;
}

.progress {
  height: 7px;
  border-radius: 999px;
  background: var(--secondary);
  overflow: hidden;
  margin-top: 13px;
}

.progress i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr 36px 36px;
  gap: 8px;
  margin-top: 12px;
}

.import-button {
  gap: 8px;
}

.chart-row {
  position: relative;
  z-index: 6;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 12px;
  margin-bottom: 12px;
}

.chart-panel {
  position: relative;
  z-index: 6;
  padding: 14px;
  overflow: visible;
}

.chart-panel.wide {
  margin-bottom: 12px;
}

.chart-title {
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: 650;
  margin-bottom: 12px;
}

.chart {
  min-height: 206px;
  overflow: visible;
}

.chart.tall {
  min-height: 266px;
}

.bar-line {
  position: relative;
  display: grid;
  grid-template-columns: 128px 1fr 76px;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
  color: #2e2e2a;
  font-size: 13px;
}

.bar-track {
  height: 8px;
  border-radius: 999px;
  background: #edf0ef;
  overflow: hidden;
}

.bar-track i {
  display: block;
  height: 100%;
  background: #ff660d;
  animation: chartGrowX 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
  transform-origin: left center;
}

.stacked-track {
  display: flex;
  width: 100%;
}

.stacked-track i {
  flex: 0 0 auto;
  transition: width 0.32s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.18s ease;
}

.stacked-row strong {
  font-variant-numeric: tabular-nums;
}

.column-chart {
  height: 246px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(28px, 1fr));
  gap: 10px;
  align-items: end;
  border-bottom: 1px solid #e5e7e5;
  padding: 14px 10px 28px;
}

.column-item {
  position: relative;
  height: 100%;
  min-width: 0;
  display: flex;
  align-items: end;
  justify-content: center;
}

.column-stack {
  width: min(28px, 78%);
  min-height: 4px;
  display: flex;
  flex-direction: column-reverse;
  overflow: hidden;
  border-radius: 7px 7px 2px 2px;
  background: #edf0ef;
  animation: chartGrowY 0.44s cubic-bezier(0.22, 1, 0.36, 1) both;
  transform-origin: bottom center;
  transition: transform 0.18s ease, filter 0.18s ease, height 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.column-stack i {
  display: block;
  width: 100%;
  flex: 0 0 auto;
}

.column-item:hover .column-stack {
  transform: translateY(-2px);
  filter: saturate(1.08);
}

.column-label {
  position: absolute;
  left: 50%;
  bottom: -23px;
  max-width: 54px;
  transform: translateX(-50%);
  color: #8b928f;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

[data-usage-sort] {
  cursor: pointer;
  user-select: none;
}

[data-usage-sort].active {
  color: #111;
  background: #f2f2ee;
}

[data-usage-sort].active::after {
  content: " ↓";
  color: #111;
  font-weight: 700;
}

.donut-wrap {
  display: grid;
  grid-template-columns: 154px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  min-height: 206px;
}

.donut {
  display: grid;
  width: 154px;
  height: 154px;
  place-items: center;
  border-radius: 999px;
  animation: chartPop 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
  transition: filter 0.18s ease, transform 0.18s ease;
}

.donut:hover {
  filter: saturate(1.06);
  transform: scale(1.01);
}

.donut > div {
  display: grid;
  width: 92px;
  height: 92px;
  place-items: center;
  align-content: center;
  border-radius: 999px;
  background: #fbfbf8;
  text-align: center;
}

.donut strong {
  color: #111;
  font-size: 17px;
  font-weight: 720;
}

.donut span {
  color: var(--muted-foreground);
  font-size: 11px;
  font-weight: 650;
}

.donut-legend {
  display: grid;
  gap: 9px;
}

.donut-legend div {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  color: #2e2e2a;
  font-size: 13px;
  animation: listItemIn 0.28s ease both;
  animation-delay: calc(var(--row-index, 0) * 24ms);
}

.donut-legend i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.donut-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.25;
}

.donut-legend strong {
  color: #111;
  font-weight: 700;
  justify-self: end;
  white-space: nowrap;
}

.table-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  overflow: auto;
  box-shadow: var(--shadow-sm);
}

.chart-tooltip {
  position: absolute;
  z-index: 80;
  left: 142px;
  top: 50%;
  width: max-content;
  min-width: 320px;
  max-width: 420px;
  max-height: min(70vh, 520px);
  overflow: auto;
  padding: 14px;
  border: 1px solid #ece8e2;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(22, 27, 28, 0.12);
  color: #161b1c;
  opacity: 0;
  pointer-events: none;
  transform: translate(8px, -50%);
  transition: opacity 0.12s ease, transform 0.12s ease;
}

.chart-tooltip-host {
  position: relative;
}

.chart-tooltip-floating {
  left: 142px;
  top: 0;
}

.chart-tooltip-floating.is-visible {
  opacity: 1;
  transform: translate(0, -50%);
}

.chart-tooltip-floating.is-updating > * {
  animation: tooltipContentIn 0.16s ease-out both;
}

.chart-tooltip-column {
  transform: translate(-50%, calc(-100% - 10px));
}

.chart-tooltip-column.is-visible {
  transform: translate(-50%, calc(-100% - 10px));
}

@keyframes tooltipContentIn {
  from {
    opacity: 0.55;
    transform: translateY(3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.bar-line:hover .chart-tooltip,
.column-item:hover .chart-tooltip {
  opacity: 1;
  transform: translate(0, -50%);
}

.column-item .chart-tooltip {
  left: 50%;
  top: auto;
  bottom: 42px;
  transform: translate(-50%, 6px);
}

.column-item:hover .chart-tooltip {
  transform: translate(-50%, 0);
}

.chart-tooltip strong {
  display: block;
  margin-bottom: 10px;
  color: #161b1c;
  font-size: 14px;
  font-weight: 750;
}

.tooltip-total {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding-bottom: 8px;
  border-bottom: 1px solid #f0ede8;
  color: #6a7478;
  font-size: 12px;
}

.tooltip-total b {
  color: #161b1c;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.tooltip-section-title {
  margin-top: 9px;
  color: #9aa09d;
  font-size: 11px;
  font-weight: 800;
}

.tooltip-section-title.people {
  margin-top: 12px;
  padding-top: 9px;
  border-top: 1px solid #f0ede8;
}

.department-tooltip {
  width: 390px;
  min-width: 390px;
  max-width: 390px;
  max-height: none;
  overflow: visible;
}

.department-tooltip .department-tooltip-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  padding-bottom: 8px;
  border-bottom: 1px solid #f0ede8;
}

.department-tooltip .department-tooltip-head strong {
  margin: 0;
}

.department-tooltip .department-tooltip-head b {
  color: #161b1c;
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.department-tooltip .department-tooltip-path {
  margin-top: 7px;
  color: #8b928f;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.35;
}

.department-tooltip .department-tooltip-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-top: 9px;
}

.department-tooltip .department-tooltip-meta span {
  min-width: 0;
  padding: 6px 7px;
  border-radius: 6px;
  background: rgba(22, 27, 28, 0.045);
  color: #6a7478;
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}

.department-tooltip .department-tooltip-meta b {
  color: #161b1c;
  font-weight: 780;
}

.department-tooltip .department-tooltip-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid #f0ede8;
}

.department-tooltip .tooltip-section-title {
  margin-top: 0;
}

.department-tooltip .tooltip-row {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-top: 6px;
}

.tooltip-row {
  display: grid;
  grid-template-columns: minmax(128px, 1fr) auto;
  gap: 16px;
  align-items: center;
  margin-top: 7px;
  color: #6a7478;
  font-size: 12px;
  white-space: nowrap;
}

.tooltip-model,
.tooltip-person {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tooltip-row em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-style: normal;
}

.tooltip-row i {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 2px;
}

.tooltip-person i {
  width: 16px;
  height: 16px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #fff3e3;
  color: #d33a00;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}

.tooltip-value {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  color: #161b1c;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.tooltip-row small {
  color: #8b928f;
  font-size: 11px;
  font-weight: 650;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 920px;
}

th,
td {
  border-bottom: 1px solid var(--border);
  padding: 11px 12px;
  text-align: left;
  vertical-align: top;
  font-size: 13px;
}

th {
  position: sticky;
  top: 0;
  background: #fbfbf8;
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: 650;
}

td {
  color: #20201d;
}

tr:last-child td {
  border-bottom: 0;
}

tr:hover td {
  background: #fbfbf8;
}

.mono {
  font-family: "SFMono-Regular", "Cascadia Mono", Consolas, monospace;
  font-size: 12px;
}

.key-copy-cell {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 128px;
}

.copy-key-button {
  width: 26px;
  height: 26px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #d9d9d0;
  border-radius: 8px;
  background: #fff;
  color: #111;
  cursor: pointer;
  opacity: 0;
  transform: translateY(1px);
  transition: opacity 0.16s ease, transform 0.16s ease, background 0.16s ease;
}

.key-copy-cell:hover .copy-key-button,
.copy-key-button:focus-visible {
  opacity: 1;
  transform: translateY(0);
}

.copy-key-button:hover {
  background: #f2f2ee;
}

.copy-key-button svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.model-tag,
.money-tag {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 240px;
  min-height: 26px;
  border: 1px solid #deded6;
  border-radius: 999px;
  background: #fbfbf8;
  color: #1f1f1c;
  font-size: 12px;
  font-weight: 650;
  line-height: 1;
}

.model-tag {
  gap: 7px;
  padding: 3px 9px 3px 6px;
}

.model-tag span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.model-logo {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  object-fit: contain;
}

.money-tag {
  padding: 4px 10px;
  border-color: #deded6;
  background: #fbfbf8;
  color: #161b1c;
  font-variant-numeric: tabular-nums;
}

.link-list {
  display: grid;
  gap: 9px;
}

.link-item {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr) 36px 36px;
  gap: 9px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.link-item strong {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.dark-button.mini {
  width: 36px;
  min-width: 36px;
  padding: 0;
}

.link-url {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted-foreground);
  font-family: "SFMono-Regular", "Cascadia Mono", Consolas, monospace;
  font-size: 12px;
}

.export-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  max-width: 420px;
  border: 1px solid #2a2a2a;
  border-radius: var(--radius);
  background: #111;
  color: #fff;
  padding: 12px 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.16);
  opacity: 0;
  transform: translateY(8px);
  transition: 0.18s ease;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .workspace {
    padding: 20px 16px 28px;
  }

  .topbar,
  .section-head {
    flex-direction: column;
  }

  .topbar-actions {
    justify-content: flex-start;
  }

  .metrics-grid,
  .chart-row,
  .command-row,
  .provider-cards {
    grid-template-columns: 1fr;
  }

  .tabs {
    display: flex;
    width: 100%;
    overflow-x: auto;
  }

  .tab {
    flex: 1 0 auto;
  }

  .link-item {
    grid-template-columns: 1fr;
  }
}

body.admin-body {
  background: #f7f7f4;
  zoom: 1.1;
}

body.admin-body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  z-index: 10;
  height: 104px;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.36), rgba(255, 255, 255, 0.1) 42%, rgba(255, 255, 255, 0.26)),
    linear-gradient(
      180deg,
      rgba(247, 247, 244, 0.78) 0%,
      rgba(247, 247, 244, 0.58) 48%,
      rgba(247, 247, 244, 0.22) 78%,
      rgba(247, 247, 244, 0) 100%
    );
  backdrop-filter: blur(11px) saturate(1.08);
  -webkit-backdrop-filter: blur(11px) saturate(1.08);
  mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.84) 58%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.84) 58%, transparent 100%);
}

.admin-body .app-shell {
  grid-template-columns: minmax(0, 1fr);
  min-height: 100svh;
}

.admin-body .sidebar {
  position: fixed;
  top: 28px;
  left: 28px;
  z-index: 12;
  border-right: 0;
  background: transparent;
  height: auto;
  overflow: visible;
  padding: 0;
}

.admin-body .brand {
  gap: 0;
  margin-bottom: 0;
  padding-left: 0;
}

.admin-body .brand-logo {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  padding: 0;
  background: transparent;
}

.admin-body .brand h1 {
  font-size: 15px;
  font-weight: 760;
}

.admin-body .brand p {
  margin-top: 0;
  font-size: 12px;
}

.admin-gate {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  background: #f7f7f4;
}

.admin-gate-box {
  width: min(320px, calc(100% - 36px));
  display: grid;
  gap: 12px;
  border: 1px solid #deded6;
  border-radius: 16px;
  background: #fff;
  padding: 22px;
}

.admin-gate-box img {
  width: 34px;
  height: 34px;
}

.admin-gate-box strong {
  font-size: 22px;
  font-weight: 720;
}

.admin-gate-box input,
.admin-gate-box .dark-button {
  min-height: 44px;
  border-radius: 11px;
}

.admin-gate-box p {
  min-height: 18px;
  color: #b42318;
  font-size: 12px;
}

.admin-body .panel {
  border-color: #e0e0d8;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.58);
  padding: 14px 12px;
  box-shadow: none;
}

.admin-body .admin-subsection {
  margin-top: 14px;
  border-top: 1px solid #e8e8e0;
  padding-top: 14px;
}

.admin-body .panel-title {
  margin-bottom: 10px;
  color: #20201d;
  font-size: 13px;
}

.admin-body .subtle-action {
  opacity: 0.48;
}

.admin-body .source-grid {
  grid-template-columns: 1fr;
  gap: 0;
}

.admin-body .file-drop {
  grid-template-columns: 34px minmax(0, 1fr);
  justify-items: start;
  min-height: 46px;
  margin-bottom: 0;
  padding: 8px 0;
  border: 0;
  border-bottom: 1px solid #ecece5;
  border-radius: 0;
  background: transparent;
}

.admin-body .file-drop:hover {
  border-color: #e0e0d8;
  background: transparent;
  transform: none;
}

.admin-body .file-drop svg {
  width: 17px;
  height: 17px;
  border-radius: 8px;
}

.admin-body .file-drop span {
  font-size: 13px;
  color: #20201d;
}

.admin-body .paste-box {
  margin-top: 10px;
  border-top: 1px solid #e7e7df;
  padding-top: 10px;
}

.admin-body .paste-box summary {
  color: #4b4b45;
}

.admin-body .paste-box textarea {
  min-height: 132px;
  border-radius: 11px;
}

.admin-body .data-status {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
  border-top: 1px solid #e8e8e0;
  padding-top: 12px;
}

.admin-body .data-status span,
.admin-body .data-status p {
  color: #6b6b64;
  font-size: 11px;
}

.admin-body .data-status strong {
  display: block;
  margin-top: 2px;
  color: #111;
  font-size: 12px;
  font-weight: 700;
}

.admin-body .data-status p {
  grid-column: 1 / -1;
  margin-top: 2px;
}

.admin-body .data-status .warn strong,
.admin-body .data-status p.warn {
  color: #a16207;
}

.admin-body .check-grid {
  grid-template-columns: 1fr;
  gap: 2px;
}

.admin-body .check-item {
  display: grid;
  grid-template-columns: 18px 22px minmax(0, 1fr);
  justify-items: start;
  min-height: 30px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  padding: 4px 6px;
}

.admin-body .check-item:hover {
  background: rgba(255, 255, 255, 0.52);
}

.admin-body .check-item input {
  position: static;
  width: 13px;
  height: 13px;
  accent-color: #30302b;
}

.admin-body .check-item span:not(.app-icon) {
  font-size: 12px;
}

.admin-body .admin-export-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.admin-body .admin-export-actions .icon-button {
  width: 100%;
  height: 56px;
  display: grid;
  gap: 4px;
  padding: 7px 4px 6px;
  border-radius: 11px;
}

.admin-body .admin-export-actions .icon-button svg {
  width: 18px;
  height: 18px;
  justify-self: center;
}

.admin-body .admin-export-actions .icon-button span {
  color: #3f3f39;
  font-size: 11px;
  font-weight: 650;
  line-height: 1;
}

.admin-body .workspace {
  position: relative;
  padding: 88px 28px 42px;
}

.admin-body .topbar,
.admin-body .command-row,
.admin-body .control-row,
.admin-body .metrics-grid,
.admin-body .tabs,
.admin-body .view,
.admin-body .empty-state {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
}

.admin-body .tool-menu-button {
  position: fixed;
  top: 20px;
  right: 24px;
  z-index: 24;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 0;
  border: 1px solid #d9d9d0;
  border-radius: 12px;
  background: #111;
  color: #fff;
  box-shadow: 0 8px 22px rgba(17, 17, 17, 0.12);
}

.admin-body .tool-menu-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tool-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(17, 17, 17, 0.16);
}

.tool-overlay[hidden] {
  display: none;
}

.tool-modal {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(520px, calc(100vw - 32px));
  max-height: min(760px, calc(100svh - 48px));
  overflow: hidden;
  border: 1px solid #deded6;
  border-radius: 16px;
  background: #fbfbf8;
  padding: 14px;
  box-shadow: 0 24px 80px rgba(17, 17, 17, 0.18);
}

.tool-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.tool-modal-head p {
  color: #6b6b64;
  font-size: 12px;
  font-weight: 650;
}

.tool-modal-head h2 {
  margin-top: 2px;
  font-size: 20px;
  line-height: 1.1;
}

.tool-content {
  display: grid;
  gap: 14px;
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
}

.tool-section {
  border: 1px solid #deded6;
  border-radius: 13px;
  background: #fff;
  padding: 12px;
}

.tool-section .panel-title {
  margin-bottom: 8px;
}

.admin-body .check-item.app-with-model {
  grid-template-columns: minmax(0, 1fr) minmax(155px, 0.9fr);
  align-items: center;
  gap: 8px;
}

.app-choice {
  display: grid;
  grid-template-columns: 18px 22px minmax(0, 1fr);
  align-items: center;
  min-width: 0;
  gap: 0;
}

.app-model-select {
  min-width: 0;
  height: 36px;
  border: 1px solid #deded6;
  border-radius: 7px;
  background: #fff;
  color: #262623;
  padding: 0 9px;
}

.admin-body .topbar {
  align-items: center;
  margin-bottom: 18px;
  min-height: 56px;
}

.admin-body .eyebrow {
  color: #6b6b64;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
}

.admin-body .topbar h2 {
  margin-top: 4px;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0;
}

.admin-body .admin-command {
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

.admin-body .control-row {
  position: relative;
  z-index: 1;
  grid-template-columns: minmax(0, 7fr) minmax(280px, 3fr);
  gap: 10px;
  margin-bottom: 14px;
}

.admin-body .command-search,
.admin-body .period-select,
.admin-body .command-button {
  min-height: 58px;
  border-radius: 14px;
}

.admin-body .command-search {
  grid-template-columns: 22px minmax(0, 1fr);
  border-color: #deded6;
  background: #fff;
  box-shadow: none;
}

.admin-body .command-search input {
  height: 56px;
  font-size: 18px;
  font-weight: 520;
}

.admin-body .period-select {
  border-color: #deded6;
  background: #ecece6;
  color: #1d1d1a;
  font-weight: 650;
}

.admin-body .period-tabs {
  --segment-count: 4;
  --segment-index: 0;
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border: 1px solid #d9d9d0;
  padding: 4px;
  overflow: hidden;
}

.admin-body .period-tabs::before,
.admin-body .tabs::before {
  content: "";
  position: absolute;
  inset: 4px auto 4px 4px;
  z-index: 0;
  width: calc((100% - 8px) / var(--segment-count));
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transform: translateX(calc(var(--segment-index) * 100%));
  transition:
    transform 0.34s cubic-bezier(0.22, 1, 0.36, 1),
    width 0.22s ease,
    box-shadow 0.18s ease;
}

.admin-body .period-tabs button {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #4a4a43;
  font-size: 13px;
  font-weight: 650;
  line-height: 1;
  transition:
    color 0.2s ease,
    transform 0.18s ease;
}

.admin-body .period-tabs button:hover,
.admin-body .tab:hover,
.admin-body .metric:not(:disabled):hover,
.admin-body .member-pill:hover {
  color: #111;
}

.admin-body .period-tabs button.active {
  color: #111;
}

.admin-body .command-button {
  border-color: #111;
  background: #111;
  color: #fff;
}

.admin-body .command-button:disabled {
  border-color: #e0e0d8;
  background: #e3e3db;
  color: #85857d;
  opacity: 1;
}

.admin-body .metrics-grid {
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0;
  margin-bottom: 12px;
  border: 1px solid #e0e0d8;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.68);
  overflow: hidden;
}

.admin-body .metric {
  border: 0;
  border-right: 1px solid #e8e8e0;
  border-radius: 0;
  background: transparent;
  padding: 12px 14px;
  box-shadow: none;
  transition: background-color 0.18s ease, transform 0.18s ease;
}

.admin-body .metric:not(:disabled):hover {
  transform: translateY(-1px);
}

.admin-body .metric.active {
  background: #f2f2ee;
}

.admin-body .metric strong {
  color: #111;
}

.admin-body .metric:last-child {
  border-right: 0;
}

.admin-body .metric span {
  color: #6b6b64;
  font-size: 12px;
}

.admin-body .metric strong {
  margin-top: 8px;
  font-size: 21px;
  font-weight: 700;
}

.admin-body .tabs {
  --segment-count: 5;
  --segment-index: 0;
  position: relative;
  width: 100%;
  justify-self: stretch;
  margin-left: 0;
  margin-right: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  margin-bottom: 0;
  border-color: #d9d9d0;
  border-radius: 14px;
  background: #ecece6;
  padding: 4px;
  overflow: hidden;
}

.admin-body .tab {
  position: relative;
  z-index: 1;
  width: auto;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 10px;
  background: transparent;
  box-shadow: none;
  color: #4a4a43;
  line-height: 1;
  transition: color 0.2s ease, transform 0.18s ease;
}

.admin-body .tab svg {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
}

.admin-body .tab span {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-weight: 650;
  line-height: 1;
}

.admin-body .tab.active {
  background: transparent;
  box-shadow: none;
  color: #111;
}

.admin-body .empty-state,
.admin-body .view {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 18px 4px 0;
  box-shadow: none;
}

.admin-body .view.active {
  animation: guideFade 0.22s ease both;
}

.admin-body .empty-state {
  text-align: left;
}

.admin-body .empty-state h3 {
  font-size: 18px;
  font-weight: 700;
}

.admin-body .section-head {
  align-items: center;
  margin-bottom: 14px;
}

.admin-body .section-head h3 {
  font-size: 22px;
  font-weight: 720;
}

.admin-body .section-head p {
  margin-top: 2px;
}

.admin-body .icon-button.text-button.usage-action-button {
  width: auto;
  min-width: 104px;
  height: 38px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid #d9d9d0;
  border-radius: 10px;
  background: #fff;
  color: #1d1d1a;
  box-shadow: none;
  font-size: 13px;
  font-weight: 720;
  line-height: 1;
  transition: background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.admin-body .icon-button.text-button.usage-action-button svg {
  width: 17px;
  height: 17px;
  stroke: #1d1d1a;
  stroke-width: 2;
}

.admin-body .icon-button.text-button.usage-action-button span {
  display: inline-block;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-body .icon-button.text-button.usage-action-button:hover {
  border-color: #c9c9bf;
  background: #f6f6f1;
  box-shadow: none;
  transform: translateY(-1px);
}

.admin-body .icon-button.text-button.usage-export-button {
  box-sizing: border-box;
  width: auto;
  min-width: 154px;
  border-color: rgba(17, 17, 17, 0.08);
  background: rgba(255, 255, 253, 0.72);
  color: rgba(17, 17, 17, 0.72);
}

.admin-body .icon-button.text-button.usage-export-button span {
  max-width: none;
}

.admin-body .icon-button.text-button.usage-export-button svg {
  stroke: rgba(17, 17, 17, 0.68);
}

.admin-body .icon-button.text-button.usage-export-button:hover {
  border-color: rgba(17, 17, 17, 0.16);
  background: #fff;
  color: #111;
}

.admin-body .icon-button.text-button.usage-export-button:hover svg {
  stroke: #111;
}

.admin-body .icon-button.text-button.usage-filter-button.active {
  border-color: #111;
  background: #111;
  color: #fff;
}

.admin-body .icon-button.text-button.usage-filter-button.active svg {
  stroke: #fff;
}

.admin-body .usage-filter-anchor {
  position: relative;
  z-index: 30;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.admin-body .usage-filter-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 60;
  width: min(380px, calc(100vw - 32px));
  max-height: min(390px, calc(100svh - 180px));
  overflow: hidden;
  border: 1px solid rgba(17, 17, 17, 0.12);
  border-radius: 8px;
  background: #fbfbf8;
  box-shadow: 0 18px 50px rgba(17, 17, 17, 0.14);
}

.admin-body .usage-filter-popover[hidden] {
  display: none;
}

.admin-body .usage-export-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: auto;
  left: 0;
  transform: none;
  width: min(520px, calc(100vw - 32px));
  max-height: none;
}

.admin-body .usage-export-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 10px;
}

.admin-body .usage-export-head strong {
  color: #111;
  font-size: 13px;
  font-weight: 780;
}

.admin-body .usage-export-head span {
  color: rgba(17, 17, 17, 0.42);
  font-size: 11px;
  font-weight: 700;
}

.admin-body .usage-export-periods {
  display: grid;
  grid-template-columns: 1fr;
  gap: 5px;
  padding: 0 16px 12px;
  border-bottom: 1px solid rgba(17, 17, 17, 0.07);
}

.admin-body .usage-export-period-group {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
}

.admin-body .usage-export-period-group > span {
  color: rgba(17, 17, 17, 0.42);
  font-size: 11px;
  font-weight: 720;
  white-space: nowrap;
}

.admin-body .usage-export-period-group > div {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
}

.admin-body .usage-export-periods button {
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 253, 0.82);
  color: #111;
  text-align: center;
  white-space: nowrap;
}

.admin-body .usage-export-periods button small {
  display: inline;
  margin-left: 5px;
}

.admin-body .usage-export-periods button {
  font-size: 11px;
  font-weight: 760;
}

.admin-body .usage-export-periods button small {
  color: rgba(17, 17, 17, 0.42);
  font-size: 10px;
  font-weight: 650;
}

.admin-body .usage-export-periods button.active {
  border-color: #111;
  background: #111;
  color: #fff;
}

.admin-body .usage-export-periods button.active small {
  color: rgba(255, 255, 255, 0.62);
}

.admin-body .usage-export-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 16px 14px;
  border-top: 1px solid rgba(17, 17, 17, 0.07);
}

.admin-body .usage-export-actions button {
  height: 34px;
  padding: 0 16px;
  border: 1px solid rgba(17, 17, 17, 0.1);
  border-radius: 8px;
  background: #fff;
  color: #111;
  font-size: 12px;
  font-weight: 760;
}

.admin-body .usage-export-actions button[data-export-submit] {
  border-color: #111;
  background: #111;
  color: #fff;
}

.admin-body .usage-export-popover .usage-department-tree {
  max-height: 160px;
  padding: 10px 16px 12px;
}

.admin-body .usage-export-popover .usage-filter-summary {
  gap: 8px;
  padding: 12px 16px 10px;
}

.admin-body .usage-export-popover .department-filter-option {
  min-height: 36px;
  padding: 7px 10px;
}

@media (max-width: 640px) {
  .admin-body .usage-export-popover {
    top: calc(100% + 8px);
    right: auto;
    left: -44px;
    transform: none;
    width: min(340px, calc(100vw - 48px));
  }

  .admin-body .usage-export-period-group {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .admin-body .usage-export-popover .usage-department-tree {
    max-height: 120px;
    padding-left: 12px;
    padding-right: 12px;
  }
}

.admin-body .member-list {
  gap: 7px;
  margin-bottom: 14px;
}

.admin-body .member-pill {
  min-height: 34px;
  border-radius: 10px;
  background: #fbfbf8;
}

.admin-body .member-pill.active {
  border-color: #111;
  background: #111;
  color: #fff;
}

.admin-body .provider-cards {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 10px;
}

.admin-body .provider-card,
.admin-body .chart-panel,
.admin-body .table-wrap,
.admin-body .link-item {
  border-color: #deded6;
  border-radius: 14px;
  box-shadow: none;
}

.admin-body .provider-card {
  padding: 14px;
  background: #fbfbf8;
  transition: border-color 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
}

.admin-body .provider-card:hover {
  transform: translateY(-1px);
  background: #fff;
}

.admin-body .card-head h4 {
  font-size: 17px;
  font-weight: 720;
}

.admin-body .status {
  border-color: #d9eadf;
  background: #eef8f2;
}

.admin-body .meta-grid {
  border-color: #e3e3dc;
  border-radius: 11px;
  background: #fff;
}

.admin-body .meta {
  border-color: #e3e3dc;
}

.admin-body .progress {
  height: 6px;
  background: #e9e9e1;
}

.admin-body .progress i {
  background: #111;
}

.admin-body .card-actions {
  grid-template-columns: 1fr 38px 38px;
}

.admin-body .chart-row {
  position: relative;
  z-index: 6;
  gap: 10px;
}

.admin-body .chart-panel {
  position: relative;
  z-index: 6;
  background: #fbfbf8;
  padding: 14px;
  overflow: visible;
  animation: panelIn 0.28s ease both;
}

.admin-body .chart-title {
  color: #4b4b45;
}

.admin-body .bar-track {
  background: #e9e9e1;
}

.admin-body .table-wrap {
  background: #fff;
  animation: panelIn 0.28s ease both;
}

.admin-body th {
  background: #f7f7f4;
}

.admin-body td,
.admin-body th {
  padding: 12px;
}

.admin-body .link-item {
  background: #fbfbf8;
}

.admin-body .export-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-body.models-mode .admin-command,
.admin-body.models-mode .metrics-grid,
.admin-body.models-mode .period-tabs {
  display: none;
}

.admin-body.models-mode .control-row {
  grid-template-columns: minmax(0, 1fr);
}

.model-marketplace {
  --model-accent: #d97706;
  padding-bottom: 48px;
}

.model-marketplace-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  align-items: end;
  gap: 32px;
  padding: 24px 0 22px;
  border-bottom: 1px solid #dcdcd4;
}

.model-marketplace-kicker {
  margin-bottom: 8px;
  color: var(--model-accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
}

.model-marketplace-head h2 {
  color: #111;
  font-size: 32px;
  line-height: 1.08;
  font-weight: 740;
  letter-spacing: 0;
}

.model-marketplace-head > div > p:last-child {
  margin-top: 8px;
  color: #6b6b64;
  font-size: 13px;
}

.model-marketplace-search {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-height: 44px;
  margin: 0;
  border-bottom: 1px solid #a9a99f;
  color: #5f5f58;
}

.model-marketplace-search:focus-within {
  border-color: #111;
  color: #111;
}

.model-marketplace-search svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
}

.model-marketplace-search input {
  width: 100%;
  height: 43px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
  color: #111;
  font-size: 14px;
}

.model-marketplace-search input:focus {
  box-shadow: none;
}

.model-marketplace-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 22px;
  min-height: 52px;
  border-bottom: 1px solid #e3e3dc;
  color: #686861;
  font-size: 12px;
}

.model-marketplace-summary span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.model-marketplace-summary b {
  color: #111;
  font-size: 14px;
  font-weight: 760;
}

.model-sync-state {
  color: #26724d;
  font-weight: 720;
}

.model-sync-state i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2d9664;
}

.model-sync-state.is-stale {
  color: #a15c08;
}

.model-sync-state.is-stale i {
  background: #d97706;
}

.model-vendor-groups {
  display: grid;
  gap: 34px;
  padding-top: 28px;
}

.model-vendor-section {
  min-width: 0;
}

.model-vendor-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.model-vendor-head h3 {
  color: #151515;
  font-size: 17px;
  line-height: 1.2;
  font-weight: 740;
}

.model-vendor-head span:not(.model-vendor-logo) {
  display: block;
  margin-top: 3px;
  color: #77776f;
  font-size: 11px;
}

.model-vendor-logo {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border: 1px solid #deded6;
  border-radius: 7px;
  background: #fff;
  overflow: hidden;
}

.model-vendor-logo.large {
  width: 38px;
  height: 38px;
  border-radius: 8px;
}

.model-vendor-logo img {
  width: 70%;
  height: 70%;
  object-fit: contain;
}

.model-vendor-logo.fallback {
  background: #171717;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
}

.model-catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 8px;
}

.model-catalog-card {
  display: grid;
  grid-template-rows: auto minmax(38px, auto) auto;
  min-width: 0;
  min-height: 132px;
  border: 1px solid #deded6;
  border-radius: 8px;
  background: #fbfbf8;
  padding: 13px;
  transition: border-color 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
}

.model-catalog-card:hover {
  transform: translateY(-1px);
  border-color: #bdbdb3;
  background: #fff;
}

.model-catalog-card-head {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
}

.model-catalog-card-head strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #111;
  font-family: "SFMono-Regular", "Cascadia Mono", Consolas, monospace;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 700;
}

.model-catalog-card > p {
  display: -webkit-box;
  margin: 10px 0;
  overflow: hidden;
  color: #66665f;
  font-size: 11px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.model-catalog-card > p.model-catalog-description-muted {
  color: #94948b;
}

.model-catalog-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  align-self: end;
}

.model-catalog-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border: 1px solid #e0e0d8;
  border-radius: 5px;
  background: #fff;
  padding: 0 7px;
  color: #55554e;
  font-size: 9px;
  font-weight: 720;
}

.model-catalog-meta span:first-child {
  border-color: #ead7bd;
  background: #fff8ed;
  color: #96540a;
}

.model-marketplace-empty {
  display: grid;
  place-items: center;
  min-height: 240px;
  border-bottom: 1px solid #e0e0d8;
  padding: 28px;
  color: #77776f;
  text-align: center;
}

.model-marketplace-empty strong,
.model-marketplace-empty span {
  display: block;
}

.model-marketplace-empty strong {
  color: #232320;
  font-size: 15px;
}

.model-marketplace-empty span {
  margin-top: 6px;
  font-size: 12px;
}

@media (max-width: 980px) {
  .admin-body .app-shell {
    grid-template-columns: 1fr;
  }

  .admin-body .sidebar {
    top: 18px;
    left: 16px;
  }

  .admin-body .workspace {
    padding: 82px 16px 32px;
  }

  .admin-body .topbar,
  .admin-body .command-row,
  .admin-body .control-row,
  .admin-body .metrics-grid,
  .admin-body .tabs,
  .admin-body .view,
  .admin-body .empty-state {
    max-width: none;
  }

  .admin-body .admin-command,
  .admin-body .control-row,
  .admin-body .metrics-grid,
  .admin-body .chart-row,
  .admin-body .provider-cards {
    grid-template-columns: 1fr;
  }

  .admin-body .tabs {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    overflow-x: hidden;
  }

  .admin-body .tab {
    gap: 4px;
    min-width: 0;
  }

  .admin-body .tab span {
    font-size: 12px;
  }

  .model-marketplace-head {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }

  .admin-body .tool-menu-button {
    top: 16px;
    right: 16px;
  }

  .tool-overlay {
    padding: 70px 16px 16px;
  }

  .tool-modal {
    width: calc(100vw - 32px);
  }
}

@media (max-width: 640px) {
  .model-marketplace-head {
    padding-top: 14px;
  }

  .model-marketplace-head h2 {
    font-size: 27px;
  }

  .model-marketplace-summary {
    gap: 8px 14px;
    padding: 10px 0;
  }

  .model-catalog-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .model-vendor-groups {
    gap: 28px;
  }
}

.portal-body {
  min-height: 100vh;
  background: #fbfbf8;
}

.portal-shell {
  width: min(880px, calc(100% - 32px));
  min-height: 100svh;
  margin: 0 auto;
  padding: 22px 0 48px;
  position: relative;
  display: grid;
  place-items: center;
}

.portal-top {
  position: absolute;
  top: 22px;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0;
}

.portal-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #111;
  text-decoration: none;
  font-size: 13px;
  font-weight: 650;
}

.portal-brand img {
  width: 26px;
  height: 26px;
}

.portal-center {
  width: 100%;
  transform: translateY(-18px);
}

.portal-hero {
  width: 100%;
  text-align: center;
  margin: 0 0 20px;
  transform: none;
}

.portal-hero h1 {
  max-width: 640px;
  margin: 7px auto 22px;
  color: #111;
  font-size: 38px;
  line-height: 1.12;
  font-weight: 650;
}

.portal-command {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 58px;
  align-items: center;
  gap: 10px;
  max-width: 680px;
  min-height: 62px;
  margin: 0 auto;
  padding: 0 6px 0 17px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.06);
}

.portal-command svg,
.portal-open svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.portal-command input {
  height: 58px;
  border: 0;
  padding: 0;
  background: transparent;
  font-size: 18px;
}

.portal-command input:focus {
  box-shadow: none;
}

.portal-command .command-button {
  min-height: 50px;
  border-radius: 12px;
}

.portal-command .command-button.icon-only {
  width: 58px;
  padding: 0;
}

.portal-command .command-button.icon-only svg {
  width: 19px;
  height: 19px;
}

.portal-state {
  min-height: 74px;
  margin-top: 0;
}

.portal-empty {
  max-width: 560px;
  margin: 0 auto;
  padding: 18px;
  text-align: center;
  color: var(--muted-foreground);
}

.portal-empty h2 {
  margin-bottom: 6px;
  color: #111;
  font-size: 17px;
  font-weight: 650;
}

.portal-empty .ghost-button {
  margin-top: 14px;
}

.portal-hint {
  margin: 18px 0 12px;
  color: var(--muted-foreground);
  text-align: center;
  font-size: 13px;
}

.portal-results {
  display: grid;
  gap: 12px;
  max-width: 680px;
  margin: 0 auto;
}

.portal-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.portal-card.active {
  border-color: rgba(16, 163, 127, 0.38);
  box-shadow: 0 0 0 3px rgba(16, 163, 127, 0.12);
}

.portal-card-main {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 0;
  background: transparent;
  padding: 18px;
  color: #111;
  text-align: left;
}

.portal-card-main strong,
.portal-card-main small {
  display: block;
}

.portal-card-main strong {
  font-size: 17px;
  font-weight: 650;
}

.portal-card-main small {
  margin-top: 3px;
  color: var(--muted-foreground);
}

.portal-apps {
  display: inline-flex;
  gap: 7px;
  align-items: center;
}

.portal-card-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: #fbfbf8;
}

.portal-card-meta span {
  min-width: 0;
  padding: 11px 14px;
  border-right: 1px solid var(--border);
  color: #2a2a26;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-card-meta span:last-child {
  border-right: 0;
}

.portal-open {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  border: 0;
  background: #111;
  color: #fff;
  font-weight: 650;
}

.portal-open:hover {
  background: #252525;
}

@media (max-width: 720px) {
  .portal-shell {
    width: min(100% - 24px, 880px);
    padding-top: 16px;
  }

  .portal-top {
    top: 16px;
  }

  .portal-hero h1 {
    font-size: 30px;
  }

  .portal-command {
    grid-template-columns: 20px minmax(0, 1fr);
    padding: 0 13px;
  }

  .portal-command .command-button {
    grid-column: 1 / -1;
    margin: 0 0 8px;
  }

  .portal-card-meta {
    grid-template-columns: 1fr;
  }

  .portal-card-meta span {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .portal-card-meta span:last-child {
    border-bottom: 0;
  }
}

.binding-control { display: grid; gap: 10px; }
.binding-control select { width: 100%; min-height: 40px; padding: 0 10px; border: 1px solid var(--border); background: var(--background); color: var(--foreground); }
.binding-provider-list { display: grid; gap: 6px; max-height: 260px; overflow: auto; }
.binding-provider-list label { display: grid; grid-template-columns: 18px 24px 1fr; align-items: center; gap: 8px; padding: 8px; border: 1px solid var(--border); cursor: pointer; }
.binding-provider-list label:hover { background: var(--muted); }
.binding-provider-list label.is-suggested { border-color: #8db9aa; background: #edf5f1; }
.binding-provider-list label > span:last-child { display: grid; min-width: 0; }
.binding-provider-list strong, .binding-provider-list small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.binding-provider-list strong { font-size: 12px; }
.binding-provider-list small { margin-top: 2px; color: var(--muted-foreground); font-size: 10px; }

.guide-body {
  min-height: 100vh;
  background: #f7f7f4;
  color: #111;
}

.guide-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 30px 0 52px;
}

.guided-shell {
  min-height: 100svh;
  display: block;
}

.guide-hero {
  display: grid;
  gap: 24px;
  min-height: 44svh;
  align-content: center;
  padding: 34px 0 26px;
}

.guided-hero {
  min-height: auto;
  grid-template-columns: minmax(0, 1fr);
  padding: 22px 0 20px;
}

.guide-brand {
  display: none;
  align-items: center;
  gap: 10px;
  width: fit-content;
  color: #111;
  font-size: 13px;
  font-weight: 650;
}

.guide-brand img {
  width: 30px;
  height: 30px;
}

.guide-hero-copy {
  max-width: 760px;
}

.guide-hero-copy h1 {
  font-size: clamp(40px, 6vw, 76px);
  line-height: 0.98;
  font-weight: 650;
}

.hero-product-rotator {
  display: inline-block;
  height: 1.08em;
  min-width: 4.9em;
  overflow: hidden;
  vertical-align: -0.09em;
}

.hero-product-track {
  display: grid;
  animation: heroProductSlide 4.8s cubic-bezier(0.76, 0, 0.24, 1) infinite;
}

.hero-product-item {
  display: inline-flex;
  align-items: center;
  gap: 0.16em;
  height: 1.08em;
  white-space: nowrap;
}

.hero-product-logo {
  width: 0.66em;
  height: 0.66em;
  object-fit: contain;
  flex: 0 0 auto;
  transform: translateY(0.08em);
}

.hero-product-wordmark {
  display: block;
  width: auto;
  height: 0.71em;
  object-fit: contain;
  transform: translateY(0.09em);
}

.hero-product-wordmark.codex {
  height: 0.69em;
}

@keyframes heroProductSlide {
  0%,
  39% {
    transform: translateY(0);
  }
  50%,
  89% {
    transform: translateY(-1.08em);
  }
  100% {
    transform: translateY(0);
  }
}

.guided-hero .guide-hero-copy h1 {
  max-width: 940px;
  font-size: clamp(34px, 4.4vw, 62px);
  line-height: 0.98;
  font-weight: 650;
  white-space: nowrap;
}

.guide-progress {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  width: min(620px, 100%);
  margin-top: 4px;
  border: 1px solid #d5d5cb;
  border-radius: 14px;
  background: #e9e9e1;
  padding: 4px;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.64);
}

.guide-progress::before {
  content: "";
  position: absolute;
  inset: 4px auto 4px 4px;
  z-index: 2;
  width: calc((100% - 8px) / 4);
  border-radius: 10px;
  background: #111;
  transform: translateX(calc(var(--stage-index, 0) * 100%));
  transition: transform 0.22s cubic-bezier(0.76, 0, 0.24, 1);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.16);
}

.guide-progress::after {
  content: "";
  position: absolute;
  inset: 4px calc(4px + var(--stage-tail, 75%)) 4px 4px;
  z-index: 1;
  border-radius: 10px;
  background: #fff;
  transition: right 0.22s cubic-bezier(0.76, 0, 0.24, 1);
  pointer-events: none;
}

.guide-progress button {
  position: relative;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #30302b;
  font-size: 13px;
  font-weight: 650;
}

.guide-progress button.active {
  color: #fff;
}

.guide-progress button.done {
  color: #075b35;
}

.guide-progress button.done::before {
  content: "\2713";
  display: grid;
  place-items: center;
  width: 15px;
  height: 15px;
  border-radius: 999px;
  background: rgba(8, 116, 67, 0.1);
  color: #087443;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

.guide-command {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 54px;
  align-items: center;
  gap: 10px;
  max-width: 720px;
  min-height: 64px;
  padding: 0 6px 0 18px;
  border: 1px solid #dfdfd7;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.06);
}

.guide-command svg,
.guide-download svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.guide-command input {
  height: 60px;
  border: 0;
  padding: 0;
  background: transparent;
  font-size: 18px;
}

.guide-command input:focus {
  box-shadow: none;
}

.guide-command button,
.guide-ghost,
.guide-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 10px;
  min-height: 40px;
  font-size: 13px;
  font-weight: 650;
}

.guide-command button {
  width: 54px;
  min-height: 52px;
  background: #111;
  color: #fff;
}

.guide-flow {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 16px;
  margin-top: 20px;
}

.guide-panel {
  display: none;
  animation: guideFade 0.22s ease both;
}

.guide-panel.active {
  display: block;
}

@keyframes guideFade {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes panelIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes listItemIn {
  from {
    opacity: 0;
    transform: translateX(6px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes chartGrowX {
  from {
    transform: scaleX(0.72);
    opacity: 0.58;
  }
  to {
    transform: scaleX(1);
    opacity: 1;
  }
}

@keyframes chartGrowY {
  from {
    transform: scaleY(0.72);
    opacity: 0.58;
  }
  to {
    transform: scaleY(1);
    opacity: 1;
  }
}

@keyframes chartPop {
  from {
    opacity: 0.72;
    transform: scale(0.98);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

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

.guide-picker,
.guide-workspace,
.guide-result {
  border: 1px solid #e1e1d9;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.guide-stage-head {
  margin-bottom: 14px;
}

.guide-stage-head h2 {
  margin-top: 8px;
  font-size: 28px;
  font-weight: 650;
}

.guide-picker {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 10px;
}

.guided-picker {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.guide-product {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 72px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  padding: 12px;
  text-align: left;
}

.guided-picker .guide-product {
  min-height: 156px;
  align-items: flex-start;
  flex-direction: column;
  justify-content: space-between;
  border-color: #e1e1d9;
  background: #fff;
  padding: 18px;
}

.guided-picker .guide-product[data-product="codex"] {
  border-color: rgba(16, 163, 127, 0.28);
  box-shadow: inset 0 0 0 1px rgba(16, 163, 127, 0.08);
}

.guide-product.active {
  border-color: #d6d6ce;
  background: #f8f8f4;
}

.guided-picker .guide-product.active {
  border-color: rgba(16, 163, 127, 0.38);
  box-shadow: 0 0 0 3px rgba(16, 163, 127, 0.12);
}

.guided-picker .guide-product[data-product="codex"].active {
  background: #f3fbf8;
  border-color: rgba(16, 163, 127, 0.52);
  box-shadow:
    0 0 0 3px rgba(16, 163, 127, 0.14),
    0 16px 34px rgba(8, 116, 67, 0.08);
}

.guide-product img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.guide-duo-icons {
  display: inline-flex;
  align-items: center;
  width: 44px;
  min-width: 44px;
}

.guide-duo-icons img {
  width: 30px;
  height: 30px;
}

.guide-duo-icons img + img {
  margin-left: -16px;
}

.guide-product strong,
.guide-product small {
  display: block;
}

.guide-product strong {
  font-size: 15px;
}

.guided-picker .guide-product strong {
  font-size: 18px;
}

.guide-priority {
  display: inline-flex;
  align-items: center;
  height: 20px;
  margin-left: 7px;
  border-radius: 999px;
  background: #111;
  color: #fff;
  padding: 0 7px;
  font-size: 11px;
  font-style: normal;
  font-weight: 650;
  vertical-align: 2px;
  white-space: nowrap;
}

.guide-product small {
  margin-top: 3px;
  color: #6b6b64;
}

.guide-workspace,
.guide-result {
  padding: 18px;
}

.guided-workspace,
.guided-result,
.guide-finish {
  padding: 22px;
  border: 1px solid #e1e1d9;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.guided-result .guide-command {
  max-width: none;
  margin-top: 18px;
}

.guided-result {
  width: min(680px, 100%);
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.guide-toolbar,
.guide-section-head,
.guide-card-main,
.guide-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.guide-os-switcher {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: fit-content;
  border: 1px solid #e1e1d9;
  border-radius: 12px;
  background: #f7f7f4;
  padding: 4px;
}

.guide-os-switcher button {
  min-height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #6b6b64;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 650;
}

.guide-os-switcher button.active {
  background: #111;
  color: #fff;
}

.guide-tag {
  display: inline-flex;
  align-items: center;
  height: 24px;
  border-radius: 999px;
  background: #f1f1ec;
  color: #111;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 650;
}

.guide-toolbar h2,
.guide-section-head h2 {
  margin-top: 7px;
  font-size: 24px;
  font-weight: 650;
}

.guide-feishu-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.feishu-mark {
  width: 22px;
  height: 22px;
  object-fit: contain;
  transform: translateY(1px);
}

.guide-downloads {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.guide-download {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 76px;
  border: 1px solid #e1e1d9;
  border-radius: 12px;
  background: #fff;
  color: #171813;
  text-decoration: none;
  font-weight: 650;
  padding: 14px;
  transition:
    border-color 0.16s ease,
    background 0.16s ease,
    color 0.16s ease,
    transform 0.16s ease,
    box-shadow 0.16s ease;
}

.download-main {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.guide-download:hover {
  transform: translateY(-1px);
  background: #fff;
  box-shadow: 0 14px 34px rgba(21, 23, 18, 0.07);
}

.download-logo {
  width: 34px;
  height: 34px;
  object-fit: contain;
  flex: 0 0 auto;
}

.download-logo.fallback {
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #f1f1ec;
  color: #111;
}

.download-logo.fallback svg,
.download-action svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.download-action {
  justify-self: end;
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid #e4e4dc;
  border-radius: 10px;
  background: #fbfbf8;
  color: #6b6b64;
  padding: 7px;
  transition:
    background 0.16s ease,
    color 0.16s ease,
    border-color 0.16s ease;
}

.download-action svg {
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  transform: none;
}

.download-buttons {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  padding-left: 10px;
  border-left: 1px solid #ecece5;
}

.download-check {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid #deded6;
  border-radius: 10px;
  background: #fff;
  color: #9a9a91;
  padding: 7px;
  cursor: pointer;
  transition:
    background 0.16s ease,
    border-color 0.16s ease,
    color 0.16s ease,
    transform 0.16s ease;
}

.download-check svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.download-check:hover {
  transform: translateY(-1px);
  border-color: #111;
  color: #111;
}

.guide-download.installed {
  border-color: #cfd9cf;
  background: #fdfdf9;
}

.guide-download.installed .download-check {
  border-color: #bfd7c6;
  background: #eef8f0;
  color: #087443;
}

.guide-download.needs-install {
  border-color: #d9cfc2;
  background: #fffdf8;
}

.guide-download.shake {
  animation: downloadNeedShake 0.46s ease;
}

@keyframes downloadNeedShake {
  0%,
  100% {
    transform: translateX(0);
  }
  18% {
    transform: translateX(-4px);
  }
  36% {
    transform: translateX(4px);
  }
  54% {
    transform: translateX(-3px);
  }
  72% {
    transform: translateX(3px);
  }
}

.install-reminder {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  border: 1px solid #e2dfd2;
  border-radius: 12px;
  background: #fbfaf4;
  color: #171813;
  padding: 12px 14px;
}

.install-reminder-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  background: #fff;
  color: #8b5e00;
  flex: 0 0 auto;
}

.install-reminder-icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.install-reminder strong,
.install-reminder small {
  display: block;
}

.install-reminder strong {
  font-size: 13px;
}

.install-reminder small {
  margin-top: 2px;
  color: #6b6b64;
  font-size: 12px;
  font-weight: 600;
}

.install-reminder.complete {
  border-color: #d8e2d7;
  background: #fbfdf9;
}

.install-reminder.complete .install-reminder-icon {
  color: #087443;
  background: #eef8f0;
}

.guide-download:hover .download-action {
  border-color: #111;
  background: #111;
  color: #fff;
}

.download-action.official-link {
  background: #fff;
  color: #363630;
}

.download-action.download-link {
  background: #111;
  border-color: #111;
  color: #fff;
}

.guide-download:hover .download-action.official-link {
  background: #f1f1ec;
  border-color: #d4d4ca;
  color: #111;
}

.guide-download:hover .download-action.download-link {
  background: #000;
  color: #fff;
}

.guide-download strong,
.guide-download small {
  display: block;
}

.guide-download strong {
  color: #111;
  font-size: 14px;
}

.guide-download small {
  margin-top: 3px;
  color: #6b6b64;
  font-size: 12px;
  font-weight: 600;
}

.guide-primary:hover,
.guide-command button:hover {
  background: #262626;
}

.guide-steps {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.guide-step {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 136px;
  align-items: center;
  gap: 12px;
  min-height: 74px;
  border-top: 1px solid #ecece5;
  padding-top: 10px;
}

.guide-step span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 999px;
  background: #f1f1ec;
  color: #111;
  font-size: 13px;
  font-weight: 700;
}

.guide-step strong {
  display: block;
  color: #111;
  font-size: 14px;
  font-weight: 650;
}

.guide-step p,
.guide-state p {
  color: #4d4d47;
}

.guide-step p {
  margin-top: 3px;
}

.guide-step-tag {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  margin-top: 10px;
  padding: 8px 12px;
  border: 1px solid #ffba68;
  border-radius: 999px;
  background: #fff3e3;
  color: #d33a00;
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.25;
}

.guide-step-media {
  display: grid;
  min-height: 56px;
  place-items: center;
  border: 1px solid #e4e4dc;
  border-radius: 10px;
  background: #fbfbf8;
  color: #6b6b64;
  font-size: 12px;
  font-weight: 650;
}

.guide-step-media img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.guide-step-duo {
  display: inline-flex;
  align-items: center;
}

.guide-step-duo img + img {
  margin-left: -12px;
}

.guide-step-media svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.guide-result {
  margin-top: 16px;
}

.guide-ghost {
  border-color: #deded6;
  background: #fff;
  color: #111;
  padding: 0 13px;
}

.guide-state {
  min-height: 38px;
  margin-top: 14px;
}

.guide-results {
  display: grid;
  gap: 10px;
}

.guide-card {
  display: flex;
  flex-direction: column;
  border: 1px solid #e2e2da;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}

.guide-card.active {
  border-color: rgba(16, 163, 127, 0.36);
  box-shadow: 0 0 0 3px rgba(16, 163, 127, 0.12);
}

.guide-card-main {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 16px;
  color: #111;
  text-align: left;
}

.guide-card-main strong,
.guide-card-main small {
  display: block;
}

.guide-card-main small {
  margin-top: 3px;
  color: #6b6b64;
}

.guide-app {
  border-radius: 999px;
  background: #f1f1ec;
  color: #111;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 650;
}

.guide-card-actions {
  padding: 10px;
  flex-wrap: wrap;
}

.guide-card.prominent .guide-card-actions {
  order: 2;
  padding: 0 16px 16px;
}

.guide-card-details {
  display: grid;
  gap: 0;
  border-top: 1px solid #e7e7df;
  border-bottom: 1px solid #e7e7df;
  background: #fff;
}

.guide-detail-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  border-top: 1px solid #f0f0e9;
  padding: 7px 10px 7px 14px;
}

.guide-detail-row:first-child {
  border-top: 0;
}

.guide-detail-row > span {
  color: #6b6b64;
  font-size: 12px;
  font-weight: 700;
}

.guide-detail-row code {
  min-width: 0;
  color: #171813;
  font-family: "SFMono-Regular", "Cascadia Mono", Consolas, monospace;
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  white-space: normal;
}

.guide-copy-btn {
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid #e4e4dc;
  border-radius: 9px;
  background: #fbfbf8;
  color: #6b6b64;
  cursor: pointer;
  transition:
    background 0.16s ease,
    border-color 0.16s ease,
    color 0.16s ease,
    transform 0.16s ease;
}

.guide-copy-btn:hover {
  transform: translateY(-1px);
  border-color: #111;
  background: #111;
  color: #fff;
}

.guide-copy-btn svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.guide-primary {
  flex: 1;
  min-width: 150px;
  background: #111;
  color: #fff;
  padding: 0 14px;
}

.guide-import-button {
  gap: 8px;
}

.guide-import-button.large {
  min-height: 54px;
  border-radius: 12px;
  font-size: 15px;
}

.guide-import-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex: 0 0 auto;
}

.guide-import-icon.fallback {
  display: inline-grid;
  place-items: center;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.guide-primary:disabled,
.guide-ghost:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.guide-finish {
  position: relative;
  min-height: 360px;
  display: grid;
  place-content: center;
  text-align: center;
  overflow: hidden;
  isolation: isolate;
  padding-block: 52px;
}

.guide-finish::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(circle at 50% 30%, rgba(17, 17, 17, 0.055), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.74), transparent 58%);
  opacity: 0;
  transform: scale(0.98);
  pointer-events: none;
}

.guide-finish > * {
  position: relative;
  z-index: 1;
}

.guide-finish.release-glow::before {
  animation: finishPanelBreath 2.7s cubic-bezier(0.18, 0.86, 0.22, 1) both;
}

.guide-finish.release-glow h2,
.guide-finish.release-glow p,
.guide-finish.release-glow .finish-tools {
  animation: finishContentLift 1.15s cubic-bezier(0.18, 0.86, 0.22, 1) both;
}

.guide-finish.release-glow p {
  animation-delay: 0.08s;
}

.guide-finish.release-glow .finish-tools {
  animation-delay: 0.14s;
}

.guide-finish.release-glow .tutorial-card {
  animation: finishCardReveal 1.35s cubic-bezier(0.18, 0.86, 0.22, 1) 0.34s both;
}

.guide-finish.release-glow .tutorial-card:nth-child(2) {
  animation-delay: 0.52s;
}

.guide-finish.release-glow .tutorial-card::before {
  animation: tutorialCardSheen 1.8s cubic-bezier(0.18, 0.86, 0.22, 1) 0.56s both;
}

.guide-finish.release-glow .tutorial-card:nth-child(2)::before {
  animation-delay: 0.74s;
}

.guide-finish h2 {
  max-width: 760px;
  margin-top: 12px;
  font-size: 32px;
  line-height: 1.12;
  font-weight: 650;
}

.finish-check {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 999px;
  background: #eaf8ef;
  color: #087443;
  font-size: 18px;
  font-weight: 800;
  vertical-align: 0.08em;
}

.guide-finish p {
  max-width: 520px;
  margin: 14px auto 0;
  color: #5f5f58;
  font-size: 16px;
}

.finish-tools {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}

.finish-tools span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  border: 1px solid #deded6;
  border-radius: 10px;
  background: #fff;
  padding: 0 12px;
  color: #111;
  font-size: 13px;
  font-weight: 650;
}

.finish-tools .guide-import-icon.fallback {
  background: #f1f1ec;
  color: #111;
}

.tutorial-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 300px));
  justify-content: center;
  gap: 16px;
  margin-top: 24px;
}

.tutorial-card {
  display: grid;
  gap: 8px;
  position: relative;
  overflow: hidden;
  border: 1px solid #deded6;
  border-radius: 16px;
  background: #fff;
  padding: 10px 10px 14px;
  color: #111;
  text-decoration: none;
  text-align: left;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.06);
  transition:
    border-color 0.16s ease,
    transform 0.16s ease;
}

.tutorial-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(110deg, transparent 24%, rgba(255, 255, 255, 0.72) 48%, transparent 68%);
  opacity: 0;
  transform: translateX(-76%);
  pointer-events: none;
}

.tutorial-card > * {
  position: relative;
  z-index: 2;
}

.tutorial-card:hover {
  border-color: #c9c9bf;
  transform: translateY(-1px);
}

.tutorial-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  object-fit: cover;
  background: #f1f1ec;
}

.tutorial-card span {
  width: fit-content;
  border-radius: 999px;
  background: #f1f1ec;
  color: #3f3f39;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
}

.tutorial-card strong {
  font-size: 17px;
  font-weight: 700;
}

.tutorial-card small {
  color: #6b6b64;
  font-size: 13px;
  line-height: 1.35;
}

.finish-retry {
  width: fit-content;
  min-width: 180px;
  margin: 18px auto 0;
}

.finish-retry[hidden] {
  display: none;
}

.finish-ambient {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.finish-ambient i {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--c);
  opacity: 0;
  box-shadow: 0 0 16px rgba(17, 17, 17, 0.12);
  transform: translateY(10px) scale(0.7);
  animation: finishAmbientDot 1.75s cubic-bezier(0.18, 0.86, 0.22, 1) var(--d) forwards;
}

@keyframes finishPanelBreath {
  0% {
    opacity: 0;
    transform: scale(0.99);
  }
  38% {
    opacity: 1;
    transform: scale(1);
  }
  78% {
    opacity: 0.56;
  }
  100% {
    opacity: 0;
    transform: scale(1.01);
  }
}

@keyframes finishContentLift {
  0% {
    opacity: 0.82;
    transform: translateY(8px) scale(0.985);
  }
  45% {
    opacity: 1;
    transform: translateY(-2px) scale(1.012);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes finishCardReveal {
  0% {
    opacity: 0;
    transform: translateY(18px) scale(0.972);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.04);
  }
  56% {
    opacity: 1;
    transform: translateY(-4px) scale(1.012);
    box-shadow: 0 26px 56px rgba(17, 17, 17, 0.08);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes tutorialCardSheen {
  0% {
    opacity: 0;
    transform: translateX(-76%);
  }
  22% {
    opacity: 0.86;
  }
  100% {
    opacity: 0;
    transform: translateX(76%);
  }
}

@keyframes finishAmbientDot {
  0% {
    opacity: 0;
    transform: translateY(10px) scale(0.7);
  }
  34% {
    opacity: 0.86;
    transform: translateY(-4px) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-20px) scale(0.88);
  }
}

@media (prefers-reduced-motion: reduce) {
  .confetti-layer {
    display: none;
  }
}

.guide-nav {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  width: 100%;
  margin-top: 16px;
  padding-right: 0;
}

.guide-nav .guide-ghost,
.guide-nav .guide-primary {
  flex: 0 0 auto;
  min-width: 112px;
}

@media (max-width: 860px) {
  .guide-shell {
    width: min(100% - 24px, 1120px);
    padding-top: 18px;
  }

  .guide-hero {
    min-height: auto;
    padding-top: 20px;
  }

  .guided-hero .guide-hero-copy h1 {
    white-space: normal;
  }

  .guide-flow,
  .guide-downloads,
  .guided-picker,
  .guide-progress {
    grid-template-columns: 1fr;
  }

  .guided-picker .guide-product {
    min-height: 118px;
  }

  .guide-step {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .guide-step-media {
    grid-column: 2;
  }

  .guide-command {
    grid-template-columns: 20px minmax(0, 1fr) 48px;
  }

  .guide-nav {
    padding-right: 0;
  }

  .guide-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .guide-os-switcher {
    width: fit-content;
  }

  .guide-os-switcher button {
    flex: 0 0 auto;
  }
}

.admin-body .compact-head {
  margin-top: 14px;
  margin-bottom: 8px;
}

.admin-body #insightsView .section-head {
  margin-bottom: 12px;
}

.admin-body .insight-overview,
.admin-body .insight-workspace {
  margin-bottom: 12px;
}

.admin-body .insight-kpi-row,
.admin-body .issue-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.66);
}

.admin-body .insight-overview-grid {
  grid-template-columns: 1fr 1fr 1.45fr 1fr 1fr;
}

.admin-body .insight-kpi-row span,
.admin-body .issue-summary span {
  min-width: 0;
  padding: 11px 12px;
  border-right: 1px solid rgba(17, 17, 17, 0.07);
}

.admin-body .insight-kpi-row span:last-child,
.admin-body .issue-summary span:last-child {
  border-right: 0;
}

.admin-body .insight-kpi-row b,
.admin-body .issue-summary b {
  display: block;
  margin-bottom: 4px;
  color: rgba(17, 17, 17, 0.5);
  font-size: 11px;
  font-weight: 650;
}

.admin-body .insight-kpi-row strong,
.admin-body .issue-summary strong {
  color: #111;
  font-size: 18px;
  font-weight: 740;
  white-space: nowrap;
}

.admin-body .insight-kpi-row em {
  display: block;
  overflow: hidden;
  margin-top: 3px;
  color: rgba(17, 17, 17, 0.44);
  font-size: 11px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-body .insight-kpi-row .has-issue strong,
.admin-body .issue-summary .has-issue strong {
  color: var(--destructive);
}

.admin-body .insight-workspace {
  padding: 12px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.5);
}

.admin-body .insight-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.admin-body .insight-panel-head h4 {
  margin: 0;
  color: #111;
  font-size: 15px;
  font-weight: 740;
}

.admin-body .insight-panel-head p,
.admin-body .insight-panel-head > span {
  margin: 2px 0 0;
  color: rgba(17, 17, 17, 0.52);
  font-size: 12px;
}

.admin-body .insight-split {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.9fr);
  gap: 12px;
  align-items: start;
}

.admin-body .insight-panel-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.52fr) minmax(300px, 0.82fr);
  gap: 12px;
  align-items: stretch;
}

.admin-body .insight-panel-main,
.admin-body .insight-side-panel {
  min-width: 0;
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.64);
}

.admin-body .insight-panel-main {
  overflow: hidden;
}

.admin-body .insight-side-panel {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 12px;
}

.admin-body .insight-subhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(17, 17, 17, 0.07);
}

.admin-body .insight-side-panel .insight-subhead {
  padding: 0 0 10px;
}

.admin-body .insight-subhead strong {
  min-width: 0;
  overflow: hidden;
  color: #111;
  font-size: 13px;
  font-weight: 740;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-body .insight-subhead span {
  flex: 0 0 auto;
  color: rgba(17, 17, 17, 0.48);
  font-size: 12px;
  white-space: nowrap;
}

.admin-body .insight-portal-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.7fr) minmax(0, 1fr);
  gap: 12px;
}

.admin-body .issue-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 10px;
}

.admin-body .insight-issue-summary {
  margin-bottom: 12px;
}

.admin-body #insightsView .chart-panel {
  margin-bottom: 12px;
  padding: 12px 14px;
  border-radius: 8px;
  box-shadow: none;
}

.admin-body #insightsView .table-wrap {
  box-shadow: none;
}

.admin-body .insight-grid {
  display: block;
  margin-bottom: 12px;
}

.admin-body .insight-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 12px 30px rgba(17, 17, 17, 0.04);
}

.admin-body .insight-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.admin-body .insight-card-head strong {
  min-width: 0;
  overflow: hidden;
  color: #151515;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-body .insight-card-head span {
  flex: 0 0 auto;
  color: rgba(17, 17, 17, 0.48);
  font-size: 12px;
}

.admin-body .insight-mini {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  color: rgba(17, 17, 17, 0.56);
  font-size: 12px;
}

.admin-body .insight-card .usage-card-stats {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-body .insight-card .usage-card-stats div {
  padding: 10px 11px;
}

.admin-body .insight-card .usage-card-stats strong {
  font-size: 17px;
  white-space: nowrap;
}

.admin-body .dense-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  overflow: hidden;
  margin-bottom: 10px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
}

.admin-body .dense-summary span {
  min-width: 0;
  padding: 10px 12px;
  border-right: 1px solid rgba(17, 17, 17, 0.07);
}

.admin-body .dense-summary span:last-child {
  border-right: 0;
}

.admin-body .dense-summary b {
  display: block;
  margin-bottom: 3px;
  color: rgba(17, 17, 17, 0.48);
  font-size: 11px;
  font-weight: 650;
}

.admin-body .dense-summary strong {
  color: #111;
  font-size: 18px;
  font-weight: 720;
  white-space: nowrap;
}

.admin-body .dense-summary .has-issue strong {
  color: #111;
}

.admin-body .dense-table,
.admin-body #keyStatusTable {
  overflow: hidden;
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.64);
}

.admin-body #keyStatusTable {
  max-height: 360px;
  overflow: auto;
}

.admin-body .dense-table table,
.admin-body #keyStatusTable table {
  width: 100%;
  border-collapse: collapse;
}

.admin-body .dense-table th,
.admin-body .dense-table td,
.admin-body #keyStatusTable th,
.admin-body #keyStatusTable td {
  height: 38px;
  padding: 7px 12px;
  border-bottom: 1px solid rgba(17, 17, 17, 0.07);
  font-size: 12px;
  white-space: nowrap;
}

.admin-body #keyStatusTable th,
.admin-body #keyStatusTable td {
  height: 34px;
}

.admin-body #keyStatusTable input[type="checkbox"] {
  width: 14px;
  height: 14px;
  margin: 0;
  vertical-align: middle;
}

.admin-body #keyStatusTable td:first-child,
.admin-body #keyStatusTable th:first-child {
  width: 42px;
  text-align: center;
}

.admin-body .dense-table th,
.admin-body #keyStatusTable th {
  color: rgba(17, 17, 17, 0.5);
  font-weight: 650;
}

.admin-body .dense-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.admin-body .dense-head strong {
  color: #111;
  font-size: 14px;
  font-weight: 720;
}

.admin-body .dense-head span {
  color: rgba(17, 17, 17, 0.5);
  font-size: 12px;
}

.admin-body .dense-issues {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 0;
}

.admin-body .dense-issues section {
  min-width: 0;
  min-height: 0;
  padding: 8px 10px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.6);
}

.admin-body .dense-issues section > strong {
  display: block;
  margin-bottom: 6px;
  color: #111;
  font-size: 12px;
}

.admin-body .insight-rank-list {
  display: grid;
}

.admin-body .insight-rank-item {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 11px 14px;
  border-bottom: 1px solid rgba(17, 17, 17, 0.07);
}

.admin-body .insight-rank-item:last-child {
  border-bottom: 0;
}

.admin-body .insight-rank-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.admin-body .insight-rank-top > span {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
  color: #111;
  font-size: 13px;
  font-weight: 680;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-body .insight-rank-top .rank-name {
  white-space: normal;
}

.admin-body .insight-rank-top b {
  display: inline-grid;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 7px;
  background: rgba(17, 17, 17, 0.08);
  color: rgba(17, 17, 17, 0.68);
  font-size: 11px;
  font-weight: 760;
}

.admin-body .insight-rank-top strong {
  color: #111;
  font-size: 13px;
  font-weight: 760;
  white-space: nowrap;
}

.admin-body .insight-rank-bar {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.08);
}

.admin-body .insight-rank-bar i {
  display: block;
  width: var(--w);
  height: 100%;
  border-radius: inherit;
  background: #111;
}

.admin-body .insight-rank-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}

.admin-body .insight-rank-meta span {
  min-width: 0;
  overflow: hidden;
  color: rgba(17, 17, 17, 0.56);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-body .insight-health-list {
  display: grid;
  gap: 9px;
}

.admin-body .insight-health-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(92px, 1.05fr) minmax(54px, auto);
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.admin-body .insight-health-row > span {
  min-width: 0;
  overflow: hidden;
  color: rgba(17, 17, 17, 0.62);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-body .department-crumbs {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  vertical-align: middle;
}

.admin-body .department-crumbs span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-body .department-crumbs .parent {
  flex: 0 1 auto;
  max-width: 9em;
  color: rgba(17, 17, 17, 0.38);
  font-weight: 520;
}

.admin-body .department-crumbs .parent::after {
  content: "/";
  margin: 0 5px;
  color: rgba(17, 17, 17, 0.24);
}

.admin-body .department-crumbs .leaf {
  flex: 0 1 auto;
  color: #111;
  font-weight: 740;
}

.admin-body .insight-health-row i {
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, #111 0 var(--w), rgba(17, 17, 17, 0.08) var(--w) 100%);
}

.admin-body .insight-health-row b {
  color: #111;
  font-size: 12px;
  font-weight: 720;
  text-align: right;
  white-space: nowrap;
}

.admin-body .insight-note-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 2px;
  padding-top: 10px;
  border-top: 1px solid rgba(17, 17, 17, 0.07);
}

.admin-body .insight-note-row span {
  color: rgba(17, 17, 17, 0.5);
  font-size: 12px;
}

.admin-body .insight-note-row strong {
  color: #111;
  font-size: 13px;
}

.admin-body .key-layout {
  grid-template-columns: minmax(0, 1.42fr) minmax(280px, 0.78fr);
}

.admin-body .key-layout #keyStatusTable {
  border: 0;
  border-radius: 0;
  background: transparent;
}

.admin-body .portal-layout {
  grid-template-columns: minmax(0, 1.28fr) minmax(280px, 0.82fr);
}

.admin-body .insight-timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(24px, 1fr));
  align-items: end;
  gap: 8px;
  height: 246px;
  padding: 14px 12px 30px;
  border-bottom: 1px solid rgba(17, 17, 17, 0.08);
}

.admin-body .insight-timeline-item {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-width: 0;
  height: 100%;
}

.admin-body .insight-timeline-item i {
  display: block;
  width: 100%;
  min-height: 6px;
  height: var(--h);
  border-radius: 7px 7px 2px 2px;
  background: #111;
}

.admin-body .insight-timeline-item span {
  position: absolute;
  right: 50%;
  bottom: -22px;
  max-width: 64px;
  overflow: hidden;
  color: rgba(17, 17, 17, 0.52);
  font-size: 10px;
  text-overflow: ellipsis;
  transform: translateX(50%);
  white-space: nowrap;
}

.admin-body .insight-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.admin-body .insight-strip span {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.admin-body .insight-strip b {
  display: block;
  margin-bottom: 4px;
  color: rgba(17, 17, 17, 0.48);
  font-size: 12px;
  font-weight: 600;
}

.admin-body .insight-strip strong {
  color: #111;
  font-size: 20px;
  font-weight: 700;
}

.admin-body .mini-bars {
  display: grid;
  gap: 10px;
}

.admin-body .mini-bars.compact {
  gap: 7px;
}

.admin-body .mini-bars div {
  display: grid;
  grid-template-columns: minmax(86px, 160px) 1fr minmax(54px, auto);
  align-items: center;
  gap: 10px;
  color: rgba(17, 17, 17, 0.62);
  font-size: 12px;
}

.admin-body .mini-bars.model-cost-bars div {
  grid-template-columns: minmax(86px, 150px) 1fr minmax(62px, auto) minmax(58px, auto);
}

.admin-body .mini-bars.compact div {
  grid-template-columns: minmax(80px, 140px) 1fr minmax(54px, auto);
}

.admin-body .mini-bars span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-body .mini-bars i {
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, #111 0 var(--w), rgba(17, 17, 17, 0.08) var(--w) 100%);
}

.admin-body .mini-bars b {
  color: #111;
  font-weight: 650;
  text-align: right;
}

.admin-body .mini-bars strong {
  color: rgba(17, 17, 17, 0.55);
  font-size: 12px;
  font-weight: 650;
  text-align: right;
  white-space: nowrap;
}

.admin-body .diagnostic-list {
  display: grid;
  gap: 6px;
}

.admin-body .diagnostic-list p {
  display: grid;
  grid-template-columns: minmax(70px, 0.8fr) minmax(0, 1.6fr);
  gap: 8px;
  margin: 0;
  color: rgba(17, 17, 17, 0.58);
  font-size: 12px;
  line-height: 1.35;
}

.admin-body .diagnostic-list b,
.admin-body .diagnostic-list span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-body .diagnostic-list b {
  color: #111;
  font-weight: 650;
}

.admin-body .diagnostic-list .department-crumbs {
  display: inline-flex;
}

.admin-body .diagnostic-list .department-crumbs span {
  display: inline-block;
}

.admin-body .batch-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.admin-body .batch-actions span {
  color: rgba(17, 17, 17, 0.52);
  font-size: 12px;
}

.admin-body .text-button {
  width: auto;
  min-width: 54px;
  padding: 0 10px;
  color: #111;
  font-size: 12px;
}

.admin-body .status-badge {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.08);
  color: #111;
  font-size: 11px;
  font-weight: 650;
}

.admin-body .status-badge.watch {
  background: rgba(231, 166, 40, 0.16);
  color: #7a4a00;
}

.admin-body .status-badge.disabled,
.admin-body .status-badge.archived {
  background: rgba(17, 17, 17, 0.12);
  color: rgba(17, 17, 17, 0.5);
}

.admin-body .detail-overlay {
  position: fixed;
  inset: 0;
  box-sizing: border-box;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(17, 17, 17, 0.16);
}

.admin-body .detail-overlay[hidden] {
  display: none;
}

.admin-body .precheck-modal,
.admin-body .person-drawer {
  width: min(100%, 980px);
  max-height: min(760px, calc(100vh - 44px));
  overflow: hidden;
  border: 1px solid rgba(17, 17, 17, 0.1);
  border-radius: 10px;
  background: rgba(250, 250, 248, 0.94);
  box-shadow: 0 28px 80px rgba(17, 17, 17, 0.18);
}

.admin-body .precheck-modal {
  box-sizing: border-box;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 10px;
  width: min(1080px, calc(100vw - 48px));
  height: min(650px, calc(90.9vh - 44px));
  max-height: calc(90.9vh - 44px);
  padding: 18px;
}

@supports (height: 100dvh) {
  .admin-body .precheck-modal {
    height: min(650px, calc(90.9dvh - 44px));
    max-height: calc(90.9dvh - 44px);
  }
}

.admin-body .precheck-modal .tool-modal-head {
  margin: 0;
}

.admin-body .precheck-modal .insight-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.admin-body .precheck-modal .insight-strip span {
  padding: 10px 12px;
}

.admin-body .precheck-modal .insight-strip b {
  margin-bottom: 2px;
}

.admin-body .precheck-modal .insight-strip strong {
  font-size: 18px;
}

.admin-body .person-drawer {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  justify-self: center;
  width: min(1120px, calc(100vw - 40px));
  max-height: min(740px, calc(100svh - 32px));
}

.admin-body .person-drawer .tool-modal-head {
  align-items: flex-start;
  margin: 0;
  padding: 18px 20px 4px;
}

.admin-body .person-drawer-name {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.admin-body .person-drawer .tool-modal-head h2 {
  margin: 0;
  color: #111;
  font-size: 26px;
  font-weight: 780;
  line-height: 1.08;
}

.admin-body .person-drawer .tool-modal-head p {
  margin: 0;
  color: rgba(17, 17, 17, 0.42);
  font-size: 13px;
  font-weight: 720;
  letter-spacing: 0;
  line-height: 1.2;
  white-space: nowrap;
}

.admin-body .usage-filter-summary {
  display: grid;
  gap: 6px;
  padding: 10px;
  border-bottom: 1px solid rgba(17, 17, 17, 0.07);
}

.admin-body .usage-filter-crumbs {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.admin-body .usage-filter-crumbs::-webkit-scrollbar {
  display: none;
}

.admin-body .usage-filter-crumbs button {
  flex: 0 0 auto;
  max-width: none;
  overflow: visible;
  border: 0;
  background: transparent;
  color: rgba(17, 17, 17, 0.54);
  font-size: 12px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-body .usage-filter-crumbs button:not(:last-child)::after {
  content: "/";
  margin-left: 4px;
  color: rgba(17, 17, 17, 0.28);
}

.admin-body .usage-filter-current {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.admin-body .usage-filter-current::-webkit-scrollbar {
  display: none;
}

.admin-body .usage-filter-current button {
  flex: 0 0 auto;
  height: 26px;
  max-width: 260px;
  overflow: hidden;
  padding: 0 9px;
  border: 1px solid rgba(17, 17, 17, 0.1);
  border-radius: 7px;
  background: #fff;
  color: #111;
  font-size: 12px;
  font-weight: 700;
}

.admin-body .usage-filter-current button.active {
  border-color: #111;
  background: #111;
  color: #fff;
}

.admin-body .usage-filter-current span {
  min-width: 0;
  overflow: hidden;
  color: rgba(17, 17, 17, 0.48);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-body .usage-department-tree {
  display: grid;
  gap: 4px;
  max-height: 286px;
  overflow: auto;
  padding: 8px 10px 10px;
}

.admin-body .department-filter-option {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 6px 9px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 253, 0.78);
  color: #111;
  text-align: left;
  transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.admin-body .department-filter-option.root {
  grid-template-columns: minmax(0, 1fr) auto;
  padding-left: 10px;
}

.admin-body .department-filter-option:hover {
  transform: none;
  border-color: rgba(17, 17, 17, 0.18);
  background: #fff;
}

.admin-body .department-filter-option.active {
  border-color: #111;
  background: #111;
  color: #fff;
}

.admin-body .department-filter-option span,
.admin-body .department-filter-option b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 700;
}

.admin-body .department-filter-option span {
  display: block;
  min-width: 0;
}

.admin-body .department-filter-option b {
  min-width: max-content;
}

.admin-body .department-filter-option small {
  display: block;
  grid-column: auto;
  overflow: hidden;
  color: rgba(17, 17, 17, 0.36);
  font-size: 16px;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-body .department-filter-option.active small {
  color: rgba(255, 255, 255, 0.58);
}

.admin-body .precheck-table,
.admin-body .drawer-table {
  max-height: 100%;
  overflow: auto;
}

.admin-body .precheck-table {
  align-self: stretch;
  min-height: 0;
  height: 100%;
  margin: 0;
  border-radius: 8px;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.admin-body .precheck-table table {
  min-width: 760px;
}

.admin-body .precheck-table::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.admin-body .precheck-table::-webkit-scrollbar-thumb {
  border: 3px solid #fff;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.24);
}

.admin-body .drawer-body {
  display: grid;
  min-height: 0;
  max-height: none;
  overflow: hidden;
  padding: 6px 20px 18px;
}

.admin-body .drawer-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 0;
}

.admin-body .precheck-modal .drawer-actions {
  min-height: 40px;
  padding-top: 4px;
}

.admin-body .drawer-panel {
  margin: 0;
}

.admin-body .drawer-profile {
  box-shadow: none;
}

.admin-body .person-detail-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.86fr) minmax(0, 1.14fr);
  gap: 14px;
  align-items: stretch;
  min-height: 0;
}

.admin-body .person-detail-board,
.admin-body .person-detail-data {
  display: grid;
  gap: 12px;
  min-width: 0;
  min-height: 0;
  align-content: start;
}

.admin-body .person-detail-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.admin-body .person-detail-kpis span,
.admin-body .person-detail-card {
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
}

.admin-body .person-detail-card,
.admin-body .person-detail-kpis span {
  box-shadow: none;
}

.admin-body .person-detail-kpis span {
  min-width: 0;
  padding: 12px 14px;
}

.admin-body .person-detail-kpis b {
  display: block;
  margin-bottom: 4px;
  color: rgba(17, 17, 17, 0.5);
  font-size: 11px;
}

.admin-body .person-detail-kpis strong {
  color: #111;
  font-size: 19px;
  font-weight: 740;
}

.admin-body .person-profile {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
}

.admin-body .person-profile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.admin-body .person-profile-head span {
  min-width: 0;
  overflow: hidden;
  color: rgba(17, 17, 17, 0.56);
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-body .person-profile .status {
  flex: 0 0 auto;
}

.admin-body .person-connection-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.admin-body .person-connection-item {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 26px;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid rgba(17, 17, 17, 0.06);
  border-radius: 8px;
  background: rgba(250, 250, 248, 0.72);
}

.admin-body .person-connection-item b {
  color: rgba(17, 17, 17, 0.52);
  font-size: 12px;
  font-weight: 700;
}

.admin-body .person-connection-item span {
  min-width: 0;
  overflow: hidden;
  color: #111;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-body .person-connection-item .copy-key-button {
  opacity: 1;
  transform: none;
}

.admin-body .person-detail-section {
  padding: 14px 16px;
}

.admin-body .person-detail-data {
  grid-template-rows: auto minmax(0, 1fr);
  align-content: stretch;
  padding: 14px 16px;
  overflow: hidden;
}

.admin-body .person-detail-data .drawer-table {
  min-height: 0;
  width: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  border-radius: 8px;
  box-shadow: none;
}

.admin-body .person-detail-data .table-wrap {
  margin: 0;
}

.admin-body .person-detail-data table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.admin-body .person-detail-data table th,
.admin-body .person-detail-data table td {
  height: 42px;
  padding: 7px 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

.admin-body .person-detail-data table th:nth-child(1),
.admin-body .person-detail-data table td:nth-child(1) {
  width: 118px;
}

.admin-body .person-detail-data table th:nth-child(2),
.admin-body .person-detail-data table td:nth-child(2) {
  width: 148px;
}

.admin-body .person-detail-data table th:nth-child(3),
.admin-body .person-detail-data table td:nth-child(3),
.admin-body .person-detail-data table th:nth-child(4),
.admin-body .person-detail-data table td:nth-child(4) {
  width: 88px;
  text-align: right;
}

.admin-body .person-detail-data .model-tag {
  max-width: 128px;
}

.admin-body .warn-row td {
  background: rgba(224, 88, 52, 0.06);
}

.admin-body tr[data-person-key] {
  cursor: pointer;
}

.admin-body tr[data-person-key]:hover td {
  background: rgba(17, 17, 17, 0.035);
}

@media (max-width: 980px) {
  .admin-body .insight-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-body .insight-panel-grid,
  .admin-body .key-layout,
  .admin-body .portal-layout {
    grid-template-columns: 1fr;
  }

  .admin-body .insight-grid,
  .admin-body .insight-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-body .person-detail-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .admin-body .insight-grid,
  .admin-body .insight-strip,
  .admin-body .insight-rank-meta,
  .admin-body .mini-bars div,
  .admin-body .diagnostic-list p {
    grid-template-columns: 1fr;
  }

  .admin-body .insight-kpi-row,
  .admin-body .issue-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-body .insight-overview-grid .wide {
    grid-column: 1 / -1;
  }

  .admin-body .insight-kpi-row span:nth-child(2n),
  .admin-body .issue-summary span:nth-child(2n) {
    border-right: 0;
  }

  .admin-body .insight-health-row {
    grid-template-columns: minmax(0, 1fr) minmax(54px, auto);
  }

  .admin-body .insight-health-row i {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .admin-body .bar-line .chart-tooltip {
    left: 50%;
    width: min(320px, calc(100vw - 48px));
    min-width: 0;
    max-width: calc(100vw - 48px);
    transform: translate(-50%, -50%);
  }

  .admin-body .bar-line:hover .chart-tooltip {
    transform: translate(-50%, -50%);
  }

  .admin-body .chart-tooltip-floating {
    left: 50%;
    transform: translate(-50%, -50%);
  }

  .admin-body .chart-tooltip-floating.is-visible {
    transform: translate(-50%, -50%);
  }

  .admin-body #keyStatusTable {
    max-width: 100%;
    overflow-x: auto;
    contain: paint;
  }

  .admin-body #keyStatusTable table {
    min-width: 720px;
  }

  .admin-body .person-drawer {
    width: calc(100vw - 24px);
  }

  .admin-body .drawer-body {
    padding: 14px;
  }

  .admin-body .person-detail-kpis {
    grid-template-columns: 1fr;
  }
}
/* Feishu identity */
.auth-account {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.auth-account-sidebar {
  margin-top: auto;
  padding: 14px 12px;
  border-top: 1px solid var(--border);
}

.admin-body .auth-account-sidebar {
  position: fixed;
  top: 20px;
  right: 74px;
  z-index: 24;
  margin: 0;
  padding: 3px 0;
  border: 0;
}

.auth-account-guide {
  position: absolute;
  top: 0;
  right: 0;
}

.auth-avatar,
.member-avatar {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--border) 78%, #111 22%);
  border-radius: 50%;
  background: #e7f0ed;
  color: #17483d;
  font-size: 12px;
  font-weight: 750;
}

.auth-avatar img,
.member-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.member-avatar-small {
  width: 22px;
  height: 22px;
  font-size: 9px;
}

.auth-user-copy {
  display: grid;
  min-width: 0;
  line-height: 1.2;
}

.auth-user-copy strong,
.auth-user-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-user-copy strong { font-size: 13px; }
.auth-user-copy small { margin-top: 3px; color: var(--muted-foreground); font-size: 11px; }

.auth-logout {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-left: auto;
  border: 0;
  background: transparent;
  color: var(--muted-foreground);
  cursor: pointer;
}

.auth-logout:hover { color: var(--foreground); background: var(--muted); }
.auth-logout svg { width: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; }

.person-heading,
.usage-person-cell,
.chart-person-label {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.person-heading > span:last-child { min-width: 0; }
.usage-person-cell { white-space: nowrap; }
.chart-person-label { gap: 6px; }
.tooltip-person .member-avatar { margin-right: 5px; }

.login-body {
  min-height: 100vh;
  margin: 0;
  display: grid;
  place-items: center;
  background: #f2f4f1;
  color: #161816;
}

.login-shell {
  width: min(420px, calc(100vw - 32px));
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  font-size: 13px;
}

.login-brand > span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  background: #111;
  color: #fff;
  font-weight: 800;
}

.login-panel {
  padding: 34px;
  border: 1px solid #d9ddd7;
  background: #fff;
  box-shadow: 0 18px 50px rgba(22, 32, 25, .08);
}

.login-panel > p {
  margin: 0 0 8px;
  color: #66706a;
  font-size: 12px;
}

.login-panel h1 {
  margin: 0 0 28px;
  font-size: 28px;
  letter-spacing: 0;
}

#feishu-login {
  display: grid;
  grid-template-columns: 34px 1fr 18px;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 14px;
  background: #111;
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
}

#feishu-login:hover { background: #24594d; }
#feishu-login svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.feishu-mark { display: grid; place-items: center; width: 30px; height: 30px; background: #3370ff; color: #fff; }

@media (max-width: 720px) {
  .auth-account-guide { position: static; margin-top: 14px; }
  .admin-body .auth-account-sidebar { top: 18px; right: 68px; padding: 2px 0; }
  .auth-user-copy { display: none; }
  .login-panel { padding: 26px 22px; }
}
