:root {
  color-scheme: light;
  --bg: #f8f9fb;
  --panel: #ffffff;
  --text: #242831;
  --muted: #717782;
  --line: #e8eaee;
  --accent: #c75c35;
  --accent-soft: #fbf0ea;
  --sidebar-width: 220px;
}

* { box-sizing: border-box; }
html { scroll-padding-top: 28px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans CJK SC", "PingFang SC", "Microsoft YaHei", sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button, a, label { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible { outline: 3px solid #ba5939; outline-offset: 4px; }
h1, h2, h3, p, dl, dd { margin: 0; }
.icon { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.icon-definitions { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 16px; top: -80px; z-index: 10; padding: 12px 18px; background: var(--text); color: white; border-radius: 8px; }
.skip-link:focus { top: 12px; }

.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 2; width: var(--sidebar-width); padding: 32px 18px 22px; display: flex; flex-direction: column; background: var(--panel); border-right: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 10px; font-size: 24px; font-weight: 750; letter-spacing: -.8px; line-height: 1.2; }
.brand-mark { display: block; width: 39px; height: 39px; flex-shrink: 0; object-fit: contain; }
.brand-caption { display: block; padding-top: 5px; color: var(--muted); font-size: 10px; font-weight: 400; letter-spacing: .1px; }
.workspace-label { display: flex; align-items: center; gap: 9px; margin: 30px 5px 28px; padding: 10px 12px; background: #f8f9fa; border: 1px solid var(--line); border-radius: 8px; color: #59606c; font-size: 12px; }
.workspace-dot { width: 6px; height: 6px; flex-shrink: 0; display: inline-block; background: #858b97; border-radius: 50%; }
.nav-heading { margin: 0 14px 10px; color: #848a94; font-size: 11px; }
.nav-heading-secondary { margin-top: 30px; }
.nav-link { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 10px 13px; margin-bottom: 5px; border-radius: 8px; color: #626974; font-size: 13px; transition: background .15s, color .15s; }
.nav-link .icon { width: 18px; height: 18px; }
.nav-link:hover { background: #f6f7f9; color: var(--text); }
.nav-link.active { background: var(--accent-soft); color: #ad4d2c; font-weight: 600; }
.sidebar-footer { display: flex; gap: 11px; align-items: center; border-top: 1px solid var(--line); margin: auto 10px 0; padding-top: 21px; color: var(--muted); }
.footer-mark { font-size: 16px; color: #b4b8c0; letter-spacing: -1px; }
.sidebar-footer p { font-size: 11px; }
.sidebar-footer small { display: block; font-size: 9px; margin-top: 3px; color: #828892; }

.workspace { margin-left: var(--sidebar-width); }
.topbar { height: 72px; padding: 0 40px; display: flex; justify-content: space-between; align-items: center; gap: 20px; border-bottom: 1px solid var(--line); background: var(--panel); }
.breadcrumb { display: flex; align-items: center; gap: 15px; color: var(--muted); font-size: 12px; }
.breadcrumb-divider { color: #c4c8ce; }
.breadcrumb strong { color: #4d5460; font-weight: 500; }
.workspace-badge { display: flex; align-items: center; gap: 8px; color: #737a85; font-size: 11px; }
main { max-width: 1480px; margin: 0 auto; padding: 40px 40px 24px; }
.hero { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.eyebrow { color: #8a7370; font-size: 10px; font-weight: 600; letter-spacing: 1.8px; margin-bottom: 8px; }
h1 { font-size: 30px; font-weight: 650; line-height: 1.5; letter-spacing: -.8px; }
.subtitle { margin-top: 8px; color: var(--muted); font-size: 13px; }
.hero-actions { display: flex; gap: 10px; flex-shrink: 0; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; border: 1px solid transparent; border-radius: 8px; padding: 9px 15px; font-size: 12px; font-weight: 500; transition: background .15s, border-color .15s; }
.button .icon { width: 16px; height: 16px; }
.button-secondary { background: var(--panel); color: #535b66; border-color: #dfe2e7; box-shadow: 0 1px 2px #1b243005; }
.button-secondary:hover { background: #f0f2f5; border-color: #c7ccd5; }
.button-primary { background: var(--text); color: white; border-color: var(--text); box-shadow: 0 2px 3px #1b243015; }
.button-primary:hover { background: #404550; }

.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 30px 0 36px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); box-shadow: 0 2px 3px #1b243003; }
.metric { padding: 20px 24px; position: relative; }
.metric + .metric::before { content: ""; position: absolute; width: 1px; background: var(--line); top: 22px; bottom: 22px; left: 0; }
.metric-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #5f6672; font-size: 12px; }
.metric-heading .icon { width: 17px; height: 17px; color: #8d95a1; }
.metric-heading .metric-green { color: #5d957f; }
.metric-heading .metric-amber { color: #bd9864; }
.metric p { display: flex; align-items: baseline; gap: 8px; margin-top: 10px; }
.metric strong { font-size: 32px; line-height: 1.4; letter-spacing: -1px; font-weight: 600; font-variant-numeric: tabular-nums; }
.metric p > span { font-size: 11px; color: #8b9099; }
.metric small { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 11px; margin-top: 5px; }
.status-dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; }
.status-dot.available { background: #54836e; }

.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.section-title { display: flex; align-items: center; gap: 9px; }
h2 { font-size: 17px; font-weight: 600; letter-spacing: -.2px; }
.count-badge { display: inline-grid; place-content: center; min-width: 24px; height: 23px; border: 1px solid #e4e7ec; border-radius: 6px; color: #69707c; background: #f0f2f5; font-size: 11px; font-variant-numeric: tabular-nums; }
.section-note { color: #858b95; font-size: 11px; }
.resource-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin: 18px 0 20px; }
.filter-group { display: flex; padding: 4px; margin: 0; min-width: 0; border: 1px solid #e6e8ed; border-radius: 9px; background: #f0f2f5; gap: 2px; }
.filter-option { position: relative; cursor: pointer; }
.filter-option input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.filter-option > span { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 32px; padding: 6px 12px; border: 1px solid transparent; border-radius: 6px; color: #6c7480; font-size: 12px; transition: background .15s; }
.filter-option b { font-size: 10px; font-weight: 500; color: #838b98; }
.filter-option input:checked + span { background: var(--panel); border-color: #e2e5e9; color: var(--text); box-shadow: 0 1px 3px #1b243009; font-weight: 600; }
.filter-option input:checked + span b { color: var(--accent); }
.filter-option input:hover + span { color: var(--text); }
.filter-option input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.data-mode { display: flex; align-items: center; gap: 6px; color: #828893; font-size: 11px; }
.data-mode .icon { width: 14px; height: 14px; }

.resource-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.resource-message { padding: 16px; margin: 0 0 16px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: var(--panel); }
.resource-message.error { border-color: #e7c1c1; color: #9b4545; background: #fff7f7; }
.resource-card { --tint: #f6f7f9; --icon-color: #63768d; min-width: 0; padding: 22px 22px 0; display: flex; flex-direction: column; border: 1px solid #e4e7ec; border-radius: 13px; background: var(--panel); box-shadow: 0 2px 4px #202b3c03; transition: border-color .18s, box-shadow .18s, transform .18s; }
.resource-card:hover { border-color: #c7cdd5; box-shadow: 0 8px 20px #202b3c08; transform: translateY(-2px); }
.resource-card[data-kind="api"] { --tint: #fdf1e9; --icon-color: #bd7753; }
.resource-card[data-kind="subscription"] { --tint: #f0eefb; --icon-color: #8071b3; }
.resource-card[data-kind="gpu"] { --tint: #eaf2fa; --icon-color: #5e81ac; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.resource-icon { display: grid; place-content: center; width: 42px; height: 42px; border-radius: 11px; color: var(--icon-color); background: var(--tint); }
.resource-icon .icon { width: 23px; height: 23px; }
.status { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 5px; font-size: 10px; white-space: nowrap; }
.status::before { content: ""; display: block; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.status.available { color: #39765a; background: #eef7f1; }
.status.request { color: #936c2d; background: #fcf6e9; }
.status.maintenance { color: #986827; background: #fcf3e6; }
.status.unavailable { color: #ad4b4b; background: #fceeee; }
.status.unknown { color: #68717d; background: #f1f3f5; }
.resource-heading { margin-top: 17px; }
.kind { color: #8c919b; font-size: 9px; font-weight: 600; letter-spacing: 1.2px; }
h3 { font-size: 17px; font-weight: 600; letter-spacing: -.25px; line-height: 1.5; margin-top: 3px; }
.description { margin: 8px 0 18px; color: #7a808b; font-size: 12px; line-height: 1.9; min-height: 46px; overflow-wrap: anywhere; }
.quota { margin-top: auto; padding: 12px 14px; border: 1px solid #eef0f3; border-radius: 8px; background: #fafbfc; }
.quota dt { font-size: 10px; color: #7d8490; }
.total { margin-top: 4px; font-size: 18px; font-weight: 550; letter-spacing: -.3px; line-height: 1.65; overflow-wrap: anywhere; }
.resource-details { display: grid; gap: 8px; margin: 15px 0 20px; }
.resource-details div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 11px; }
.resource-details dt { flex-shrink: 0; color: #7a818d; }
.resource-details dd { text-align: right; color: #666e7b; overflow-wrap: anywhere; }
.card-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 66px; border-top: 1px solid var(--line); }
.owner-info { display: flex; align-items: center; gap: 8px; min-width: 0; }
.avatar { display: grid; place-content: center; flex-shrink: 0; width: 28px; height: 28px; border: 1px solid #e9e5e1; border-radius: 50%; color: #8a7464; background: #f4efeb; font-size: 9px; font-weight: 600; }
.owner-label { display: block; color: #858b96; font-size: 9px; line-height: 1.4; }
.owner { font-size: 11px; color: #59616e; }
.application-link { display: flex; align-items: center; gap: 5px; min-height: 40px; color: #66707c; font-size: 11px; border-radius: 4px; white-space: nowrap; }
.application-link .icon { width: 14px; height: 14px; transition: transform .15s; }
.application-link:hover { color: var(--accent); }
.application-link:hover .icon { transform: translate(1px, -1px); }
.page-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 20px; padding-top: 23px; color: #818894; font-size: 10px; }
.noscript { padding: 20px; border: 1px solid var(--line); border-radius: 10px; }
.radar-hero { margin-bottom: 30px; }
.radar-types { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-bottom: 38px; }
.radar-type, .report-card, .empty-state { display: block; padding: 22px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.radar-type:hover, .report-card:hover { border-color: #c7cdd5; box-shadow: 0 8px 20px #202b3c08; }
.radar-type p, .report-card p { margin-top: 8px; color: var(--muted); }
.report-section h2 { margin-bottom: 16px; }
.report-list { display: grid; gap: 12px; }
.report-card h2 { margin-top: 4px; }
.report-card h2 a:hover, .report-detail a:hover { color: var(--accent); }
.report-meta { color: var(--muted); font-size: 12px; }
.empty-state { color: var(--muted); }
.report-detail { max-width: 860px; }
.report-detail section { margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--line); }
.report-detail section p + p { margin-top: 12px; }
.report-detail ul { margin: 14px 0 0; padding-left: 22px; }
.report-detail li + li { margin-top: 10px; }
.report-detail a { color: #9c482b; text-decoration: underline; text-underline-offset: 3px; }
.account-actions { display: flex; align-items: center; gap: 10px; }
.account-actions form { margin: 0; }
.login-panel { width: min(440px, calc(100% - 32px)); margin: 8vh auto; padding: 30px; border: 1px solid var(--line); border-radius: 13px; background: var(--panel); }
.login-panel h1 { margin-top: 28px; font-size: 24px; }
.login-form { display: grid; gap: 10px; margin-top: 24px; }
.login-form input:not([type="hidden"]) { min-width: 0; width: 100%; padding: 10px 12px; border: 1px solid #c7ccd5; border-radius: 6px; }
.login-form input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.login-form button { margin-top: 10px; }
.form-error { margin-top: 16px; color: #ad4b4b; overflow-wrap: anywhere; }

@media (min-width: 1600px) {
  main { padding-top: 48px; }
  .resource-card { padding: 26px 26px 0; }
}

@media (max-width: 1250px) {
  :root { --sidebar-width: 195px; }
  .topbar { padding: 0 28px; }
  main { padding: 32px 28px 24px; }
  .metric { padding: 18px; }
  .resource-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .radar-types { grid-template-columns: 1fr; }
  .sidebar { padding-inline: 14px; }
}

@media (max-width: 950px) {
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric:nth-child(3)::before { display: none; }
  .metric:nth-child(n+3) { border-top: 1px solid var(--line); }
  .hero { align-items: flex-start; flex-direction: column; gap: 18px; }
  .section-note { display: none; }
}

@media (max-width: 760px) {
  .sidebar { position: static; width: auto; padding: 15px 20px; border-right: 0; border-bottom: 1px solid var(--line); flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; }
  .brand { padding: 0; font-size: 22px; }
  .brand-mark { width: 34px; height: 34px; }
  .brand-caption { font-size: 9px; }
  .sidebar nav { display: flex; align-items: center; gap: 4px; }
  .sidebar .workspace-label, .nav-heading, .sidebar-footer, .sidebar nav > a:last-child { display: none; }
  .nav-link { min-height: 40px; margin: 0; padding: 8px 10px; font-size: 12px; }
  .nav-link .icon { display: none; }
  .workspace { margin: 0; }
  .topbar { height: 52px; padding: 0 20px; background: transparent; }
  main { padding: 28px 20px 24px; }
  .hero { flex-direction: row; align-items: center; }
  h1 { font-size: 26px; }
  .subtitle { max-width: 260px; font-size: 12px; }
  .hero-actions { flex-direction: column-reverse; gap: 8px; }
  .metrics { margin: 26px 0 30px; }
  .resource-grid { gap: 14px; }
  .resource-card { padding: 19px 18px 0; }
  .page-footer { line-height: 1.9; }
}

@media (max-width: 540px) {
  .account-actions .workspace-badge { display: none; }
  .account-actions { gap: 6px; }
  .account-actions .button { padding: 6px 8px; min-height: 34px; }
  .resource-grid { grid-template-columns: minmax(0, 1fr); }
  .resource-card { padding: 22px 22px 0; }
  .description { min-height: 0; }
  .data-mode { font-size: 10px; }
  .resource-toolbar { gap: 10px; }
  .filter-group { width: 100%; }
  .filter-option { flex: 1; }
  .filter-option > span { gap: 5px; padding: 6px; font-size: 11px; }
  .workspace-badge { font-size: 9px; }
  .breadcrumb { gap: 9px; font-size: 10px; }
  .metric { padding: 17px 18px; }
  .metric small { font-size: 10px; }
}

@media (max-width: 360px) {
  .sidebar, .topbar { padding-inline: 16px; }
  main { padding-inline: 16px; }
  .brand-caption { display: none; }
  .hero { flex-direction: column; align-items: flex-start; }
  .hero-actions { flex-direction: row; }
  .metric { padding: 14px; }
  .metric-heading { gap: 6px; }
  .resource-card { padding-inline: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
  .resource-card:hover, .application-link:hover .icon { transform: none; }
}
